# packages

pkgId: e626c6269dbe2a4727a5ae489770ad489f0cce876f5050bed1d97f408e064fa1
name: python-cmislib
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Apache Chemistry CMIS client library for Python
url: http://chemistry.apache.org/
rpm_license: Apache License (2.0)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmislib-0.7.0-1.src.rpm
checksum_type: sha256
description:
  ABOUT

  Thanks for using cmislib, the CMIS client library for Python.

  The goal of this library is to provide an interoperable API to CMIS
  repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
  EMC Documentum, and any other content repository that is CMIS-compliant.

  More info on CMIS can be found at:
  http://www.oasis-open.org/committees/cmis

  SOURCE

  The source code for this project lives at http://chemistry.apache.org/

  TESTS

  There are unit tests available in the tests directory. They require access
  to a CMIS provider. There are many freely-available CMIS repositories
  available to run locally or that are hosted.

  DOC

  Documentation that tells you what this is all about can be found in the doc
  directory. Please see the doc for dependencies, required CMIS version level,
  required Python version, etc.


pkgId: 783a6283be9a4c114b7571513175046ba87db771d45ea4fe54df6c488cf74dad
name: python-cmislib-maykin
arch: src
version: 0.7.4
epoch: 0
release: 1
summary: Apache Chemistry CMIS client library for Python
url: http://chemistry.apache.org/
rpm_license: Apache License (2.0)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmislib-maykin-0.7.4-1.src.rpm
checksum_type: sha256
description:
  Thanks for using cmislib, the CMIS client library for Python.
  The goal of this library is to provide an interoperable API to CMIS
  repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
  EMC Documentum, and any other content repository that is CMIS-compliant.
  More info on CMIS can be found at:
  http://www.oasis-open.org/committees/cmis
  This is a fork from https://github.com/apache/chemistry-cmislib and update to work with
  Python 2.7 and 3.5.


pkgId: 2d0321efd2fef5b88e3af8fefe8750426e35b7b18ac106c69ea35b99fd190a75
name: python-cmislib3
arch: src
version: 1.0.8
epoch: 0
release: 1
summary: Apache Chemistry CMIS client library for Python 3
url: https://github.com/luca-92/cmislib3
rpm_license: Apache License (2.0)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmislib3-1.0.8-1.src.rpm
checksum_type: sha256
description:
  ABOUT

  Thanks for using cmislib, the CMIS client library for Python v. >= 3.

  The goal of this library is to provide an interoperable API to CMIS
  repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
  EMC Documentum, and any other content repository that is CMIS-compliant.

  More info on CMIS can be found at:
  http://www.oasis-open.org/committees/cmis

  SOURCE

  The source code for this project implemented for Python 2 lives at http://chemistry.apache.org/.
  The source code for this project implemented for Python 3 lives at https://github.com/luca-92/cmislib3.

  TESTS

  There are unit tests available in the tests directory. They require access
  to a CMIS provider. There are many freely-available CMIS repositories
  available to run locally or that are hosted.

  DOC

  Documentation that tells you what this is all about can be found in the doc
  directory. Please see the doc for dependencies, required CMIS version level,
  required Python version, etc.


pkgId: fd599996686c836caa881ab3a8edeb8a475a26f20af16b1828b08ef635044921
name: python-cmk-tools
arch: src
version: 1.1.3
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cmk-tools/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmk-tools-1.1.3-1.src.rpm
checksum_type: sha256
description:
  To install the CmkRedisTools package, you can use pip:

  ```sh
  pip install cmk-tools
  ```
  or

  ```sh
  poetry add cmk-tools
  ```



  To run tests for CmkRedisTools, use the following command:

  ```sh
  pytest
  ```



  Here is a simple example of how to use CmkRedisTools:

  ```python
  from cmk_tools import RedisSemaphore, run_with_semaphore

  semaphore = RedisSemaphore(
      'redis://localhost:6379/0',
      name="my_semaphore",
      limit=3,            # limit concurrent running task
      timeout=10          # accquire timeout
  )

  run_with_semaphore(
      your_func,
      func_args,
      func_kwargs,
      execute_when_timeout=True       # execute function if accquired timeout
  )
  ```

  For more detailed documentation, email me.


pkgId: cf52b6faded1d139039c7200fd0164e2c7a8476066c11f252ada67357e4b0150
name: python-cmlkit
arch: src
version: 2.0.0a26
epoch: 0
release: 1
summary: Machine learning tools for computational chemistry and condensed matter physics
url: https://github.com/sirmarcel/cmlkit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmlkit-2.0.0a26-1.src.rpm
checksum_type: sha256
description:
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cmlkit.svg) [![PyPI](https://img.shields.io/pypi/v/cmlkit.svg)](https://pypi.org/project/cmlkit/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)

  Publications: [`repbench`: Langer, Gößmann, Rupp (2020)](https://marcel.science/repbench)

  Plugins: [`cscribe 🐫🖋️`](https://github.com/sirmarcel/cscribe) | [`mortimer 🎩⏰`](https://gitlab.com/sirmarcel/mortimer) | [`skrrt 🚗💨`](https://gitlab.com/sirmarcel/skrrt)

  ***

  `cmlkit` is an extensible `python` package providing clean and concise infrastructure to specify, tune, and evaluate machine learning models for computational chemistry and condensed matter physics. Intended as a common foundation for more specialised systems, not a monolithic user-facing tool, it wants to help you build your own tools! ✨

  *If you use this code in any scientific work, please mention it in the publication, cite [the paper](https://marcel.science/repbench) and let me know. Thanks! 🐫*



  [💡 A tutorial introduction to `cmlkit` courtesy of the NOMAD Analytics Toolkit 💡](https://www.nomad-coe.eu/index.php?page=bigdata-analyticstoolkit)

  *Sidenote*: If you've come across this from outside the "ML for materials and chemistry" world, this will unfortunately be of limited use for you! However, if you're interested in ML infrastructure in general, please take a look at `engine` and `tune`, which are not specific to this domain and might be of interest.



  - Reasonably clean, composable, modern codebase with little magic ✨



  `cmlkit` provides a unified interface for:

  - Many-Body Tensor Representation by [Huo, Rupp (2017)](https://arxiv.org/abs/1704.06439) (`qmmlpack` and `dscribe` implementation)
  - Smooth Overlap of Atomic Positions representaton by [Bartók, Kondor, Csányi (2013)](https://doi.org/10.1103/PhysRevB.87.184115) (`quippy`‡ and `dscribe` implementations)
  - Symmetry Functions representation by [Behler (2011)](https://doi.org/10.1063/1.3553717) (`RuNNer` and `dscribe` implementation), with a semi-automatic parametrisation scheme taken from [Gastegger et al. (2018)](https://doi.org/10.1063/1.5019667).

  ‡ The `quippy` interface was written for an older version that didn't support `python3`.



  - Kernel Ridge Regression as implemented in [`qmmlpack`](https://gitlab.com/qmml/qmmlpack) (supporting both global and local/atomic representations)



  - Robust multi-core support (i.e. it can automatically kill timed out external code, even if it ignores `SIGTERM`)
  - No `mongodb` required
  - Extensions to the `hyperopt` priors (uniform `log` grids)
  - Resumable/recoverable runs backed by a readable, atomically written history of the optimisation (backed by [`son`](https://github.com/flokno/son))
  - Search spaces can be defined entirely in text, i.e. they're easily writeable, portable and serialisable
  - Possibility to implement multi-step optimisation (experimental at the moment)
  - Extensible with custom loss functions or training loops



  - Automated loading of datasets by name
  - Seamless conversion of properties into per-atom or per-system quantities. Models can do this automatically!
  - Plugin system! ☢️ Isolate one-off nightmares! ☢️
  - Canonical, stable hashes of models and datasets!
  - Automatically train models and compute losses!



  At its core, `cmlkit` defines a unified `dict`-based format to specify model components, which can be straightforwardly read and written as `yaml`. Model components are implemented as pure-ish functions, which is conceptually satisfying and opens the door to easy pipelining and caching. Using this format, `cmlkit` provides interfaces to many representations and a fast kernel ridge regression implementation.

  Here is an example for a SOAP+KRR model:

  ```yaml
  model:
    per: cell
    regression:
      krr:               # regression method: kernel ridge regression
        kernel:
          kernel_atomic: # soap is a local representation, so we use the appropriate kernel
            kernelf:
              gaussian:  # gaussian kernel
                ls: 80   # ... with length scale 80
        nl: 1.0e-07      # regularisation parameter
    representation:
      ds_soap:           # SOAP representation (dscribe implementation via plugin)
        cutoff: 3
        elems: [8, 13, 31, 49]
        l_max: 8
        n_max: 2
        sigma: 0.5
  ```

  Having a canonical model format allows `cmlkit` to provide a quite pleasant interface to `hyperopt`. The same mechanism *also* enables a simple plugin system, making `cmlkit` easily exensible, so you can isolate one-off task-specific code into separate projects without any problems, while making use of a solid, if opionated, foundation.

  For a gentle, detailed tour please [check out the tutorial]( https://www.nomad-coe.eu/index.php?page=bigdata-analyticstoolkit ).



  Okay then, what are the rough parts?

  - `cmlkit` is very inconvenient for interactive and non-automated use: Models cannot be saved and caching is not enabled yet, so all computations (representation, kernel matrices, etc.) must be re-run from scratch upon restart. This is not a problem during HP optimisation, as there the point is to try *different* models, but it is annoying for exploring a single model in detail. Fixing this is an *active* consideration, though! After all, the code is written with caching in mind.
  - `cmlkit` is and will remain "scientific research software", i.e. it is prone to somewhat haphazard development practices and periods of hibernation. I'll do my best to avoid breaking changes and abandonement, but you know how it is!
  - `cmlkit` is currently in an "alpha" state. While it's pretty stable and well-tested for some specific usecases (like writing a [large-scale benchmarking paper](https://marcel.science/repbench)), it's not tested for more everyday use. There's also some internal loose ends that need to be tied up.
  - `cmlkit` is not particularly user friendly at the moment, and expects its users to be python developers. See below for notes on documentation! 😀



  `cmlkit` is available via pip:

  ```
  pip install cmlkit
  ```

  You can also clone this repository! I'd suggest having a look into the codebase in any case, as there is currently no external documentation.

  If you want to do any "real" work with `cmlkit`, you'll need to install [`qmmlpack`](https://gitlab.com/qmml/qmmlpack/-/tree/development) **on the development branch**. It's fairly straightforward!

  ***

  In order to compute representations with `dscribe`, you should install the [`cscribe`](https://github.com/sirmarcel/cscribe) plugin:

  ```
  pip install cscribe
  ```
  You need to also export `CML_PLUGINS=cscribe`.

  To setup the `quippy` and `RuNNer` interface please consult the readmes in `cmlkit/representation/soap` and `cmlkit/representation/sf`.

  ***

  For details on environment variables and such things, please consult the readme in the `cmlkit` folder.





  At the moment, I don't think it's feasible for me to maintain separate written docs, and I believe that purely auto-generated docs are basically a worse version of just looking at the formatted source on Github or in your text editor. So I *highly* encourage to take a look there!

  Most submodules in `cmlkit` have their own `README.md` documenting what's going on in them, and all "outside facing" classes have extensive docstrings. I hope that's sufficient! Please feel free to file an issue if you have any questions.



  The short answer is regrettably probably no.

  However, I think the architecture of this library is quite neat, so maybe it can provide some marginally interesting reading. The `tune` component is very general and provides, in my opinion, a delightfully clean interface to `hyperopt`. The `engine` is also rather general and provides a nice way to serialise specific kinds of python objects to `yaml`.



  Well, maybe if you:

  - need to use any of the libraries mentioned above, especially if you want to use them in the same project with the same infrastructure,
  - are tired of plain `hyperopt`,
  - would like to be able to save your model parameters in a readable format,
  - think it's neat?

  My goal with this is to make it slightly easier for you to build up your own infrastructure for studying models and applications in our field! If you're just starting out, just take a look around!


pkgId: 5d82abc7b1d82f196d87ad764bb34561bc5b2ec1b4b7d2f2fb70e023cca11c88
name: python-cmocean
arch: src
version: 4.0.3
epoch: 0
release: 1
summary: Colormaps for Oceanography
url: https://github.com/matplotlib/cmocean
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmocean-4.0.3-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://img.shields.io/github/actions/workflow/status/matplotlib/cmocean/test.yaml?branch=main&logo=github&style=for-the-badge)](https://github.com/matplotlib/cmocean/actions/workflows/test.yaml)
  [![Code Coverage](https://img.shields.io/codecov/c/github/matplotlib/cmocean.svg?style=for-the-badge)](https://codecov.io/gh/matplotlib/cmocean)
  [![License:MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmocean.svg?style=for-the-badge)](https://anaconda.org/conda-forge/cmocean)
  [![Python Package Index](https://img.shields.io/pypi/v/cmocean.svg?style=for-the-badge)](https://pypi.org/project/cmocean)
  <!-- [![Documentation Status](https://img.shields.io/readthedocs/cmocean/latest.svg?style=for-the-badge)](https://cmocean.readthedocs.io/en/latest/?badge=latest) -->
  <!-- [![Code Style Status](https://img.shields.io/github/actions/workflow/status/matplotlib/cmocean/linting.yaml?branch=main&label=Code%20Style&style=for-the-badge)](https://github.com/matplotlib/cmocean/actions/workflows/linting.yaml) -->
  Documentation available: [http://matplotlib.org/cmocean/](http://matplotlib.org/cmocean/).
  We have a paper with guidelines to colormap selection for your application and a description of the `cmocean` colormaps:
  Thyng, K. M., Greene, C. A., Hetland, R. D., Zimmerle, H. M., & DiMarco, S. F. (2016). True colors of oceanography. Oceanography, 29(3), 10.
  link: [http://tos.org/oceanography/assets/docs/29-3_thyng.pdf](http://tos.org/oceanography/assets/docs/29-3_thyng.pdf)
  Besides Python, the cmocean colormaps are also available:
  * For [MATLAB](http://www.mathworks.com/matlabcentral/fileexchange/57773-cmocean-perceptually-uniform-colormaps) by [Chad Greene](http://www.chadagreene.com/)
  * For [R cmocean](https://github.com/aitap/cmocean), which includes [ggplot2](ggplot2.tidyverse.org/) compatible functions. Also included in [Oce](http://dankelley.github.io/oce/): an oceanographic analysis package by [Dan Kelley](http://www.dal.ca/faculty/science/oceanography/people/faculty/daniel-e-kelley.html) and [Clark Richards](http://clarkrichards.org/).
  * For Julia, included in [Plots.jl](https://github.com/JuliaPlots/Plots.jl) and [Makie.jl](https://github.com/JuliaPlots/Makie.jl)
  * For [Ocean Data Viewer](https://github.com/kthyng/cmocean-odv)
  * For Generic Mapping Tools (GMT)  at [cpt-city](http://soliton.vm.bytemark.co.uk/pub/cpt-city/cmocean/index.html) and on [github](https://github.com/kthyng/cmocean-gmt)
  * For [Paraview](https://github.com/kthyng/cmocean-paraview) inspired by [Phillip Wolfram](https://github.com/pwolfram)
  * In [Plotly](https://plot.ly/python/cmocean-colorscales/)
  * Chad Greene's [Antarctic Mapping Tools](http://www.mathworks.com/matlabcentral/fileexchange/47638-antarctic-mapping-tools) in Matlab uses `cmocean`
  * For [Tableau](https://www.tableau.com) as a preferences file on [github](https://github.com/shaunwbell/cmocean_tableau)
  * For [ImageJ](https://imagej.nih.gov/ij/) as [LUTs](https://github.com/mikeperrins/cmocean-LUT-ImageJ)
  * For [ncview](http://meteora.ucsd.edu/~pierce/ncview_home_page.html) via [ncmaps](https://github.com/TomLav/ncmaps).
  * For [SeaDAS](https://github.com/gertvd-stanford/cmocean_seadas), and should work with BEAM/SNAP as well.
  To install:
  ``pip install cmocean``
  To install with Anaconda:
  ``conda install -c conda-forge cmocean``
  If you want to be able to use the `plots` submodule, you can instead install with:
  `pip install "cmocean[plots]"`
  which will also install `viscm` and `colorspacious`.


pkgId: c98c36b524d65586a0212adf1c6b579b753504a81bbce147d6224d28047c0f62
name: python-cmomy
arch: src
version: 0.23.0
epoch: 0
release: 1
summary: Central (co)moment calculation/manipulation
url: https://github.com/usnistgov/cmomy
rpm_license: NIST-PD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmomy-0.23.0-1.src.rpm
checksum_type: sha256
description:
  <!-- markdownlint-disable MD041 -->
  <!-- markdownlint-disable MD013 -->

  [![Repo][repo-badge]][repo-link] [![Docs][docs-badge]][docs-link]
  [![PyPI license][license-badge]][license-link]
  [![PyPI version][pypi-badge]][pypi-link]
  [![Conda (channel only)][conda-badge]][conda-link]
  [![Code style: black][black-badge]][black-link]

  <!--
    For more badges, see
    https://shields.io/category/other
    https://naereen.github.io/badges/
    [pypi-badge]: https://badge.fury.io/py/cmomy
  -->

  [black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
  [black-link]: https://github.com/psf/black
  [pypi-badge]: https://img.shields.io/pypi/v/cmomy
  [pypi-link]: https://pypi.org/project/cmomy
  [docs-badge]: https://img.shields.io/badge/docs-sphinx-informational
  [docs-link]: https://pages.nist.gov/cmomy/
  [repo-badge]: https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff
  [repo-link]: https://github.com/usnistgov/cmomy
  [conda-badge]: https://img.shields.io/conda/v/conda-forge/cmomy.svg
  [conda-link]: https://anaconda.org/conda-forge/cmomy
  [license-badge]: https://img.shields.io/pypi/l/cmomy?color=informational
  [license-link]: https://github.com/usnistgov/cmomy/blob/main/LICENSE

  <!-- other links -->

  [numpy]: https://numpy.org
  [Numba]: https://numba.pydata.org/
  [xarray]: https://docs.xarray.dev/en/stable/



  A Python package to calculate and manipulate Central (co)moments. The main
  features of `cmomy` are as follows:

  - [Numba][Numba] accelerated computation of central moments and co-moments
  - Routines to combine, and resample central moments.
  - Supports [numpy][numpy] array and [xarray][xarray] DataArray or Dataset based
    data.
  - Routines to convert between central and raw moments.



  `cmomy` is an open source package to calculate central moments and co-moments in
  a numerical stable and direct way. Behind the scenes, `cmomy` makes use of
  [Numba][Numba] to rapidly calculate moments. A good introduction to the type of
  formulas used can be found
  [here](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance).



  - Fast calculation of central moments and central co-moments with weights
  - Support for scalar or vector inputs
  - numpy and xarray api's
  - bootstrap resampling



  This package is actively used by the author. Please feel free to create a pull
  request for wanted features and suggestions!



  Use one of the following

  ```bash
  pip install cmomy
  ```

  or

  ```bash
  conda install -c conda-forge cmomy
  ```



  ```pycon
  >>> import numpy as np
  >>> import cmomy
  >>> rng = cmomy.default_rng(seed=0)
  >>> x = rng.random(100)
  >>> m = x.mean()
  >>> mom = np.array([((x - m) ** i).mean() for i in range(4)])
  >>> c = cmomy.wrap_reduce_vals(x, mom=3, axis=0)

  >>> np.testing.assert_allclose(c.cmom(), mom, atol=1e-8)
  >>> c.cmom()
  array([ 1.    ,  0.    ,  0.0919, -0.0061])


  >>> c = cmomy.wrap_reduce_vals(x.reshape(-1, 2), mom=3, axis=0)

  >>> c
  <CentralMomentsArray(mom_ndim=1)>
  array([[ 5.0000e+01,  5.3019e-01,  8.0115e-02, -4.3748e-03],
         [ 5.0000e+01,  5.6639e-01,  1.0297e-01, -8.9911e-03]])


  >>> c.reduce(axis=0).cmom()
  array([ 1.    ,  0.    ,  0.0919, -0.0061])


  >>> x0, x1, x2 = x[:20], x[20:60], x[60:]

  >>> cs = [cmomy.wrap_reduce_vals(_, mom=3, axis=0) for _ in (x0, x1, x2)]

  >>> c = cs[0] + cs[1] + cs[2]

  >>> np.testing.assert_allclose(c.cmom(), mom, atol=1e-8)
  >>> c.cmom()
  array([ 1.    ,  0.    ,  0.0919, -0.0061])

  ```



  This code makes extensive use of the numba python package. This uses a jit
  compiler to speed up vital code sections. This means that the first time a
  function called, it has to compile the underlying code. However, caching has
  been implemented. Therefore, the very first time you run a function, it may be
  slow. But all subsequent uses (including other sessions) will be already
  compiled.

  <!-- end-docs -->



  See the [documentation][docs-link] for a look at `cmomy` in action.



  This is free software. See [LICENSE][license-link].



  This package is used extensively in the newest version of `thermoextrap`. See
  [here](https://github.com/usnistgov/thermo-extrap).



  The author can be reached at <wpk@nist.gov>.



  This package was created using
  [Cookiecutter](https://github.com/audreyr/cookiecutter) with the
  [usnistgov/cookiecutter-nist-python](https://github.com/usnistgov/cookiecutter-nist-python)
  template.
  <!-- markdownlint-disable MD024 -->
  <!-- markdownlint-disable MD013 -->
  <!-- prettier-ignore-start -->



  Changelog for `cmomy`



  [changelog.d]: https://github.com/usnistgov/cmomy/tree/main/changelog.d

  See the fragment files in [changelog.d]

  <!-- prettier-ignore-end -->

  <!-- markdownlint-enable MD013 -->

  <!-- scriv-insert-here -->





  - Routines now accept `mom_axes` parameter. This allows for moment axes to be in
    arbitrary location
  - Routines now accept `mom_params` parameter. This object contains all the logic
    for working with moment arrays. This Also simplifies calling routines from
    other classes/routines.
  - Update requirements, typing, and linting
  - Routines now correctly respect the `order` parameter. Passing in `None` will
    lead to arrays that are `c` ordered when "normalized" (i.e., which have `axis`
    and `mom_axes` at the end), which is the default behavior of
    `numb.guvectorize`. Passing order `c` will lead to outputs that are `c`
    ordered regardless of `mom_axes` location.

  - Negative axis/axes are now treated relative to the end of the array (just like
    python lists and numpy ndarrays). To get the old behavior of counting relative
    to the `mom_ndim`, pass in imaginary axis. For example, passing `axis=-1j`
    with `mom_ndim=1` is equivalent to passing `axis=-2`.

  - renamed parameter `move_axes_to_end` to `axes_to_end`. This will lead to axes
    being in the form `(..., *mom_axes)` if `axes` are reduced or
    `(..., *axes, *mom_axes)` if `axes` are kept.

  - Applying routines to `dataset` objects now keeps correct order if
    `axes_to_end` is `False`.





  - For xarray (DataArray and Dataset) central moments data, routines will infer
    `mom_ndim` from `mom_dims`. For example, can calling
    `cmomy.reduce_data(data, mom_dims=("mom_0", "mom_1"), dim="a")` will infer
    `mom_ndim=1`.





  - `cmomy.randsamp_freq` has been replaced with `cmomy.factory_sampler`



  - `cmomy.factory_sampler` to create a sampler for resample routines.
  - `cmomy.IndexSampler` to wrap resample "indices" and "freq" table.



  - Added `IndexSampler` class to handle resampling. This wraps either resampling
    `indices` or a "frequency" table `freq`, and can produce whichever is not
    provided.
  - replace `randsamp_freq` with `factory_sampler` which creates `IndexSampler`
    from parameters or a mapping.
  - Removed arguments `freq`, `nrep`, `rng`, `paired` from resampling routines
    (`resample_data`, etc). This was replaced by an arguments `sampler` which can
    be either an `IndexSampler` or a mapping which is passed to `factory_sampler`.
    This means that to call the resampling routines, you'll have to pass a sampler
    or a dict of parameters. While this is a little annoying, it greatly cleans up
    a bunch of parameters that may not be used. For example, the call
    `cmomy.resample_data(data, axis=0, nrep=10, rng=0)` is now
    `cmomy.resampler_data(data, axis=0, sampler={"nrep": 10, "rng": 0})`. Plus,
    you can now pass `indices` with
    `cmomy.resample_data(data, axis=0, sampler={"indices": indices})`
  - Removed parameter `on_missing_core_dim` from routines that call
    `xarray.apply_ufunc` behind the scenese. You can still pass this parameter
    using `apply_ufunc_kwargs`. For example,
    `cmomy.reduce_data(data, axis=0, apply_ufunc_kwargs={"on_missing_core_dim": "drop"})`.





  - Made `cmomy.resample.freq_to_indices` and `cmomy.resample.indices_to_freq`
    gufunc's. Much faster than old code (`freq_to_indices` was a bottleneck).





  - Added `cmomy.convert.comoments_to_moments` routine, which is the inverse of
    `cmomy.convert.moments_to_comoments`.





  - `cmomy.assign_moment` and `cmomy.select_moment` now accept options `xmom_0`,
    `xmom_1`, `ymom_0`, and `ymom_1`. These allow selecting/assigning to slices.
    Useful when convertering values to central moments array.





  - Now fully support wrapping `xarray.Dataset` objects
  - Complete rewrite of wrapper classes
  - Added `wrapper` factory methods `cmomy.wrap`, `cmomy.wrap_reduce_vals`, etc.
    These automatically select from `CentralMomentsArray` and
    `CentralMomentsData`.
  - Renamed `CentralMoments` to `CentralMomentsArray` and `xCentralMoments` to
    `CentralMomentsData`. The former is parametrized across numpy arrays. The
    later is parametrized to work with either `xarray.DataArray` or
    `xarray.Dataset` objects.
  - Full support `dask` backed `xarray` objects. This will be lazily evaluated.
  - Removed `CentralMomentsArray/Data.block` method. Instead, there is a `block`
    keyword in `reduce` method.
  - `to_dataarray`, `to_dataset`, etc, method of `CentralMomentsArray/Data` now
    return a wrapped object instead of an `xarray` object. To access the
    underlying `xarray` object, use the `obj` attribute.
  - Removed `values` and `data` attributes from `CentralMomentsArray/Data` wrapper
    classes. Now wrap either an array or `xarray` object directly (instead of only
    really wrapping `numpy` arrays in the old code). To access the wrapped object,
    now use `obj` attribute.
  - Now include testing of typing (`mypy` and `pyright`) support.





  - Added `rolling` module for rolling mean and exponential rolling mean.
  - Added `bootstrap_confidence_interval` method to calculate confidence intervals
  - Added `moveaxis` function to cleanly handle axes movement of central moments
    array
  - Added `select_moment` method to select specific moments (weight, average, etc)
    from a central moments array
  - Added `assign_moment` method to assign values to specific moments.
  - Added `vals_to_data` to simplify using `_data` methods for raw values.
  - Added `jackknife_` an routines to perform jackknife analysis.
  - Update `_vals` routines to properly place the `axis` parameter in result.
  - Added `axes_to_end` option to most routines.
  - Added `keepdims` option from `reduce_data` and `reduce_vals`





  - Added `cmomy.concat` method to concatenate moments objects.

  - Added `__getitem__` to `(x)CentralMoments` objects. This method **does not\***
    allow changing the moments shape. If you want to do that, you'll need to work
    directly with `(x)CentralMoments.to_values()`





  - added `cmomy.resample.select_ndat` to select data size along reduction
    dimension
  - Added `cmomy.randsamp_freq` to top level api



  - Updated `cmomy.resample.randsamp_freq` to select ndat from array





  - Added `cmomy.convert.moments_to_comoments` (and
    `(x)CentralMoments.moments_to_comoments`)to convert from single variable
    moments to comoments. This is useful in `thermoextrap`.
  - Added `cmomy.convert.assign_weight` (and `(x)CentralMoments.assign_weights`)
    to update weights (useful in `thermoextrap`).

  - Added support for `numpy>=2.0.0`. Because we still support older versions, we
    still use the old convention for the `copy` parameter to `numpy.array`. Will
    change this when minimum numpy is 2.0.



  - Renamed `cmomy.convert` function to `cmomy.convert.moments_type`A bullet item
    for the Changed category.





  - Now supports python3.12





  - Switch to underlying numba functions using `guvectorize`. This significantly
    simplifies the code. Previously, we had separate functions for "vector" vs
    "scalar" moments. To handle arbitrary vector dimensions, the arrays were
    reshaped behind the scenes (to a single "meta" dimension). Now, this is all
    handled by the `gufunc` based library code.
  - Typing support improved.
  - Added `(x)CentralMoments.astype`
  - Added `(x)CentralMoments.`
  - Added alias `CentralMoments.to_x` which is the same as
    `CentralMoments.to_xcentralmoments`.
  - Added alias `xCentralMoments.to_c` which is the same as
    `xCentralMoments.to_centralmoments`.
  - Most constructors now accept `order` and `dtype` arguments.
  - Most routines that process central moments accept a `parallel` parameter.
  - Instead of complicated internal validation routines in `(x)CentralMoments`,
    most of this is now handled by `cmomy.reduction` or similar routines.
  - Now using `xr.apply_ufunc` for most of the `xarray.DataArray` based
    calculations.



  - Removed classmethods `(x)CentralMoments.from_raws`. Instead, use
    `(x)CentralMoments.from_raw(...).reduce(...)`.
  - Removed classmethods `(x)CentralMoments.from_datas`. Instead, use
    `(x)CentralMoments.from_data(...).reduce(...)`.
  - Removed classmethod `(x)CentralMoments.from_data`. Instead, use
    `(x)CentralMoments(....)`.
  - Removed ability to create `xCentralMoments` objects directly from
    `numpy.ndarray` objects. (e.g., passing in array-like to
    `xCentralmoments.from_vals` doesn't work anymore). Instead use
    `CentralMoments.from_vals(....).to_xcentralmoments(...)`, etc.
  - Removed methods `push_stat`, `push_stats`, `from_stat`, `from_stats`. Instead
    use, for example, `numpy.concatenate`, to combine weights, average, and
    variance into a `data` array. A helper function may be added if called for.
  - `(x)CentralMoments.resample_and_reduce` and
    `(x)CentralMoments.from_resample_vals` no longer accept `nrep=...` or
    `indices=...`. They only accept `freq=...`.





  - Can now resample with an arbitrary number of samples. Previously, it was
    assumed that resampling should be done with a shape `(nrep, ndat)`, where
    `nrep` is the number of replicates and `ndat` is the shape of the data along
    the resampled axis. Now you can pass sample with shape `(nrep, nsamp)` where
    `nsamp` is the specified number of samples in a replicate (defaulting to
    `ndat`). This allows users to do things like jacknife resampling, etc, with
    `resample_and_reduce` methods.
  - Preliminary support for using type hints in generated documentation. The
    standard sphinx autodoc support doesn't quite work for `cmomy`, as it requires
    type hints to be accessible at run time, and not in `TYPE_CHECKING` blocks.
    Instead, we use
    [`sphinx_autodoc_type`](https://github.com/tox-dev/sphinx-autodoc-typehints).
    This has the downside of expanding type aliases, but handles (most things)
    being in `TYPE_CHECKING` blocks. Over time, we'll replace some of the explicit
    parameter type documentation with those from type hints.
  - Fixed creation of templates in reduction routines of `xCentralMoments`.
    Previously, we build the template for the result using something like
    `da.isel(dim=0)`. This kept scalar coordinates of `da` with `dim`. Now we use
    `da.isel(dim=0, drop=True)` to drop these.
  - Updated dependencies.





  - Added `to_values` method to access underlying array data. This should be
    preferred to `.values` attribute.
  - Added `to_numpy` method to access underlying `numpy.ndarray`.
  - Added `to_dataarray` method to access underlying `xarray.DataArray` in
    `xCentralMoment s`

  - Added submodule `cmomy.random` to handle random numbers generation. This uses
    `numpy.random.Generator` behind the scenes.
  - Updated `ruff` lintering rules
  - Now using `hatchling` for package building
  - Update repo template



  - Now CentralMoments and xCentralMoments ensure that data/data_flat share
    memory. This may result in passed data not being the same as the internal
    data, if reshaping data creates a copy.
  - Made little used arguments keyword only





  - Now use [lazy_loader](https://github.com/scientific-python/lazy_loader) to
    speed up initial load time.

  - Now using `module_utilities >=0.6`.
  - Changed from `custom-inherit` to `docstring-inheritance`
  - Now fully supports typing (passing mypy --stict and pyright)
  - Relocated numba functions to submodule `cmomy._lib`.



  - Moved tests to top level of repo (`src/cmomy/tests` to `tests`)





  - Package now available on conda-forge

  - Bumped maximum python version to 3.11

  [`v0.4.1...v0.5.0`](https://github.com/usnistgov/cmomy/compare/v0.4.1...v0.5.0)



  - Testing now handled with nox.





  - Moved module `_docstrings_` to `docstrings`. This can be used by other
    modules.



  - Update package layout
  - New linters via pre-commit
  - Development env now handled by tox

  - Now use `module-utilities` to handle caching and docfiller.

  [`v0.3.0...v0.4.0`](https://github.com/usnistgov/cmomy/compare/v0.3.0...v0.4.0)



  Full set of changes:
  [`v0.2.2...v0.3.0`](https://github.com/usnistgov/cmomy/compare/v0.2.2...v0.3.0)



  Full set of changes:
  [`v0.2.1...v0.2.2`](https://github.com/usnistgov/cmomy/compare/v0.2.1...v0.2.2)



  Full set of changes:
  [`v0.2.0...v0.2.1`](https://github.com/usnistgov/cmomy/compare/v0.2.0...v0.2.1)



  Full set of changes:
  [`v0.1.9...v0.2.0`](https://github.com/usnistgov/cmomy/compare/v0.1.9...v0.2.0)



  Full set of changes:
  [`v0.1.8...v0.1.9`](https://github.com/usnistgov/cmomy/compare/v0.1.8...v0.1.9)



  Full set of changes:
  [`v0.1.7...v0.1.8`](https://github.com/usnistgov/cmomy/compare/v0.1.7...v0.1.8)



  Full set of changes:
  [`v0.1.6...v0.1.7`](https://github.com/usnistgov/cmomy/compare/v0.1.6...v0.1.7)



  Full set of changes:
  [`v0.1.5...v0.1.6`](https://github.com/usnistgov/cmomy/compare/v0.1.5...v0.1.6)



  Full set of changes:
  [`v0.1.4...v0.1.5`](https://github.com/usnistgov/cmomy/compare/v0.1.4...v0.1.5)



  Full set of changes:
  [`v0.1.3...v0.1.4`](https://github.com/usnistgov/cmomy/compare/v0.1.3...v0.1.4)



  Full set of changes:
  [`v0.1.2...v0.1.3`](https://github.com/usnistgov/cmomy/compare/v0.1.2...v0.1.3)



  Full set of changes:
  [`v0.1.1...v0.1.2`](https://github.com/usnistgov/cmomy/compare/v0.1.1...v0.1.2)



  Full set of changes:
  [`v0.1.0...v0.1.1`](https://github.com/usnistgov/cmomy/compare/v0.1.0...v0.1.1)



  Full set of changes:
  [`v0.0.7...v0.1.0`](https://github.com/usnistgov/cmomy/compare/v0.0.7...v0.1.0)



  Full set of changes:
  [`v0.0.6...v0.0.7`](https://github.com/usnistgov/cmomy/compare/v0.0.6...v0.0.7)



  Full set of changes:
  [`v0.0.4...v0.0.6`](https://github.com/usnistgov/cmomy/compare/v0.0.4...v0.0.6)



  Full set of changes:
  [`v0.0.3...v0.0.4`](https://github.com/usnistgov/cmomy/compare/v0.0.3...v0.0.4)
  This software was developed by employees of the National Institute of Standards
  and Technology (NIST), an agency of the Federal Government. Pursuant to title 17
  United States Code Section 105, works of NIST employees are not subject to
  copyright protection in the United States and are considered to be in the public
  domain. Permission to freely use, copy, modify, and distribute this software and
  its documentation without fee is hereby granted, provided that this notice and
  disclaimer of warranty appears in all copies.

  THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
  EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
  THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
  INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
  SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
  SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
  INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
  IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
  CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
  PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
  OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.

  Distributions of NIST software should also include copyright and licensing
  statements of any third-party software that are legally bundled with the code in
  compliance with the conditions of those licenses.


pkgId: 6945c2da0b89da48d66d0eec35e5279df77cc18a29a95eba75d09a339fcc59a4
name: python-cmp_version
arch: src
version: 3.0.0
epoch: 0
release: 1
url: https://github.com/kata198/cmp_version
rpm_license: Public Domain
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmp_version-3.0.0-1.src.rpm
checksum_type: sha256
summary:
  A script and python module to compare version numbers. Use this to compare the version strings of packages, modules, really anything.

description:
  A script and python module to compare version numbers. Use this to compare the version strings of packages, modules, really anything.
  Since version 3.0, cmp\_version supports all kinds of complex version numbers, including those with releases ( like $version-5 ) or Epochs (like 5:$version)


pkgId: 7fbe5b67528023bd71d7bc2883ca3c1da817234fe87b9a244cd3ed45d53993f4
name: python-cmpx
arch: src
version: 0.8.4
epoch: 0
release: 1
summary: A package for different operations on complex numbers
url: https://github.com/Omar-Belghaouti/PythonComplex
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmpx-0.8.4-1.src.rpm
checksum_type: sha256
description:
  A package for different operations on complex numbers.


  - This package is essentially for mathematical operations on complex numbers.
  - It is very easy and intuitif to use, as any mathematicain would expect.
  - There is more to come on this class, like power of complex numbers.



  Use the package manager [pip](https://pypi.org/project/cmpx/) to install cmpx.

  ```bash
  pip install cmpx
  ```


  You can follow this [tutorial](https://github.com/Omar-Belghaouti/PythonComplex/blob/master/cmpx%20tutorial.ipynb) to learn more about this package.


  Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

  Please make sure to update tests as appropriate.


pkgId: b62d7b1e7666df7760033284835022834c19235b94aac5131652da68d7f72ee9
name: python-cmsdials
arch: src
version: 1.5.0
epoch: 0
release: 1
summary: The Python api client interface to DIALS service
url: https://github.com/cms-DQM/dials-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmsdials-1.5.0-1.src.rpm
checksum_type: sha256
description:
  The Python api client interface to DIALS service.



  To install dials-py, simply

  ```bash
  $ pip install cmsdials
  ```

  It is also possible to specify the following extras, to enable optional features:

  ```
  pandas, tqdm
  ```



  Before interfacing with any route you need to generate valid credentials, it is possible to authenticate trough the `device authorization flow` or using the `client secret key` of any application registered in DIALS. Note that, the device flow is an interactively authentication procedure that is possible to distinguish users in DIALS backend and the client secret flow is not interactive and is not possible to distinguish users so it should only be used for automation scripts.



  ```python
  from cmsdials.auth.secret_key import Credentials

  creds = Credentials(token=".....")
  ```





  ```python
  from cmsdials.auth.client import AuthClient
  from cmsdials.auth.bearer import Credentials

  auth = AuthClient()
  token = auth.device_auth_flow()
  creds = Credentials.from_authclient_token(token)
  ```



  Credentials are always cached once you authenticate at least one time, calling this method without having a cached credential file will automatically trigger the AuthClient device flow.

  ```python
  from cmsdials.auth.bearer import Credentials

  creds = Credentials.from_creds_file()
  ```



  ```python
  from cmsdials.auth.bearer import Credentials
  from cmsdials import Dials
  from cmsdials.filters import LumisectionHistogram1DFilters

  creds = Credentials.from_creds_file()
  dials = Dials(creds)


  data = dials.h1d.list_all(LumisectionHistogram1DFilters(me="PixelPhase1/Tracks/PXBarrel/charge_PXLayer_2"), max_pages=5)
  ```



  Users are automatically routed to a workspace based on e-groups, but it is possible to overwrite this configuration and inspect data from others workspaces:

  ```python
  dials = Dials(creds, workspace="jetmet")
  ```



  This package interacts with DIALS api endpoints using underlying classes in `Dials` object.



  ```python
  dials.dataset_index.get(dataset_id=14677060)
  dials.file_index.get(dataset_id=14677060, file_id=3393809397)
  dials.h1d.get(dataset_id=14677060, run_number=367112, ls_number=10, me_id=1)
  dials.h1d.get(dataset_id=14677060, run_number=367112, ls_number=10, me_id=96)
  dials.lumi.get(dataset_id=14677060, run_number=367112, ls_number=10)
  dials.run.get(dataset_id=14677060, run_number=367112)


  dials.ml_models_index(model_id=1)
  dials.ml_bad_lumisection(model_id=19, dataset_id=15102369, run_number=386951, ls_number=36)
  ```



  It is possible to get a list of entries from those endpoint using the `list` and `list_all` methods, the `list` method will fetch only one page and the `list_all` will fetch all available pages:

  ```python
  dials.dataset_index.list()
  dials.file_index.list()
  dials.h1d.list()
  dials.h2d.list()
  dials.lumi.list()
  dials.run.list()
  dials.ml_models_index.list()
  dials.ml_bad_lumisection.list()
  ```



  Note: Keep in mind that running `list_all` without any filter can take too much time, since you will be retrieving all rows in the database.

  ```python
  dials.dataset_index.list_all()
  dials.file_index.list_all()
  dials.h1d.list_all()
  dials.h2d.list_all()
  dials.lumi.list_all()
  dials.run.list_all()
  dials.ml_models_index.list_all()
  dials.ml_bad_lumisection.list_all()
  ```

  If you don't need all available pages but just a subset of then, it is possible to specify a `max_pages` integer parameter:

  ```python
  dials.run.list_all(..., max_pages=5)
  ```



  Keep in mind that calling those methods without any filter can take a lot of time, because the underlying query will try to load the entire database table through multiple requests, then it is recommended to apply filters according to DIALS [live documentation](https://cmsdials-api.web.cern.ch/api/v1/swagger#/) using filter classes for each table:

  ```python
  from cmsdials.filters import (
      FileIndexFilters,
      LumisectionHistogram1DFilters,
      LumisectionHistogram2DFilters,
      LumisectionFilters,
      RunFilters,
      MLBadLumisectionFilters
  )

  dials.dataset_index.list_all(DatasetIndexFilters(page_size=500))

  dials.file_index.list(FileIndexFilters(dataset__regex="2024B"))

  dials.h1d.list(LumisectionHistogram1DFilters(me="PixelPhase1/Tracks/PXBarrel/charge_PXLayer_2"))

  dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="PXBarrel", ls_number=78, entries__gte=100), max_pages=5)

  dials.lumi.list_all(LumisectionFilters(run_number=360392), max_pages=5)

  dials.run.list_all(RunFilters(run_number__gte=360392, run_number__lte=365000), max_pages=5)


  dials.ml_models_index.list_all(MLModelsIndexFilters(active=True))


  dials.ml_bad_lumis.list_all(
      MLBadLumisectionFilters(
          page_size=500,
          model_id__in=[20,19],
          dataset_id__in=[15042670],
          run_number__in=[385801,385799,385764]
      )
  )
  ```



  It is possible to inspect the list of ingested MEs in DIALS listing the endpoint `mes` trough the method:

  ```python
  dials.mes.list()
  ```



  You can enable this optional feature by installing the package with the `pandas` extra.

  All `Paginated` metaclasses contain the method `to_pandas` that will automatically transform the `results` attribute of the metaclass into a pandas dataframe, for example:

  ```python
  data = dials.h1d.list_all(LumisectionHistogram1DFilters(me="PixelPhase1/Tracks/PXBarrel/charge_PXLayer_2"), max_pages=5)
  data.to_pandas()
  ```



  You can enable this optional feature by installing the package with the `tqdm` extra.

  Whenever you call a `list_all` method that fetches multiple pages a dynamic progress will be rendered to indicate duration and number of pages, for example:

  ```python
  >>> dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="PXBarrel", ls_number=78, entries__gte=100), max_pages=5)
  Progress: 100%|█████████████████████████████████████| 5/5 [00:02<00:00,  1.70it/s]
  ```

  The total attribute of the bar is dynamically updated while fetching the pages.



  In case of an unstable connection, DNS failures or service overload it is possible to configure any `get`, `list` and  `list_all` to retry the underlying requests using native `urllib3` retry class, for example:

  ```python
  from urllib3.util import Retry

  data = dials.h1d.get(dataset_id=14677060, run_number=367112, ls_number=10, me_id=1, retries=Retry(total=3, backoff_factor=0.1))
  data = dials.h1d.list(retries=Retry(total=3, backoff_factor=0.1))
  data = dials.h1d.list_all(LumisectionHistogram1DFilters(), max_pages=5, retries=Retry(total=5, backoff_factor=0.1))
  ```



  When listing and endpoint for a long time, you may loose connection or the server can potentially return an error. By specifying `keep_failed` and using `resume_from` you can resume from an older response object, for example:

  ```python
  from cmsdials.auth.client import AuthClient
  from cmsdials.auth.bearer import Credentials
  from cmsdials import Dials
  from cmsdials.filters import LumisectionHistogram2DFilters

  auth = AuthClient()
  creds = Credentials.from_creds_file()
  dials = Dials(creds, workspace="tracker")

  data = dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="PXBarrel", ls_number=78, entries__gte=100), keep_failed=True)  # Code may broke inside this routine
  print(len(data.results))  # 100
  print(data.exc_type)
  print(data.exc_formatted)


  data = dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="PXBarrel", ls_number=78, entries__gte=100), keep_failed=True, resume_from=data)  # Resume from failed object
  print(len(data.results))  # 200
  ```

  You may find it useful to resume from a partial response, i.e,

  ```python
  data = dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="PXBarrel", ls_number=78, entries__gte=100), max_pages=10, keep_failed=True)  # Code may not break, however will fetch only 100 elements
  print(len(data.results))  # 100


  data = dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="PXBarrel", ls_number=78, entries__gte=100), max_pages=10, keep_failed=True, resume_from=data)  # Resume from partial object
  print(len(data.results))  # 200
  ```



  The following examples are testable in the `jetmet` workspace:

  ```python
  dials.ml_bad_lumis.cert_json(
      model_id__in=[20,19],
      dataset_id__in=[15042670],
      run_number__in=[385801,385799,385764]
  )

  dials.ml_bad_lumis.golden_json(
      model_id__in=[20,19],
      dataset_id__in=[15042670],
      run_number__in=[385801,385799,385764]
  )
  ```

  You may need to query the `ml_models_index` client to fetch the models ids you are interested and the `dataset-index` client to fetch the datasets ids. Take a look in the live documentation to check all possible filters.

  Attention: Those endpoints doesn't return a Pydantic model, instead they are returning a plain json response. Consequently, the method `to_pandas` doesn't work on them.



  All classes that interface the DIALS service inherits the class `BaseAPIClient` which propagate the `base_url`, `route` and `version` attributes with production values. In order to use dials-py with a local version of DIALS it is possible to overwrite those attributes when instantiating the `AuthClient` and the `Dials` client, for example:

  ```python
  from cmsdials.auth.client import AuthClient
  from cmsdials.auth.bearer import Credentials
  from cmsdials import Dials
  from cmsdials.filters import LumisectionHistogram2DFilters

  DEV_URL = "http://localhost:8000/"
  DEV_CACHE_DIR = ".cache-dev"

  auth = AuthClient(base_url=DEV_URL)
  creds = Credentials.from_creds_file(cache_dir=DEV_CACHE_DIR, client=auth)  # Make sure to specify the auth client with overwritten values, using another cache_dir is recommended
  dials = Dials(creds, base_url=DEV_URL)

  dials.h2d.list_all(LumisectionHistogram2DFilters(me__regex="EEOT digi occupancy EE +", entries__gte=100, run_number__gte=360392, run_number__lte=365000), max_pages=5)
  ```



  The repository has some tests written to make sure DIALS responses are compatible with pydantic metaclasses, you can use pytest to run all tests but you need to specify a secret key to authenticate non-interactively against DIALS api:

  ```bash
  SECRET_KEY=... pytest tests
  ```

  The secret key is an api client enabled secret key and can be obtained from the applications portal, any api client secret key whitelisted in DIALS can be used. The interactive authentication flow should be tested manually, an example for this can be found in [this line](/tests/integration/test_auth_client.py#L33).

  If testing against a local version of DIALS you need to specify the BASE_URL:

  ```bash
  SECRET_KEY=... BASE_URl=http://localhost:8000 pytest tests
  ```


pkgId: 5c686dd1c0b8f2ae9b7912a5c2a35b107671af23ec0c236bc0a3622ae8b0198c
name: python-cmselemental
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cmselemental/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmselemental-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [//]: # (Badges)
  [![CI](https://github.com/MolSSI/cmselemental/actions/workflows/CI.yaml/badge.svg)](https://github.com/MolSSI/cmselemental/actions/workflows/CI.yaml)
  [![codecov](https://codecov.io/gh/MolSSI/cmslemental/branch/main/graph/badge.svg)](https://codecov.io/gh/MolSSI/cmslemental/branch/main)
  [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/MolSSI/cmselemental.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MolSSI/cmselemental/context:python)
  A python package which provides data models & tools for the Computational Molecular Sciences (CMS).
  CMSElemental provides:
  - Pydantic models:
    - Base models: primarily `ProtoModel`, a subclass of the [pydantic](https://pydantic-docs.helpmanual.io) `BaseModel`, which provides commonly used methods in CMS for data parsing, validation, and serializatio>
    - Procedure models: for storing generic intput/output data associated with CMS procedures.
    - Common models: a miscellaneous collection of frequently used models in CMS.
  - File I/O methods:
    - JSON: support for JSON schema ([draft-07](https://json-schema.org/specification-links.html#draft-7)).
    - YAML: support for YAML [1.1](https://yaml.org/spec/1.1) (PyYAML) and [1.2](https://yaml.org/spec/1.2) (ruamel.yaml).
    - MessagePack: support for the msgpack data format.
    - HDF5: support for [HDF5](https://support.hdfgroup.org/HDF5/doc1.6/UG/03_Model.html) file schema and the [HDF5-JSON](https://github.com/HDFGroup/hdf5-json) specification.


pkgId: d94be9c1eae22d11f1342a330b5c0e2fd1b3edf2f1fbf848715d8cd895decfce
name: python-cmsip
arch: src
version: 0.0.3.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/lijinbio/cmsip
rpm_license: License :: OSI Approved :: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmsip-0.0.3.0-1.src.rpm
checksum_type: sha256
description:
  A scalable, accurate, and efficient solution for hydroxymethylation analysis of CMS-IP sequencing data.

  ![Workflow of CMSIP.](https://github.com/lijinbio/cmsip/raw/master/cmsip_flowchart.png)



  CMSIP has been deployed in Bioconda at https://anaconda.org/bioconda/cmsip. It is encouraged to install CMSIP from Bioconda due to most runtime dependencies will be installed automatically. The following channels should be added in Conda. Namely,

  ```
  conda config --add channels defaults
  conda config --add channels bioconda
  conda config --add channels conda-forge
  conda install cmsip
  ```

  Alternatively, CMSIP has been also deployed in PyPI at https://pypi.org/project/cmsip, and it can be installed via `pip`.

  ```
  pip3 install cmsip
  ```

  In some cases, users want to build CMSIP manually from source code at https://github.com/lijinbio/cmsip. Below is an example installation steps.

  ```
  git clone https://github.com/lijinbio/cmsip.git
  cd cmsip
  python3 setup.py install
  ```

  In order to run CMSIP after a manual installation, the following dependent software are required.

  | Software | URL |
  |-------|-------|
  | Python 3 | https://www.python.org |
  | Matplotlib | https://matplotlib.org |
  | PyYAML | https://pyyaml.org |
  | bedtools | https://bedtools.readthedocs.io |
  | R software | https://www.r-project.org |
  | R package DESeq2 | https://bioconductor.org/packages/release/bioc/html/DESeq2.html |
  | R package genefilter | https://bioconductor.org/packages/release/bioc/html/genefilter.html |
  | R package RVAideMemoire | https://cran.r-project.org/web/packages/RVAideMemoire/index.html |
  | Gawk | https://www.gnu.org/software/gawk |
  | MOABS | https://github.com/sunnyisgalaxy/moabs |



  CMSIP takes in a configuration file for input data and program parameters. CMSIP can be run end-to-end, starting from raw FASTQ files to peak calling and differential hydroxymethylation identification. One can also start the pipeline from intermediate steps. For example, using alignment files as input so that mapping steps will be skipped.



  The configuration file is in a YAML format. Two example templates are `config_fastq.yaml` and `config_bam.yaml` under https://github.com/lijinbio/cmsip/blob/master/config. `config_fastq.yaml` is used as a full CMSIP running from FASTQ inputs, while `config_bam.yaml` is adapted to input existing BAM files so that CMSIP will skip the long-time alignment step. The inspection of configuration is explained below.

  1. sampleinfo

  The sampleinfo section defines metadata information in analysis. Below metadata information can be specified.

  | Parameter | Description |
  |-------|-------|
  | sampleinfo.sampleid | the unique identifier to one sample |
  | sampleinfo.group | the biological group of the sample, e.g., KO or WT |
  | sampleinfo.filenames | the absolute path of raw FASTQ files |
  | sampleinfo.reference | the absolute path of the reference BAM file when `aligninfo.inputbam` is True |
  | sampleinfo.spikein | the absolute path of the spike-in BAM file when `aligninfo.inputbam` and `aligninfo.usespikein` is True |

   2. groupinfo

  This section defines biological comparison `group1` - `group2`, e.g., KO - WT.

  | Parameter | Description |
  |-------|-------|
  | groupinfo.group1 | the first group in biological comparison |
  | groupinfo.group2 | the second group in biological comparison |

  3. resultdir

  This directory is default working directory storing intemediate result files, such as BAM and BED files.

  4. aligninfo

  This section specifies parameters used in raw reads alignment.

  | Parameter | Description |
  |-------|-------|
  | aligninfo.inputbam | True for BAM inputs. Default: FASTQ inputs. |
  | aligninfo.reference | FASTA file of the reference genome, e.g. `hg38.fa`. |
  | aligninfo.usespikein | True for spike-in libraries, otherwise False. This option controls the normalization method, either a spike-in normalization using spike-in mapping, or reduced to WIG sum in reference genome. |
  | aligninfo.spikein | FASTA file of the spike-in genome, e.g. `mm10.fa`. |
  | aligninfo.statfile | the output statistics file. This file includes quality control statistics as well as estimated normalization factors. |
  | aligninfo.barplotinfo | a barplot of normalized WIG sums of samples. |
  | aligninfo.numthreads | number of threads in alignment program. |
  | aligninfo.verbose | Print verbose message |

  5. genomescaninfo

  This section defines parameters for CMS measurement construction.

  | Parameter | Description |
  |-------|-------|
  | genomescaninfo.readextension | True to extend reads length before CMS measurement construction. |
  | genomescaninfo.fragsize | the fixed fragment size to extend when readextension is True. |
  | genomescaninfo.windowfile | an intermediate window file with fixed-size genomic regions. |
  | genomescaninfo.referencename | the UCSC genome name to fetch reference genome size. E.g., hg38 or mm10. |
  | genomescaninfo.windowsize | the window size |
  | genomescaninfo.readscount | CMS measurement using readcount (True) or mean WIG (False). |
  | genomescaninfo.counttablefile | the result count table file. |
  | genomescaninfo.verbose | Print verbose message |

  6. dhmrinfo

  Parameters in this section is for DMR detection.

  | Parameter | Description |
  |-------|-------|
  | dhmrinfo.method | The statistical method used in DHMR detection. Available methods: `ttest`, `chisq`, `gtest`, `nbtest`, `nbtest_sf`. `ttest` is calling Student's t-test to examine the mean difference of CMS measurements between two biological groups. `chisq` and `gtest` are Pearson’s Chi-squared and G-test to test if sums of CMS measurements fit the numbers of replicates between two biological condtions. `nbtest` applies negative binomial generalized linear model to formulate CMS measurements, and Wald test evaluates the significance of logarithmic fold change. By default, CMS measurement are adjusted by size factors using spike-in normalization. In `nbtest_sf`, CMS measurements are normalized by the median-ratio algorithm (previously used in DESeq2 for transcriptome measurements). |
  | dhmrinfo.meandepth | Average depth to filter out low-depth windows. This step is essential to save computing resources and increase power of downstream statistical inference |
  | dhmrinfo.testfile | The result file with statistical outputs for whole genome windows |
  | dhmrinfo.qthr | q-value threshod for DHMW. |
  | dhmrinfo.maxdistance | Maximum distance to merge adjacent DHMWs into DHMRs |
  | dhmrinfo.dhmrfile | The final DHMR result file after merging adjacent DHMWs. |
  | dhmrinfo.numthreads | The number of threads. |
  | dhmrinfo.nsplit | The number of split of windows. This option controls parallelization with `dhmrinfo.numthreads`. |
  | dhmrinfo.verbose | Print verbose message. |
  | dhmrinfo.keepNA | Keep genome windows ruled out by independent filtering. |

  7. useinput

  To indicate if the input data is used during CMS-IP sequencing.

  8. inputinfo

  If `useinput` is True, this section is required to specify input data. When input data is used, peak windows are identified first by comparing CMS measurements between group 1/2 and their input data. Then, the union of peak windows are tested for DHMR between group 1 and group 2.

  | Parameter | Description |
  |-------|-------|
  | inputinfo.group1 | The label for the first group input data. |
  | inputinfo.group2 | The label for the second group input data. Group 1 and group 2 can share same set of input data. |
  | inputinfo.method | The statistical method used in peak calling. See `dhmrinfo.method`. |
  | inputinfo.qthr | q-value threshold for peak calling. |
  | inputinfo.testfile1 | Statistical test results for group 1 peaking calling. |
  | inputinfo.dhmrfile1 | Peak regions for group 1. |
  | inputinfo.testfile2 | Statistical test results for group 2 peaking calling. |
  | inputinfo.dhmrfile2 | Peak regions for group 2. |
  | inputinfo.inputfilterfile | Union of peak regions in group 1 and group 2. |
  | inputinfo.verbose | Print verbose message. |



  To facilitate the running of CMSIP, a toy example is generated using existing BAM inputs. The example is accessible at https://github.com/lijinbio/cmsip/blob/master/example. The `example` directory consists of running scripts and example BAM files. Below commands will generate the configuration file and run the example.

  ```
  $ ./config.sh ## Generate config.yaml
  $ ./fasta.sh ## download the reference genome and the spike-in genome under ./fasta
  $ ./run.sh ## run the example
  ```

  1. `config.sh`

  This script will generate the running configuration file. The inspection of configuration file has been explained above. This example includes small BAM files for 2 KO and 2 WT samples, together with 3 input samples. Spike-in BAM files are also included for spike-in normalization. These BAM files are under the `./bamfile` directory. The `gtest` is used for peaking calling and DHMR detection.

  2. `fasta.sh`

  This script is to download required FASTA file for reference genome and spike-in genome. These FASTA files are used in MCALL for bisulfite conversion ratio (BCR) estimation. FASTA files are downloaded into a local directory `./fasta`.

  3. `run.sh`

  The simple command to run CMSIP:

  ```
  $ cmsip -c config.yaml
  ```

  Intermediate and results files are stored under `./outdir`. The example quality control statistic file (e.g., `qcstats.txt`) is as below.

  | sample_id | total | unique_ref | ref/total | unique_spk | spk/total | comm | comm/total | comm/unique_ref | twss_spk | sizefactors | twss_ref | twss_ref_norm | bcr_ref | bcr_spk |
  |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
  | T1 | 2328 | 2328 | 100.00% | 141 | 6.06% | 99 | 4.25% | 4.25% | 3053 | 0.52 | 171892 | 88620 | 0.022883 | 0.278465 |
  | T2 | 20414 | 20414 | 100.00% | 2780 | 13.62% | 2539 | 12.44% | 12.44% | 9522 | 0.17 | 704965 | 116532 | 0.033482 | 0.178238 |
  | W1 | 1588 | 1588 | 100.00% | 97 | 6.11% | 74 | 4.66% | 4.66% | 1786 | 0.88 | 118312 | 104268 | 0.043317 | 0.206362 |
  | W2 | 1182 | 1182 | 100.00% | 89 | 7.53% | 66 | 5.58% | 5.58% | 1574 | 1.00 | 85335 | 85335 | 0.034864 | 0.214435 |
  | I1 | 212 | 212 | 100.00% | 17 | 8.02% | 4 | 1.89% | 1.89% | 992 | 1.59 | 15984 | 25362 | 0.738502 | 0.811715 |
  | I2 | 150 | 150 | 100.00% | 14 | 9.33% | 1 | 0.67% | 0.67% | 1032 | 1.53 | 11586 | 17671 | 0.897633 | 0.994475 |
  | I3 | 52 | 52 | 100.00% | 9 | 17.31% | 0 | 0.00% | 0.00% | 356 | 4.42 | 2053 | 9077 | 0.910494 | 0.983871 |

  Specifically, the `sizefactors` column is the size factors generated by spike-in normalization.

  The example DHMR file is as below.

  | chrom | start | end | baseMean | lfc | statistic | pvalue | padj |
  |-------|-------|-------|-------|-------|-------|-------|-------|
  | chr4 | 105276100 | 105276400 | 95.88 | -0.8072375451 | 27.63702666 | 1.463503254e-07 | 2.048904555e-06 |
  | chr4 | 105272500 | 105272700 | 86.7175 | -0.837383035 | 19.45881901 | 1.027921214e-05 | 4.796965666e-05 |
  | chr4 | 105259600 | 105259800 | 42.4925 | -0.5320182773 | 5.682020984 | 0.01713961427 | 0.03999243329 |

  For example, three hypo-DHMRs are identified in chr4 between group T and group W.



  Maintainer: Jin Li, lijin.abc@gmail.com.
  PI: De-Qiang Sun, dsun@tamu.edu.


pkgId: e6c3a7cfbc75dfdf7e2bc111f992842d22800f8bf47876ef95d0c463c61f88b4
name: python-cmsplugin-blocks
arch: src
version: 1.5.3
epoch: 0
release: 1
summary: A set of DjangoCMS plugins for structured contents in CMS pages
url: https://github.com/emencia/cmsplugin-blocks
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmsplugin-blocks-1.5.3-1.src.rpm
checksum_type: sha256
description:
  A set of DjangoCMS plugins for structured contents in CMS pages.
  Features
  ********
  * Multiple plugins to implement some common layout components:
    * Accordion;
    * Album;
    * Card;
    * Container;
    * Hero;
    * Slider;
  * Album can be filled from a ZIP with images;
  * Included usage of `django-smart-media`_ for thumbnailing with SVG soft support;
  * Included class for default settings with `django-configuration`_ (optional);
  * Full test coverage;
  Dependencies
  ************
  * Python>=3.8;
  * Django>=3.2,<5.2;
  * `DjangoCMS`_>=3.11.0,<4.0;
  * `djangocms-text-ckeditor`_>=5.0.1;
  * `django-smart-media`_>=0.3.0;
  Links
  *****
  * Read the documentation on `Read the docs <https://cmspluginblocks.readthedocs.io/>`_;
  * Download its `PyPi package <https://pypi.python.org/pypi/cmsplugin-blocks>`_;
  * Clone it on its `Github repository <https://github.com/emencia/cmsplugin-blocks>`_;


pkgId: 3b7ad21c3ec0aedc7067269680c1178da111fba9b7e9b8b3fcd0a5a753141021
name: python-cmsplugin-rt
arch: src
version: 0.5.1
epoch: 0
release: 1
url: https://github.com/RacingTadpole/cmsplugin-rt
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmsplugin-rt-0.5.1-1.src.rpm
checksum_type: sha256
summary:
  This package contains a number of basic plugins to kick start your DjangoCMS project, such as Twitter Bootstrap navbar and buttons, Facebook and Twitter buttons, a Style Modifier, Google Analytics tracking code, Google fonts, meta tags and resizable pictures.


pkgId: cbdd7629032e4d6f94a88712200066ec6af4a358f4fe8e8625c1b1a79d4d4b45
name: python-cmsstyle
arch: src
version: 0.4.3
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/cms-cat/cms-root-style
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmsstyle-0.4.3-1.src.rpm
checksum_type: sha256
description:
  Holding repo for CMS plotting style ROOT macros
  guidelines available at https://cms-analysis.docs.cern.ch/guidelines/plotting/general/


  ```
  pip install cmsstyle
  ```



  Documentation is available at [cmsstyle.readthedocs.io](https://cmsstyle.readthedocs.io/).


pkgId: 31481b29864642bd90d30627c214e17cb1937fa6e4c9fd862d387c59275b6671
name: python-cmu-graphics
arch: src
version: 1.1.37
epoch: 0
release: 1
summary: The graphics framework used by CMU CS Academy, geared toward beginner CS students.
url: https://academy.cs.cmu.edu/
rpm_license: BSD 3-Clause License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmu-graphics-1.1.37-1.src.rpm
checksum_type: sha256
description:
  ![Desktop CMU Graphics logo](https://s3.amazonaws.com/cmu-cs-academy.lib.prod/desktop-cmu-graphics/docs-media/pkg-logo.png)

  Desktop CMU Graphics is an offline version of CMU Graphics, a
  persistent-object graphics package geared towards beginner computer science
  students. CMU Graphics and its desktop version are maintained by
  [CMU CS Academy](https://academy.cs.cmu.edu/), a Carnegie Mellon University
  project which develops free-to-use middle and high school computer science
  curriculum.

  Desktop CMU Graphics works with **Python 3.6-3.11** and is compatible with
  [Replit](https://replit.com/) and [Coding Rooms](https://www.codingrooms.com/)
  (see the "Replit" and "Coding Rooms" sections below). This
  package, including its documentation, is licensed under the
  [BSD 3-Clause license](https://github.com/cmu-cs-academy/desktop-cmu-graphics/blob/master/LICENSE).






  There are two different ways to install Desktop CMU Graphics on a device:

  1. (Mac and Windows only) Use the [zip file installer](https://academy.cs.cmu.edu/desktop) that is available
  for download on the CMU CS Academy website.
  1. (Mac, Windows, and Linux) Use pip, Python’s built-in package-managing software.

  Both methods come with their own advantages and limitations. If you're in doubt
  about which to choose, the zip file installer is the most likely to succeed. It
  should work regardless of most restrictions in place on school-distributed devices.

  For those using devices with Linux operating systems, or for those who are
  familiar with the command line/terminal, the pip version of the
  package offers a larger degree of versatility.

  The remainder of these installation instructions are only for the pip version.



  If you're using Windows, you don't need to install any dependencies. Skip ahead to "Install CMU Graphics" below.

  If you're using a Mac, install [Homebrew](https://brew.sh/).

  If you're using a Mac or Linux, install the software packages needed by pycairo. Read their [getting started page](https://pycairo.readthedocs.io/en/latest/getting_started.html) for instructions.



  Run the following command:

  ```
  pip install cmu-graphics
  ```



  To run our graphics framework, include the following line at the top of your
  Python file:

  ```
  from cmu_graphics import *
  ```

  At the end of your Python file, add this line:

  ```
  cmu_graphics.run()
  ```

  From there, the syntax for using the graphics package is identical to the
  online version of the framework. You can find more details about how to use the
  graphics framework here on our [documentation page](https://academy.cs.cmu.edu/docs).




  If you are a teacher with a CMU CS Academy Account and you have questions about
  CMU Graphics, remember that you can reach out to us through the Support tab on
  the left side of the CMU CS Academy website:

  ![Highlighted teacher support tab](https://s3.amazonaws.com/cmu-cs-academy.lib.prod/desktop-cmu-graphics/docs-media/support-tab.png)

  If you are an educator but do not have an account with CMU CS Academy, you can
  [register for an account here](https://academy.cs.cmu.edu/register).

  If you are a student, or you are exploring Desktop CMU Graphics,
  there are plenty of resources to help you get started with
  the framework. Students can reach out to their teachers for questions about
  CMU Graphics, and a full reference documentation for the graphics
  framework is available on our [documentation page](https://academy.cs.cmu.edu/docs).




  Desktop CMU Graphics is compatible with [Replit](https://replit.com/). To use
  the package on the Replit website:

  1. Create a new repl. Choose "Python-CMUGraphics" as the language.
  1. Run your code!



  Desktop CMU Graphics is compatible with [Coding Rooms](https://www.codingrooms.com/). To use the package on the
  Coding Rooms website:

  1. Visit [this link](https://www.codingrooms.com/compiler/python3) to create a workspace
  1. Click "Start Coding Python for Free Now"
  1. Click the blue "View Desktop" button above the shell
  1. Run your code!


pkgId: 9d0393cbf646e6db9af130cfaa312c0199b9eb5188825c857191357a03721096
name: python-cmudict
arch: src
version: 1.0.31
epoch: 0
release: 1
summary: A versioned python wrapper package for The CMU Pronouncing Dictionary data files.
url: https://github.com/prosegrinder/python-cmudict
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmudict-1.0.31-1.src.rpm
checksum_type: sha256
description:
  [![Latest PyPI version](https://img.shields.io/pypi/v/cmudict.svg)](https://pypi.python.org/pypi/cmudict)
  [![GitHub Workflow Status](https://github.com/prosegrinder/python-cmudict/workflows/Python%20CI/badge.svg?branch=main)](https://github.com/prosegrinder/python-cmudict/actions?query=workflow%3A%22Python+CI%22+branch%3Amain)

  CMUdict is a versioned python wrapper package for
  [The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict) data
  files. The main purpose is to expose the data with little or no assumption on
  how it is to be used.



  `cmudict` is available on PyPI. Simply install it with `pip`:

  ```bash
  pip install cmudict
  ```



  The cmudict data set includes 4 data files: cmudict.dict, cmudict.phones,
  cmudict.symbols, and cmudict.vp. See
  [The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict) for
  details on the data. Chances are, if you're here, you already know what's in the
  files.

  Each file can be accessed through three functions, one which returns the raw
  (string) contents, one which returns a binary stream of the file, and one which
  does minimal processing of the file into an appropriate structure:

  ```python
  >>> import cmudict

  >>> cmudict.dict() # Compatible with NLTK
  >>> cmudict.dict_string()
  >>> cmudict.dict_stream()

  >>> cmudict.phones()
  >>> cmudict.phones_string()
  >>> cmudict.phones_stream()

  >>> cmudict.symbols()
  >>> cmudict.symbols_string()
  >>> cmudict.symbols_stream()

  >>> cmudict.vp()
  >>> cmudict.vp_string()
  >>> cmudict.vp_stream()
  ```

  Three additional functions are included to maintain compatibility with NLTK:
  cmudict.entries(), cmudict.raw(), and cmudict.words(). See the
  [nltk.corpus.reader.cmudict](http://www.nltk.org/_modules/nltk/corpus/reader/cmudict.html)
  documentation for details:

  ```python
  >>> cmudict.entries() # Compatible with NLTK
  >>> cmudict.raw() # Compatible with NLTK
  >>> cmudict.words() # Compatible with NTLK
  ```

  And finally, the license for the cmudict data set is available as well:

  ```python
  >>> cmudict.license_string() # Returns the cmudict license as a string
  ```



  Built on or modeled after the following open source projects:

  - [The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict)
  - [NLTK](https://github.com/nltk/nltk)


pkgId: 1e822d041fd403be0a5d193dc7af714126653dd0667f8718f77702565a2c7b28
name: python-cmw
arch: src
version: 11.0.16
epoch: 0
release: 1
description: Documentation can be found at [commonmarkwebsite.org](https://commonmarkwebsite.org).
url: https://github.com/mizuki-hikaru/cmw
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmw-11.0.16-1.src.rpm
checksum_type: sha256
summary:
  CommonMark Website (cmw): A CLI tool to seamlessly convert CommonMark markdown files into professional HTML websites with minimal effort.


pkgId: 4f66f0fec308986d0d86047eb8d84445737262b0f2f121a03d5b0701d5534ba1
name: python-cmweather
arch: src
version: 0.3.2
epoch: 0
release: 1
url: https://github.com/openradar/cmweather
rpm_license: MIT license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmweather-0.3.2-1.src.rpm
checksum_type: sha256
summary:
  A library of useful colormaps when visualizing weather and climate data, with numerous color vision deficiency friendly options

description:
  [![CI Status](https://github.com/openradar/cmweather/actions/workflows/ci.yaml/badge.svg)](https://github.com/openradar/cmweather/actions/workflows/ci.yaml) [![code-style](https://github.com/openradar/cmweather/actions/workflows/linting.yaml/badge.svg)](https://github.com/openradar/cmweather/actions/workflows/linting.yaml) [![CodeCov](https://img.shields.io/codecov/c/github/openradar/cmweather.svg?style=for-the-badge)](https://codecov.io/gh/openradar/cmweather)[![Conda Package](https://anaconda.org/conda-forge/cmweather/badges/version.svg)](https://anaconda.org/conda-forge/cmweather)



  The motivation for this package is to contain weather maps relevant to the weather and climate community. There are **many** colormaps that are unique to the weather/climate community that are not included in core libraries such as [matplotlib](https://matplotlib.org/). This is also meant to be a community collaboration, across multiple domain-specific packages (ex. MetPy, GeoCAT, Py-ART). It is lightweight, easy to install, and we encourage contributions from across the community!

  While not all of the colormaps are color vision deficiency (CVD) friendly, we do include CVD friendly colormaps, and encourage users to use these when possible.



  cmweather can be found on both PyPI and conda-forge, installable using

  ```bash
  mamba install cmweather
  ```

  or

  ```bash
  pip install cmweather
  ```



  For a development install, do the following in the repository directory:

  ```bash
  conda env update -f ci/environment.yml
  conda activate cmweather-dev
  python -m pip install -e .
  ```

  Also, please install `pre-commit` hooks from the root directory of the created project by running:

  ```
  pre-commit install
  ```


pkgId: 5e27e0d95ce7bf9f9883348d34818c31f14b36637a41a728671d4116e64733bf
name: python-cmyt
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: A collection of Matplotlib colormaps from the yt project
url: https://yt-project.org/
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmyt-2.0.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt)
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt)

  [![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml)
  [![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main)

  [![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)

  <a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="150"></a>

  Matplotlib colormaps from the yt project !



  The following colormaps, as well as their respective reversed (`*_r`) versions are available


  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png" width="800"></a>
  </p>


  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png" width="800"></a>
  </p>


  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png" width="800"></a>
  </p>



  with `pip`
  ```shell
  python -m pip install cmyt
  ```
  or with `conda`
  ```shell
  conda install -c conda-forge cmyt
  ```


  cmyt integrates with matplotlib in a similar fashion to
  [cmocean](https://matplotlib.org/cmocean/) or
  [cmasher](https://cmasher.readthedocs.io)
  ```python
  import numpy as np
  import matplotlib.pyplot as plt
  import cmyt  # that's it !


  prng = np.random.RandomState(0x4D3D3D3)
  noise = prng.random_sample((100, 100))
  x, y = np.mgrid[-50:50, -50:50]
  z = 5 * np.exp(-(x**2 + y**2) / 1000)


  fig, ax = plt.subplots()
  ax.set(aspect="equal")


  im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat")
  fig.colorbar(im, ax=ax)
  ```
  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png" width="400"></a>
  </p>

  ```python

  from cmyt import pastel

  fig, ax = plt.subplots()
  ax.set(aspect="equal")
  im = ax.contourf(x, y, z + noise, cmap=pastel)
  fig.colorbar(im, ax=ax)
  ```
  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png" width="400"></a>
  </p>

  A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline).


pkgId: ea0079df81c488d66592ab400526efca2aeb92f3ca9a9b198deb22ed4fb03431
name: python-cmyt
arch: src
version: 2.0.1
epoch: 0
release: 1
summary: A collection of Matplotlib colormaps from the yt project
url: https://yt-project.org/
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmyt-2.0.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt)
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt)

  [![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml)
  [![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main)

  [![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)

  <a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="150"></a>

  Matplotlib colormaps from the yt project !



  The following colormaps, as well as their respective reversed (`*_r`) versions are available


  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png" width="800"></a>
  </p>


  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png" width="800"></a>
  </p>


  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png" width="800"></a>
  </p>



  with `pip`
  ```shell
  python -m pip install cmyt
  ```
  or with `conda`
  ```shell
  conda install -c conda-forge cmyt
  ```


  cmyt integrates with matplotlib in a similar fashion to
  [cmocean](https://matplotlib.org/cmocean/) or
  [cmasher](https://cmasher.readthedocs.io)
  ```python
  import numpy as np
  import matplotlib.pyplot as plt
  import cmyt  # that's it !


  prng = np.random.RandomState(0x4D3D3D3)
  noise = prng.random_sample((100, 100))
  x, y = np.mgrid[-50:50, -50:50]
  z = 5 * np.exp(-(x**2 + y**2) / 1000)


  fig, ax = plt.subplots()
  ax.set(aspect="equal")


  im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat")
  fig.colorbar(im, ax=ax)
  ```
  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png" width="400"></a>
  </p>

  ```python

  from cmyt import pastel

  fig, ax = plt.subplots()
  ax.set(aspect="equal")
  im = ax.contourf(x, y, z + noise, cmap=pastel)
  fig.colorbar(im, ax=ax)
  ```
  <p align="center">
      <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png" width="400"></a>
  </p>

  A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline).


pkgId: 2f52198f699244f7f3f096fa942f17713d12a2db7f51be6124222844a1802201
name: python-cmyui
arch: src
version: 1.9.3
epoch: 0
release: 1
summary: Tools I find myself constantly rebuilding and reusing.
url: https://github.com/cmyui/cmyui_pkg
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cmyui-1.9.3-1.src.rpm
checksum_type: sha256
description:
  - Async multi-domain http server & sql wrapper
  - Simple logging utilities, for printing in colour w/ timestamps.
  - osu! tools, such as replay and beatmap parsers, and more.
  - Simple discord webhook wrapper, likely going to grow into more.

  ```py


  import asyncio
  import time
  import re
  from typing import NoReturn
  from typing import Optional

  from cmyui.logging import Ansi
  from cmyui.logging import log
  from cmyui.logging import Rainbow
  from cmyui.logging import RGB
  from cmyui.mysql import AsyncSQLPool
  from cmyui.version import Version
  from cmyui.utils import rstring
  from cmyui.web import Connection
  from cmyui.web import Domain
  from cmyui.web import Server
  from pathlib import Path

  version = Version(1, 0, 3)
  debug = True

  sql: Optional[AsyncSQLPool] = None
  players = [just imagine this is a list with
             player objects on a game server]



  app = Server(name=f'Gameserver v{version}',
               gzip=4, verbose=debug)



  domain1 = Domain('osu.ppy.sh')
  domain2 = Domain('cmyui.codes')







  @domain1.route('/ingame/getfriends.php')
  async def ingame_getfriends(conn: Connection) -> Optional[bytes]:
      if 'token' not in conn.headers:
          
          
          return (400, b'Bad Request')

      token = conn.headers['token']

      global players
      if not token in conn.headers:
          return (401, b'Unauthorized')

      
      return '\n'.join(players[token].friends).encode()


  @domain1.route('/ingame/screenshot.php', methods=['POST'])
  async def ingame_screenshot(conn: Connection) -> Optional[bytes]:
      if 'token' not in conn.headers or 'ss' not in conn.files:
          return (400, b'Bad Request')

      token = conn.headers['token']

      global players
      if not token in conn.headers:
          return (401, b'Unauthorized')

      p = players[token]
      ss_file = Path.cwd() / 'ss' / rstring(8)

      with open(ss_file, 'wb') as f:
          f.write(conn.files['ss'])

      
      log(f'{p!r} uploaded {ss_file}.', Ansi.LBLUE)
      log(f'{p!r} uploaded {ss_file}.', RGB(0x77ffdd))
      log(f'{p!r} uploaded {ss_file}.', Rainbow)

      return b'Uploaded'

  @domain2.route(re.compile('^/u/(?P<id>\d{1,10}$'))
  async def user_profile(conn: Connection) -> Optional[bytes]:
      ... # TODO: templates implementation?



  app.add_domains({domain1, domain2})




  async def on_start():
      
      
      sql_info = {
          'db': 'cmyui',
          'host': 'localhost',
          'password': 'lol123',
          'user': 'cmyui'
      }

      global sql
      sql = AsyncSQLPool()
      await sql.connect(sql_info)

  async def disconnect_inactive_players() -> NoReturn:
      ping_timeout = 120
      global players

      while True:
          for p in players:
              if time.time() - p.last_recv_time > ping_timeout:
                  await p.logout()

          await asyncio.sleep(ping_timeout)

  app.add_task(on_start())
  app.add_tasks({on_start(), disconnect_inactive_players()})


  server_addr = ('127.0.0.1', 5001)  # inet4
  server_addr = '/tmp/myserver.sock' # unix




  app.run(server_addr)


pkgId: 262e2f7f053e23696117e65311520869db76565ab24817e1dbd4e70c881d0132
name: python-cn-stock-holidays
arch: src
version: 1.12
epoch: 0
release: 1
summary: A List of china stock exchange holidays
url: https://github.com/rainx/cn_stock_holidays.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cn-stock-holidays-1.12-1.src.rpm
checksum_type: sha256
description:
  ![CI Status](https://github.com/rainx/cn_stock_holidays/actions/workflows/pytest.yml/badge.svg)



  沪深市场

  ```
  cn_stock_holidays/data.txt
  ```

  香港市场

  ```
  cn_stock_holidays/data_hk.txt
  ```

  Fetch Data via URL :

  ```
  wget https://raw.githubusercontent.com/rainx/cn_stock_holidays/main/cn_stock_holidays/data.txt

  or

  curl https://raw.githubusercontent.com/rainx/cn_stock_holidays/main/cn_stock_holidays/data.txt
  ```



  保存除了周六日休市之外，其它休市信息，换行分割

  store all (even upcoming) holiday for china stock exchange (without regular market close date on Saturday Day and Sun Day ) , one date per line



  ```
  YYYYMMDD
  ```



  ```
  pip install cn-stock-holidays
  ```

  or

  ```
  pip install git+https://github.com/rainx/cn_stock_holidays.git
  ```



  ```python


  import cn_stock_holidays.data as shsz


  import cn_stock_holidays.data_hk as hkex

  ```



  ```python
  Help on module cn_stock_holidays.data in cn_stock_holidays:

  NAME
      cn_stock_holidays.data - Help functions for python to get china stock exchange holidays

  FILE
      /Users/rainx/dev/cn_stock_holidays/cn_stock_holidays/data.py

  FUNCTIONS
      check_expired()
          check if local or cached data need update
          :return: true/false

      date_to_int(da)

      date_to_str(da)

      get_cache_path()

      get_cached()
          get from cache version , if it is not exising , use txt file in package data
          :return: a list contains all holiday data, element with datatime.date format

      get_local()
          read data from package data file
          :return: a list contains all holiday data, element with datatime.date format

      get_remote_and_cache()
          get newest data file from network and cache on local machine
          :return: a list contains all holiday data, element with datatime.date format

      int_to_date(d)

      str_to_int(s)

      sync_data()


      is_trading_day(dt)
          param dt: datetime.datetime or datetime.date.
          is a trading day or not
          :returns: Bool

      previous_trading_day(dt):
          param dt: datetime.datetime or datetime.date.
          get previous trading day
          :returns: datetime.date

      next_trading_day(dt):
          param dt: datetime.datetime or datetime.date.
          get next trading day
          :returns: datetime.date

      trading_days_between(start, end):

          param start, end: start and end time , datetime.datetime or datetime.date
          get calendar data range
          :returns: a generator for available dates for chinese market included start and end date
  ```



  from version 0.10 on, we used functools.lrucache on `get_cached` for getting more speech,
  if needed you can used the following syntax to clear cache.

  ```python
  get_cached.cache_clear()

  ```



  we had a script to check the expired of the data and fetch the data from web.

  you could set it up on cron job

  ```crontab
  0 0 * * * /usr/local/bin/cn-stock-holiday-sync > /tmp/cn_stock_holiday_sync.log
  ```

  You could get the absolute path of cn-stock-holiday-sync by which command

  沪深

  ```bash
  which cn-stock-holiday-sync
  ```

  香港

  ```bash
  which cn-stock-holiday-sync-hk
  ```


pkgId: 8b5f07de835602a0a807c250a456ae941ef707237e3e8c2b7e647994e776bdb2
name: python-cn2an
arch: src
version: 0.5.22
epoch: 0
release: 1
summary: Convert Chinese numerals and Arabic numerals.
url: https://github.com/Ailln/cn2an
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cn2an-0.5.22-1.src.rpm
checksum_type: sha256
description:
  [![Pypi](https://img.shields.io/pypi/v/cn2an.svg)](https://pypi.org/project/cn2an/)
  [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/Ailln/cn2an/blob/master/LICENSE)
  [![stars](https://img.shields.io/github/stars/Ailln/cn2an.svg)](https://github.com/Ailln/cn2an/stargazers)
  [![build](https://img.shields.io/github/actions/workflow/status/Ailln/cn2an/build.yml)](https://github.com/Ailln/cn2an/actions/workflows/build.yml)
  [![API](https://img.shields.io/badge/API-reference-pink.svg)](https://github.com/Ailln/cn2an/wiki/API)
  [![download month](https://img.shields.io/pypi/dm/cn2an)](https://pypistats.org/packages/cn2an)

  📦 **`cn2an`** 是一个快速转化 `中文数字` 和 `阿拉伯数字` 的工具包！

  [![](https://ailln.oss-cn-hangzhou.aliyuncs.com/github/cn2an/cn2an-site-latest.png)](https://www.dovolopor.com/cn2an)

  🔗[点击访问 DEMO](https://www.dovolopor.com/cn2an)

  > 🎈 `v0.5.22 update`: replace print with warning.warn
  >
  > 🎈 [`en2an`](https://github.com/Ailln/en2an): 「英文数字」和「阿拉伯数字」互转正在收集需求中！ [详情](https://github.com/Ailln/en2an)
  >
  > 🎈 [`Cn2An.jl`](https://github.com/Ailln/Cn2An.jl): Julia 语言版本已经上线，正在丰富基础功能。[详情](https://github.com/Ailln/Cn2An.jl)





  - 支持 `中文数字` => `阿拉伯数字`；
  - 支持 `大写中文数字` => `阿拉伯数字`；
  - 支持 `中文数字和阿拉伯数字` => `阿拉伯数字`；



  - 支持 `阿拉伯数字` => `中文数字`；
  - 支持 `阿拉伯数字` => `大写中文数字`；
  - 支持 `阿拉伯数字` => `大写人民币`；



  - 支持 `中文数字` => `阿拉伯数字`；
      - 支持 `日期`；
      - 支持 `分数`；
      - 支持 `百分比`；
      - 支持 `摄氏度`；

  - 支持 `阿拉伯数字` => `中文数字`；
      - 支持 `日期`；
      - 支持 `分数`；
      - 支持 `百分比`；
      - 支持 `摄氏度`；



  - 支持 `小数`；
  - 支持 `负数`；
  - 支持 `HTTP API`。



  > ⚠️ 注意：
  > 1. 本地安装仅支持 Python 的 3.6 以上版本；
  > 2. 其他语言用户可以考虑使用 [HTTP API](https://www.dovolopor.com/api/cn2an) ；
  > 3. 尽可能使用 `cn2an` 的最新版本。



  ```shell
  pip install cn2an -U
  ```



  ```shell
  git clone https://github.com/Ailln/cn2an.git
  cd cn2an && python setup.py install
  ```



  ```python

  import cn2an


  print(cn2an.__version__)

  ```



  > 最大支持到 `10**16`，即 `千万亿`，最小支持到 `10**-16`。

  ```python
  import cn2an


  output = cn2an.cn2an("一百二十三")

  output = cn2an.cn2an("一百二十三", "strict")




  output = cn2an.cn2an("一二三", "normal")




  output = cn2an.cn2an("1百23", "smart")




  output = cn2an.cn2an("负一百二十三", "strict")




  output = cn2an.cn2an("一点二三", "strict")


  ```



  > 最大支持到`10**16`，即`千万亿`，最小支持到 `10**-16`。

  ```python
  import cn2an


  output = cn2an.an2cn("123")

  output = cn2an.an2cn("123", "low")




  output = cn2an.an2cn("123", "up")




  output = cn2an.an2cn("123", "rmb")




  output = cn2an.an2cn("-123", "low")




  output = cn2an.an2cn("1.23", "low")


  ```



  > ⚠️：试验性功能，可能会造成不符合期望的转化。

  ```python
  import cn2an


  output = cn2an.transform("小王捡了一百块钱")

  output = cn2an.transform("小王捡了一百块钱", "cn2an")




  output = cn2an.transform("小王捡了100块钱", "an2cn")





  output = cn2an.transform("小王的生日是二零零一年三月四日", "cn2an")



  output = cn2an.transform("小王的生日是2001年3月4日", "an2cn")





  output = cn2an.transform("抛出去的硬币为正面的概率是二分之一", "cn2an")



  output = cn2an.transform("抛出去的硬币为正面的概率是1/2", "an2cn")





  ```



  主要为其他语言（Java、Javascript、Go等）用户提供方便，当然 Python 用户也可以使用，点击查看[详细用法](https://github.com/Ailln/cn2an/wiki/API#http-api)。



  - 理论上支持 `Windows`、`MacOS`、`Ubuntu` 下的所有 `Python 3.6+` 的版本。
  - 实际上仅在 `ubuntu-latest`、`windows-latest`、`macOS-latest` 的 `Python 3.6, 3.7, 3.8` 上做过完整测试。
  - 欢迎提交其他版本使用情况到 [Issues](https://github.com/Ailln/cn2an/issues) 中，期待你的反馈。
  - 如果你有 `Python 2` 的使用需求，可 Fork 代码自行修改。当然也欢迎提 PR，贡献自己代码给其他人。



  1. 先搜索 [Issues](https://github.com/Ailln/cn2an/issues) 中有没有人已经问过类似的问题；
  2. 如果没有找到解答，请新开一个 issue：
      1. 首先，在「issue 标题」中填写你遇到的问题的简介；
      2. 然后，在「issue 详情」中填写你遇到的问题的详情；
      3. 最后，不要忘记注明你使用的操作系统（比如 Windows 10）和 Python 版本（比如 Python 3.6.3）。
  3. 还可以参考 [Issue Template](https://github.com/Ailln/cn2an/tree/master/.github/ISSUE_TEMPLATE) 。





  本项目是用看板管理开发进度，请点击 [v0.5](https://github.com/Ailln/cn2an/projects/4) 查看开发进度和计划事项。



  本地测试使用 [Anaconda](https://www.anaconda.com/) 的虚拟环境，测试方法如下：

  ```bash

  bash scripts/local_test.sh
  ```

  线上测试使用 [GitHub Actions](https://github.com/Ailln/cn2an/actions) 。



  - 测试版本：`v0.5.1`
  - 测试设备：`2.3 GHz 双核Intel Core i5 MacBook Pro`
  - 测试代码：[performance.py](https://github.com/Ailln/cn2an/tree/master/cn2an/performance.py)
  - 测试方法：

      ```bash
      pip install -r requirements_test.txt

      python -m cn2an.performance
      ```

  - 测试结果：

      | 序号 |  功能   | 执行次数  | 执行时间(万次平均) | 性能(次/秒) |
      |:--:|:-----:|:-----:|:----------:|:-------:|
      | 1  | an2cn | 10000 |    0.15    | **67k** |
      | 2  | cn2an | 10000 |    0.35    | **29k** |

  测试时，我使用的是最大长度的测试数据！因此，大多数情况下该库的性能会更好～



  [![](https://award.dovolopor.com?lt=License&rt=MIT&rbc=green)](./LICENSE)
  [![](https://award.dovolopor.com?lt=Ailln's&rt=idea&lbc=lightgray&rbc=red&ltc=red)](https://github.com/Ailln/award)



  欢迎添加微信号：`Ailln_`，备注「cn2an」，邀请你进入 Python 交流群。



  - [Thunder Bouble](https://github.com/sfyc23): 提出很多有效的反馈，包括一些 bug 和新功能；
  - [Damon Yu](https://github.com/20071313): 增加对全角数字和全角符号的支持；
  - [Beants](https://github.com/Beants): 修复了口语格式的 bug；
  - Ray: 提出修改输出 warn 的方法，以及其他一些建议。



  - [🎈 cn2an 核心代码解析](https://www.v2ai.cn/2020/06/30/python/8-cn2an/)
  - [如何发布自己的包到 pypi](https://www.v2ai.cn/2018/07/30/python/1-pypi/)
  - [Python 中的小陷阱](https://www.v2ai.cn/2019/01/01/python/4-python-trap/)
  - [汉字数字转阿拉伯数字](https://www.zouyesheng.com/han-number-convert.html)
  - [Chinese Text Normalization for Speech Processing](https://github.com/speechio/chinese_text_normalization)
  - [The Best Tool of Chinese Number to Digits](https://github.com/Wall-ee/chinese2digits)
  - [Microsoft Recognizers Text Overview](https://github.com/microsoft/Recognizers-Text)
  - [process: 数据预处理管道](https://github.com/Ailln/proces)
  - [wikipedia: 中文数字](https://zh.wikipedia.org/zh-sg/%E4%B8%AD%E6%96%87%E6%95%B0%E5%AD%97)


pkgId: 76ea84525b69b2f16b245acc7dc8cb11cbf3801b6455ed79802fa226b6ba7d17
name: python-cna
arch: src
version: 0.1.6
epoch: 0
release: 1
summary: covarying neighborhood analysis
url: https://github.com/immunogenomics/cna
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cna-0.1.6-1.src.rpm
checksum_type: sha256
description:
  Covarying neighborhood analysis is a method for finding structure in- and conducting association analysis with multi-sample single-cell datasets. `cna` does not require a pre-specified transcriptional structure such as a clustering of the cells in the dataset. It aims instead to flexibly identify differences of all kinds between samples. `cna` is fast, does not require parameter tuning, produces measures of statistical significance for its association analyses, and allows for covariate correction.

  `cna` is built on top of `scanpy` and offers a `scanpy`-like interface for ease of use.

  If you prefer R, there is an [R implementation](https://github.com/korsunskylab/rcna) maintained separately by Ilya Korsunsky. (Though the R implementation may occasionally lag behind this implementation as updates are made.)


  To use `cna`, you can either install it directly from the [Python Package Index](https://pypi.org/) by running, e.g.,

  `pip install cna`

  or if you'd like to manipulate the source code you can clone this repository and add it to your `PYTHONPATH`.


  Take a look at our [tutorial](https://nbviewer.jupyter.org/github/yakirr/cna/blob/master/demo/demo.ipynb) to see how to get started with a small synthetic data set.


  You can learn more about `cna` by watching our [talk](https://youtu.be/FlFYa79D4dc?t=2405) at the Broad Institute's Models, Inference, and Algorithms seminar, which is preceded by a [primer](https://youtu.be/FlFYa79D4dc) by Dylan Kotliar on nearest-neighbor graphs.


  * January 20, 2022:  It has come to our attention that a bug introduced on July 16, 2021 caused `cna` to behave incorrectly for users with `anndata` version 0.7.2 or later, possibly resulting in false positive or false negative results. This bug was fixed in `cna` version 0.1.4. We strongly recommend that any users with `anndata` version 0.7.2 or later either re-clone CNA or run `pip install --upgrade cna` and re-run all analyses that may have been affected.


  If you use `cna`, please cite

  [\[Reshef, Rumker\], et al., Co-varying neighborhood analysis identifies cell populations associated with phenotypes of interest from single-cell transcriptomics](https://www.nature.com/articles/s41587-021-01066-4). \[...\] contributed equally


pkgId: 697d386e8428f2cda4d1926f854a8515afff04ce4df32c9267b08d004b13279d
name: python-cndi
arch: src
version: 2.4.9
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cndi/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cndi-2.4.9-1.src.rpm
checksum_type: sha256
description:
      pip install -U git+https://github.com/mayank31313/python-dependency-injection.git



  Documentation is shifted [here](https://mayank31313.github.io/get-started/site/python-di/)



  Follow the below code to simplify understanding, or can also refer to [main.py](main.py)

      from cndi.annotations import Bean, Autowired, AppInitializer

      class TestBean:
          def __init__(self, name):
              self.name = name


      @Bean()
      def getTestBean() -> TestBean:
          return TestBean("Test 123")

      testBean = None

      app = AppInitializer()
      if __name__ == "__main__":
          @Autowired()
          def setTestBean(bean: TestBean):
              global testBean
              testBean = bean

          app.run()

          print(testBean.name)


pkgId: 88037b698e5c857aaca32561dca894df3e5077f952c45a81c5cc0eeaa809801c
name: python-cnext
arch: src
version: 0.11.6
epoch: 0
release: 1
summary: The data-centric workspace for AI & DS
url: https://cyc-ai.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnext-0.11.6-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <a href="https://www.cnext.io">
      <img
        src="https://avatars.githubusercontent.com/u/105595528?s=200&v=4"
        alt="CNext Logo"
        height="64"
      />
    </a>
    <br />
    <p>
      <h3>
        <b>
          CNext
        </b>
      </h3>
    </p>
    <p>
      <b>
        Open source workspace designed for the DS & AI workflow
      </b>
    </p>
    <p>
       <a href="https://pepy.tech/project/cnext">
       <img
          src="https://static.pepy.tech/personalized-badge/cnext?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads"
          alt="Cnext"
        />
        </a>
        <a href="https://docs.cnext.io/">
        <img
          src="https://img.shields.io/badge/docs-GitBook-blue"
          alt="docs"
        />
        </a>
        <a href="https://www.cnext.io/">
        <img
          src="https://img.shields.io/badge/website-CNext-brightgreen"
          alt="site"
        />
        </a>
        <a href="https://hub.docker.com/r/cycai/cnext">
        <img
          src="https://img.shields.io/badge/docker-CNext-blue"
          alt="docker"
        />
        </a>
        <a href="https://www.youtube.com/watch?v=5eWPkQIUfZw">
        <img
          src="https://img.shields.io/badge/demo-YouTube-red"
          alt="youtube"
        />
        </a>
        <a href="https://join.slack.com/t/cnextcommunity/shared_invite/zt-1ay12cvpx-M29uASHZbFfQ989tVgCHVg">
        <img
          src="https://img.shields.io/badge/chat-Slack-purple"
          alt="slack"
        />
        </a>
    </p>
    <p>
      <sub>
        Built with ❤︎ by
        <a href="https://github.com/cnextio/cnext/graphs/contributors">
          contributors
        </a>
      </sub>
    </p>

    <a href="https://www.cnext.io" target="_blank">
        <img
          src="https://www.cnext.io/gifs/2nd.gif"
          alt="Cnext"
          width="80%"
        />
  </div>






  CNext is a workspace for DS and AI workflows. This workspace is meant to consolidate the most common tasks performed by data scientists and ML engineers. At a high level our workspace allows for:

  -   Data exploration & transformation
  -   Model development / exploration
  -   Production code generation
  -   Dashboard & App Generation
  -   Experiment Management



  -   Interactive Python coding envrionment with native Python output (think Jupyter replacement)
  -   Smart code suggestion (categorical values and column names)
  -   Interactive data exploration
  -   Automative visualizations
  -   Experiment and model management
  -   Instant dashboarding

  🚀 **Requests:** We're actively developing features based off user feedback, if you'd like to make any suggestions please feel free to hit us up on Slack.



  PLEASE NOTE: CNext requires npm >= 18.4 and Python >= 3.9.7 . Please ensure your environment meets the minimum requirements before beginning the installation.

  Step 1: Make sure `Nodejs` is available in your computer (try `npm --version`)

  Step 2: `run` command `pip install -U cnext`

  Step 3: `run` command `cnext`

  -   Input `Enter path to the cnext sample project created in Step 1` and hit `Enter` (Example `C:/Skywalker`)

  -   Web application will launch at : `http://localhost:CLIENT_PORT` or `http://127.0.0.1:CLIENT_PORT/` (CLIENT_PORT default is 4000)
  -   Stop application: `Ctrl + c | Command + c`
  -   Note: Pay attention at `CLIENT_PORT`, and `SERVER_PORT` in `.env` file (you will have to change these ports if you already use them on your machine)



  cnext is also available via pre-built Docker images. To get started, you can simply run the following command:

  ```bash
  docker run --rm -it -p 4000:4000 -p 5000:5000 -p 5011:5011 -p 5008:5008 -p 5005:5005 cycai/cnext
  ```

  The web application will launch at: `http://localhost:4000` or `http://127.0.0.1:4000/`



  Copyright 2022 CycAI Inc. Distributed under MIT License.
  ​
  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.

  [website]: https://www.cnext.io/
  [docker image]: https://hub.docker.com/r/cycai/cnext
  [documentation]: https://docs.cnext.io/
  [overview video]: https://youtu.be/5eWPkQIUfZw
  [cnext]: https://drive.google.com/file/d/1ft4PmFclylOtEAQSPBqn9nUSyAkMs5R-
  [docker]: https://www.docker.com/products/docker-desktop/


pkgId: 4a364346168bd37fa1e0f91d17356e4eb4c8f6e1c60dd454516950d11a59c873
name: python-cnext-test
arch: src
version: 0.7.5
epoch: 0
release: 1
summary: The data-centric workspace for AI & DS
url: https://cyc-ai.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnext-test-0.7.5-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <a href="https://www.cnext.io">
      <img
        src="https://avatars.githubusercontent.com/u/105595528?s=200&v=4"
        alt="CNext Logo"
        height="64"
      />
    </a>
    <br />
    <p>
      <h3>
        <b>
          CNext
        </b>
      </h3>
    </p>
    <p>
      <b>
        Open source workspace designed for DS & AI workflows
      </b>
    </p>
    <p>
       <a href="https://pepy.tech/project/cnext">
       <img
          src="https://static.pepy.tech/personalized-badge/cnext?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads"
          alt="Cnext"
        />
        </a>
        <a href="https://docs.cnext.io/">
        <img
          src="https://img.shields.io/badge/docs-GitBook-blue"
          alt="docs"
        />
        </a>
        <a href="https://www.cnext.io/">
        <img
          src="https://img.shields.io/badge/website-CNext-brightgreen"
          alt="site"
        />
        </a>
        <a href="https://hub.docker.com/r/cycai/cnext">
        <img
          src="https://img.shields.io/badge/docker-CNext-blue"
          alt="docker"
        />
        </a>
        <a href="https://www.youtube.com/watch?v=5eWPkQIUfZw">
        <img
          src="https://img.shields.io/badge/demo-YouTube-red"
          alt="youtube"
        />
        </a>
        <a href="https://join.slack.com/t/cnextcommunity/shared_invite/zt-1ay12cvpx-M29uASHZbFfQ989tVgCHVg">
        <img
          src="https://img.shields.io/badge/chat-Slack-purple"
          alt="slack"
        />
        </a>
    </p>
    <p>
      <sub>
        Built with ❤︎ by
        <a href="https://github.com/cnextio/cnext/graphs/contributors">
          contributors
        </a>
      </sub>
    </p>

    <a href="https://www.cnext.io" target="_blank">
        <img
          src="https://www.cnext.io/gifs/2nd.gif"
          alt="Cnext"
          width="80%"
        />
  </div>






  CNext is a workspace for DS and AI workflows. This workspace is meant to consolidate the most common tasks performed by data scientists and ML engineers. At a high level our workspace allows for:

  -   Data exploration & transformation
  -   Model development / exploration
  -   Production code generation
  -   Dashboard & App Generation
  -   Experiment Management



  -   Interactive Python coding envrionment with native Python output (think Jupyter replacement)
  -   Smart code suggestion (categorical values and column names)
  -   Interactive data exploration
  -   Automative visualizations
  -   Experiment and model management
  -   Instant dashboarding

  🚀 **Requests:** We're actively developing features based off user feedback, if you'd like to make any suggestions please feel free to hit us up on Slack.



  PLEASE NOTE: CNext requires npm >= 18.4 and Python >= 3.9.7 . Please ensure your environment meets the minimum requirements before beginning the installation.

  Step 1: Make sure `Nodejs` is available in your computer (try `npm --version`)

  Step 2: `run` command `pip install -U cnext`

  Step 3: `run` command `cnext`

  -   Input `Enter path to the cnext sample project created in Step 1` and hit `Enter` (Example `C:/Skywalker`)

  -   Web application will launch at : `http://localhost:CLIENT_PORT` or `http://127.0.0.1:CLIENT_PORT/` (CLIENT_PORT default is 4000)
  -   Stop application: `Ctrl + c | Command + c`
  -   Note: Pay attention at `CLIENT_PORT`, and `SERVER_PORT` in `.env` file (you will have to change these ports if you already use them on your machine)



  cnext is also available via pre-built Docker images. To get started, you can simply run the following command:

  ```bash
  docker run --rm -it -p 4000:4000 -p 5000:5000 -p 5011:5011 -p 5008:5008 -p 5005:5005 cycai/cnext
  ```

  The web application will launch at: `http://localhost:4000` or `http://127.0.0.1:4000/`



  Copyright 2022 CycAI Inc. Distributed under MIT License.
  ​
  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.

  [website]: https://www.cnext.io/
  [docker image]: https://hub.docker.com/r/cycai/cnext
  [documentation]: https://docs.cnext.io/
  [overview video]: https://youtu.be/5eWPkQIUfZw
  [cnext]: https://drive.google.com/file/d/1ft4PmFclylOtEAQSPBqn9nUSyAkMs5R-
  [docker]: https://www.docker.com/products/docker-desktop/


pkgId: 233c16056fee32f9f1f386979bfb841b6dcd1cce72d9986525ad0c4dab05bf8d
name: python-cnl2asp
arch: src
version: 1.3.12
epoch: 0
release: 1
summary: A tool for converting a Controlled Natural Language based on English into Answer Set Programming
url: https://github.com/dodaro/cnl2asp/tree/main
rpm_license: Apache License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnl2asp-1.3.12-1.src.rpm
checksum_type: sha256
description:
  A tool for converting a Controlled Natural Language based on English into Answer Set Programming

  Documentation is available at:
  https://dodaro.github.io/cnl2asp/


pkgId: 1f9203af15ae5c93306e9c376d7552770658b607cbe50cea59163b60241500af
name: python-cnlp-transformers
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Transformers for Clinical NLP
url: https://github.com/Machine-Learning-for-Medical-Language/cnlp_transformers/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnlp-transformers-0.7.0-1.src.rpm
checksum_type: sha256
description:
  Transformers for Clinical NLP

  This library was created to add abstractions on top of the Huggingface Transformers library for many clinical NLP research use cases.
  Primary use cases include

   1) simplifying multiple tasks related to fine-tuning of transformers for building models for clinical NLP research, and
   2) creating inference APIs that will allow downstream researchers easier access to clinical NLP outputs.

  This library is _not_ intended to serve as a place for clinical NLP applications to live. If you build something cool that uses transformer models that take advantage of our model definitions, the best practice is probably to rely on it as a library rather than treating it as your workspace. This library is also not intended as a deployment-ready tool for _scalable_ clinical NLP. There is a lot of interest in developing methods and tools that are smaller and can process millions of records, and this library can potentially be used for research along those line. But it will probably never be extremely optimized or shrink-wrapped for applications. However, there should be plenty of examples and useful code for people who are interested in that type of deployment.


  > [!WARNING]
  macOS support is currently experimental. We recommend using python3.10 for macOS installations.

  > [!NOTE]
  When installing the library's dependencies, `pip` will probably install
  PyTorch with CUDA 10.2 support by default. If you would like to run the
  library in CPU-only mode or with a newer version of CUDA, [install PyTorch
  to your desired specifications](https://pytorch.org/get-started/locally/)
  in your virtual environment first before installing `cnlp-transformers`.



  If you are installing just to fine-tune or run the REST APIs,
  you can install without cloning:

  ```sh

  pip install cnlp-transformers
  ```

  If you prefer, [prebuilt Docker images](https://hub.docker.com/repository/docker/smartonfhir/cnlp-transformers) are also available to run the REST APIs in a network.
  An example [Docker Compose configuration](./docker/compose.yaml) is also available for reference.



  If you want to modify code (e.g., for developing new models), then install locally:

  1. Clone this repository:

     ```sh
     
     $ git clone https://github.com/Machine-Learning-for-Medical-Language/cnlp_transformers.git
     
     $ git clone git@github.com:Machine-Learning-for-Medical-Language/cnlp_transformers.git
     ```

  2. Enter the repo: `cd cnlp_transformers`

  3. Follow the instructions [here](CONTRIBUTING.md#set-up-your-python-environment) to set up your Python environment.



  The main entry point for fine-tuning is the ```cnlp_transformers/src/cnlpt/train_system.py``` script. Run with no arguments to show an extensive list of options that are allowed, inheriting from and extending the Huggingface training options.



  To use the library for fine-tuning, you'll need to take the following steps:

  1. Write your dataset to one of the following formats in a folder with train, dev, and test files:
     1. csv or tsv: The first row should have column names separated by comma or tab. The name ```text``` has special meaning as the input string. Likewise if there are columns named ```text_a``` and ```text_b``` it will be interpreted as two parts of a transformer input string separated by a `<sep>`-token equivalent. All other columns are treated as potential targets -- their names can be passed to the ```train_system.py``` script as ```--task_name``` arguments. For tagging targets, the field must consist of space-delimited labels, one per space-delimited token in the ```text``` field. For relation extraction targets, the field must be a ``` , ``` delimited list of relation tuples, where each relation tuple is (<offset 1>, <offset 2>,label), where offset 1 and 2 are token indices into the space-delimited tokens in the ```text``` field.
     2. json: The file format must be the following:

        ```jsonc
        {
          "data": [
            {
              "text": "<text of instance>",
              "id": "<instance id>",
              "<sub-task 1 name>": "<instance label>",
              "<sub-task 2 name>": "<instance label>",
              // ... other labels
            },
            // ...
            {
              // instance N
            },
          ],
          "metadata": {
            "version": "<optional dataset versioning>",
            "task": "<overall task/dataset name>",
            "subtasks": [
              {
                "task_name": "<sub-task 1 name>",
                "output_mode": "<sub-task output mode (e.g. tagging, relex, classification)>",
              },
              // ...
              {
                "task_name": "<sub-task n name>",
                "output_mode": "<sub-task output mode (e.g. tagging, relex, classification)>",
              }
            ]
          }
        }
        ```

        Instance labels should be formatted the same way as in the csv/tsv example above, see specifically the formats for tagging and relations. The 'metadata' field can either be included in the train/dev/test files or as a separate metadata.json file.

  2. Run train_system.py with a ```--task_name``` from your data files and the ```--data-dir``` argument from Step 1. If no ```--task_name``` is provided, all tasks will be trained.



  We provided the following step-by-step examples how to finetune in clinical NLP tasks:







  Run ```python -m cnlpt.train_system -h``` to see all the available options. In addition to inherited Huggingface Transformers options, there are options to do the following:

  * Select different models: ```--model hier``` uses a hierarchical transformer layer on top of a specified encoder model. We recommend using a very small encoder: ```--encoder microsoft/xtremedistil-l6-h256-uncased``` so that the full model fits into memory.
  * Run simple baselines (use ``--model cnn|lstm --tokenizer_name roberta-base`` -- since there is no HF model then you must specify the tokenizer explicitly)
  * Use a different layer's CLS token for the classification (e.g., ```--layer 10```)
  * Probabilistically freeze weights of the encoder (leaving classifier weights all unfrozen) (```--freeze``` alone freezes all encoder weights, ```--freeze <float>``` when given a parameter between 0 and 1, freezes that percentage of encoder weights)
  * Classify based on a token embedding instead of the CLS embedding (```--token``` -- applies to the event/entity classification setting only, and requires the input to have xml-style tags (`<e>`, `</e>`) around the tokens representing the event/entity)
  * Use class-weighted loss function (```--class_weights```)



  There are existing REST APIs in the ```src/cnlpt/api``` folder for a few important clinical NLP tasks:

  1. Negation detection
  2. Time expression tagging (spans + time classes)
  3. Event detection (spans + document creation time relation)
  4. End-to-end temporal relation extraction (event spans+DTR+timex spans+time classes+narrative container [CONTAINS] relation extraction)



  To demo the negation API:

  1. Install the `cnlp-transformers` package.
  2. Run `cnlpt_negation_rest [-p PORT]`.
  3. Open a python console and run the following commands:



  ```ipython
  >>> import requests
  >>> process_url = 'http://hostname:8000/negation/process'  ## Replace hostname with your host name
  ```



  ```ipython
  >>> sent = 'The patient has a sore knee and headache but denies nausea and has no anosmia.'
  >>> ents = [[18, 27], [32, 40], [52, 58], [70, 77]]
  >>> doc = {'doc_text':sent, 'entities':ents}
  ```



  ```ipython
  >>> r = requests.post(process_url, json=doc)
  >>> r.json()
  ```

  Output: `{'statuses': [-1, -1, 1, 1]}`

  The model correctly classifies both nausea and anosmia as negated.



  To demo the temporal API:

  1. Install the `cnlp-transformers` package.
  2. Run `cnlpt_temporal_rest [-p PORT]`
  3. Open a python console and run the following commands to test:



  ```ipython
  >>> import requests
  >>> from pprint import pprint
  >>> process_url = 'http://hostname:8000/temporal/process_sentence'  ## Replace hostname with your host name
  ```



  ```ipython
  >>> sent = 'The patient was diagnosed with adenocarcinoma March 3, 2010 and will be returning for chemotherapy next week.'
  >>> r = requests.post(process_url, json={'sentence':sent})
  >>> pprint(r.json())
  ```

  should return:

  ```json
  {
    "events": [
      [
        {"begin": 3, "dtr": "BEFORE", "end": 3},
        {"begin": 5, "dtr": "BEFORE", "end": 5},
        {"begin": 13, "dtr": "AFTER", "end": 13},
        {"begin": 15, "dtr": "AFTER", "end": 15}
      ]
    ],
    "relations": [
      [
        {"arg1": "TIMEX-0", "arg2": "EVENT-0", "category": "CONTAINS"},
        {"arg1": "EVENT-2", "arg2": "EVENT-3", "category": "CONTAINS"},
        {"arg1": "TIMEX-1", "arg2": "EVENT-2", "category": "CONTAINS"},
        {"arg1": "TIMEX-1", "arg2": "EVENT-3", "category": "CONTAINS"}
      ]
    ],
    "timexes": [
      [
        {"begin": 6, "end": 9, "timeClass": "DATE"},
        {"begin": 16, "end": 17, "timeClass": "DATE"}
      ]
    ]
  }
  ```

  This output indicates the token spans of events and timexes, and relations between events and timexes, where the suffixes are indices into the respective arrays (e.g., TIMEX-0 in a relation refers to the 0th time expression found, which begins at token 6 and ends at token 9 -- ["March 3, 2010"])

  To run only the time expression or event taggers, change the run command to:

  ```uvicorn cnlpt.api.timex_rest:app --host 0.0.0.0``` or

  ```uvicorn cnlpt.api.event_rest:app --host 0.0.0.0```

  then run the same process commands as above (including the same URL). You will get similar json output, but only one of the dictionary elements (timexes or events) will be populated.


pkgId: c770f8b775acf5d56af50e3b2bd53a4789f7ed2dd602383c328a42ae6d24cf4c
name: python-cnlunar
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/OPN48/cnLunar
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnlunar-0.1.4-1.src.rpm
checksum_type: sha256
description:
      import datetime

      import cnlunar

      

      a = cnlunar.Lunar(datetime.datetime(2022, 11, 14, 10, 30), godType='8char')  # 常规算法
      

      '日期': a.date,

      '农历数字': (a.lunarYear, a.lunarMonth, a.lunarDay, '闰' if a.isLunarLeapMonth else ''),

      '农历': '%s %s[%s]年 %s%s' % (a.lunarYearCn, a.year8Char, a.chineseYearZodiac, a.lunarMonthCn, a.lunarDayCn),

      '星期': a.weekDayCn,

      

      '今日节日': (a.get_legalHolidays(), a.get_otherHolidays(), a.get_otherLunarHolidays()),

      '八字': ' '.join([a.year8Char, a.month8Char, a.day8Char, a.twohour8Char]),

      '今日节气': a.todaySolarTerms,

      '下一节气': (a.nextSolarTerm, a.nextSolarTermDate, a.nextSolarTermYear),

      '今年节气表': a.thisYearSolarTermsDic,

      '季节': a.lunarSeason,

      '今日时辰': a.twohour8CharList,

      '时辰凶吉': a.get_twohourLuckyList(),

      '生肖冲煞': a.chineseZodiacClash,

      '星座': a.starZodiac,

      '星次': a.todayEastZodiac,

      '彭祖百忌': a.get_pengTaboo(),

      '彭祖百忌精简': a.get_pengTaboo(long=4, delimit='<br>'),

      '十二神': a.get_today12DayOfficer(),

      '廿八宿': a.get_the28Stars(),

      '今日三合': a.zodiacMark3List,

      '今日六合': a.zodiacMark6,

      '今日五行': a.get_today5Elements(),

      '纳音': a.get_nayin(),

      '九宫飞星': a.get_the9FlyStar(),

      '吉神方位': a.get_luckyGodsDirection(),

      '今日胎神': a.get_fetalGod(),

      '神煞宜忌': a.angelDemon,

      '今日吉神': a.goodGodName,

      '今日凶煞': a.badGodName,

      '宜': a.goodThing,

      '忌': a.badThing,

      '时辰经络': a.meridians

  八字月柱与八字日柱算神煞版本

  日期 	:	 2021-02-07 10:30:00

  农历数字 :	 (2020, 12, 26, '')

  农历 	:	 二零二零 庚子[鼠]年 腊月大廿六

  星期 	:	 星期日

  今日节日 :	 ('', '京汉铁路罢工纪念', '')

  八字 	:	 庚子 庚寅 丙戌 癸巳

  今日节气 :	 无

  下一节气 :	 ('雨水', (2, 18), 2021)

  今年节气表 :	 {'小寒': (1, 5), '大寒': (1, 20), '立春': (2, 3), '雨水': (2, 18), '惊蛰': (3, 5), '春分': (3, 20), '清明': (4, 4), '谷雨': (4, 20), '立夏': (5, 5), '小满': (5, 21), '芒种': (6, 5), '夏至': (6, 21), '小暑': (7, 7), '大暑': (7, 22), '立秋': (8, 7), '处暑': (8, 23), '白露': (9, 7), '秋分': (9, 23), '寒露': (10, 8), '霜降': (10, 23), '立冬': (11, 7), '小雪': (11, 22), '大雪': (12, 7), '冬至': (12, 21)}

  季节 	:	 孟春

  今日时辰 :	 ['戊子', '己丑', '庚寅', '辛卯', '壬辰', '癸巳', '甲午', '乙未', '丙申', '丁酉', '戊戌', '己亥', '庚子']

  时辰凶吉 :	 ['凶', '凶', '吉', '凶', '吉', '吉', '凶', '凶', '吉', '吉', '凶', '吉', '凶']

  生肖冲煞 :	 狗日冲龙

  星座 	:	 水瓶座

  星次 	:	 娵訾

  彭祖百忌 :	 丙不修灶 必见灾殃,戌不吃犬 作怪上床

  彭祖百忌精简 :	 丙不修灶<br>戌不吃犬

  十二神 	:	 ('成', '司命', '黄道日')

  廿八宿 	:	 星日马

  今日三合 :	 ['虎', '马']

  今日六合 :	 兔

  今日五行 :	 ['天干', '丙', '属火', '地支', '戌', '属土', '纳音', '土', '属土', '廿八宿', '星', '宿', '十二神', '成', '日']

  纳音 	:	 屋上土

  九宫飞星 :	 279135684

  吉神方位 :	 ['喜神西南', '财神西南', '福神西北', '阳贵正西', '阴贵西北']

  今日胎神 :	 厨灶栖外西北

  神煞宜忌 :	 ((['月德', '三合', '四相', '天喜', '月恩', '天官'], ['月厌', '神号', '伏兵', '地火', '受死', '飞廉', '大煞', '四击', '宝日']), (['祭祀', '出行', '结婚姻', '宴会', '嫁娶', '修造', '求医疗病', '上表章', '上官', '入学', '进人口', '竖柱上梁', '经络', '开市', '纳财', '安碓硙', '栽种', '牧养', '安葬', '选将', '求嗣', '酝酿', '临政', '庆赐', '安抚边境', '解除', '筑堤防', '祈福', '出师', '纳采', '纳畜', '营建', '立券交易', '缮城郭', '修宫室', '恤孤茕', '覃恩', '裁制', '开仓', '修仓库', '上册', '雪冤', '搬移'], ['剃头', '冠带', '修置产室', '开渠', '穿井', '平治道涂', '破屋坏垣', '伐木', '畋猎', '破土', '启攒', '布政事', '修饰垣墙', '整手足甲', '远回', '整容', '补垣', '取鱼', '鼓铸', '塞穴']))

  今日吉神 :	 ['月德', '三合', '四相', '天喜', '月恩', '天官']

  今日凶煞 :	 ['月厌', '神号', '伏兵', '地火', '受死', '飞廉', '大煞', '四击', '宝日']

  宜忌等第 :	 中：吉不抵凶，遇德从宜不从忌，不遇从忌不从宜。

  宜 		:	 ['祭祀', '出行', '结婚姻', '宴会', '嫁娶', '修造', '求医疗病', '上表章', '上官', '入学', '进人口', '竖柱上梁', '经络', '开市', '纳财', '安碓硙', '栽种', '牧养', '安葬', '选将', '求嗣', '酝酿', '临政', '庆赐', '安抚边境', '解除', '筑堤防', '祈福', '出师', '纳采', '纳畜', '营建', '立券交易', '缮城郭', '修宫室', '恤孤茕', '覃恩', '裁制', '开仓', '修仓库', '上册', '雪冤', '搬移']

  忌 		:	 ['剃头', '冠带', '修置产室', '开渠', '穿井', '平治道涂', '破屋坏垣', '伐木', '畋猎', '破土', '启攒', '布政事', '修饰垣墙', '整手足甲', '远回', '整容', '补垣', '取鱼', '鼓铸', '塞穴']

  时辰经络 :	 脾


pkgId: 8da98a122bfe7762af275f46f6b51d32ab92012b03aa2e7b0bc0e9ab2b938621
name: python-cnmaps
arch: src
version: 1.1.9
epoch: 0
release: 1
summary: A python package to draw china maps more easily
url: https://github.com/cnmetlab/cnmaps
rpm_license: BSD 3-Clause License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnmaps-1.1.9-1.src.rpm
checksum_type: sha256
description:
  <h4>
      cnmaps 是一个可以让中国地图画起来更丝滑的地图类python扩展包
  </h4>

  <a href="https://github.com/cnmetlab/cnmaps/actions/workflows/python-package-conda.yml">
  <img src="https://github.com/cnmetlab/cnmaps/actions/workflows/python-package-conda.yml/badge.svg?branch=main"
   alt="Pytest" /></a>

  <a href="https://github.com/cnmetlab/cnmaps/actions/workflows/pypi-publish.yml">
  <img src="https://github.com/cnmetlab/cnmaps/actions/workflows/pypi-publish.yml/badge.svg"
   alt="Pypi publish"/> </a>

  <a href="https://anaconda.org/conda-forge/cnmaps">
  <img src="https://anaconda.org/conda-forge/cnmaps/badges/version.svg"
   alt="Anaconda" /></a>

  <a href="https://anaconda.org/conda-forge/cnmaps">
  <img src="https://anaconda.org/conda-forge/cnmaps/badges/platforms.svg" /> </a>

  <a href="https://anaconda.org/conda-forge/cnmaps">
  <img src="https://anaconda.org/conda-forge/cnmaps/badges/latest_release_relative_date.svg" /> </a>

  <a href="https://anaconda.org/conda-forge/cnmaps">
  <img src="https://anaconda.org/conda-forge/cnmaps/badges/downloads.svg"
   alt="Conda downloads"/> </a>

  <a href="https://badge.fury.io/py/cnmaps">
  <img src="https://badge.fury.io/py/cnmaps.svg"
   alt="PyPI version" /></a>

  <a href="https://pepy.tech/project/cnmaps">
  <img src="https://static.pepy.tech/personalized-badge/cnmaps?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Pypi%20Downloads"
   alt="Pypi Downloads" /></a>

  <a href='https://cnmaps.readthedocs.io/zh_CN/latest/'>
      <img src='https://readthedocs.org/projects/cnmaps/badge/?version=latest' alt='Documentation Status' />
  </a>

  <a href="https://www.codacy.com/gh/Clarmy/cnmaps/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Clarmy/cnmaps&amp;utm_campaign=Badge_Grade">
    <img src="https://app.codacy.com/project/badge/Grade/ef6ab1893b0b47428b287f2f2875021c"/>
   </a>

  <a href="https://cnmetlab.github.io/cnmaps/performance/">
    <img src="https://img.shields.io/badge/performance-benchmark-yellow"/>
   </a>

  <a href="https://codecov.io/gh/cnmetlab/cnmaps" >
   <img src="https://codecov.io/gh/cnmetlab/cnmaps/branch/main/graph/badge.svg?token=CF80D3CSR9"/>
   </a>

  <a href="https://github.com/Clarmy/cnmaps/issues">
  <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"
   alt="contributions welcome" /></a>

  <a href="https://github.com/psf/black">
  <img src="https://img.shields.io/badge/code%20style-black-000000.svg"
   alt="style" /></a>



  安装 cnmaps 需要满足 Python 的解释器在 3.9 版本及以上。


  cnmaps 最简单也最快的安装方法是使用 pip 来安装 cnmaps： `$ pip install -U cnmaps`


  你也可以使用 conda 安装： ``$ conda install -c conda-forge cnmaps``






  用最简单直接的方式，来绘制你的第一张中国地图。

  ```python
  import cartopy.crs as ccrs
  import matplotlib.pyplot as plt
  from cnmaps import get_adm_maps, draw_maps

  fig = plt.figure(figsize=(10,10))
  ax = fig.add_subplot(111, projection=ccrs.PlateCarree())

  draw_maps(get_adm_maps(level='国'))
  plt.show()
  ```



  cnmaps还可以绘制各省（特区/直辖市）的地图

  ```python
  import cartopy.crs as ccrs
  import matplotlib.pyplot as plt
  from cnmaps import get_adm_maps, draw_maps

  fig = plt.figure(figsize=(10,10))
  ax = fig.add_subplot(111, projection=ccrs.PlateCarree())

  draw_maps(get_adm_maps(level='省'), linewidth=0.8, color='r')

  plt.show()
  ```



  cnmaps可以绘制市级的行政区地图。

  ```python
  import cartopy.crs as ccrs
  import matplotlib.pyplot as plt
  from cnmaps import get_adm_maps, draw_maps

  fig = plt.figure(figsize=(15,15))
  ax = fig.add_subplot(111, projection=ccrs.PlateCarree())

  draw_maps(get_adm_maps(level='市'), linewidth=0.5, color='g')

  plt.show()
  ```



  cnmaps可以绘制区县级的行政区地图。

  ```python
  import cartopy.crs as ccrs
  import matplotlib.pyplot as plt
  from cnmaps import get_adm_maps, draw_maps

  fig = plt.figure(figsize=(20,20))
  ax = fig.add_subplot(111, projection=ccrs.PlateCarree())

  draw_maps(get_adm_maps(level='区县'), linewidth=0.8, color='r')

  plt.show()
  ```



  针对本项目更多的使用方法，我们还有一份更详细的文档：[cnmaps使用指南](https://cnmaps.readthedocs.io/zh_CN/latest/index.html)


pkgId: 041a71cf2577d60ea716cbb4d07dd8dfd57d72928f86bc76608c3e158381c060
name: python-cnmf
arch: src
version: 1.6.0
epoch: 0
release: 1
summary: Consensus NMF for scRNA-Seq data
url: https://github.com/dylkot/cNMF
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnmf-1.6.0-1.src.rpm
checksum_type: sha256
description:
  <img src="https://storage.googleapis.com/sabeti-public/dkotliar/elife-cNMF-fig1.jpg" style="height: 800px;" />

  cNMF is a pipeline for inferring gene expression programs from scRNA-Seq. It takes a count matrix (N cells X G genes) as input and produces a (K x G) matrix of gene expression programs (GEPs) and a (N x K) matrix specifying the usage of each program for each cell in the data. Read more about the method in the [publication](https://elifesciences.org/articles/43803) and check out examples on [simulated data](Tutorials/analyze_simulated_example_data.ipynb) and [PBMCs](Tutorials/analyze_pbmc_example_data.ipynb).

  We have also created a tutorial for running cNMF from R. See the [Rmd notebook](Tutorials/R_vignette.Rmd) or the [compiled html](Tutorials/R_vignette.nb.html) for this.


  cNMF has been tested with Python 3.7 and 3.10 and requires scikit-learn>=1.0, scanpy>=1.8, and AnnData>=0.9

  You can install with [pip](https://pypi.org/):

  ```bash
  pip install cnmf
  ```

  If you want to use the batch correction preprocessing, you also need to install the [Python implementation of Harmony](https://github.com/slowkow/harmonypy) and scikit-misc

  ```bash
  pip install harmonypy
  pip install scikit-misc
  ```



  cNMF can be run from the command line without any parallelization using the example commands below:

  ```bash
  cnmf prepare --output-dir ./example_data --name example_cNMF -c ./example_data/counts_prefiltered.txt -k 5 6 7 8 9 10 11 12 13 --n-iter 100 --seed 14

  cnmf factorize --output-dir ./example_data --name example_cNMF --worker-index 0 --total-workers 1

  cnmf combine --output-dir ./example_data --name example_cNMF

  cnmf k_selection_plot --output-dir ./example_data --name example_cNMF

  cnmf consensus --output-dir ./example_data --name example_cNMF --components 10 --local-density-threshold 0.01 --show-clustering
  ```

  Or alternatively, the same steps can be run from within a Python environment using the commands below:

  ```python
  from cnmf import cNMF
  cnmf_obj = cNMF(output_dir="./example_data", name="example_cNMF")
  cnmf_obj.prepare(counts_fn="./example_data/counts_prefiltered.txt", components=np.arange(5,14), n_iter=100, seed=14)
  cnmf_obj.factorize(worker_i=0, total_workers=1)
  cnmf_obj.combine()
  cnmf_obj.k_selection_plot()
  cnmf_obj.consensus(k=10, density_threshold=0.01)
  usage, spectra_scores, spectra_tpm, top_genes = cnmf_obj.load_results(K=10, density_threshold=0.01)
  ```

  For the Python environment approach, `usage` will contain the usage matrix with each cell normalized to sum to 1. `spectra_scores` contains the gene_spectra_scores output (aka Z-score unit gene expression matrix), `spectra_tpm` contains the GEP spectra in units of TPM and `top_genes` contains an ordered list of the top 100 associated genes for each program.

  Output data files will all be available in the ./example_data/example_cNMF directory including:

     - Z-score unit gene expression program matrix - `example_data/example_cNMF/example_cNMF.gene_spectra_score.k_10.dt_0_01.txt`
     - TPM unit gene expression program matrix - `example_data/example_cNMF/example_cNMF.gene_spectra_tpm.k_10.dt_0_01.txt`
     - Usage matrix - `example_data/example_cNMF/example_cNMF.usages.k_10.dt_0_01.consensus.txt`
     - K selection plot - `example_data/example_cNMF/example_cNMF.k_selection.png`
     - Clustergram diagnostic plot - `example_data/example_cNMF/example_cNMF.clustering.k_10.dt_0_01.pdf`

  Some usage notes:
   - __Parallelization__: The factorize step can be parallelized with the --total-workers flag and then submitting multiple jobs, one per worker, indexed starting by 0. For example:
    ```
    cnmf factorize --output-dir ./example_data --name example_cNMF --worker-index 0 --total-workers 3 &
    cnmf factorize --output-dir ./example_data --name example_cNMF --worker-index 1 --total-workers 3 &
    cnmf factorize --output-dir ./example_data --name example_cNMF --worker-index 2 --total-workers 3 &
    ```
    would break the factorization jobs up into 3 batches and submit them independently. This can be used with compute clusters to run the factorizations in parallel (see tutorials for example).
   - __Input data__: Input data can be provided in 3 ways:
      - 1. as a scanpy file ending in .h5ad containg counts as the data feature. See the PBMC dataset tutorial for an example of how to generate the Scanpy object from the data provided by 10X. Because Scanpy uses sparse matrices by default, the .h5ad data structure can take up much less memory than the raw counts matrix and can be much faster to load.
      - 2. as a raw tab-delimited text file containing row labels with cell IDs (barcodes) and column labels as gene IDs
      - 3. as a 10x-Genomics-formatted mtx directory. You provide the path to the counts.mtx file or counts.mtx.gz file to counts_fn. It expects there to be barcodes.tsv and genes.tsv in the directory as well


  See the tutorials or Stepwise_Guide.md for more details



  We have implemented a pipeline to integrate batch variables prior to running cNMF and to handle ADTs in CITE-Seq. It uses an adaptation of [Harmony](https://github.com/slowkow/harmonypy) that corrects the underlying count matrix rather than principal components. We describe it in our [recent preprint](https://www.biorxiv.org/content/10.1101/2024.05.03.592310v1). See the [batch correction tutorial](Tutorials/analyze_batcheffectcorrect_BaronEtAl.ipynb) as well for an example.

  We use a separate Preprocess class to run batch correction. You pass in an AnnData object, as well as harmony_vars, a list of the names of variables to correct correspond to columns in the AnnData obs attribute. You also specify an output file base name to save the results to like below:

  ```
  from cnmf import cNMF, Preprocess

  p = Preprocess(random_seed=14)


  (adata_c, adata_tpm, hvgs) = p.preprocess_for_cnmf(adata, harmony_vars=['Sex', 'Sample'], n_top_rna_genes = 2000, librarysize_targetsum= 1e6,
                                                      save_output_base='./example_islets/batchcorrect_example_sex')


  cnmf_obj_corrected = cNMF(output_dir='./example_islets', name='BatchCorrected')
  cnmf_obj_corrected.prepare(counts_fn='./example_islets/batchcorrect_example.Corrected.HVG.Varnorm.h5ad',
                             tpm_fn='./example_islets/batchcorrect_example.TP10K.h5ad',
                             genes_file='./example_islets/batchcorrect_example.Corrected.HVGs.txt',
                             components=[15], n_iter=20, seed=14, num_highvar_genes=2000)


  ```




  - Added option in consensus() to build spectra for annotating new datasets with GEPs using [starCAT](https://github.com/immunogenomics/starCAT).
  - Added option to factorize() to skip tasks that have already completed.


  - Fixed bug in detecting and printing cells with 0 counts of overdispersed genes
  - Added option in load_results() to return normalized or unnormalized usage.
  - Added a Preprocess class to batch correct data prior to cNMF. See the added Tutorial analyze_batcheffectcorrect_BaronEtAl.ipynb to illustrate its basic usage.
  - Now accepts 10x formatted .mtx directories (containing counts.mtx, barcodes.tsv, and genes.tsv files)


  - Usage is re-fit a final time from gene_spectra_tpm which increases accuracy in simulations
  - Use cnmf_obj.load_results(K=_, density_threshold=_) to obtain usage, spectra_scores, spectra_tpm, and top_genes matrices
  - cnmf_obj.combine() now has a skip_missing_files=True/False option to skip incomplete factorize iterations
  - GEPs are now ordered by maximum total usage
  - Now detects and errors when 0 counts of HVGs with interpretable error message


  - Installation via pip
  - Object oriented interface for Python users and command line script option via `cnmf`


   - Increased the threshold for ignoring genes with low mean expression for determining high-variance genes from a TPM of 0.01 to 0.5. Some users were identifying uninterpretable programs with very low usage except in a tiny number of cells. We suspect that this was due to including genes as high-variance that are detected in a small number of cells. This change in the default parameter will help offset that problem in most cases.
   - Updated import of NMF for compatibility with scikit-learn versions >22
   - Colorbar for heatmaps included with consensus matrix plot


   - Now operates by default on sparse matrices. Use --densify option in prepare step if data is not sparse
   - Now takes Scanpy AnnData object files (.h5ad) as input
   - Now has option to use KL divergence beta_loss instead of Frobenius. Frobenius is the default because it is much faster.
   - Includes a Docker file for creating a Docker container to run cNMF in parallel with cloud compute
   - Includes a tutorial on a simple PBMC dataset
   - Other minor fixes


pkgId: e70b36550108ede83b63153959e3d489cd02231f9dd866639e045ee4746be64e
name: python-cnn-framework
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: CNN framework
url: https://github.com/15bonte/cnn_framework
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnn-framework-0.3.0-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/15bonte/cnn_framework/branch/main/graph/badge.svg)](https://codecov.io/gh/15bonte/cnn_framework)
  [![tests](https://github.com/15bonte/cnn_framework/workflows/tests/badge.svg)](https://github.com/15bonte/cnn_framework/actions)

  Run CNN models for classification, regression, segmentation, VAE, contrastive learning with any data set.



  First, create a dedicated conda environment using Python 3.9

  ```bash
  conda create -n cnn_framework python=3.9
  conda activate cnn_framework
  ```

  To install the latest github version of this library run the following using pip

  ```bash
  pip install git+https://github.com/15bonte/cnn_framework
  ```

  or alternatively you can clone the github repository

  ```bash
  git clone https://github.com/15bonte/cnn_framework.git
  cd cnn_framework
  pip install -e .
  ```

  If you want to run jupyter tutorials, you also need to install ipykernel

  ```bash
  pip install ipykernel
  ```

  If you want to work with VAE, you must also install [Pythae](https://github.com/clementchadebec/benchmark_VAE/tree/main) and [WandB](https://wandb.ai/home), which is not the case by default.

  ```bash
  pip install pythae
  ```

  ```bash
  pip install wandb
  ```


pkgId: e715a8e47bc0a542162515a2c8f9fb575207bfd0e2440f5499c2f10e09c1e8b0
name: python-cnn2snn
arch: src
version: 2.10.0
epoch: 0
release: 1
summary: Keras to Akida CNN Converter
url: https://doc.brainchipinc.com
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnn2snn-2.10.0-1.src.rpm
checksum_type: sha256
description:
  The Brainchip CNN2SNN toolkit provides a means to convert Convolutional Neural
  Networks (CNN) that were trained using Deep Learning methods to a low-latency
  and low-power Spiking Neural Network (SNN) for use with the Akida Runtime.


pkgId: f7a2ed2ee8b7d2e88b03ea3b3790414e699f21850c712021a183e339bd014113
name: python-cnparser
arch: src
version: 1.6.5
epoch: 0
release: 1
summary: cnparser is a parser library of Corporate Number Publication Site data.
url: https://github.com/new-village/cnparser
rpm_license: Apache-2.0 license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnparser-1.6.5-1.src.rpm
checksum_type: sha256
description:
  cnparser is available on pip installation.
  ```shell:
  $ python -m pip install cnparser
  ```

  Installing the latest version from GitHub:
  ```shell:
  $ git clone https://github.com/new-village/cnparser
  $ cd cnparser
  $ python setup.py install
  ```

  This section demonstrates how to use this library to load and process data from the National Tax Agency's [Corporate Number Publication Site](https://www.houjin-bangou.nta.go.jp/).

  To download data for a specific prefecture, use the `load` function. By passing the prefecture name as an argument, you can obtain a DataFrame containing data for that prefecture.If you wish to download data for a specific prefecture, you must specify the prefecture name in Roman characters ([list of the supported prefectures](https://github.com/new-village/cnparser/blob/main/cnparser/config/file_id.json)).
  To execute the `load` function without specifying any arguments, data for all prefectures across Japan will be downloaded.
  ```python:
  >>> import cnparser
  >>> df = cnparser.load("Shimane")
  ```

  If you already have a downloaded CSV file, use the `read_csv` function. By passing the file path as an argument, you can obtain a DataFrame with headers from the CSV data.
  ```python:
  >>> import cnparser
  >>> df = cnparser.read_csv("path/to/data.csv")
  ```

  The `enrich` function standardises and transforms the values of specific fields in the loaded DataFrame.
  ```python:
  >>> import cnparser
  >>> df = cnparser.enrich(df)
  ```
  The functions perform all processing, but it is possible to apply only specific processing by defining specific processing as an argument.
  ```python:
  >>> import cnparser
  >>> df = cnparser.enrich(df, "enrich_kana" ...)
  ```
  The processes supported by the `enrich` function are as follows:
  - `enrich_kana`: Function that adds a standardized furigana column `furigana` to the DataFrame. It handles data entry by converting `name` to kana, if `furigana` is NaN. Note that currently only kanji and katakana conversions are supported. Alphabet conversions are not supported.
  - `enrich_kind`: Function that adds the `kind` label to the `legal_entity`.
  - `enrich_post_code`: Function that adds the formatted postcode as XXX-XXX to `post_code`.


pkgId: e3fd0cbe28afeb195b9d763adc6b1f0587fce4f428171547948e72930400b89e
name: python-cns
arch: src
version: 2.3.13
epoch: 0
release: 1
summary: cns工具包
url: https://pypi.org/project/cns/
rpm_license: MIT License. See LICENSE for details.
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cns-2.3.13-1.src.rpm
checksum_type: sha256
description:
  cns常用的工具包, 内置大量常用工具, 正在不断增加中......



  pip install cns



  ```python代码
  import cns

  if __name__ == "__main__":

      dfx  = cns.DateTimeX()  # 可初始化 "2023-05-28 23:23:51"

      print("初始时间:", dfx)

      print("昨天的本月区间:", dfx.get("{[年-月-初||复位-1日]}~{[年-月-日]}"))

      print("昨天的去年本月区间:", dfx.get("{[年-月-初||复位-1日-1年]}~{[年-月-末]}"))

      print("昨天的上月区间:", dfx.get("{[年-月-初||复位-1日-1月]}~{[年-月-末]}"))

      print("昨天的近35天区间:", dfx.get("{[年-月-日||复位-35日]}~{[年-月-日||复位-1日]}"))

      print("前35天的日期:", dfx.get("{[年-月-日||复位-35日]}"))

      print("昨天的月1号:", dfx.get("{[年-月-初||复位-1日]}"))

      print("昨天的本月:", dfx.get("{[年-月||复位-1日]}"))


  '''

  1、分隔符“||” 左侧是获取的时间格式，右侧是时间计算的指令；
  2、左左侧的字符串中通包含年、月、日、时、分、秒、初、末，用来获取时间和格式，其中“初”是获数字1，“末”最后一天的日期；
  3、右侧是时间计算的指令支持年、月、日、时、分、秒、复位，用来对当前的时间进行加和减的计算，其中“复位”代表恢复到初始时间；

  目前支持WINDOWS下 Python 3.6 和 3.10
  联系作者：6566666@qq.com
  '''


pkgId: 803bb1ac57b6788e52b3b75be07ad8ba02a4a3ea8108623df32f3915c8dc1638
name: python-cnspy-trajectory
arch: src
version: 0.2.11
epoch: 0
release: 1
summary: Trajectory in SE(3) space with utilities.
url: https://github.com/aau-cns/cnspy_trajectory/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cnspy-trajectory-0.2.11-1.src.rpm
checksum_type: sha256
description:
  A [Trajectory](./cnspy_trajectory/Trajectory.py) object consists of a matrix of positions, orientations (Quaternions) and associated timestamps.
  The object can be created by passing the these three matrices or by passing a `Pandas` `DataFrame` object containing them.
  The `DataFrame` will be converted using the class `TUMCSV2DataFrame`.

  A trajectory object offers some conversions, load/store methods, plot, spatial transformations, etc.

  A `TrajectoryEstimated` is a specialization of a `Trajectory`, holding a covariances of the position and orientation to the timestamps, which can be loaded form a `DataFrame` too.

  The `TrajectoryPlotter` offers methods to visualize a (or multiple) `Trajectory` objects.

  ![class_diagram](./doc/class_diagram.png "folder structure")




  Install the current code base from GitHub and pip install a link to that cloned copy
  ```
  git clone https://github.com/aau-cns/cnspy_trajectory.git
  cd cnspy_trajectory
  pip install -e .
  ```
  or the [official package](https://pypi.org/project/cnspy-trajectory/) via
  ```commandline
  pip install cnspy-trajectory
  ```




  It is part of the [cnspy eco-system](hhttps://github.com/aau-cns/cnspy_eco_system_test) of the [cns-github](https://github.com/aau-cns) group.

  * [numpy]()
  * [matplotlib]()
  * [pandas]()
  * [scipy]()
  * [cnspy_numpy_utils](https://github.com/aau-cns/cnspy_numpy_utils)
  * [cnspy_csv2dataframe](https://github.com/aau-cns/cnspy_csv2dataframe)
  * [cnspy_spatial_csv_formats](https://github.com/aau-cns/cnspy_spatial_csv_formats)
  * [cnspy_trajectory](https://github.com/aau-cns/cnspy_trajectory)
  * [matplotlib.pyplot]()



  ```commandline
  trajectory$ python PlotTrajectory.py -h
  usage: PlotTrajectory.py [-h] [--filename FILENAME] [--result_dir RESULT_DIR] [--verbose] [--plot_3D] [--plot_pose] [--show_plots] [--save_metrics]

  PlotTrajectory: tool to save plots and metrics of a trajectory

  optional arguments:
    -h, --help            show this help message and exit
    --filename FILENAME   csv filename
    --result_dir RESULT_DIR
                          directory to store results]
    --verbose
    --plot_3D
    --plot_pose
    --show_plots
    --save_metrics
  ```



  Please refer to the unit-tests `Trajectory_Test` and `TrajectoryEstimated_Test` in `Trajectory/TrajectoryEstimated.py`.
  For plotting options to the unit-test `TrajectoryPlotter_Test`.


  ![pose](./doc/pose_plot.png "folder structure")


  ![plot3d](./doc/plot_3D.png "folder structure")


  ![multi](./doc/multi.png "folder structure")




  Software License Agreement (GNU GPLv3  License), refer to the LICENSE file.

  *Sharing is caring!* - [Roland Jung](https://github.com/jungr-ait)


pkgId: a69381e929fbba8883b901bde4c4c28848ff140bbcd1d103c3ac1b900d5f9ec2
name: python-cntext
arch: src
version: 1.9.2
epoch: 0
release: 1
url: https://pypi.org/project/cntext/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cntext-1.9.2-1.src.rpm
checksum_type: sha256
summary:
  Chinese text analysis library, which can perform word frequency statistics, dictionary expansion, sentiment analysis, similarity, readability, co-occurrence analysis, social computing (attitude, prejudice, culture) on texts

description:
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
  **Table of Contents**

  - [功能模块含](#%E5%8A%9F%E8%83%BD%E6%A8%A1%E5%9D%97%E5%90%AB)
  - [安装](#%E5%AE%89%E8%A3%85)
  - [QuickStart](#quickstart)
  - [一、stats](#%E4%B8%80stats)
    - [1.1  readability](#11--readability)
    - [1.2  term_freq](#12--term_freq)
    - [1.3 dict_pkl_list](#13-dict_pkl_list)
    - [注意:](#%E6%B3%A8%E6%84%8F)
    - [1.4 load_pkl_dict](#14-load_pkl_dict)
    - [1.5 sentiment](#15-sentiment)
    - [1.6 sentiment_by_valence()](#16-sentiment_by_valence)
  - [二、dictionary](#%E4%BA%8Cdictionary)
    - [2.1 SoPmi 共现法](#21-sopmi-%E5%85%B1%E7%8E%B0%E6%B3%95)
    - [2.2 W2VModels 词向量](#22-w2vmodels-%E8%AF%8D%E5%90%91%E9%87%8F)
    - [需要注意](#%E9%9C%80%E8%A6%81%E6%B3%A8%E6%84%8F)
    - [2.3 co_occurrence_matrix](#23-co_occurrence_matrix)
    - [2.4  Glove](#24--glove)
  - [三、similarity](#%E4%B8%89similarity)
  - [四、Text2Mind](#%E5%9B%9Btext2mind)
    - [4.1 tm.sematic_distance(words, c_words1, c_words2)](#41-tmsematic_distancewords-c_words1-c_words2)
    - [4.2 tm.sematic_projection(words, c_words1, c_words2)](#42-tmsematic_projectionwords-c_words1-c_words2)
  - [引用声明](#%E5%BC%95%E7%94%A8%E5%A3%B0%E6%98%8E)
    - [apalike](#apalike)
    - [bibtex](#bibtex)
    - [endnote](#endnote)
  - [如果](#%E5%A6%82%E6%9E%9C)
  - [更多](#%E6%9B%B4%E5%A4%9A)

  <!-- END doctoc generated TOC please keep comment here to allow auto update -->

  [![DOI](https://zenodo.org/badge/487297608.svg)](https://zenodo.org/badge/latestdoi/487297608)





  <br><br>

  **cntext** 是一个文本分析包，提供基于词嵌入模型的语义距离和语义投影。 此外，cntext还提供了传统的方法，如字数统计、可读性、文档相似度、情感分析等。

  - [github repo](https://github.com/hidadeng/cntext) ``https://github.com/hidadeng/cntext``
  - [pypi link](https://pypi.org/project/cntext/)  ``https://pypi.org/project/cntext/``

  根据 [pepy网站](https://www.pepy.tech/projects/cntext) 统计，截止 2024-5-14, 累积下载量  45,305 。 目前分为

  - 公开cntext1.x ， 免费， 已更新至1.9
  - 非公开cntext2.x， 付费，已更新至2.1.2。 cntext新增了一些特色功能，感兴趣的可以点击阅读[博客: 文本分析库cntext2.x使用手册](https://textdata.cn/blog/2024-04-27-cntext2x-usage-tutorial/)

  [![](img/cntext2.png)](https://textdata.cn/blog/2024-04-27-cntext2x-usage-tutorial/)


  <br><br>




  - [x] **stats**  文本统计指标
    - [x] 词频统计
    - [x] 可读性
    - [x] 内置pkl词典
    - [x] **情感分析**
  - [x] **dictionary** 构建词表(典)
    - [x] Sopmi 互信息扩充词典法
    - [x] W2Vmodels 词向量扩充词典法
    - [x] Glove Glove词向量模型
  - [x] **similarity**   文本相似度
    - [x] cos相似度
    - [x] jaccard相似度
    - [x] 编辑距离相似度
  - [x] **mind.py** 计算文本中的认知方向（态度、偏见）



  <br>



  ```
  pip install cntext --upgrade
  pip install numpy==1.24.2
  pip install gensim==4.2.0
  pip install scikit-learn==1.1.2
  ```



  <br>



  ```python
  import cntext as ct

  help(ct)
  ```

  Run

  ```
  Help on package cntext:

  NAME
      cntext

  PACKAGE CONTENTS
      mind
      dictionary
      similarity
      stats
  ```



  <br>





  目前stats内置的函数有

  - **readability**  文本可读性
  - **term_freq** 词频统计函数
  - **dict_pkl_list**  获取cntext内置词典列表(pkl格式)
  - **load_pkl_dict** 导入pkl词典文件
  - **sentiment** 情感分析
  -



  ```python
  import cntext as ct

  text = '如何看待一网文作者被黑客大佬盗号改文，因万分惭愧而停更。'

  ct.term_freq(text, lang='chinese')
  ```

  Run

  ```
  Counter({'看待': 1,
           '网文': 1,
           '作者': 1,
           '黑客': 1,
           '大佬': 1,
           '盗号': 1,
           '改文': 1,
           '因':   1,
           '万分': 1,
           '惭愧': 1,
           '停': 1})
  ```

  <br>





  文本可读性，指标越大，文章复杂度越高，可读性越差。

  readability(text, lang='chinese')

  - text: 文本字符串数据
  - lang: 语言类型，"chinese"或"english"，默认"chinese"

  **中文可读性 ** 算法参考自

  > 徐巍,姚振晔,陈冬华.中文年报可读性：衡量与检验[J].会计研究,2021(03):28-44.
  >
  > - readability1 ---每个分句中的平均字数
  > - readability2  ---每个句子中副词和连词所占的比例
  > - readability3  ---参考Fog Index， readability3=(readability1+readability2)×0.5

  ​

  以上三个指标越大，都说明文本的复杂程度越高，可读性越差。

  ```python
  text1 = '如何看待一网文作者被黑客大佬盗号改文，因万分惭愧而停更。'


  ct.readability(text1, lang='chinese')
  ```

  Run

  ```
  {'readability1': 28.0,
   'readability2': 0.15789473684210525,
   'readability3': 14.078947368421053}
  ```

  <br>



  句子中的符号变更会影响结果

  ```python
  text2 = '如何看待一网文作者被黑客大佬盗号改文，因万分惭愧而停更。'
  ct.readability(text2, lang='chinese')
  ```

  Run

  ```
  {'readability1': 27.0,
   'readability2': 0.16666666666666666,
   'readability3': 13.583333333333334}
  ```

  <br><br>



  词频统计函数，返回Counter类型

  ```python
  import cntext as ct

  text = '如何看待一网文作者被黑客大佬盗号改文，因万分惭愧而停更。'

  ct.term_freq(text, lang='chinese')
  ```

  Run

  ```
  Counter({'看待': 1,
           '网文': 1,
           '作者': 1,
           '黑客': 1,
           '大佬': 1,
           '盗号': 1,
           '改文因': 1,
           '万分': 1,
           '惭愧': 1,
           '停': 1})
  ```

  <br>





  获取cntext内置词典列表(pkl格式)

  ```python
  import cntext as ct


  ct.dict_pkl_list()
  ```

  Run

  ```
  ['DUTIR.pkl',
   'HOWNET.pkl',
   'sentiws.pkl',
   'Chinese_Digitalization.pkl',
   'ChineseFinancialFormalUnformalSentiment.pkl',
   'Concreteness.pkl',
   'ANEW.pkl',
   'LSD2015.pkl',
   'NRC.pkl',
   'ChineseEmoBank.pkl',
   'geninqposneg.pkl',
   'HuLiu.pkl',
   'AFINN.pkl',
   'ADV_CONJ.pkl',
   'Loughran_McDonald_Financial_Sentiment.pkl',
   'Chinese_Loughran_McDonald_Financial_Sentiment.pkl',
   'STOPWORDS.pkl']
  ```

  词典对应关系, 部分情感词典资料整理自 [quanteda.sentiment](https://github.com/quanteda/quanteda.sentiment)

  | pkl文件                                           | 词典                                                         | 语言    | 功能                                                         |
  | ------------------------------------------------- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
  | ChineseEmoBank.pkl                                   | 中文情感词典，含``效价valence``和``唤醒度arousal``。在cntext中，我们只使用了CVAW词表(单词)，其他词典如CVAP, CVAS, CVAT没有纳入到ChineseEmoBank.pkl. | Chinese         | ``效价valence``和``唤醒度arousal`` |
  | DUTIR.pkl                                         | 大连理工大学情感本体库                                       | 中文    | 七大类情绪，``哀, 好, 惊, 惧, 乐, 怒, 恶``                   |
  | HOWNET.pkl                                        | 知网Hownet词典                                               | 中文    | 正面词、负面词                                               |
  | SentiWS.pkl                                       | SentimentWortschatz (SentiWS)                                | 德文    | 正面词、负面词；<br>                                         |
  | ChineseFinancialFormalUnformalSentiment.pkl       | 金融领域正式、非正式；积极消极                               | 中文    | formal-pos、<br>formal-neg；<br>unformal-pos、<br>unformal-neg |
  | ANEW.pkl                                          | 英语单词的情感规范Affective Norms for English Words (ANEW)   | 英文    | pleasure, arousal, dominance                                 |
  | LSD2015.pkl                                       | Lexicoder Sentiment Dictionary (2015)                        | 英文    | 正面词、负面词                                               |
  | NRC.pkl                                           | NRC Word-Emotion Association Lexicon                         | 英文    | 细粒度情绪词；                                               |
  | geninqposneg.pkl                                  |                                                              |         |                                                              |
  | HuLiu.pkl                                         | Hu&Liu (2004)正、负情感词典                                  | 英文    | 正面词、负面词                                               |
  | AFINN.pkl                                         | 尼尔森 (2011) 的“新 ANEW”效价词表                            | 英文    | 情感效价信息valence                                          |
  | ADV_CONJ.pkl                                      | 副词连词                                                     | 中文    |                                                              |
  | STOPWORDS.pkl                                     |                                                              | 中、英  | 停用词                                                       |
  | Concreteness.pkl                                  | Brysbaert, M., Warriner, A. B., & Kuperman, V. (2014). Concreteness ratings for 40 thousand generally known English word lemmas. Behavior Research Methods, 46, 904–911 | English | word & concreateness score                                   |
  | Chinese_Loughran_McDonald_Financial_Sentiment.pkl | 曾庆生, 周波, 张程, and 陈信元. "年报语调与内部人交易: 表里如一还是口是心非?." 管理世界 34, no. 09 (2018): 143-160. | 中文    | 正面、负面词                                                 |
  | Chinese_Digitalization.pkl |吴非,胡慧芷,林慧妍,任晓怡. 企业数字化转型与资本市场表现——来自股票流动性的经验证据[J]. 管理世界,2021,37(07):130-144+10. | 中文    | 基于这篇论文，构建了中文数字化词典，含人工智能技术、大数据技术、云计算技术、区块链技术、数字技术应用等关键词列表。                                               |
  | Loughran_McDonald_Financial_Sentiment.pkl         | Loughran, Tim, and Bill McDonald. "When is a liability not a liability? Textual analysis, dictionaries, and 10‐Ks." The Journal of finance 66, no. 1 (2011): 35-65. | 英文    | 金融LM情绪词典2018年版本，含七个词表，分别是Negative, Positive, Uncertainty, Litigious, StrongModal, WeakModal, Constraining |
  | Chinese_FLS.pkl | 许帅,邵帅,何贤杰.业绩说明会前瞻性信息对分析师盈余预测准确性的影响——信口雌黄还是言而有征[J].中国管理科学:1-15. | 中文 | 前瞻性词典集，含174个词语 |







  - 如果用户情绪分析时使用DUTIR词典发表论文，请在论文中添加诸如“使用了大连理工大学信息检索研究室的情感词汇本体” 字样加以声明。参考文献中加入引文“徐琳宏,林鸿飞,潘宇,等.情感词汇本体的构造[J]. 情报学报, 2008, 27(2): 180-185.”


  - 如果大家有制作的词典，可以上传至百度网盘，并在issue中留下词典的网盘链接。如词典需要使用声明，可连同文献出处一起issue

  <br>



  导入pkl词典文件，返回字典样式数据。

  ```python
  import cntext as ct

  print(ct.__version__)

  print(ct.load_pkl_dict('DUTIR.pkl'))
  ```

  Run

  ```
  1.8.0

  {'DUTIR': {'哀': ['怀想', '治丝而棼', '伤害',...],
             '好': ['进贤黜奸', '清醇', '放达', ...],
             '惊': ['惊奇不已', '魂惊魄惕', '海外奇谈',...],
             '惧': ['忸忸怩怩', '谈虎色变', '手忙脚乱',...],
             '乐': ['神采', '喜人', '如意',...],
             '怒': ['饮恨吞声', '扬眉瞬目',...],
             '恶': ['出逃', '鱼肉百姓', '移天易日',...]},

   'Desc': '大连理工大学情感本体库，细粒度情感词典。含七大类情绪，依次是哀, 好, 惊, 惧, 乐, 怒, 恶',

   'Referer': '徐琳宏,林鸿飞,潘宇,等.情感词汇本体的构造[J]. 情报学报, 2008, 27(2): 180-185.'}
  ```

  <br>





  sentiment(text, diction, lang='chinese')
  使用diy词典进行情感分析，计算各个情绪词出现次数; 未考虑强度副词、否定词对情感的复杂影响，

  - text:  待分析中文文本
  - diction:  情感词字典；
  - lang: 语言类型，"chinese"或"english"，默认"chinese"

  ```python
  import cntext as ct

  text = '我今天得奖了，很高兴，我要将快乐分享大家。'

  ct.sentiment(text=text,
               diction=ct.load_pkl_dict('DUTIR.pkl')['DUTIR'],
               lang='chinese')
  ```

  Run

  ```
  {'哀_num': 0,
   '好_num': 0,
   '惊_num': 0,
   '惧_num': 0,
   '乐_num': 2,
   '怒_num': 0,
   '恶_num': 0,
   'stopword_num': 8,
   'word_num': 14,
   'sentence_num': 1}
  ```

  如果不适用pkl词典，可以自定义自己的词典，例如

  ```python
  diction = {'pos': ['高兴', '快乐', '分享'],
             'neg': ['难过', '悲伤'],
             'adv': ['很', '特别']}

  text = '我今天得奖了，很高兴，我要将快乐分享大家。'
  ct.sentiment(text=text,
               diction=diction,
               lang='chinese')
  ```

  Run

  ```
  {'pos_num': 3,
   'neg_num': 0,
   'adv_num': 1,
   'stopword_num': 8,
   'word_num': 14,
   'sentence_num': 1}
  ```

  <br>


  sentiment函数默认所有情感词权重均为1，只需要统计文本中情感词的个数，即可得到文本情感得分。

  sentiment_by_valence(text, diction, lang='english')函数考虑了词语的效价(valence)

  - text 待输入文本
  - diction 带效价的词典，DataFrame格式。
  - lang 语言类型'chinese' 或 'english'，默认'english'

  这里我们以文本具体性度量为例， **concreteness.pkl** 整理自 Brysbaert2014的文章。

  >Brysbaert, M., Warriner, A. B., & Kuperman, V. (2014). Concreteness ratings for 40 thousand generally known English word lemmas. Behavior Research Methods, 46, 904–911

  ```python
  import cntext as ct


  concreteness_df = ct.load_pkl_dict('concreteness.pkl')
  concreteness_df.head()
  ```

  Run




  |      | word          | valence |
  | ---: | :------------ | ------: |
  |    0 | roadsweeper   |    4.85 |
  |    1 | traindriver   |    4.54 |
  |    2 | tush          |    4.45 |
  |    3 | hairdress     |    3.93 |
  |    4 | pharmaceutics |    3.77 |

  <br>

  先看一条文本的具体性度量

  ```python
  reply = "I'll go look for that"

  score=ct.sentiment_by_valence(text=reply,
                                diction=concreteness_df,
                                lang='english')
  score
  ```

  Run

  ```
  1.85
  ```



  <br>

  很多条文本的具体性度量

  ```python
  employee_replys = ["I'll go look for that",
                     "I'll go search for that",
                     "I'll go search for that top",
                     "I'll go search for that t-shirt",
                     "I'll go look for that t-shirt in grey",
                     "I'll go search for that t-shirt in grey"]

  for idx, reply in enumerate(employee_replys):
      score=ct.sentiment_by_valence(text=reply,
                                    diction=concreteness_df,
                                    lang='english')

      template = "Concreteness Score: {score:.2f} | Example-{idx}: {exmaple}"
      print(template.format(score=score,
                            idx=idx,
                            exmaple=reply))

  ct.sentiment_by_valence(text=text, diction=concreteness_df, lang='english')
  ```

  Run

  ```
  Concreteness Score: 1.55 | Example-0: I'll go look for that
  Concreteness Score: 1.55 | Example-1: I'll go search for that
  Concreteness Score: 1.89 | Example-2: I'll go search for that top
  Concreteness Score: 2.04 | Example-3: I'll go search for that t-shirt
  Concreteness Score: 2.37 | Example-4: I'll go look for that t-shirt in grey
  Concreteness Score: 2.37 | Example-5: I'll go search for that t-shirt in grey
  ```





  <br>







  本模块用于构建词表(典),含

  - SoPmi 共现法扩充词表(典)
  - W2VModels 词向量word2vec扩充词表(典)



  ```python
  import cntext as ct
  import os

  sopmier = ct.SoPmi(cwd=os.getcwd(),
                     input_txt_file='data/sopmi_corpus.txt',  #原始数据，您的语料
                     seedword_txt_file='data/sopmi_seed_words.txt', #人工标注的初始种子词
                     )

  sopmier.sopmi()
  ```

  Run

  ```
  Step 1/4:...Preprocess   Corpus ...
  Step 2/4:...Collect co-occurrency information ...
  Step 3/4:...Calculate   mutual information ...
  Step 4/4:...Save    candidate words ...
  Finish! used 44.49 s
  ```



  <br>



  **特别要注意代码需要设定lang语言参数**

  ```python
  import cntext as ct
  import os


  model = ct.W2VModels(cwd=os.getcwd(),
                       lang='english')  #语料数据 w2v_corpus.txt
  model.train(input_txt_file='data/w2v_corpus.txt')



  model.find(seedword_txt_file='data/w2v_seeds/integrity.txt',
             topn=100)
  model.find(seedword_txt_file='data/w2v_seeds/innovation.txt',
             topn=100)
  model.find(seedword_txt_file='data/w2v_seeds/quality.txt',
             topn=100)
  model.find(seedword_txt_file='data/w2v_seeds/respect.txt',
             topn=100)
  model.find(seedword_txt_file='data/w2v_seeds/teamwork.txt',
             topn=100)
  ```

  Run

  ```
  Step 1/4:...Preprocess   corpus ...
  Step 2/4:...Train  word2vec model
              used   174 s
  Step 3/4:...Prepare similar candidates for each seed word in the word2vec model...
  Step 4/4 Finish! Used 187 s
  Step 3/4:...Prepare similar candidates for each seed word in the word2vec model...
  Step 4/4 Finish! Used 187 s
  Step 3/4:...Prepare similar candidates for each seed word in the word2vec model...
  Step 4/4 Finish! Used 187 s
  Step 3/4:...Prepare similar candidates for each seed word in the word2vec model...
  Step 4/4 Finish! Used 187 s
  Step 3/4:...Prepare similar candidates for each seed word in the word2vec model...
  Step 4/4 Finish! Used 187 s

  ```

  <br>



  训练出的w2v模型可以后续中使用。

  ```python
  from gensim.models import KeyedVectors

  w2v_model = KeyedVectors.load(w2v.model路径)




  ```

  例如本代码，运行生成的结果路径``output/w2v_candi_words/w2v.model``

  ```python
  from gensim.models import KeyedVectors

  w2v_model = KeyedVectors.load('output/w2v_candi_words/w2v.model')
  w2v_model.most_similar('innovation')
  ```

  Run

  ```
  [('technology', 0.689210832118988),
   ('infrastructure', 0.669672966003418),
   ('resources', 0.6695448160171509),
   ('talent', 0.6627111434936523),
   ('execution', 0.6549549102783203),
   ('marketing', 0.6533523797988892),
   ('merchandising', 0.6504817008972168),
   ('diversification', 0.6479553580284119),
   ('expertise', 0.6446896195411682),
   ('digital', 0.6326863765716553)]
  ```

  <br>

  ```python

  w2v_model.get_vector('innovation')
  ```

  Run

  ```
  array([-0.45616838, -0.7799563 ,  0.56367606, -0.8570078 ,  0.600359  ,
         -0.6588043 ,  0.31116748, -0.11956959, -0.47599426,  0.21840936,
         -0.02268819,  0.1832016 ,  0.24452794,  0.01084935, -1.4213187 ,
          0.22840202,  0.46387577,  1.198386  , -0.621511  , -0.51598716,
          0.13352732,  0.04140598, -0.23470387,  0.6402956 ,  0.20394802,
          0.10799981,  0.24908689, -1.0117126 , -2.3168423 , -0.0402851 ,
          1.6886286 ,  0.5357047 ,  0.22932841, -0.6094084 ,  0.4515793 ,
         -0.5900931 ,  1.8684244 , -0.21056202,  0.29313338, -0.221067  ,
         -0.9535679 ,  0.07325   , -0.15823542,  1.1477109 ,  0.6716076 ,
         -1.0096023 ,  0.10605699,  1.4148282 ,  0.24576302,  0.5740349 ,
          0.19984631,  0.53964925,  0.41962907,  0.41497853, -1.0322098 ,
          0.01090925,  0.54345983,  0.806317  ,  0.31737605, -0.7965337 ,
          0.9282971 , -0.8775608 , -0.26852605, -0.06743863,  0.42815775,
         -0.11774074, -0.17956367,  0.88813037, -0.46279573, -1.0841943 ,
         -0.06798118,  0.4493006 ,  0.71962464, -0.02876493,  1.0282255 ,
         -1.1993176 , -0.38734904, -0.15875885, -0.81085825, -0.07678922,
         -0.16753489,  0.14065655, -1.8609751 ,  0.03587054,  1.2792674 ,
          1.2732009 , -0.74120265, -0.98000383,  0.4521185 , -0.26387128,
          0.37045383,  0.3680011 ,  0.7197629 , -0.3570571 ,  0.8016917 ,
          0.39243212, -0.5027844 , -1.2106236 ,  0.6412354 , -0.878307  ],
        dtype=float32)
  ```

  <br><br>





  词共现矩阵

  ```python
  import cntext as ct

  documents = ["I go to school every day by bus .",
           "i go to theatre every night by bus"]

  ct.co_occurrence_matrix(documents,
                          window_size=2,
                          lang='english')
  ```

  ![](img/co_occurrence1.png)



  ```python
  documents2 = ["编程很好玩",
               "Python是最好学的编程"]

  ct.co_occurrence_matrix(documents2,
                          window_size=2,
                          lang='chinese')
  ```

  ![](img/co_occurrence2.png)

  <br><br>



  构建Glove词嵌入模型，使用英文数据``data/brown_corpus.txt``

  ```python
  import cntext as ct
  import os

  model = ct.Glove(cwd=os.getcwd(), lang='english')
  model.create_vocab(file='data/brown_corpus.txt', min_count=5)
  model.cooccurrence_matrix()
  model.train_embeddings(vector_size=50, max_iter=25)
  model.save()
  ```

  Run

  ```
  Step 1/4: ...Create vocabulary for Glove.
  Step 2/4: ...Create cooccurrence matrix.
  Step 3/4: ...Train glove embeddings.
               Note, this part takes a long time to run
  Step 3/4: ... Finish! Use 175.98 s
  ```

  生成的Glove词嵌入文件位于 ``output/Glove`` 。

  <br>

  <br>





  四种相似度计算函数

  - cosine_sim(text1, text2)  cos余弦相似
  - jaccard_sim(text1, text2)     jaccard相似
  - minedit_sim(text1, text2)  最小编辑距离相似度；
  - simple_sim(text1, text2) 更改变动算法

  算法实现参考自 ``Cohen, Lauren, Christopher Malloy, and Quoc Nguyen. Lazy prices. No. w25084. National Bureau of Economic Research, 2018.``



  <br>

  ```python
  import cntext as ct


  text1 = '编程真好玩编程真好玩'
  text2 = '游戏真好玩编程真好玩啊'

  print(ct.cosine_sim(text1, text2))
  print(ct.jaccard_sim(text1, text2))
  print(ct.minedit_sim(text1, text2))
  print(ct.simple_sim(text1, text2))
  ```

  Run

  ```
  0.82
  0.67
  2.00
  0.87
  ```

  <br><br>



  词嵌入中蕴含着人类的认知信息，以往的词嵌入大多是比较一个概念中两组反义词与某对象的距离计算认知信息。

  \- **多个对象在某概念的远近**，职业与性别，某个职业是否存在亲近男性，而排斥女性

  \- 多个对象在某**概念的分量(fen，一声)的多少**， 人类语言中留存着对不同动物体积的认知记忆，如小鼠大象。动物词在词向量空间中是否能留存着这种大小的记忆

  这两种认知分别可以用向量距离、向量语义投影计算得来。

  - tm.sematic_distance(words, c_words1, c_words2)  向量距离
  - tm.sematic_projection(words, c_words1, c_words2)  向量投影





  分别计算words与c_words1、c_words2语义距离，返回距离差值。



  例如

  ```
  male_concept = ['male', 'man', 'he', 'him']
  female_concept = ['female', 'woman', 'she', 'her']
  software_engineer_concept  = ['engineer',  'programming',  'software']
  d1 = distance(male_concept,  software_engineer_concept)
  d2 = distance(female_concept,  software_engineer_concept)
  ```

  如果d1-d2<0，说明在语义空间中，software_engineer_concept更接近male_concept，更远离female_concept。

  换言之，在该语料中，人们对软件工程师这一类工作，对女性存在刻板印象(偏见)。



  **下载glove_w2v.6B.100d.txt**链接: https://pan.baidu.com/s/1MMfQ7M0YCzL9Klp4zrlHBw 提取码: 72l0

  ```python
  import cntext as ct


  tm = ct.Text2Mind(w2v_model_path='glove_w2v.6B.100d.txt')

  engineer = ['program', 'software', 'computer']
  man_words =  ["man", "he", "him"]
  woman_words = ["woman", "she", "her"]



  tm.sematic_distance(words=engineer,
                      c_words1=man_words,
                      c_words2=woman_words)
  ```

  Run

  ```
  -0.38
  ```

  <br>



  为了解释词向量模型的语义投影，我使用了 2022 年 Nature 论文中的图片[@Grand2022SemanticPR]。 关于动物的名字，人类对动物大小的认知信息隐藏在语料库文本中。 通过将**LARGE WORDS** 和**SMALL WORDS**的含义用不同的**animals**的向量投影，动物在**size向量**上的投影（就像下图中的红线 ) 得到，因此可以通过计算比较动物的大小。

  根据两组反义词c_words1, c_words2构建一个概念(认知)向量, words中的每个词向量在概念向量中投影，即可得到认知信息。

  分值越大，word越位于c_words2一侧。

  > Grand, G., Blank, I.A., Pereira, F. and Fedorenko, E., 2022. Semantic projection recovers rich human knowledge of multiple object features from word embeddings. _Nature Human Behaviour_, pp.1-13."

  ![](img/Nature_Semantic_projection_recovering_human_knowledge_of.png)

  例如，人类的语言中，存在尺寸、性别、年龄、政治、速度、财富等不同的概念。每个概念可以由两组反义词确定概念的向量方向。

  以尺寸为例，动物在人类认知中可能存在体积尺寸大小差异。

  ```python
  animals = ['mouse', 'cat', 'horse',  'pig', 'whale']
  small_words= ["small", "little", "tiny"]
  large_words = ["large", "big", "huge"]



  tm.sematic_projection(words=animals,
                        c_words1=small_words,
                        c_words2=large_words)
  ```

  Run

  ```
  [('mouse', -1.68),
   ('cat', -0.92),
   ('pig', -0.46),
   ('whale', -0.24),
   ('horse', 0.4)]
  ```

  关于尺寸的认知，人类在文本中隐含着老鼠较小，马较大。

  <br><br>





  如果再研究或项目中使用到**cntext** ，请声明出处。



  ```
  Deng X., Nan P. (2022). cntext: a Python tool for text mining (version 1.7.9). DOI: 10.5281/zenodo.7063523 URL: https://github.com/hiDaDeng/cntext
  ```



  ```
  @misc{YourReferenceHere,
  author = {Deng, Xudong and Nan, Peng},
  doi = {10.5281/zenodo.7063523},
  month = {9},
  title = {cntext: a Python tool for text mining},
  url = {https://github.com/hiDaDeng/cntext},
  year = {2022}
  }
  ```



  ```
  %0 Generic
  %A Deng, Xudong
  %A Nan, Peng
  %D 2022
  %K text mining
  %K text analysi
  %K social science
  %K management science
  %K semantic analysis
  %R 10.5281/zenodo.7063523
  %T cntext: a Python tool for text mining
  %U https://github.com/hiDaDeng/cntext
  ```


  <br><br>




  如果您是经管人文社科专业背景，编程小白，面临海量文本数据采集和处理分析艰巨任务，可以参看 [**python实证指标构建与文本分析**](https://textdata.cn/blog/management_python_course/) 视频课。作为文科生，一样也是从两眼一抹黑开始，这门课程是用五年时间凝缩出来的。自认为讲的很通俗易懂o(*￣︶￣*)o，

  - python入门
  - 网络爬虫
  - 数据读取
  - 文本分析入门
  - 机器学习与文本分析
  - 词嵌入与态度认知
  - 文本分析在经管研究中的应用

  感兴趣的童鞋不妨 戳一下 [**python实证指标构建与文本分析**](https://textdata.cn/blog/management_python_course/) 进来看看~

  [![](img/management_data_mining_with_python_course2.png)](https://textdata.cn/blog/management_python_course/)

  <br>



  - [B站:大邓和他的python](https://space.bilibili.com/122592901/channel/detail?cid=66008)
  - 公众号：大邓和他的python
  - [博客](https://textdata.cn/)


  ![](img/dadeng.png)


pkgId: ec2385a032c41a94620ed8152badc26a9dfaaaa1a92ccded012eca37936c7d3b
name: python-cntkx
arch: src
version: 0.1.54
epoch: 0
release: 1
summary: Extension library of Microsoft Cognitive Toolkit
url: https://github.com/delzac/cntkx
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cntkx-0.1.54-1.src.rpm
checksum_type: sha256
description:
  CNTKx is a deep learning library that builds on and extends Microsoft Cognitive Toolkit [CNTK](https://github.com/Microsoft/CNTK).
  Despite the last planned release of cntk 2.7, cntkx will continue to be in active development, more models and pre-built components coming soon!

  Feel free to open an issue for any request or a PR to contribute :)


  cntkx is written in pure python and cntk is a dependency to it. Please get a working installation of cntk first. Then:

      pip install cntkx

  cntkx only works with `python>=3.6`



  | ops | Description |
  | --- | ---|
  | `floor_division` | element-wise floor_division |
  | `remainder` | element-wise remainder of division |
  | `scalar` | cast tensor to scalar (1,) |
  | `cumsum` | Cumulative summation along axis |
  | `upsample` | Upsample by k factor (for image) |
  | `centre_crop` | Crop centre of image |
  | `swish` | Activation |
  | `mish` | Activation |
  | `hardmax` | Activation |
  | `erf` | Error function |
  | `gelu` | Gaussian Error Linear Unit function |
  | `gelu_fast` | fast approximation of Gaussian Error Linear Unit function |
  | `sequence.pad` | Pad at start or end of sequence axis |
  | `sequence.pad_to` | Pad a sequence to have the same length as another sequence |
  | `sequence.length` | length of sequence |
  | `sequence.position` | position of every sequence element |
  | `sequence.stride` | strides across sequential axis  |
  | `sequence.join` | joins two sequence along their sequential axis  |
  | `sequence.window` | creates sliding window along the sequence axis  |
  | `sequence.window_causal` | creates causal sliding window along the sequence axis  |
  | `sequence.reverse` | reverses the items along the dynamic sequence axis  |
  | `sequence.reduce_mean` | calculates the mean along the dynamic sequence axis  |
  | `sequence.pad_ctc_labels` | padded ctc labels to be the same sequence length as the network output  |
  | `sequence.reduce_concat_pool` | drop-in replace for sequence.last  |
  | `random.sample` | Samples an unnormalised log probability distribution |
  | `random.sample_with_bias` | Samples an unnormalised log probability distribution over-weighted to more probable classes |
  | `random.sample_top_k` | Samples from the top_k of an unnormalised log probability distribution |
  | `batchmatmul` | Batch Matrix Multiplication on a static batch axis, similar to tf.matmul |

  | Layers | Description |
  | --- | ---|
  | `QRNN` | Quasi-Recurrent Neural Network |
  | `Recurrence` | With option to apply `VariationalDroppout` |
  | `PyramidalBiRecurrence` | Pyramidal bi-directional recurrence |
  | `VariationalDropout` | Single binary dropout mask for entire sequence |
  | `SinusoidalPositionalEmbedding` | Non-learnable positional embedding (no max sequence length) |
  | `PositionalEmbedding` | Learnable Positional Embedding (used in BERT) |
  | `BertEmbeddings` | BERT Embeddings (word + token_type + positional) |
  | `BertPooler` | Pooler used in BERT |
  | `SpatialPyramidPooling` | Fixed pooled representation regardless of image input size |
  | `GatedLinearUnit` | Gated Convolutional Neural Network |
  | `ScaledDotProductAttention` | Attention used in BERT and Transformer (aka 'attention is all you need') |
  | `MultiHeadAttention` | Attention used in BERT and Transformer (aka 'attention is all you need') |
  | `GaussianWindowAttention` | Windowed attention instead of conventional attention where everything is attended at the same time |
  | `SequentialDense` | Applies Dense to a window of sequence item along sequence axis |
  | `SequentialMaxPooling` | Max pool across sequential axis and static axes |
  | `SequentialAveragePooling` | Average pool across sequential axis and static axes |
  | `SequentialConcatPooling` | Concat Average and Mean pool across sequential axis and static axes |
  | `vFSMN` | Vectorised Feedforward Sequential Memory Networks |
  | `cFSMN` | Compact Feedforward Sequential Memory Networks |
  | `BiRecurrence` | BiRecurrence recurrent layer with weight tying option to half parameter requirement |
  | `GlobalConcatPooling` | Global spatial concat pooling of ave and mean |
  |`FilterResponseNormalization`| Drop in replacement for batch norm with superior performance |
  |`Boom`| More parametrically efficient alternative to Position-Wise FeedForward layer found in Transformer |
  |`GaussianAttentionSeqImage`| Memory efficient attention that used 2d gaussian filters for images |
  | `SequenceDropout` | Dropout entire sequence elements |
  | `SEBlock` | Squeeze and Excitation block |
  | `SequenceSEBlock` | Squeeze and Excitation block for variable width image sequence |
  | `SIREN` | Sinusoidal Representation Network |
  | `LinearAttention` | Linearised form of dot-product attention with linear memory complexity |
  | `LinearAttentionModel` | Wrapper to `LinearAttention` |


  | Blocks | Description |
  | --- | ---|
  | `WeightDroppedLSTM` | A form of regularised LSTM |
  | `IndyLSTM` | A parameter efficient form of LSTM |
  | `IndRNN` | a RNN with long memory and can be stacked deeply |

  | Loss | Description |
  | --- | ---|
  | `gaussian_mdn_loss` | loss function when using Mixture density network |
  | `focal_loss_with_softmax` | A kind of cross entropy that handles extreme class imbalance |
  | `cross_entropy_with_softmax` | Added `label smoothing regularisation` in cross entropy with softmax |
  | `generalised_robust_barron_loss` | generalised robust loss |

  | Models | Description |
  | --- | ---|
  | `VGG` | Image Classification |
  | `UNET` | Semantic Segmentation |
  | `Transformer` | Language Modelling |
  | `MDN` | Mixture Density Networks |


  | Pre-trained models | Description |
  | --- | ---|
  | `Bert` | Bidirectional Encoder Representations from Transformers |
  | [fwd_wt103.hdf5](https://1drv.ms/u/s!AjJ4XyC3prp8mItNxiawGK4gD8iMhA?e=wh7PLB) | The weight parameters of the fastai's pytorch model. To be used to initialise `PretrainedWikitext103LanguageModel` |
  | [fwd_wt103.cntk](https://1drv.ms/u/s!AjJ4XyC3prp8mItPBdfmDYr9QP7J4w?e=k1BXlW) | The converted cntk model of fastai's pytorch model. To be used with `C.load_model` |
  | [fwd_wt103.onnx](https://1drv.ms/u/s!AjJ4XyC3prp8mItO70T_q8HOPwa6aQ?e=h2Fiv5) | The converted ONNX model of fastai's pytorch model. |


  | Learners | Description |
  | --- | ---|
  | `CyclicalLearningRate` | a method to eliminate the need to find best value and schedule for learning rate |
  | `RAdam` | a variant of `Adam` that doesn't require any warmup |

  | Misc | Description |
  | --- | ---|
  | `CTCEncoder` | Helper class to convert data into a format acceptable for cntk's ctc implementation |



  This library is implemented in pure cntk python API. For help in cntk c#, you can refer to the two repository
  [deep-learning-with-csharp-and-cntk](https://github.com/anastasios-stamoulis/deep-learning-with-csharp-and-cntk)
  and [DeepBelief_Course4_Examples](https://github.com/AllanYiin/DeepBelief_Course4_Examples).



  For the F# wrapper of CNTK please visit [FsCNTK](https://github.com/fwaris/FsCNTK),
  it also contains some example implementations like seq2seq, autoencoder, LSTM, GAN.



  ***2021-04-04***

  Previous `LinearAttention` uses implemntation from [Transformers are RNNs:Fast Autoregressive Transformers with Linear Attention](https://arxiv.org/abs/2006.16236) that uses `elu`.
  `elu` as kernel may not perform well in certain task (e.g. ASR) as documented in the paper.

  Hence, new kernel trick uses `softmax` from [Efficient Attention: Attention with Linear Complexities](https://arxiv.org/abs/1812.01243).



  ***2020-09-06***

  Pads the ctc label sequence to the same sequence length as the network output.
  This should be used when the final sequence length of the network output cannot be determined
  beforehand during the pre-processing of the ctc_labels. Thus, the padding is done during training runtime
  instead of during the data pipeline processing.

  The padding token would be the last sequence element of `ctc_labels`. `ctc_labels` should be
  a one hot encoded vector sequence. The padding token will have the value of 1 in its one-hot encoded vector.


  ***2020-06-20***

  Added cntk implementation of `LinearAttention` and `LinearAttentionModel`.
  Standard dot-product attention found in `Transformer` is quadratic in time and gpu memory complexity
  with respect to sequence length. The `C.layers.AttentionModel` is also quadratic.

  However, `LinearAttention` is a linearised form of dot-product attention. It is linear in time and gpu memory complexity
  with respect to sequence length. This is especially significant since `cntk` doesn't have any checkpointing function
  compared to other frameworks like `tensorflow` and `pytorch`, where it saves gpu memory at the expense of some
  computation overhead. Now, with `LinearAttention` training of `Transformer` can be done on `cntk` since the
   gpu memory requirement is drastically reduced.

  `LinearAttentionModel` is wrapper for `LinearAttention` in the style of `C.layers.AttentionModel`.

  For more details refer to [Transformers are RNNs:Fast Autoregressive Transformers with Linear Attention](https://arxiv.org/abs/2006.16236) by Katharopoulos et al.

  Example:

      a = C.sequence.input_variable(24)
      b = LinearAttention(hidden_dim=32, model_dim=24)(a, a, a)

      assert b.shape == (32, )


  ***2020-06-20***

  `sequence.pad_to` pads a shorter sequence to the same sequence length as another longer sequence.
  This is especially useful in CTC training where both sequences need to have the same sequence length

  Example:

      ax1 = C.Axis.new_unique_dynamic_axis('ax1')
      ax2 = C.Axis.new_unique_dynamic_axis('ax2')
      a = C.sequence.input_variable(3, sequence_axis=ax1)
      b = C.sequence.input_variable(6, sequence_axis=ax2)

      c = Cx.sequence.pad_to(a, b)  # pad to same sequence length

      ctc_token = C.Constant(np.array([0, 0, 1]))
      d = C.element_select(C.equal(c, 0), ctc_token, c)  # swap padded zeros with ctc token


  ***2020-06-19***

  `SIREN` leverages periodic activation functions for implicit neural representations and demonstrate
  that these networks are ideally suited for representing complex natural signals and their derivatives.

  The results are incredible. It is highly recommended that you check out their [project page](https://vsitzmann.github.io/siren/).

  More details can be found in their paper [Implicit Neural Representations with PeriodicActivation Functions](https://arxiv.org/abs/2006.09661)



  ***2020-05-01***

  `SEBlock` and `SequenceSEBlock` are squeeze-excitation blocks that adaptively recalibrates channel-wise feature
  responses by explicitly modelling interdependencies between channels. It was show that these blocks can be
  stacked together to form SENet architectures that generalise extremely effectively across different datasets.

  Its the winner for ILSVRC2017 classification submission. More details can be found in the
  paper [Squeeze-and-Excitation Networks](https://arxiv.org/abs/1709.01507) by Jie hu et al.


  ***2020-04-20***

  `SequenceDropout` dropouts entire sequence elements along the dynamic sequence axis.



  ***2020-04-15***

  `GaussianAttentionSeqImage` is a 2d spatial gaussian attention.
  To use, the encoded image should be formulated as a cntk sequence (example below). This can be useful when
  you are constraint by gpu memory as 2d gaussian attention is more memory efficient than standard attention.

  This is from the deepmind paper, DRAW: A Recurrent Neural Network for Image Generation by Gregor et al
  More details can be found in the following https://arxiv.org/abs/1502.04623

  Example:

      n = 5
      num_channels = 3
      image_height = 64
      expected_image_width = 1000
      image_seq = C.sequence.input_variable((num_channels, image_height))  # rgb image with variable width and fixed height
      decoder_hidden_state = ...  # from decoder somewhere in the network
      attended_image = Cx.layers.GaussianAttentionSeqImage(n, image_height, expected_image_width)(image_seq, decoder_hidden_state)

      assert attended_image.shape == (num_channels, n, n)


  ***2020-03-29.***

  `generalised_robust_barron_loss` is a generalisation for generalization of the Cauchy/Lorentzian,
  Geman-McClure, Welsch/Leclerc, generalized Charbonnier, Charbonnier/pseudo-Huber/L1-L2, and
  L2 loss functions.

  Can be used as a drop-in replacement in any regression task that you have.

  For more details, please refer to [A General and Adaptive Robust Loss Function](https://arxiv.org/abs/1701.03077), Jonathan T. Barron,
  or this [video](https://www.youtube.com/watch?v=BmNKbnF69eY).
  It is the Best Paper Award Finalist in CVPR 2019.


  Implemented `sample_with_bias` to sample more likely classes as a replacement
  for `sample_top_k` which cannot be used inside a `UnfoldFrom`. `sample_with_bias` reduces sampling variance especially when you have a long tail.



  ***2020-02-11.***

  Boom layer from SHA-RNN by S. Merity creator of QRNN. Alternative to PositionwiseFeedForward. Serves the same function as
  PositionwiseFeedForward found in transformer.

  Boom layer minimizes computation and removes an entire matrix of parameters compared to traditional down-projection layers.

  For more detail please read: [Single Headed Attention RNN: Stop Thinking With Your Head](https://arxiv.org/abs/1911.11423) by Stephen Merity.


  ***2019-12-03.***

  Added cntk implementation of `FilterResponseNormalization`. Filter Response Normalization (FRN) layer
  is a novel combination of a normalization and an activation function,
  that can be used as a drop-in replacement for other normalizations and activations.

  The method operates on each activation map of each batch sample
  independently, eliminating the dependency on other batch samples or channels of the same sample.
  The method outperforms BN and all alternatives in a variety of settings for all batch sizes.
  FRN layer performs â‰ˆ0.7âˆ’1.0% better on top-1 validation accuracy than BN with large mini-batch sizes on
  Imagenet classification on InceptionV3 and ResnetV2-50 architectures. Further, it performs >1% better
  than GN on the same problem in the small mini-batch size regime. For object detection problem on COCO dataset,
  FRN layer outperforms all other methods by at least 0.3âˆ’0.5% in all batch size regimes.

  Please refer to the paper [Filter Response Normalization Layer: Eliminating Batch Dependence
  in the Training of Deep Neural Networks](https://arxiv.org/abs/1911.09737v1) for more details .



  ***2019-11-04.***

  Add in new operations stated above. `sequence.window` now has an additional argument that lets you control striding.
  `sequence.window_causal` creates causal window that doesn't leak future information into the past (preserve causality).
  `SequentialDense` convenience layer added to apply dense to a window of sequence item,
  much like `SequentialConvolution` but with better memory performance.



  ***2019-11-04.***

  `Cx.Sequence.reduce_concat_pool` concatenates the last item in the sequence axis with the summarisation
  of the sequence represented by `reduce_max` and `reduce_mean` of the sequence axis. Anytime `C.sequence.last` is used,
  this can be a drop-in replacement.

  Example:

      n = 32
      a = C.sequence.input_variable(n)
      b = Cx.sequence.reduce_concat_pool(a)

      assert b.shape == (n * 3, )


  `SequentialConcatPooling` does spatial concat pooling over the sequential axis.
  Concat pooling is the concatenation of both average pooling and max pooling. In any situation where max or ave
  pooling is appropriate, concat pooling can be used as a drop-in replacement and achieve improvements in performance.

  Example:

      a = C.sequence.input_variable((3, 10))
      b = SequentialConcatPooling(filter_shape=(2, 2), strides=2)(a)

      assert b.shape == (6, 10)

      n = [np.random.random((3, 10)).astype(np.float32),
           np.random.random((3, 10)).astype(np.float32),
           np.random.random((3, 10)).astype(np.float32),
           np.random.random((3, 10)).astype(np.float32), ]

      print(b.eval({a: n}))


  `GlobalConcatPooling` is the standard spatial concat pooling of both max pool and ave pool.


  ***2019-10-15.***

  `mish` is an activation function is introduced in [Mish: A Self Regularized Non-Monotonic Neural Activation Function](https://arxiv.org/abs/1908.08681v2)
  by Diganta Misra. Experiments show that `mish` tends to work better than both ReLU and Swish along with other standard
  activation functions in many deep networks across challenging datasets. For instance,
  in Squeeze Excite Net-18 for CIFAR 100 classification, the network with Mish had an increase in
  Top-1 test accuracy by 0.494% and 1.671% as compared to the same network with Swish and ReLU respectively.
  The similarity to Swish along with providing a boost in performance and its simplicity in implementation
  makes it easier for researchers and developers to use Mish in their Neural Network Models.

  This activation function is adopted in `fast ai`.

  Rectified Adam or `RAdam` is a `Adam` optimiser variant that doesn't require a warmup schedule, which `Adam` tends
  to need to maintain stability. In this cntk implementation, we added a `RAdam` like optimiser based
  on the work of [On the adequacy of untuned warmup for adaptive optimization](https://arxiv.org/abs/1910.04209) by Jerry Ma and Denis Yarats.

  `RAdam` is adopted in `fast ai` too.



  ***2019-09-30.***

  Made improvement to weight tying of BiRecurrence by have one parameter tensor token for every state
  in the step function per direction (forward and backward). This will allow forward and backward token
  to have more representational flexibility. Previously, all states use the same forward or backward token.


  ***2019-09-06.***

  Add a wrapper to create a bidirectional recurrent layer using `BiRecurrence`. Included in the implementation
  is an option to half the number of parameters required by  bidirectional recurrent layer. This is done
  by only using one recurrent unit to do both forward and backward computation instead of the usual two.
  A forward and backward token is used to initialise the hidden state so that the recurrent unit can tell
  the directionality.

  More details can be found in the paper [Efficient Bidirectional Neural Machine Translation](https://arxiv.org/abs/1908.09329)

  Example:

      a = C.sequence.input_variable(10)
      b = BiRecurrence(LSTM(100), weight_tie=True)(a)

      assert b.shape == (200, )


  ***2019-08-29.***

  CNTK implementation of Fast AI's Universal  Language  ModelFine-tuning (ULMFiT) English model has been added.
  This language model was trained on Wikitext-103 and can be used as a base model for any downstream language task.

  It is also much more efficient to run compare to BERT and other Transformer language models.

  For more details, you can refer to the original paper [here](https://arxiv.org/abs/1801.06146)

  Example:

      vocab_size = 238462
      converted_hdf5_model_file_path = 'PATH/fwd_wt103.hdf5'  # this is not the original pytorch model
      lm = PretrainedWikitext103LanguageModel(converted_hdf5_model_file_path)

      a = C.sequence.input_variable(vocab_size)
      prediction = lm(a)  # next-word-prediction
      features = prediction.features  # features of tokens

      assert prediction.shape == (vocab_size, )
      assert features.shape == (400, )

  | Model | Description |
  | --- | ---|
  | [fwd_wt103.hdf5](https://1drv.ms/u/s!AjJ4XyC3prp8mItNxiawGK4gD8iMhA?e=wh7PLB) | The weight parameters of the fastai's pytorch model. To be used to initialise `PretrainedWikitext103LanguageModel` |
  | [fwd_wt103.cntk](https://1drv.ms/u/s!AjJ4XyC3prp8mItPBdfmDYr9QP7J4w?e=k1BXlW) | The converted cntk model of fastai's pytorch model. To be used with `C.load_model` |
  | [fwd_wt103.onnx](https://1drv.ms/u/s!AjJ4XyC3prp8mItO70T_q8HOPwa6aQ?e=h2Fiv5) | The converted ONNX model of fastai's pytorch model. |
  | [itos_wt103.pkl](http://files.fast.ai/models/wt103/) | Tokens used in pretrained model |


  ***2019-08-08.***

  Added two cntk implementation of `gelu` activation function. `gelu` activation is used in `BERT`
  and OpenAI's `GPT` and `GPT-2`.

  Gaussian Error Linear Unit (GELU), a high-performing neuralnetwork activation function.
  The GELU nonlinearity is the expected transforma-tion of a stochastic regularizer which randomly
  applies the identity or zero mapto a neuronâ€™s input.  The GELU nonlinearity weights inputs by their
  magnitude,rather than gates inputs by their sign as in ReLUs.

  For more detail please refer to [Gaussian Error Linear Units (GELU)](https://arxiv.org/abs/1606.08415)
  by Hendrycks and Gimpel.


  ***2019-07-04.***

  Calculates the mean along the dynamic sequential axis in CNTK.


  ***2019-06-26.***

  Allows the sequence items along the sequence axis to be reversed. This is useful when you want to create a
  Bi-directional Auto-Regressive layer because using UnfoldFrom does not work with Recurrence(go_backwards=True) and
   will result in a ValueError.


  Example:

      import cntk as C
      import cntkx as Cx
      from cntk.layers import Recurrence, UnfoldFrom, LSTM

      hidden_dim = 50
      start_token = C.Constant(0, shape=(hidden_dim,))
      a = C.sequence.input_variable(1, name='seq1')

      b = UnfoldFrom(Recurrence(LSTM(hidden_dim), go_backwards=True))(start_token, a)

      n = [np.random.random((10, hidden_dim)).astype(np.float32),]

      
      b.eval({b.arguments[0]: n})


  The workaround would be:

      import cntk as C
      import cntkx as Cx
      from cntk.layers import Recurrence, UnfoldFrom, LSTM

      hidden_dim = 50
      start_token = C.Constant(0, shape=(hidden_dim,))
      a = C.sequence.input_variable(1, name='seq1')
      a_reversed = Cx.sequence.reverse(a)

      b = UnfoldFrom(Recurrence(LSTM(hidden_dim)))(start_token, a_reversed)  # remove go_backwards=True

      n = [np.random.random((10, hidden_dim)).astype(np.float32),]
      b.eval({b.arguments[0]: n})  # this will run just fine



  ***2019-06-21.***

  CNTK implementation of that allows sampling of the top_k unnormalised log-probabilities distribution.
  This is useful text (or sequence) generation where it is known that greedy decoding will cause
  text degeneration.

  For more details on this, please refer to [A curious case of neural text degeneration](https://arxiv.org/abs/1904.09751)


  Example:

      import cntk as C
      import cntkx as Cx

      a = C.input_variable(5)
      b = Cx.random.sample_top_k(a, k=3, num_classes=5)

      n = np.array([[1, 2, 3, 4, 5],] * 1000)

      results = b.eval({a: n})
      assert np.sum(results[:, :2]) == 0
      assert np.sum(results[:, 2:]) == 1000

  ***2019-05-04.***

  CNTK implementation of Bidirectional vectorised Feedforward Sequential Memory Network (vFSMN)
  and Compact Feedforward Sequential Memory Network (cFSMN).

  FSMN is a standard fully-connected feedforward neural network equipped
  with some learnable memory blocks in its hidden layers. The memory blocks
  use a tapped-delay line structure to encode the long context information into
  a fixed-size representation as short-term memory mechanism.

  The authors claim that FSMNs can be learned much more reliably and faster than
  RNNs or LSTMs due to the inherent non-recurrent model structure while significantly
  outperforming RNNs in language and speech modeling.

  For more details please refer to [Feedforward Sequential Memory Networks: A
  New Structure to Learn Long-term Dependency](https://arxiv.org/abs/1512.08301)

  cFSMN is a compact version of FSMN that can result in a reduction of up
  to 60% in model size and speed up the learning by more than 7 times while
  still significantly outperforming the popular bi-direction LSTMs for both
  frame-level cross-entropy (CE) criterion based training and MMI based sequence training.

  For more details please refer to "Compact Feedforward Sequential Memory Networks for
  Large VocabularyContinuous Speech Recognition" by Zhang, et al.

  Example:

      import cntk as C
      from cntkx.layers import vFSMN, cFSMN

      
      a = C.sequence.input_variable(10)
      b = vFSMN(100, C.relu, num_past_context=3, num_future_context=0)(a)

      assert b.shape == (100,)

      
      a = C.sequence.input_variable(10)
      b = vFSMN(120, C.relu, num_past_context=3, num_future_context=3)(a)

      assert b.shape == (120,)

      
      a = C.sequence.input_variable(100)
      b = cFSMN(120, 50, C.relu, num_past_context=3, num_future_context=3)(a)

      assert b.shape == (120,)


  ***2019-04-19.***

  CNTK's CTC implementation requires that data be formatted in a particular way that's typically in acoustic
  modeling but unusual in other applications. So class provides an easy way to convert data between
  what users typically expect and what cntk demands.

  Example:
      labels = ['a', 'b', 'c']
      encoder = CTCEncoder(labels)

      labels_tensor = C.sequence.input_variable(len(encoder.classes_))  # number of classes = 4
      input_tensor = C.sequence.input_variable(100)

      labels_graph = cntk.labels_to_graph(labels_tensor)
      network_out = model(input_tensor)

      fb = C.forward_backward(labels_graph, network_out, blankTokenId=encoder.blankTokenId)

      ground_truth = ['a', 'b', 'b', 'b', 'c']
      seq_length = 10  # must be the same length as the sequence length in network_out

      fb.eval({input_tensor: [...],
               labels_tensor: [encoder.transform(ground_truth, seq_length=seq_length)]})



  ***2019-04-14.***

  Added `Label Smoothing Regularization` in `cross_entropy_with_softmax`.
  Added `sequence.window` that creates non-overlapping window along the sequence axis thereby reducing the
  sequence length and increasing the dimension by the same factor.

  Implemented a convenience layer used in acoustic modelling known as `PyramidalBiRecurrence`. Used to create
  pyramidal bi-directional LSTM (BLSTM) found in "Listen, attend and spell" by Chan et al. (https://arxiv.org/abs/1508.01211)
  Typically used to down sample the sequence length to make memory and runtime manageable.


  ***2019-04-08.***

  Added a new `op` called `join` where two sequence tensors can be joined along with sequence axis forming a longer sequence.


  ***2019-04-08.***

  Add average pooling layer that works with sequential axis. Current cntk `AveragePooling` doesn't pool across sequence elements.

  Example on `cntkx.layers.SequentialAveragePooling`

      
      a = C.sequence.input_variable((3, 25))

      
      b = C.layers.SequentialConvolution(filter_shape=(3, 3), num_filters=16, stride=(1, 1), pad=True)(a)

      assert b.shape == (16, 25)

      
      c = SequentialAveragePooling(filter_shape=(2, 2), strides=(2, 2), pad=False)(b)

      assert c.shape == (16, 12)


  ***2019-04-07.***

  `Cx.sequence.stride` enables striding across the sequential axis, selecting every integer items along the sequence.
  `Cx.scalar` converts tensor into scalar of shape `(1,)`



  ***2019-04-06.***

  CNTK implementation of [Independently Recurrent Long Short-term Memory cells: IndyLSTMs](https://arxiv.org/abs/1903.08023)
  by Gonnet and Deselaers, and [Independently Recurrent Neural Network (IndRNN): Building A Longer andDeeper RNN](https://arxiv.org/abs/1803.04831)
  by Li, et al.

  Both `IndyLSTM` and `IndRNN` have hidden-to-hidden weights that are diagonal matrix instead of the usual full matrix.
  Thus neurons in each layer are independent from each other, and the cross-channel information is
  obtained through stacking multiple layers.

  `IndRNN` allows for the use of `C.relu` activation thus allowing multiple `IndRNN` layers to be stacked together deeply.

  `IndyLSTM` has parameters linear to the number of nodes in the linear, as opposed to standard LSTM that is quadratic
  making `IndyLSTM` potentially faster and smaller as a model.

  Authors of both `IndRNN` and `IndyLSTM` have claimed performance as good as or even better than regular LSTMs.

  Example:

      import cntk as C
      from cntkx.layers import IndyLSTM, IndRNN, Recurrence

      a = C.sequence.input_variable(10)
      b = Recurrence(IndRNN(20))(a)
      c = Recurrence(IndyLSTM(20))(a)

      assert b.shape == c.shape == (20,)



  ***2019-03-24.***

  Add max pooling layer that works with sequential axis. Current cntk `MaxPooling` doesn't pool across sequence elements.

  Example on `cntkx.layers.SequentialMaxPooling`

      
      a = C.sequence.input_variable((3, 25))

      
      b = C.layers.SequentialConvolution(filter_shape=(3, 3), num_filters=16, stride=(1, 1), pad=True)(a)

      assert b.shape == (16, 25)

      
      c = SequentialMaxPooling(filter_shape=(2, 2), strides=(2, 2), pad=False)(b)

      assert c.shape == (16, 12)


  ***2019-03-18.***

  Cyclical learning rate (CLR) is an implementation to that  practically eliminates the need to
  experimentally find the best values and schedule  for  the global  learning  rates.

  Instead  of  monotonically decreasing the learning rate, this method lets the learning
  rate  cyclically  vary  between  reasonable  boundary  values. Training  with
  cyclical  learning  rates  instead of  fixed  values  achieves improved  classification
  accuracy without a need to tune and often in fewer iterations.

  More details can be found in [Cyclical Learning Rates for Training Neural Networks](https://arxiv.org/abs/1506.01186)
  by Leslie N. Smith

  This CLR implementation can be used with the cntk training loop by adding only ***two lines of code***:

      model = C.layers.Dense(10)(C.input_variable(10))
      sgd_momentum = C.momentum_sgd(model.parameters, 0.1, 0.9)
      clr = CyclicalLeaningRate(sgd_momentum, minibatch_size=32)  # first line of code

      for epoch in range(10):
          for batch in range(100):
              trainer.train_minibatch(...)
              clr.batch_step()  # second line of code (to be called after every training update)




  ***2019-03-12.***

  Added Batch Matrix Multiplication. This implementation is similar
  to [tensorflow.matmul](https://www.tensorflow.org/api_docs/python/tf/linalg/matmul).

  Example:

      a = C.sequence.input_variable((3, 4, 5))     # batch matrix
      b = C.sequence.input_variable((3, 5, 6))     # batch matrix
      c = Cx.batchmatmul(a, b)
      assert c.shape == (3, 4, 6)                  # 3 is treated as a batch axis



  ***2019-03-10.***

  BERT, the state-of-the-art language model is now available as a CNTK pretrained model.

  Currently, it is only tested to work with `BERT-Base, Uncased` (uncased_L-12_H-768_A-12) and can be
  downloaded from [Google AI](https://github.com/google-research/bert)

  When you have downloaded `BERT-Base, Uncased`, there should be 5 files inside. You will need to `.zip`
  three of those files into a tensorflow checkpoint file before you can load it into `cntkx`.

  Those three files are: `bert_model.ckpt.data-00000-of-00001`, `bert_model.ckpt.index`, `bert_model.ckpt.meta`.
  Then rename the extension of `.zip` into `.ckpt` and you are good to go.

  Example below

      text_tensor = C.sequence.input_variable(30522)
      token_type_tensor = C.sequence.input_variable(2)
      filepath_to_tf_bert_model = "YOUR_FILE_DIRECTORY/bert_model.ckpt"

      model = Cx.layers.PreTrainedBertModel(filepath_to_tf_bert_model, num_heads=12, dropout_rate=0.1)
      b = model(text_tensor, token_type_tensor)

      assert b.shape == (768,)

  For more details about BERT, you can find the original paper [here](https://arxiv.org/abs/1810.04805),
  and some useful resources [here](https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270)
  and [here](http://jalammar.github.io/illustrated-bert/).

  Note:
  It goes without saying also that to use these pre-trained models you will need to have tensorflow installed
  since we are convert them from tensorflow models.


  ***2019-03-06.***

  CNTK implementation of `PositionalEmbedding`, `BertEmbeddings` and tf-to-cntk `PreTrainedBertEmbeddings`.
  BERT is a state-of-the-art language model from Google AI, more details can be found in
  [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805).

  Google AI's pre-trained BERT tensorflow model can be downloaded [here](https://github.com/google-research/bert).
  Tensorflow would need to be installed in your environment if you intend to use `PreTrainedBertEmbeddings`, which
  takes a tensorflow model and convert it cntk.

  Example for `PositionalEmbedding`

      a = C.sequence.input_variable(12)
      b = PositionalEmbedding(max_seq_length, hidden_dim)(a)

      assert b.shape == (hidden_dim, )

  Example for `BertEmbeddings`

      text_tensor = C.sequence.input_variable(100)
      token_type_tensor = C.sequence.input_variable(2)
      b = BertEmbeddings(max_seq_length, hidden_dim, 0.1)(text_tensor, token_type_tensor)

      assert b.shape == (hidden_dim, )

  Example for `PreTrainedBertEmbeddings`

      text_tensor = C.sequence.input_variable(30522)
      token_type_tensor = C.sequence.input_variable(2)
      filepath_to_tf_bert_model = "YOURFILEPATH"
      embeddings = PreTrainedBertEmbeddings(filepath_to_tf_bert_model, 0.1, False)
      b = embeddings(text_tensor, token_type_tensor)

      assert b.shape == (768, )


  ***2019-03-02.***

  CNTK implementation of `Variational Dropout` found in
  [A Theoretically Grounded Application of Dropout in Recurrent Neural Networks](https://arxiv.org/abs/1512.05287)
  and `Weight Dropped LSTM` proposed in a salesforce research paper
  [Regularizing and Optimizing LSTM Language Models](https://arxiv.org/abs/1708.02182).

  `Weight Dropped LSTM` is a regularised LSTM that uses DropConnect on hidden-to-hidden weights as a form of recurrent
  regularisation. It also include application of variational dropout on the inputs and outputs of the recurrent units
  for further regularisation.

  `Variational Drpoout` is a regularisation that uses same dropout mask at each time step
  (i.e. across the dynamic sequence axis) as opposed to the naive application of `C.layers.Dropout` to a sequence
  which will result in a different dropout mask for every tensor along the sequence axis.


      import cntkx as Cx
      from cntkx.layers import Recurrence, WeightDroppedLSTM
      import cntk as C

      dropconnect_rate = 0.2
      variationaldrop_rate = 0.1

      seq = C.sequence.input_variable(56)
      b = Recurrence(WeightDroppedLSTM(20, dropconnect_rate),
                     variational_dropout_rate_input=variationaldrop_rate,
                     variational_dropout_rate_output=variationaldrop_rate)(seq)

      assert b.shape == (100, )

      seq_dropped = VariationalDropout(0.1)(seq)

      assert seq_dropped.shape == seq.shape


  ***2019-02-02.***

  CNTK implementation of Gated Linear Unit (Gated CNN) founnd in Facebook AI Research Lab's paper:
  [Language Modeling with Gated Convolutional Networks](https://arxiv.org/abs/1612.08083).
  This paper applies a convolutional approach to language modelling with a novel Gated-CNN model.

      import cntkx as Cx
      import cntk as C

      seq = C.sequence.input_variable(56)
      hidden = Cx.layers.GatedLinearUnit(window=2, hidden_dim=100)(seq)

      assert hidden.shape == (100, )


  ***2019-01-21.***

  CNTK implementation of `Focal Loss` enables the training of highly accurate dense object detectors in the
  presence of vast numbers of easy background examples or dataset with extreme class imbalance (e.g. 1:1000).

  `Focal Loss` focuses training on a sparse set of hard examples and prevents the vast number of easy negatives from
  overwhelm-ing the model during training.

  For more details please refer to [Focal Loss for Dense Object Detection](https://arxiv.org/abs/1708.02002)

      import cntkx as Cx

      Cx.focal_loss_with_softmax([[0, 0, 0.8, 0.2]], [[0, 0, 1, 0]]).eval()
      array([[0.31306446]], dtype=float32)



  ***2019-01-18.***

  Gaussian window attention model was first introduced by Alex Graves in
  "Generating sequences with recurrent neural networks".

  It uses a mixture of gaussian windows to attend to
  portions of the sequence as oppose to the widely used attention model introduced in
  "Neural machine translation by jointly learning to align and translate" by Bahdanau, et al. that attends
  to the entire sequence all at once.

  Gaussian window attention is also directional in its attention on the context sequence. When modeling
  strongly ordered sequences, gaussian window attention will be a natural choice due to this inductive bias.

      import cntk as C
      import cntkx as Cx

      seq1 = C.Axis.new_unique_dynamic_axis('seq1')
      seq2 = C.Axis.new_unique_dynamic_axis('seq2')

      encoded = C.sequence.input_variable(30, sequence_axis=seq1)
      query = C.sequence.input_variable(28, sequence_axis=seq2)

      a = Cx.layers.GaussianWindowAttention(10)(encoded, query)

      assert a.shape == (30, )

  "Generating sequences with recurrent neural networks" can be found [here](https://arxiv.org/abs/1308.0850).
  "Neural machine translation by jointly learning to align and translate" can be found [here](https://arxiv.org/abs/1409.0473).

  ***2019-01-16.***

  Spatial pyramid pooling layer is a pooling layer than returns a fixed length representation regardless of the
  image size/scale. It is frequently used for multi-size image training. It reported SOTA classification results using
  a single full-image representation without fine-tuning. For more details on the paper
  "Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition" by K. He, X. Zhang, S. Ren, J. Sun,
  link [here](https://arxiv.org/abs/1406.4729).

      import cntk as C
      import cntkx as Cx

      n = np.random.random((3, 3, 32, 32)).astype(np.float32)
      a = C.input_variable((3, 32, 32))
      b = Cx.layers.SpatialPyramidPooling((1, 2, 4))(a)

      assert b.shape == (3 * (4 * 4 + 2 * 2 + 1),)  # representation not dependent on image size


  ***2019-01-15.***

  Added sinusoidal positional embedding used in [Transformer](https://arxiv.org/abs/1706.03762). For an accessible
  explanation of transformer, you may look up [here](http://jalammar.github.io/illustrated-transformer/).

      import cntk as C
      import cntkx as Cx

      a = C.sequence.input_variable(10)
      b = SinusoidalPositionalEmbedding()(a)

      assert b.shape == (10, )

  Added `cntkx.ops.erf` error function.

  ***2019-01-12.***

  VGG is for image classification and UNET is for semantic segmentation. VGG is implemented for completeness
  sake and should not be used for any serious classification task.


  Paper on VGG can be found [here](https://arxiv.org/abs/1409.1556) titled "Very Deep Convolutional Networks
  for Large-Scale Image Recognition"

  Paper for UNET can be found [here](https://arxiv.org/abs/1505.04597) titled "U-Net: Convolutional Networks
  for Biomedical Image Segmentation"

  VGG example:

      import cntk as C
      import cntkx as Cx

      a = C.input_variable((3, 64, 64))
      b = Cx.layers.VGG19(100)(a)

      assert b.shape == (100,)

  UNET example:

      import cntk as C
      import cntkx as Cx

      a = C.input_variable((3, 512, 512))
      b = Cx.layers.UNET(num_classes=10, base_num_filters=64, pad=True)(a)

      assert b.shape == (10, 512, 512)

  Convenience functions such as `cntkx.ops.upsample` and `centre_crop` have also been added.
  `cntkx.ops.upsample` upsamples an image twice on each spatial dim. `centre_crop` crops a smaller image from
  a bigger one in the centre given a reference smaller image.



  The Transformer was first introduced in the [paper](https://arxiv.org/abs/1706.03762) 'Attention is all you need'.
  The architecture is based solely on attention mechanisms, dispensing with recurrence and convolutions entirely.
  More recently, [BERT](https://arxiv.org/abs/1810.04805) which broke almost all SOTA language task is also based on
  transformer and self-attention.

      import cntk as C
      import cntkx as Cx

      a = C.sequence.input_variable(512)
      b = C.sequence.input_variable(512)

      transformer = Cx.layers.Transformer()  # using default settings
      decoded = transformer(a, b)

      assert decoded.shape == (512, )


  ***2018-12-08.***

  The QRNN provides similar accuracy to the LSTM but can be betwen 2 and 17 times faster than the
  highly optimized NVIDIA cuDNN LSTM implementation depending on the use case.

  More details please refer to the original paper [here](https://arxiv.org/abs/1611.01576).

      import cntk as C
      import cntkx as Cx

      input_seq = C.sequence.input_variable(input_dim)
      prediction_seq = Cx.layers.QRNN(hidden_dim=50)(input_seq)



  ***2018-12-07.***

  Added two new sequence ops. `cntkx.ops.sequence.pad` allows padding on the sequence axis and
  `cntkx.ops.sequence.length` calculates the length of the sequence.

  ***2018-12-05.***

  Mixture density networks are neural networks that can in principle represent arbitrary conditional
  probability distributions in the same way that a conventional neural network can represent arbitrary functions.
  MDN are very useful when you need to map an input to several correct targets (aka. one-to-many problem).

  Updated with Gaussian Mixture Density Network ops and loss function. Ops will allow you to extract mdn coefficients and sample from the network.

  More details on mdn can be found in this [paper](https://publications.aston.ac.uk/373/1/NCRG_94_004.pdf) by Christopher Bishop.

      import cntk as C
      import cntkx as Cx

      input_tensor = C.input_variable(1, name="input_tensor")
      target_tensor = C.input_variable(1, name="target_tensor")

      
      inner = Dense(50, activation=C.relu)(input_tensor)
      inner = Dense(50, activation=C.relu)(inner)
      prediction_tensor = Dense((ndim + 2) * nmix, activation=None)(inner)

      sampled = Cx.sample_gaussian_mdn(prediction_tensor, nmix, ndim)  # sampling node
      loss = Cx.gaussian_mdn_loss(prediction_tensor, target_tensor, nmix=nmix, ndim=ndim)  # loss function


pkgId: 21f93fd59f1dbc1edded572e5c25bc35e1490966ce0e97d07ff812b9c0ec873d
name: python-co-op-translator
arch: src
version: 0.5.1
epoch: 0
release: 1
url: https://github.com/Azure/co-op-translator
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-co-op-translator-0.5.1-1.src.rpm
checksum_type: sha256
summary:
  Easily automate multilingual translations for your projects with co-op-translator, powered by advanced LLM technology.

description:
  ![Logo](/imgs/logo.png)



  _Easily automate multilingual translations for your projects with co-op-translator, powered by advanced LLM technology and Azure AI Services._

  [![Python package](https://img.shields.io/pypi/v/co-op-translator?color=4BA3FF)](https://pypi.org/project/co-op-translator/)
  [![License: MIT](https://img.shields.io/github/license/azure/co-op-translator?color=4BA3FF)](https://github.com/azure/co-op-translator/blob/main/LICENSE)
  [![Downloads](https://static.pepy.tech/badge/co-op-translator)](https://pepy.tech/project/co-op-translator)
  [![Downloads](https://static.pepy.tech/badge/co-op-translator/month)](https://pepy.tech/project/co-op-translator)

  [![GitHub contributors](https://img.shields.io/github/contributors/azure/co-op-translator.svg)](https://GitHub.com/azure/co-op-translator/graphs/contributors/)
  [![GitHub issues](https://img.shields.io/github/issues/azure/co-op-translator.svg)](https://GitHub.com/azure/co-op-translator/issues/)
  [![GitHub pull-requests](https://img.shields.io/github/issues-pr/azure/co-op-translator.svg)](https://GitHub.com/azure/co-op-translator/pulls/)
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)

  [![GitHub watchers](https://img.shields.io/github/watchers/azure/co-op-translator.svg?style=social&label=Watch)](https://GitHub.com/azure/co-op-translator/watchers/)
  [![GitHub forks](https://img.shields.io/github/forks/azure/co-op-translator.svg?style=social&label=Fork)](https://GitHub.com/azure/co-op-translator/network/)
  [![GitHub stars](https://img.shields.io/github/stars/azure/co-op-translator?style=social&label=Star)](https://GitHub.com/azure/co-op-translator/stargazers/)

  [![Open in GitHub Codespaces](https://img.shields.io/static/v1?style=for-the-badge&label=Github%20Codespaces&message=Open&color=24292F&logo=github)](https://codespaces.new/azure/co-op-translator)
  [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=VS%20Code%20Dev%20Containers&message=Open&color=007ACC&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure/co-op-translator)



  - [Overview](#overview)
  - [Why choose Co-op Translator for Markdown translations?](#why-choose-co-op-translator-for-markdown-translations)
  - [Key Features](#key-features)
  - [How it works](#how-it-works)
  - [Getting started with Co-op Translator](#getting-started-with-co-op-translator)
    - [Prerequisites](#prerequisites)
    - [Quick install](#quick-install)
    - [How to use Co-op Translator](#how-to-use-co-op-translator)
  - [Case Studies: Applying Co-op Translator in real projects](#case-studies-applying-co-op-translator-in-real-projects)
  - [🌐Multi-language support setup](#-multi-language-support-setup)
  - [Supported languages](#supported-languages)
  - [Adding a new language](#adding-a-new-language)
  - [Repository Structure](#repository-structure)
  - [Contributing](#contributing)
  - [Code of Conduct](#code-of-conduct)
  - [Responsible AI](#responsible-ai)
  - [Trademarks](#trademarks)



  **Co-op Translator** is a Python package designed to automate multilingual translations for your projects using advanced Large Language Model (LLM) technology and Azure AI Services. This project aims to simplify the process of translating content into multiple languages, making it accessible and efficient for developers.

  By integrating Co-op Translator into your workflow, you can automatically generate organized translation folders for different languages, and translate both Markdown files and images effortlessly.

  Here is an example of how Co-op Translator structures the translations and translates both Markdown files and text within images in your project:

  ![Example](/imgs/translation-ex.png)



  Have you struggled with traditional translation tools when working with Markdown files? Many translation engines fail to preserve Markdown syntax, forcing you to manually fix formatting issues after translation. Even advanced tools like ChatGPT can misinterpret code blocks, making it hard to copy and paste the translated content while maintaining the original structure.

  **Co-op Translator** is specifically designed to solve these problems. With a single command, you can translate all Markdown files and images in your project into any desired language while preserving the correct Markdown syntax.

  Translate your project's Markdown files effortlessly with Co-op Translator!



  - **Automated translations**: Easily translate text in your project files into multiple languages.
  - **Comprehensive coverage**: Translate all Markdown files and text within images in your project directories.
  - **Advanced LLM technology**: Utilize cutting-edge language models for high-quality translations.
  - **Simplify localization**: Streamline the process of localizing your project for international markets.
  - **Easy integration**: Seamlessly integrate with your existing project setup.



  ![Architecture](/imgs/architecture_241019.png)

  The process begins with Markdown and image files from your project folder, which are processed by **Azure AI Services**:

  - **Azure OpenAI**: Translates text from Markdown files.
  - **Azure Computer Vision**: Extracts text from images, which are then translated by Azure OpenAI.

  The final translated Markdown and image files are saved in the designated translation folder, ready to be used in multiple languages.





  - Azure Computer vision resource
  - Azure OpenAI resource
  - Python 3.10 or higher





  ```bash
  pip install co-op-translator
  ```



  ```bash
  poetry add co-op-translator
  ```



  1. [Set up Azure resources before starting](./getting_started/set-up-azure-resources.md)
  1. [Create an '.env' file in the root directory](./getting_started/create-env-file.md)
  1. [Install the Co-op translator package](./getting_started/install-package.md)
  1. [Translate your project using Co-op Translator](./getting_started/translator-your-project.md)



  These case studies show how Co-op Translator was applied to translate a real-world project. It highlights the translation process, the challenges encountered, and the results achieved, providing a useful reference for applying the tool to similar projects.

  1. [Phi-3 Cookbook translation: A case study](./getting_started/Phi-3Cookbook-translation-case.md)



  Before starting the translation process, you can add a table in the README that links to the translated versions of your document. Co-op Translator will automatically adjust these links during the translation process, allowing users to seamlessly switch between different language versions.

  For example, if a user navigates to the Korean README, they can easily switch to other translations like Spanish or Japanese without leaving the translated page.

  Here is an example of how the table should look before running the translation:



  ```md


  > **Note:**
  > These translations were automatically generated using the open-source [co-op-translator](https://github.com/Azure/co-op-translator) and may contain errors or inaccuracies. For critical information, it is recommended to refer to the original or consult a professional human translation. If you'd like to add or update a translation, please refer to the [co-op-translator](https://github.com/Azure/co-op-translator) repository, where you can easily contribute using simple commands.

  | Language             | Code | Link to Translated README                               | Last Updated |
  |----------------------|------|---------------------------------------------------------|--------------|
  | Chinese (Simplified) | zh   | [Chinese Translation](./translations/zh/README.md)      | 2024-10-04   |
  | Chinese (Traditional)| tw   | [Chinese Translation](./translations/tw/README.md)      | 2024-10-04   |
  | French               | fr   | [French Translation](./translations/fr/README.md)       | 2024-10-04   |
  | Japanese             | ja   | [Japanese Translation](./translations/ja/README.md)     | 2024-10-04   |
  | Korean               | ko   | [Korean Translation](./translations/ko/README.md)       | 2024-10-04   |
  | Spanish              | es   | [Spanish Translation](./translations/es/README.md)      | 2024-10-04   |
  ```



  ```md


  | [English](./translations/en/README.md) | [French](./translations/fr/README.md) | [Spanish](./translations/es/README.md) | [German](./translations/de/README.md) | [Russian](./translations/ru/README.md) | [Arabic](./translations/ar/README.md) | [Persian (Farsi)](./translations/fa/README.md) | [Urdu](./translations/ur/README.md) | [Chinese (Simplified)](./translations/zh/README.md) | [Chinese (Traditional, Macau)](./translations/mo/README.md) | [Chinese (Traditional, Hong Kong)](./translations/hk/README.md) | [Chinese (Traditional, Taiwan)](./translations/tw/README.md) | [Japanese](./translations/ja/README.md) | [Korean](./translations/ko/README.md) | [Hindi](./translations/hi/README.md) | [Bengali](./translations/bn/README.md) | [Marathi](./translations/mr/README.md) | [Nepali](./translations/ne/README.md) | [Punjabi (Gurmukhi)](./translations/pa/README.md) | [Portuguese](./translations/pt/README.md) | [Italian](./translations/it/README.md) | [Polish](./translations/pl/README.md) | [Turkish](./translations/tr/README.md) | [Greek](./translations/el/README.md) | [Thai](./translations/th/README.md) | [Swedish](./translations/sv/README.md) | [Danish](./translations/da/README.md) | [Norwegian](./translations/no/README.md) | [Finnish](./translations/fi/README.md) | [Dutch](./translations/nl/README.md) | [Hebrew](./translations/he/README.md) | [Vietnamese](./translations/vi/README.md) | [Indonesian](./translations/id/README.md) | [Malay](./translations/ms/README.md) | [Tagalog (Filipino)](./translations/tl/README.md) | [Swahili](./translations/sw/README.md) | [Hungarian](./translations/hu/README.md) | [Czech](./translations/cs/README.md) | [Slovak](./translations/sk/README.md) | [Romanian](./translations/ro/README.md) | [Bulgarian](./translations/bg/README.md) | [Serbian (Cyrillic)](./translations/sr/README.md) | [Croatian](./translations/hr/README.md) | [Slovenian](./translations/sl/README.md) |

  > **Note:**
  > These translations were automatically generated using the open-source [co-op-translator](https://github.com/Azure/co-op-translator) and may contain errors or inaccuracies. For critical information, it is recommended to refer to the original or consult a professional human translation. If you'd like to add or update a translation, please refer to the [co-op-translator](https://github.com/Azure/co-op-translator) repository, where you can easily contribute using simple commands.
  ```



  The table below lists the languages currently supported by **Co-op Translator**. It includes language codes, language names, and any known issues associated with each language. If you would like to add support for a new language, please add the corresponding language code, name, and appropriate font in the `font_language_mappings.yml` file located at `src/co_op_translator/fonts/` and submit a pull request after testing.

  | Language Code | Language Name        | Font                              | RTL Support | Known Issues |
  |---------------|----------------------|-----------------------------------|-------------|--------------|
  | en            | English              | NotoSans-Medium.ttf               | No          | No           |
  | fr            | French               | NotoSans-Medium.ttf               | No          | No           |
  | es            | Spanish              | NotoSans-Medium.ttf               | No          | No           |
  | de            | German               | NotoSans-Medium.ttf               | No          | No           |
  | ru            | Russian              | NotoSans-Medium.ttf               | No          | No           |
  | ar            | Arabic               | NotoSansArabic-Medium.ttf         | Yes         | Yes          |
  | fa            | Persian (Farsi)      | NotoSansArabic-Medium.ttf         | Yes         | Yes          |
  | ur            | Urdu                 | NotoSansArabic-Medium.ttf         | Yes         | Yes          |
  | zh            | Chinese (Simplified) | NotoSansCJK-Medium.ttc            | No          | No           |
  | mo            | Chinese (Traditional, Macau) | NotoSansCJK-Medium.ttc           | No          | No           |
  | hk            | Chinese (Traditional, Hong Kong) | NotoSansCJK-Medium.ttc           | No          | No           |
  | tw            | Chinese (Traditional, Taiwan) | NotoSansCJK-Medium.ttc           | No          | No           |
  | ja            | Japanese             | NotoSansCJK-Medium.ttc            | No          | No           |
  | ko            | Korean               | NotoSansCJK-Medium.ttc            | No          | No           |
  | hi            | Hindi                | NotoSansDevanagari-Medium.ttf     | No          | No           |
  | bn            | Bengali              | NotoSansBengali-Medium.ttf        | No          | No           |
  | mr            | Marathi              | NotoSansDevanagari-Medium.ttf     | No          | No           |
  | ne            | Nepali               | NotoSansDevanagari-Medium.ttf     | No          | No           |
  | pa            | Punjabi (Gurmukhi)   | NotoSansGurmukhi-Medium.ttf       | No          | No           |
  | pt            | Portuguese           | NotoSans-Medium.ttf               | No          | No           |
  | it            | Italian              | NotoSans-Medium.ttf               | No          | No           |
  | pl            | Polish               | NotoSans-Medium.ttf               | No          | No           |
  | tr            | Turkish              | NotoSans-Medium.ttf               | No          | No           |
  | el            | Greek                | NotoSans-Medium.ttf               | No          | No           |
  | th            | Thai                 | NotoSansThai-Medium.ttf           | No          | No           |
  | sv            | Swedish              | NotoSans-Medium.ttf               | No          | No           |
  | da            | Danish               | NotoSans-Medium.ttf               | No          | No           |
  | no            | Norwegian            | NotoSans-Medium.ttf               | No          | No           |
  | fi            | Finnish              | NotoSans-Medium.ttf               | No          | No           |
  | nl            | Dutch                | NotoSans-Medium.ttf               | No          | No           |
  | he            | Hebrew               | NotoSansHebrew-Medium.ttf         | Yes         | No           |
  | vi            | Vietnamese           | NotoSans-Medium.ttf               | No          | No           |
  | id            | Indonesian           | NotoSans-Medium.ttf               | No          | No           |
  | ms            | Malay                | NotoSans-Medium.ttf               | No          | No           |
  | tl            | Tagalog (Filipino)   | NotoSans-Medium.ttf               | No          | No           |
  | sw            | Swahili              | NotoSans-Medium.ttf               | No          | No           |
  | hu            | Hungarian            | NotoSans-Medium.ttf               | No          | No           |
  | cs            | Czech                | NotoSans-Medium.ttf               | No          | No           |
  | sk            | Slovak               | NotoSans-Medium.ttf               | No          | No           |
  | ro            | Romanian             | NotoSans-Medium.ttf               | No          | No           |
  | bg            | Bulgarian            | NotoSans-Medium.ttf               | No          | No           |
  | sr            | Serbian (Cyrillic)   | NotoSans-Medium.ttf               | No          | No           |
  | hr            | Croatian             | NotoSans-Medium.ttf               | No          | No           |
  | sl            | Slovenian            | NotoSans-Medium.ttf               | No          | No           |



  To add support for a new language:

  1. Go to [src/co_op_translator/fonts/font_language_mappings.yml](https://github.com/Azure/co-op-translator/blob/main/src/co_op_translator/fonts/font_language_mappings.yml).
  2. Add the language code, name, and appropriate font file name. Make sure to include the `rtl` attribute if the language is right-to-left.
  3. If you need to use a new font, ensure that the font is free to use in open-source projects by checking its licensing and copyright terms. After verifying, add the font file to the `src/co_op_translator/fonts/` directory.
  4. Test your changes locally to ensure that the new language is properly supported.
  5. Submit a Pull Request with your changes and indicate the addition of the new language in the PR description.

  Example:

  ```yaml
  new_lang:
    name: "New Language"
    font: "NotoSans-Medium.ttf"
    rtl: false
  ```



  - **src/co_op_translator/**: Source code for the translator.
  - **getting_started/**: Guides and tutorials to get started.
  - **imgs/**: Images used in documentation.
  - **tests/**: Test cases for the project.
  - **data/**: Contains data files.



  This project welcomes contributions and suggestions. Interested in contributing to Azure Co-op Translator? Please see our [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how you can help make Co-op Translator more accessible.



  [![co-op-translator contributors](https://contrib.rocks/image?repo=Azure/co-op-translator)](https://github.com/Azure/co-op-translator/graphs/contributors)



  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
  For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
  contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.



  Microsoft is committed to helping our customers use our AI products responsibly, sharing our learnings, and building trust-based partnerships through tools like Transparency Notes and Impact Assessments. Many of these resources can be found at [https://aka.ms/RAI](https://aka.ms/RAI).
  Microsoft’s approach to responsible AI is grounded in our AI principles of fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability.

  Large-scale natural language, image, and speech models - like the ones used in this sample - can potentially behave in ways that are unfair, unreliable, or offensive, in turn causing harms. Please consult the [Azure OpenAI service Transparency note](https://learn.microsoft.com/legal/cognitive-services/openai/transparency-note?tabs=text) to be informed about risks and limitations.

  The recommended approach to mitigating these risks is to include a safety system in your architecture that can detect and prevent harmful behavior. [Azure AI Content Safety](https://learn.microsoft.com/azure/ai-services/content-safety/overview) provides an independent layer of protection, able to detect harmful user-generated and AI-generated content in applications and services. Azure AI Content Safety includes text and image APIs that allow you to detect material that is harmful. We also have an interactive Content Safety Studio that allows you to view, explore and try out sample code for detecting harmful content across different modalities. The following [quickstart documentation](https://learn.microsoft.com/azure/ai-services/content-safety/quickstart-text?tabs=visual-studio%2Clinux&pivots=programming-language-rest) guides you through making requests to the service.

  Another aspect to take into account is the overall application performance. With multi-modal and multi-models applications, we consider performance to mean that the system performs as you and your users expect, including not generating harmful outputs. It's important to assess the performance of your overall application using [generation quality and risk and safety metrics](https://learn.microsoft.com/azure/ai-studio/concepts/evaluation-metrics-built-in).

  You can evaluate your AI application in your development environment using the [prompt flow SDK](https://microsoft.github.io/promptflow/index.html). Given either a test dataset or a target, your generative AI application generations are quantitatively measured with built-in evaluators or custom evaluators of your choice. To get started with the prompt flow sdk to evaluate your system, you can follow the [quickstart guide](https://learn.microsoft.com/azure/ai-studio/how-to/develop/flow-evaluate-sdk). Once you execute an evaluation run, you can [visualize the results in Azure AI Studio](https://learn.microsoft.com/azure/ai-studio/how-to/evaluate-flow-results).



  This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
  trademarks or logos is subject to and must follow
  [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
  Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
  Any use of third-party trademarks or logos are subject to those third-party's policies.


pkgId: db5a32125af619fa01d594007410c4e96dd109c9082cba4eaf3e1d4d1c520835
name: python-co2-reading-plugin
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Return a CO₂ reading every interval from an Adafruit CO₂ sensors SCD30, SCD40 or SCD41.
url: https://github.com/Pioreactor/co2_reading_plugin
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-co2-reading-plugin-0.2.1-1.src.rpm
checksum_type: sha256
description:
  Adafruit offers three CO2 sensors ([SCD30](https://www.adafruit.com/product/4867), [SCD40 and SCD41](https://learn.adafruit.com/adafruit-scd-40-and-scd-41)) that measure CO2, temperature, and humidity.

  This is a simple Pioreactor plugin that returns CO2 readings (or all readings) at a set duration from stemma QT connected Adafruit SCD sensors.

  Install with `pio plugins install co2-reading-plugin` from the command line, or in the Pioreactor UI.

  > [!IMPORTANT]
  > After installation, you'll need to edit your configuration to add the model of sensor you have. Find the section `[co2_reading.config]`, and edit parameter `adafruit_sensor_type` to be either `scd30` or  `scd4x`. (The `scd4x` represents both scd41 and scd40 sensors.q)




  This also adds a chart to your overview page that displays the CO2 readings per Pioreactor.


pkgId: 9cd3615931700385a2f520649fac5604ae5bc5e87114e52efd91bd37016e18cd
name: python-co2monitor
arch: src
version: 1.1
epoch: 0
release: 1
summary: See the current co2 emissions per kWh of electricity in the Netherlands
url: https://git.sr.ht:~rensoliemans/co2monitor
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-co2monitor-1.1-1.src.rpm
checksum_type: sha256
description:
  1.  [CO2 monitor](#org5277026)
      1.  [cli](#orgccda302)
      2.  [tray](#org6332d21)
      3.  [screen](#orgdf24a16)
  2.  [Installation](#orged95805)
      1.  [Development](#org3e02004)
  3.  [Pins](#org3b47f26)
      1.  [Screen](#org68d4c31)



  <a id="org5277026"></a>



  This projects monitors the current CO₂ emissions per kWh of electricity being generated in the Netherlands. It obtains the data from [ned.nl](https://ned.nl), and gets updated every 15 minutes. It has three modes:

      $ co2monitor --help

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

        Shows the current CO2 emissions per kWh of electricity in the Netherlands.

      Options:
        --debug / --no-debug
        --api-key TEXT        Override API_KEY environment variable.
        --api-url TEXT        [default: https://api.ned.nl/v1]
        --user-agent TEXT     Override USER_AGENT environment varaible.
        --polltime INTEGER    [default: 60]
        --version             Show the version and exit.
        -h, --help            Show this message and exit.

      Commands:
        cli     Print emissions to the commandline.
        screen  Show emissions on an EPD screen connected via GPIO.
        tray    Add a system tray icon with emissions.


  <a id="orgccda302"></a>



  This mode polls the API once per minute and outputs it in the current format:

      2024-11-29 19:30: 310.45g CO2/kWh


  <a id="org6332d21"></a>



  This creates a really ugly system tray icon showing the CO₂ emissions rounded to the nearest natural number, shown here below the tooltip:

  ![img](data/tray-screenshot.png)


  <a id="orgdf24a16"></a>



  This mode shows the current emisions a small EPD screen connected to some GPIO pins of the Raspberry Pi. It assumes that we are running on a Raspberry Pi, and fails otherwise.

  See here a photo of how it looks on [my 2.9 inch screen](https://www.waveshare.com/product/displays/e-paper/2.9inch-e-paper-module-b.htm):

  ![img](data/screen-photo.jpg)

  It uses the current locale (specifically, `LC_TIME`) to determine how the date looks. See [Pins](#org3b47f26) for an overview of what pins need to be connected to the screen.


  <a id="orged95805"></a>



  I show `pip` commands here. However, `pip` isn&rsquo;t ideal for this: use `pipx` or, as I do, `uv` (`uv tool install co2monitor[tray]`, for example).

      $ pip install co2monitor

  Is sufficient for the cli mode. The other modes require rather large libraries and are therefore excluded from the base package. Install the dependencies required for the `tray` mode (`Qt`, `pillow`) with

      $ pip install co2monitor[tray]

  And, shockingly,

      $ pip install co2monitor[screen]

  For the `screen` mode. This installs `pillow`, `RPi.GPIO` and `spidev`.


  <a id="org3e02004"></a>



  See the [Makefile](Makefile) for some handy dev commands. I use [uv](https://github.com/astral-sh/uv) to manage my dependencies, but it does not really matter all that much.

  [pyproject.toml](pyproject.toml) has an [Entry Point](https://setuptools.pypa.io/en/latest/userguide/entry_point.html), which means that it installs a binary called `co2monitor` in the virtual environment. If you have the virtual environment activated, you can run `co2monitor`. For `uv`, you can execute `uv run co2monitor` to run the project.


  <a id="org3b47f26"></a>



  <https://pinout.xyz/>


  <a id="org68d4c31"></a>



  [Product](https://www.waveshare.com/product/displays/e-paper/2.9inch-e-paper-module-b.htm)

  <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">


  <colgroup>
  <col  class="org-left" />

  <col  class="org-left" />

  <col  class="org-left" />

  <col  class="org-right" />

  <col  class="org-left" />
  </colgroup>
  <thead>
  <tr>
  <th scope="col" class="org-left">Name</th>
  <th scope="col" class="org-left">Function</th>
  <th scope="col" class="org-left">Color</th>
  <th scope="col" class="org-right">Pin number</th>
  <th scope="col" class="org-left">GPIO</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td class="org-left">VCC</td>
  <td class="org-left">Power</td>
  <td class="org-left">Grey</td>
  <td class="org-right">1</td>
  <td class="org-left">-</td>
  </tr>

  <tr>
  <td class="org-left">GND</td>
  <td class="org-left">Ground</td>
  <td class="org-left">Brown</td>
  <td class="org-right">6</td>
  <td class="org-left">-</td>
  </tr>

  <tr>
  <td class="org-left">DIN</td>
  <td class="org-left">SPI MOSI</td>
  <td class="org-left">Blue</td>
  <td class="org-right">19</td>
  <td class="org-left">10 (SPI0 MOSI)</td>
  </tr>

  <tr>
  <td class="org-left">CLK</td>
  <td class="org-left">SPI Clock</td>
  <td class="org-left">Yellow</td>
  <td class="org-right">23</td>
  <td class="org-left">11 (SPI0 SCLK)</td>
  </tr>

  <tr>
  <td class="org-left">CS</td>
  <td class="org-left">SPI chip selection</td>
  <td class="org-left">Orange</td>
  <td class="org-right">24</td>
  <td class="org-left">8  (SPI0 CE0)</td>
  </tr>

  <tr>
  <td class="org-left">DC</td>
  <td class="org-left">Data/Command selection</td>
  <td class="org-left">Green</td>
  <td class="org-right">22</td>
  <td class="org-left">25</td>
  </tr>

  <tr>
  <td class="org-left">RST</td>
  <td class="org-left">Reset</td>
  <td class="org-left">White</td>
  <td class="org-right">11</td>
  <td class="org-left">17</td>
  </tr>

  <tr>
  <td class="org-left">BUSY</td>
  <td class="org-left">Busy status output</td>
  <td class="org-left">Purple</td>
  <td class="org-right">18</td>
  <td class="org-left">24</td>
  </tr>
  </tbody>
  </table>


pkgId: 78105fcd7e1ef01ce7e22889f80b5b75d932df9b564d6b7ad93c23e95e437476
name: python-co6co
arch: src
version: 0.0.15
epoch: 0
release: 1
summary: 基础模块
url: http://git.hub.com/co6co
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-co6co-0.0.15-1.src.rpm
checksum_type: sha256
description:
  ```
  0.0.1 初始版，测试发布功能
  0.0.2
  0.0.3.230817
  0.0.6
      增加两个方法 find_files getWorkDirectory
  0.0.7
      debug
  0.0.8
      新增 TaskManage,Executing
  0.0.9   正式 2024-09-10 降薪30%
      调整debug 输出格式
  0.0.10 发布
      增加  read_stream, write_stream
      增加  limitThreadPoolExecutor
  0.0.11
      新增 source.py 模块, Singleton
  0.0.12
      win 模块
      gps dsm
  0.0.13
      单例模式 装饰器
      增加  compile_source 方法
      增加类 EventLoop
  0.0.14
      log 增加方法 create_logger
  0.0.15
      util.__init__.py 优化

  ```



  pip install co6co==0.0.2


pkgId: ea6cec1402b9f5383bcac4c462a7d45ec293c88a5ea8502827ce32b0002f3880
name: python-co6co
arch: src
version: 0.0.16
epoch: 0
release: 1
summary: 基础模块
url: http://git.hub.com/co6co
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-co6co-0.0.16-1.src.rpm
checksum_type: sha256
description:
  ```
  0.0.1 初始版，测试发布功能
  0.0.2
  0.0.3.230817
  0.0.6
      增加两个方法 find_files getWorkDirectory
  0.0.7
      debug
  0.0.8
      新增 TaskManage,Executing
  0.0.9   正式 2024-09-10 降薪30%
      调整debug 输出格式
  0.0.10 发布
      增加  read_stream, write_stream
      增加  limitThreadPoolExecutor
  0.0.11
      新增 source.py 模块, Singleton
  0.0.12
      win 模块
      gps dsm
  0.0.13
      单例模式 装饰器
      增加  compile_source 方法
      增加类 EventLoop
  0.0.14
      log 增加方法 create_logger
  0.0.15
      util.__init__.py 优化
      安装时出现bug，使用下面版本
  0.0.16
      修复安装Bug

  ```



  pip install co6co==0.0.2


pkgId: 60887bffb62d12ab7abf41dfd04579ef0705d324830a3086c326bfa024f41f1b
name: python-coaiapy
arch: src
version: 0.1.11
epoch: 0
release: 1
summary: A Python package for audio transcription, synthesis, and tagging using Boto3.
url: https://github.com/jgwill/coaiapy
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coaiapy-0.1.11-1.src.rpm
checksum_type: sha256
description:
  CoAiAPy is a Python package that provides functionality for audio transcription, synthesis, and tagging of MP3 files using Boto3 and the Mutagen library. This package is designed to facilitate the processing of audio files for various applications.



  - **Audio Transcription**: Convert audio files to text using AWS services.
  - **Audio Synthesis**: Generate audio files from text input.
  - **MP3 Tagging**: Add metadata tags to MP3 files for better organization and identification.



  To install the package, you can use pip:

  ```bash
  pip install coaiapy


  ```




   


  * --@STCGoal Centralized Access to this Small Project that attempt to build creative tooling using LLM
  * --@STCMastery Prompt engineering
  * --@STCMastery Distribute and Share your prompts
  * --@STCIssue Prompts engineered are sparsed in many projects and forked explorations
  * --@STCissue Pythonista coaiamodule is stuck in iCloudDrive and have interesting simple OpenAI API Wrapper and an interesting foundation for ways to define assistant and define their various prompt templating (in fact, it contains a way a template for the data structure with prefix and suffix attributes to define the properties of an assistant, therefore you can define a new assistant in seconds with 2 nested data structure in the config.json and add them to a Pythonista UI button just by initializing the UI Component with the 'prefix' of the assistant defined in the config (hopefully, you would be able to create a UI Component without an assistant to exist in the configuration and it would triggers a 'new assistant' design session and publish its definition when the user has completed to define its purpose.

rpm_license:
  Creative Commons Legal Code  CC0 1.0 Universal  CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.  Statement of Purpose  The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").  Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.  For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.  1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:  i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; ii. moral rights retained by the original author(s) and/or performer(s); iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; v. rights protecting the extraction, dissemination, use and reuse of data in a Work; vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.  2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.  3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.  4. Limitations and Disclaimers.  a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.


pkgId: b57a76c70fb7801d73a7f9e569cd7d68e50c4d289e25083d7f84bc40f1fdc32c
name: python-coal-mine
arch: src
version: 0.7.1
epoch: 0
release: 1
summary: Coal Mine - Periodic task execution monitor
url: https://github.com/quantopian/coal-mine
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coal-mine-0.7.1-1.src.rpm
checksum_type: sha256
description:
  Home page is [on Github](https://github.com/quantopian/coal-mine/).
  Releases are available [in PyPI](https://pypi.python.org/pypi/coal_mine).
  Please support this project [on Patreon](https://patreon.com/jikseclecticofferings).


pkgId: b12547977bc1ef56d2a21b9ddab4449fa2bc793298b6e18bef5cc249e439df05
name: python-coala_utils
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: A collection of coala utilities.
url: https://gitlab.com/coala/coala-utils
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coala_utils-0.7.0-1.src.rpm
checksum_type: sha256
description:
  coala-utils holds a collection of useful utilities that are used
  mainly by coala and can be used by outside sources as well.


pkgId: 6487e8def695a640cb3ee6434dde79d3832b70ab11a986eb25dbf521bcba0253
name: python-coalpy
arch: src
version: 0.55
epoch: 0
release: 1
summary: CoalPy - Compute Abstraction Layer for Python.
url: https://github.com/kecho/coalpy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coalpy-0.55-1.src.rpm
checksum_type: sha256
description:
  Compute abstraction layer for python.

  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Build Status](https://github.com/kecho/coalpy/actions/workflows/ci.yaml/badge.svg)](https://github.com/kecho/coalpy/actions/workflows/ci.yaml)

  [CoalPy](https://coalpy.org) is a free low friction python (3.10, 3.11) native module for Windows and Linux. Coalpy's main goal is to make modern DirectX12 or Vulkan GPU compute software easy to write and deploy.

  ![seascape_example](docs/images/seascape.png?raw=true "Seascape shadertoy by Alexander Alekseev aka TDM - 2014.")



  Get started with API documentation here:
  [coalpy.gpu documentation](https://coalpy.org/apidocs/0.51/coalpy.gpu.html)

  To install, just run the pip command:

  ```
  pip install coalpy
  ```

  To check that coalpy is installed properly run the seascape example:

  ```
  python -m coalpy.examples.seascape
  ```

  And presto!



  The following section specifies guidelines for contributing to the coalpy project.


  * Install Python supported versions
      ** Preferably [3.11](https://www.python.org/downloads/release/python-3112/)
      ** Other versions include 3.10
  * Ensure you have a version of visual studio with support for VC
  * Ensure you are on the latest and greatest version of windows 10


  * Source - everything inside here gets compiled by the build system.
      * modules - Internal c++ implementation of coalpy.
      * pymodules/gpu - The Python glue code, which translates the c++ coalpy module into public functions and types ready to be used in python.
      * scripts - Python scripts that get packaged with the coalpy module.
      * [libpng|libjpeg|zlib|imgui] - External libraries, which are compiled in source.
      * tests - Internal graphics and system test suites for coalpy, does not test the Python layer, only the internal layer.
  * Build - Build scripts for the tundra build system.
  * External - External precompiled libraries used.
  * Tools - Executables and tools used to assist in building. In this case the tundra build system is contained here.
  * docs - Documentation folder. This documentation utilizes github pages, which can be seen [here](https://kecho.github.io/coalpy/coalpy.gpu.html)



  To compile in Windows, use the build.bat script file:

  ```
  build.bat debug
  ```
  for release mode
  ```
  build.bat release
  ```

  To generate a solution for visual studio, use the gensln.bat script:

  ```
  gensln.bat
  ```

  To run the internal c++ tests, run the coalpy_tests.exe program generated:

  ```
  t2-output\win64-msvc-debug-default\coalpy_tests.exe
  ```

  For information about the test suites commands, such as filters / repeating tests etc use the -h flag.


  Before compiling into linux, the necessary dependencies must be installed.
  For ubuntu apt package manager, you can run the script:

  ```
  sudo ./linux-deps.sh
  ```

  Then proceed to install vulkan lunar SDK as assigned below.


  Follow this by installing vulkan lunar SDK:
  [vulkan lunar SDK](https://vulkan.lunarg.com/doc/view/latest/linux/getting_started_ubuntu.html)




  To compile for Linux, use the build.sh script file:

  ```
  ./build.sh debug
  ```
  for release mode
  ```
  ./build.sh release
  ```



  cd into the t2-output\win64-msvc-[debug|release]-default\coalpy_pip directory. Run the command:

  ```
  python -m build
  ```

  Ensure you have the latest version of the build module. To configure metadata of the pip package modify things inside the Source/pipfiles folder.



  All documentation of the coalpy Python API is self contained inside the Source/pymodules/gpu folder. Inside we fill doc strings inside types and functions exported to Python.
  To generate the documentation, cd into the t2-output/win64-msvc-[release|debug|production]-default folder, and run the commands:

  ```
  python -m pydoc -w coalpy
  python -m pydoc -w coalpy.gpu
  ```

  This will generate coalpy.html and coalpy.gpu.html which can be copied into the docs directory.



  Coalpy utilizes a few great open source libraries. Links with the authors and source provided here:

  * [libjpeg - JPEG library by @LuaDist](https://github.com/LuaDist/libjpeg/)
  * [libpng - PNG library by @glennrp](https://github.com/glennrp/libpng)
  * [zlib - compression library by @madler](https://github.com/madler/zlib)
  * [imgui - User interface library by @ocornut](https://github.com/ocornut/imgui)
  * [DirectXShaderCompiler - hlsl compiler by @microsoft](https://github.com/microsoft/DirectXShaderCompiler)


  Special thanks to my amazing wife Katie: I love you.


pkgId: 59786904b8f9cc3dfaf62ef43fd4594a1d44b5a782a3fc66d8913bee0dc11af3
name: python-coards
arch: src
version: 1.0.5
epoch: 0
release: 1
summary: A parser for COADS-compliant dates
url: http://code.dealmeida.net/coards
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coards-1.0.5-1.src.rpm
checksum_type: sha256
description:
  This module is intended to help parse time values represented using the `COARDS convention <http://ferret.wrc.noaa.gov/noaa_coop/coop_cdf_profile.html>`_. Here is a simple example:
      >>> from coards import parse
      >>> a = [1, 2, 3]
      >>> units = 'days since 1998-03-01 12:00:00'
      >>> b = [parse(value, units) for value in a]
      >>> print b
      [datetime.datetime(1998, 3, 2, 12, 0), datetime.datetime(1998, 3, 3, 12, 0), datetime.datetime(1998, 3, 4, 12, 0)]


pkgId: 54330838f40f4954fd0c8a0c8395c4eff69792ac10acf7bba242d615365acdda
name: python-coarnotify
arch: src
version: 1.0.0.1
epoch: 0
release: 1
summary: COAR Notify Common Library
url: https://pypi.org/project/coarnotify/
rpm_license: Apache2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coarnotify-1.0.0.1-1.src.rpm
checksum_type: sha256
description:
  https://coar-notify.net/

  The COAR Notify Protocol is a set of profiles, constraints and conventions around the use of W3C Linked Data Notifications (LDN) to integrate repository systems with relevant services in a distributed, resilient and web-native architecture.

  This library provides a Python implementation of the COAR Notify Protocol version 1.0.0 (https://coar-notify.net/specification/1.0.0/),
  which covers the following aspects of the protocol:

  * A set of model objects which can be used to represent the core Patterns
  * Built-in validation for Patterns and over values passed to the model APIs
  * Parse and serialise to JSON-LD
  * Send notifications to a target inbox
  * Provides a simple server-side binding to easily integrate notifications into your application

  In addition, it provides:

  * A comprehensive test suite demonstrating the use of the library
  * A simple inbox which can be run locally for testing
  * A simple set of integration tests for sending notifications to an inbox
  * A customisable HTTP layer to allow you to use your own, or to build in custom authentication routines
  * Detailed API documentation

  Full documentation here: https://cottagelabs.github.io/coarnotifypy/build/html/index.html


pkgId: dea67f99e140a01ba7a309e08770df7bb767f52f255cf4780ecda1900981754b
name: python-coastpy
arch: src
version: 0.1.14
epoch: 0
release: 1
summary: Python tools for cloud-native coastal analytics.
url: https://github.com/TUDelft-CITG/coastpy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coastpy-0.1.14-1.src.rpm
checksum_type: sha256
description:
  Python tools for cloud-native coastal analytics.



  ```bash
  $ pip install coastpy
  ```


  More extensive installation and usage instructions will come when we build the
  documentation. For now you can clone the repository, install the environment - that comes
  with jupyterlab -, and then launch jupyter lab to explore the tutorials.

  ```bash
  git clone https://TUDelft-CITG/coastpy.git
  cd coastpy
  mamba env create -f environment.yml
  jupyter lab
  ```



  The data that is produced with this software can be directly accessed via the cloud using
  tools like
  [DuckDB](https://duckdb.org/docs/installation/?version=stable&environment=cli&platform=macos&download_method=package_manager);
  see the [tutorials](./tutorials/) for other methods and latest instructions.



  Cross-shore coastal transects are essential to coastal monitoring, offering a consistent
  reference line to measure coastal change, while providing a robust foundation to map
  coastal characteristics and derive coastal statistics thereof.

  The Global Coastal Transect System consists of more than 11 million cross-shore coastal
  transects uniformly spaced at 100-m intervals alongshore, for all OpenStreetMap
  coastlines that are longer than 5 kilometers.


  ```bash

  duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE gcts.country = 'US') TO 'United_States.parquet' (FORMAT 'PARQUET')"
  ```

  ```bash

  az storage blob download-batch \
      --destination "./" \
      --source "gcts" \
      --pattern "release/2024-08-02/*.parquet" \
      --account-name coclico
  ```



  ```latex
  @article{CALKOEN2024106257,
    title   = {Enabling coastal analytics at planetary scale},
    author  = {Floris Reinier Calkoen and Arjen Pieter Luijendijk and Kilian Vos and Etiënne Kras and Fedor Baart},
    journal = {Environmental Modelling \& Software},
    year    = {2024},
    pages   = {106257},
    issn    = {1364-8152},
    doi     = {10.1016/j.envsoft.2024.106257},
    url     = {https://www.sciencedirect.com/science/article/pii/S1364815224003189}
  }
  ```



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



  `coastpy` was created by Floris Calkoen. The software is licensed under the terms of the
  MIT license. Data licenses can be found in the respective STAC collection.



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


pkgId: 70effe8e9abd404a479c6e3c196dd646eca69743095c46388fb5e6439b2471c4
name: python-coastpy
arch: src
version: 0.1.17
epoch: 0
release: 1
summary: Python tools for cloud-native coastal analytics.
url: https://github.com/TUDelft-CITG/coastpy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coastpy-0.1.17-1.src.rpm
checksum_type: sha256
description:
  Python tools for cloud-native coastal analytics.



  ```bash
  $ pip install coastpy
  ```



  The data that is produced with this software can be directly accessed via the cloud using
  tools like
  [DuckDB](https://duckdb.org/docs/installation/?version=stable&environment=cli&platform=macos&download_method=package_manager);
  see the [tutorials](./tutorials/) and [analytics](./analytics/) other methods and latest instructions.



  Cross-shore coastal transects are essential to coastal monitoring, offering a consistent
  reference line to measure coastal change, while providing a robust foundation to map
  coastal characteristics and derive coastal statistics thereof.

  The Global Coastal Transect System consists of more than 11 million cross-shore coastal
  transects uniformly spaced at 100-m intervals alongshore, for all OpenStreetMap
  coastlines that are longer than 5 kilometers.


  ```bash

  duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE gcts.country = 'US') TO 'United_States.parquet' (FORMAT 'PARQUET')"
  ```

  ```bash

  duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE bbox.xmin <= 14.58 AND bbox.ymin <= -22.77 AND bbox.xmax >= 14.27 AND bbox.ymax >= -23.57) TO area_of_interest.parquet (FORMAT 'PARQUET')"
  ```

  ```bash

  az storage blob download-batch \
      --destination "./" \
      --source "gcts" \
      --pattern "release/2024-08-02/*.parquet" \
      --account-name coclico
  ```



  More extensive installation and usage instructions will come when we build the
  documentation. For now, to run the tutorials, analytics or scripts clone the repository,
  install the [environment](environment.yaml) using a package manager like
  [miniconda](https://github.com/conda-forge/miniforge?tab=readme-ov-file#download). You
  may use Jupyter lab to explore the interactive content of the notebooks.

  ```bash
  git clone https://TUDelft-CITG/coastpy.git
  cd coastpy
  mamba env create -f environment.yml
  jupyter lab
  ```



  ```latex
  @article{CALKOEN2024106257,
    title   = {Enabling coastal analytics at planetary scale},
    author  = {Floris Reinier Calkoen and Arjen Pieter Luijendijk and Kilian Vos and Etiënne Kras and Fedor Baart},
    journal = {Environmental Modelling \& Software},
    year    = {2024},
    pages   = {106257},
    issn    = {1364-8152},
    doi     = {10.1016/j.envsoft.2024.106257},
    url     = {https://www.sciencedirect.com/science/article/pii/S1364815224003189}
  }
  ```



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



  `coastpy` was created by Floris Calkoen. The software is licensed under the terms of the
  MIT license. Data licenses can be found in the respective STAC collection.



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


pkgId: b8c84d1812fe51a42704c7ce6348de2720fd45d9fb023ff3a57ba7167940f591
name: python-coastpy
arch: src
version: 0.1.18
epoch: 0
release: 1
summary: Python tools for cloud-native coastal analytics.
url: https://github.com/TUDelft-CITG/coastpy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coastpy-0.1.18-1.src.rpm
checksum_type: sha256
description:
  Python tools for cloud-native coastal analytics.



  ```bash
  $ pip install coastpy
  ```



  The data that is produced with this software can be directly accessed via the cloud using
  tools like
  [DuckDB](https://duckdb.org/docs/installation/?version=stable&environment=cli&platform=macos&download_method=package_manager);
  see the [tutorials](./tutorials/) and [analytics](./analytics/) other methods and latest instructions.



  Cross-shore coastal transects are essential to coastal monitoring, offering a consistent
  reference line to measure coastal change, while providing a robust foundation to map
  coastal characteristics and derive coastal statistics thereof.

  The Global Coastal Transect System consists of more than 11 million cross-shore coastal
  transects uniformly spaced at 100-m intervals alongshore, for all OpenStreetMap
  coastlines that are longer than 5 kilometers.


  ```bash

  duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE gcts.country = 'US') TO 'United_States.parquet' (FORMAT 'PARQUET')"
  ```

  ```bash

  duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE bbox.xmin <= 14.58 AND bbox.ymin <= -22.77 AND bbox.xmax >= 14.27 AND bbox.ymax >= -23.57) TO area_of_interest.parquet (FORMAT 'PARQUET')"
  ```

  ```bash

  az storage blob download-batch \
      --destination "./" \
      --source "gcts" \
      --pattern "release/2024-08-02/*.parquet" \
      --account-name coclico
  ```



  More extensive installation and usage instructions will come when we build the
  documentation. For now, to run the tutorials, analytics or scripts clone the repository,
  install the [environment](environment.yaml) using a package manager like
  [miniconda](https://github.com/conda-forge/miniforge?tab=readme-ov-file#download). You
  may use Jupyter lab to explore the interactive content of the notebooks.

  ```bash
  git clone https://TUDelft-CITG/coastpy.git
  cd coastpy
  mamba env create -f environment.yml
  jupyter lab
  ```



  ```latex
  @article{CALKOEN2025106257,
    title     = {Enabling coastal analytics at planetary scale},
    journal   = {Environmental Modelling & Software},
    volume    = {183},
    pages     = {106257},
    year      = {2025},
    issn      = {1364-8152},
    doi       = {https://doi.org/10.1016/j.envsoft.2024.106257},
    url       = {https://www.sciencedirect.com/science/article/pii/S1364815224003189},
  }
  ```



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



  `coastpy` was created by Floris Calkoen. The software is licensed under the terms of the
  MIT license. Data licenses can be found in the respective STAC collection.



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


pkgId: 33c8b67eea96f9570cf3daed671fa9c8fa147988111e64df4f26f4b4caa4374a
name: python-coastsat-package
arch: src
version: 0.1.74
epoch: 0
release: 1
summary: A packaged version of CoastSat: A Global shoreline mapping tool from satellite imagery
url: https://github.com/SatelliteShorelines/coastsat_package
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coastsat-package-0.1.74-1.src.rpm
checksum_type: sha256
description:
  This is coastsat-package the pip and conda package extension of [CoastSat](https://github.com/kvos/CoastSat). CoastSat-package is a slightly modified version of coastsat to make it compatible with [CoastSeg](https://github.com/Doodleverse/CoastSeg). The CoastSeg team actively maintains coastsat-package and we welcome all contributions to improve the package.



  Our recent updates to the coastsat-package were driven by the goal of enhancing functionality, user experience, and compatibility with CoastSeg. We aimed to streamline image handling, improve data accessibility, and provide more detailed feedback during the download process. Additionally, we introduced new features to allow more precise control over image processing and data collection. These enhancements also include better file organization and comprehensive shoreline extraction reports to ensure transparency and ease of use. Below is a detailed overview of these significant improvements and additions.


  - **Download Improvements** *(implemented in `SDS_download.py`)*
    - **Detailed Download Progress**
      - The download progress bar has been enhanced to show which image is being downloaded and the current stage of the download process, providing better feedback to users.
    - **Image Download Filters**
      - It is now possible to filter image downloads based on the months in which scenes were captured, as well as the percentage of cloud cover and no data in each scene, allowing for more precise and relevant data collection.
      - Additional cloud filtering is handled by the function `remove_cloudy_images`. Filtering by months is done by the function `filter_images_by_month`, allowing for more precise and relevant data collection.
    - **Configurable Cloud Mask**
      - Users can now turn the cloud mask on or off using the `apply_cloud_mask` setting, offering more control over image processing for both extracting shorelines and downloading imagery.
    - **Large Collection Downloads**
      - Collections of over 5,000 images can now be downloaded without encountering a Google Earth Engine error, thanks to the function `get_images_list_from_collection`.
    - **Enhanced Image Handling**
      - By default, JPGs for RGB, NIR, and SWIR bands are created and stored within the `jpg_files` folder for each downloaded session, ensuring easy access and organization.


  - **Shoreline Extraction Enhancements** *(implemented in `SDS_shoreline.py`)*
    - **Shoreline Report Generation**
      - When shorelines are extracted, a shoreline report (`shoreline_report.txt`) is generated that details how shorelines were extracted from each scene.
    - **Improved File Formats**
      - Extracted shorelines are now saved as `.json` files instead of `.pkl` files, making them more accessible and easier to use with other applications.

  - **Organizational Enhancements**
    - Minor organizational changes have been implemented to make CoastSat more structured and compatible with packaging standards, improving the overall usability and maintainability of the codebase.




  1. Create a conda environment

  - We will install the CoastSat package and its dependencies in this environment.
    > `conda create --name coastsat_pkg -y`

  2. Install coastsat-package using the conda forge channel
     > `conda install -c conda-forge coastsat-package -y`
  3. (Optional) At any time you upgrade coastsat with the command:
     > `conda update -c conda-forge coastsat-package -y`



  [PyPi Repo](https://pypi.org/project/coastsat-package/)

  - Note: This package is still in beta and being actively developed.

  1. Create a conda environment

  - We will install the CoastSat package and its dependencies in this environment.
    > `conda create --name coastsat_pkg -y`

  2. Activate your conda environment
     > `conda activate coastsat_pkg `
  3. Install jupyter and geopandas with Conda using the conda forge channel
     - [Geopandas](https://geopandas.org/en/stable/) has [GDAL](https://gdal.org/) as a dependency so its best to install it with conda.
       > `conda install -c conda-forge geopandas jupyterlab -y`
  4. Install pip in your conda environment

  - We will use pip to install the coastsat package from [PyPi](https://pypi.org/)
    > `conda install pip -y`

  5. Install the pip package

  - `-U` (upgrade flag) this gets the latest release of the CoastSat package
    > `pip install coastsat_package -U`



  Having a problem? Post an issue in the [Issues page](https://github.com/2320sharon/coastsat_package/issues) (please do not email).



  If you would like to contribute to the further development of coastsat-package please follow the steps below. We appreciate all contributions!

  1. Fork the repository (https://github.com/2320sharon/coastsat_package/fork).
     A fork is a copy on which you can make your changes.
  2. Create a new branch on your fork
  3. Commit your changes and push them to your branch
  4. When the branch is ready to be merged, create a Pull Request (how to make a clean pull request explained [here](https://gist.github.com/MarcDiethelm/7303312))



  - The following description is from the official CoastSat page. Go check out the original [CoastSat](https://github.com/kvos/CoastSat).



  Satellite remote sensing can provide low-cost long-term shoreline data capable of resolving the temporal scales of interest to coastal scientists and engineers at sites where no in-situ field measurements are available. CoastSat enables the non-expert user to extract shorelines from Landsat 5, Landsat 7, Landsat 8, Landsat 9 and Sentinel-2 images.
  The shoreline detection algorithm implemented in CoastSat is optimised for sandy beach coastlines. It combines a sub-pixel border segmentation and an image classification component, which refines the segmentation into four distinct categories such that the shoreline detection is specific to the sand/water interface.

  The toolbox has four main functionalities:

  1. assisted retrieval from Google Earth Engine of all available satellite images spanning the user-defined region of interest and time period.
  2. automated extraction of shorelines from all the selected images using a sub-pixel resolution technique.
  3. intersection of the 2D shorelines with user-defined shore-normal transects.
  4. tidal correction using measured water levels and an estimate of the beach slope.
  5. post-processing of the shoreline time-series, despiking and seasonal averaging.
  6. validation example at Narrabeen





  To run the toolbox you first need to install the required Python packages in an environment. To do this we will use **Anaconda**, which can be downloaded freely [here](https://www.anaconda.com/download/).

  Once you have it installed on your PC, open the Anaconda prompt (in Mac and Linux, open a terminal window) and use the `cd` command (change directory) to go the folder where you have downloaded this repository.

  Create a new environment named `coastsat` with all the required packages by entering these commands in succession:

  ```
  conda create -n coastsat python=3.8
  conda activate coastsat
  conda install -c conda-forge geopandas earthengine-api scikit-image matplotlib astropy notebook -y
  pip install pyqt5
  ```

  All the required packages have now been installed in an environment called `coastsat`. Always make sure that the environment is activated with:

  ```
  conda activate coastsat
  ```

  To confirm that you have successfully activated CoastSat, your terminal command line prompt should now start with (coastsat).

  :warning: **In case errors are raised** :warning:: clean things up with the following command (better to have the Anaconda Prompt open as administrator) before attempting to install `coastsat` again:

  ```
  conda clean --all
  ```

  You can also install the packages with the **Anaconda Navigator**, in the _Environments_ tab. For more details, the following [link](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands) shows how to create and manage an environment with Anaconda.



  First, you need to request access to Google Earth Engine at https://signup.earthengine.google.com/. It takes about 1 day for Google to approve requests.

  Once your request has been approved, with the `coastsat` environment activated, run the following command on the Anaconda Prompt to link your environment to the GEE server:

  ```
  earthengine authenticate
  ```

  A web browser will open, login with a gmail account and accept the terms and conditions. Then copy the authorization code into the Anaconda terminal.
  In the latest version of the `earthengine-api`, the authentication is done with `gcloud`. If an error is raised about `gcloud` missing, go to https://cloud.google.com/sdk/docs/install and install `gcloud`. After you have installed it, close the Anaconda Prompt and restart it, then activate the environenment before running `earthengine authenticate` again.

  Now you are ready to start using the CoastSat toolbox!

  **Note**: remember to always activate the environment with `conda activate coastsat` each time you are preparing to use the toolbox.



  An example of how to run the software in a Jupyter Notebook is provided in the repository (`example_jupyter.ipynb`). To run this, first activate your `coastsat` environment with `conda activate coastsat` (if not already active), and then type:

  ```
  jupyter lab
  ```

  A web browser window will open. Point to the directory where you downloaded this repository and click on `example_jupyter.ipynb`.

  The following sections guide the reader through the different functionalities of CoastSat with an example at Narrabeen-Collaroy beach (Australia). If you prefer to use **Spyder**, **PyCharm** or other integrated development environments (IDEs), a Python script named `example.py` is also included in the repository.

  If using `example.py` on **Spyder**, make sure that the Graphics Backend is set to **Automatic** and not **Inline** (as this mode doesn't allow to interact with the figures). To change this setting go under Preferences>IPython console>Graphics.

  A Jupyter Notebook combines formatted text and code. To run the code, place your cursor inside one of the code sections and click on the `run cell` button (or press `Shift` + `Enter`) and progress forward.

  ![image](https://user-images.githubusercontent.com/7217258/165960239-e8870f7e-0dab-416e-bbdd-089b136b7d20.png)



  To retrieve from the GEE server the available satellite images cropped around the user-defined region of coastline for the particular time period of interest, the following variables are required:

  - `polygon`: the coordinates of the region of interest (longitude/latitude pairs in WGS84)
  - `dates`: dates over which the images will be retrieved (e.g., `dates = ['2017-12-01', '2018-01-01']`)
  - `sat_list`: satellite missions to consider (e.g., `sat_list = ['L5', 'L7', 'L8', 'L9', 'S2']` for Landsat 5, 7, 8, 9 and Sentinel-2 collections)
  - `sitename`: name of the site (this is the name of the subfolder where the images and other accompanying files will be stored)
  - `filepath`: filepath to the directory where the data will be stored
  - :new: `landsat_collection`: whether to use Collection 1 (`C01`) or Collection 2 (`C02`). Note that after 2022/01/01, Landsat images are only available in Collection 2. Landsat 9 is therefore only available as Collection 2. So if the user has selected `C01`, images prior to 2022/01/01 will be downloaded from Collection 1, while images captured after that date will be automatically taken from `C02`. Also note that at the time of writing `C02` is not complete in Google Earth Engine and still being uploaded.

  The call `metadata = SDS_download.retrieve_images(inputs)` will launch the retrieval of the images and store them as .TIF files (under _/filepath/sitename_). The metadata contains the exact time of acquisition (in UTC time) of each image, its projection and its geometric accuracy. If the images have already been downloaded previously and the user only wants to run the shoreline detection, the metadata can be loaded directly by running `metadata = SDS_download.get_metadata(inputs)`.

  The screenshot below shows an example of inputs that will retrieve all the images of Collaroy-Narrabeen (Australia) acquired by Sentinel-2 in December 2017.

  ![doc1](https://user-images.githubusercontent.com/7217258/166197244-9f41de17-f387-40a6-945e-8a78b581c4b1.png)

  **Note:** The area of the polygon should not exceed 100 km2, so for very long beaches split it into multiple smaller polygons.



  To map the shorelines, the following user-defined settings are needed:

  - `cloud_thresh`: threshold on maximum cloud cover that is acceptable on the images (value between 0 and 1 - this may require some initial experimentation).
  - `dist_clouds`: buffer around cloud pixels where shoreline is not mapped (in metres)
  - `output_epsg`: epsg code defining the spatial reference system of the shoreline coordinates. It has to be a cartesian coordinate system (i.e. projected) and not a geographical coordinate system (in latitude and longitude angles). See http://spatialreference.org/ to find the EPSG number corresponding to your local coordinate system. If unsure, use 3857 which is the web-mercator.
  - `check_detection`: if set to `True` the user can quality control each shoreline detection interactively (recommended when mapping shorelines for the first time) and accept/reject each shoreline.
  - `adjust_detection`: in case users wants more control over the detected shorelines, they can set this parameter to `True`, then they will be able to manually adjust the threshold used to map the shoreline on each image.
  - `save_figure`: if set to `True` a figure of each mapped shoreline is saved under _/filepath/sitename/jpg_files/detection_, even if the two previous parameters are set to `False`. Note that this may slow down the process.

  There are additional parameters (`min_beach_size`, `buffer_size`, `min_length_sl`, `cloud_mask_issue`, `sand_color` and `pan_off` that can be tuned to optimise the shoreline detection (for Advanced users only). For the moment leave these parameters set to their default values, we will see later how they can be modified.

  An example of settings is provided here:

  ![image](https://user-images.githubusercontent.com/7217258/182158840-ef1c527c-6ddb-44ab-a6fc-f4b46c8b0127.png)

  Once all the settings have been defined, the batch shoreline detection can be launched by calling:

  ```
  output = SDS_shoreline.extract_shorelines(metadata, settings)
  ```

  When `check_detection` is set to `True`, a figure like the one below appears and asks the user to manually accept/reject each detection by pressing **on the keyboard** the `right arrow` (⇨) to `keep` the shoreline or `left arrow` (⇦) to `skip` the mapped shoreline. The user can break the loop at any time by pressing `escape` (nothing will be saved though).

  ![map_shorelines](https://user-images.githubusercontent.com/7217258/60766769-fafda480-a0f1-11e9-8f91-419d848ff98d.gif)

  When `adjust_detection` is set to `True`, a figure like the one below appears and the user can adjust the position of the shoreline by clicking on the histogram of MNDWI pixel intensities. Once the threshold has been adjusted, press `Enter` and then accept/reject the image with the keyboard arrows.

  ![Alt text](https://github.com/kvos/CoastSat/blob/master/doc/adjust_shorelines.gif)

  Once all the shorelines have been mapped, the output is available in two different formats (saved under _/filepath/data/sitename_):

  - `sitename_output.pkl`: contains a list with the shoreline coordinates, the exact timestamp at which the image was captured (UTC time), the geometric accuracy and the cloud cover of each individual image. This list can be manipulated with Python, a snippet of code to plot the results is provided in the example script.
  - `sitename_output.geojson`: this output can be visualised in a GIS software (e.g., QGIS, ArcGIS).

  The figure below shows how the satellite-derived shorelines can be opened in a GIS software (QGIS) using the `.geojson` output. Note that the coordinates in the `.geojson` file are in the spatial reference system defined by the `output_epsg`.

  <p align="center">
    <img width="500" height="300" src="https://user-images.githubusercontent.com/7217258/49361401-15bd0480-f730-11e8-88a8-a127f87ca64a.jpeg">
  </p>



  Before running the batch shoreline detection, there is the option to manually digitize a reference shoreline on one cloud-free image. This reference shoreline helps to reject outliers and false detections when mapping shorelines as it only considers as valid shorelines the points that are within a defined distance from this reference shoreline. **It is highly recommended to use a reference shoreline**.

  The user can manually digitize one or several reference shorelines on one of the images by calling:

  ```
  settings['reference_shoreline'] = SDS_preprocess.get_reference_sl_manual(metadata, settings)
  settings['max_dist_ref'] = 100 # max distance (in meters) allowed from the reference shoreline
  ```

  This function allows the user to click points along the shoreline on cloud-free satellite images, as shown in the animation below.

  ![ref_shoreline](https://user-images.githubusercontent.com/7217258/70408922-063c6e00-1a9e-11ea-8775-fc62e9855774.gif)

  The maximum distance (in metres) allowed from the reference shoreline is defined by the parameter `max_dist_ref`. This parameter is set to a default value of 100 m. If you think that 100 m buffer from the reference shoreline will not capture the shoreline variability at your site, increase the value of this parameter. This may be the case for large nourishments or eroding/accreting coastlines.



  As mentioned above, there are some additional parameters that can be modified to optimise the shoreline detection:

  - `min_beach_area`: minimum allowable object area (in metres^2) for the class 'sand'. During the image classification, some features (for example, building roofs) may be incorrectly labelled as sand. To correct this, all the objects classified as sand containing less than a certain number of connected pixels are removed from the sand class. The default value is 4500 m^2, which corresponds to 20 connected pixels of 15 m^2. If you are looking at a very small beach (<20 connected pixels on the images), try decreasing the value of this parameter.
  - `min_length_sl`: minimum length (in metres) of shoreline perimeter to be valid. This can be used to discard small features that are detected but do not correspond to the actual shoreline. The default value is 500 m. If the shoreline that you are trying to map is shorter than 500 m, decrease the value of this parameter.
  - `cloud_mask_issue`: the cloud mask algorithm applied to Landsat images by USGS, namely CFMASK, does have difficulties sometimes with very bright features such as beaches or white-water in the ocean. This may result in pixels corresponding to a beach being identified as clouds and appear as masked pixels on your images. If this issue seems to be present in a large proportion of images from your local beach, you can switch this parameter to `True` and CoastSat will remove from the cloud mask the pixels that form very thin linear features, as often these are beaches and not clouds. Only activate this parameter if you observe this very specific cloud mask issue, otherwise leave to the default value of `False`.
  - `sand_color`: this parameter can take 3 values: `default`, `latest`, `dark` or `bright`. Only change this parameter if you are seing that with the `default` the sand pixels are not being classified as sand (in orange). If your beach has dark sand (grey/black sand beaches), you can set this parameter to `dark` and the classifier will be able to pick up the dark sand. On the other hand, if your beach has white sand and the `default` classifier is not picking it up, switch this parameter to `bright`. The `latest` classifier contains all the training data and can pick up sand in most environments (but not as accurately). At this stage the different classifiers are only available for Landsat images (soon for Sentinel-2 as well).
  - `pan_off`: by default Landsat 7, 8 and 9 images are pan-sharpened using the panchromatic band and a PCA algorithm. If for any reason you prefer not to pan-sharpen the Landsat images, switch it off by setting `pan_off` to `True`.



  CoastSat's shoreline mapping alogorithm uses an image classification scheme to label each pixel into 4 classes: sand, water, white-water and other land features. While this classifier has been trained using a wide range of different beaches, it may be that it does not perform very well at specific sites that it has never seen before. You can train a new classifier with site-specific training data in a few minutes by following the Jupyter notebook in [re-train CoastSat classifier](https://github.com/kvos/CoastSat/blob/master/doc/train_new_classifier.md).



  This section shows how to obtain time-series of shoreline change along shore-normal transects. Each transect is defined by two points, its origin and a second point that defines its length and orientation. The origin is always defined first and located landwards, the second point is located seawards. There are 3 options to define the coordinates of the transects:

  1. Interactively draw shore-normal transects along the mapped shorelines:

  ```
  transects = SDS_transects.draw_transects(output, settings)
  ```

  2. Load the transect coordinates from a .geojson file:

  ```
  transects = SDS_tools.transects_from_geojson(path_to_geojson_file)
  ```

  3. Create the transects by manually providing the coordinates of two points:

  ```
  transects = dict([])
  transects['Transect 1'] = np.array([[342836, ,6269215], [343315, 6269071]])
  transects['Transect 2'] = np.array([[342482, 6268466], [342958, 6268310]])
  transects['Transect 3'] = np.array([[342185, 6267650], [342685, 6267641]])
  ```

  **Note:** if you choose option 2 or 3, make sure that the points that you are providing are in the spatial reference system defined by `settings['output_epsg']`.

  Once the shore-normal transects have been defined, the intersection between the 2D shorelines and the transects is computed with the following function:

  ```
  settings['along_dist'] = 25
  cross_distance = SDS_transects.compute_intersection(output, transects, settings)
  ```

  The parameter `along_dist` defines the along-shore distance around the transect over which shoreline points are selected to compute the intersection. The default value is 25 m, which means that the intersection is computed as the median of the points located within 25 m of the transect (50 m alongshore-median). This helps to smooth out localised water levels in the swash zone.

  An example is shown in the animation below:

  ![transects](https://user-images.githubusercontent.com/7217258/49990925-8b985a00-ffd3-11e8-8c54-57e4bf8082dd.gif)

  There is also the option to run `SDS_transects.compute_intersection_QA()`, this function provides more quality-control when computing the intersections between shorelines and transects (small loops, multiple intersections etc).

  It is recommended to use this function as it can provide cleaner shoreline time-series. See the [Jupyter Notebook](https://github.com/kvos/CoastSat/blob/master/example_jupyter.ipynb) for a detailed description of the parameters. An example of parameters for the quality control are provided below:

  ![image](https://user-images.githubusercontent.com/7217258/182160883-5edfb8f9-e668-440c-b55c-87e8697a2b64.png)



  Each satellite image is captured at a different stage of the tide, therefore a tidal correction is necessary to remove the apparent shoreline changes cause by tidal fluctuations.

  In order to tidally-correct the time-series of shoreline change you will need the following data:

  - Time-series of water/tide level: this can be formatted as a .csv file, an example is provided [here](https://github.com/kvos/CoastSat/blob/master/examples/NARRA_tides.csv). Make sure that the dates are in UTC time as the CoastSat shorelines are always in UTC time. Also the vertical datum needs to be approx. Mean Sea Level.

  - An estimate of the beach-face slope along each transect. If you don't have this data you can obtain it using [CoastSat.slope](https://github.com/kvos/CoastSat.slope), see [Vos et al. 2020](https://doi.org/10.1029/2020GL088365) for more details (preprint available [here](https://www.essoar.org/doi/10.1002/essoar.10502903.2)).

  Wave setup and runup corrections are not included in the toolbox, but for more information on these additional corrections see [Castelle et al. 2021](https://doi.org/10.1016/j.geomorph.2021.107707).



  The tidally-corrected time-series can be post-processed to remove outliers with a despiking algorithm in `SDS_transects.reject_outliers()`.

  ![image](https://user-images.githubusercontent.com/7217258/182162154-9d8da81d-a5fc-486e-baf6-55e2a5782096.png)

  Functions to compute seasonal and monthly averages on the shoreline time-series are also provided: `SDS_transects.seasonal_averages()` and `SDS_transects.monthly_averages()`.

  ![NA1](https://user-images.githubusercontent.com/7217258/182162937-58bad8f1-35c7-4789-a03c-05799380bacf.jpg)



  This section provides code to compare the satellite-derived shorelines against the survey data for Narrabeen, available at http://narrabeen.wrl.unsw.edu.au/.

  ![comparison_transect_PF1](https://user-images.githubusercontent.com/7217258/183917858-d2fefdaf-f215-42d4-b103-3cbab636079e.jpg)



  1. Vos K., Splinter K.D., Harley M.D., Simmons J.A., Turner I.L. (2019). CoastSat: a Google Earth Engine-enabled Python toolkit to extract shorelines from publicly available satellite imagery. _Environmental Modelling and Software_. 122, 104528. https://doi.org/10.1016/j.envsoft.2019.104528 (Open Access)

  2. Vos K., Harley M.D., Splinter K.D., Simmons J.A., Turner I.L. (2019). Sub-annual to multi-decadal shoreline variability from publicly available satellite imagery. _Coastal Engineering_. 150, 160–174. https://doi.org/10.1016/j.coastaleng.2019.04.004

  3. Vos K., Harley M.D., Splinter K.D., Walker A., Turner I.L. (2020). Beach slopes from satellite-derived shorelines. _Geophysical Research Letters_. 47(14). https://doi.org/10.1029/2020GL088365 (Open Access preprint [here](https://www.essoar.org/doi/10.1002/essoar.10502903.2))

  4. Castelle B., Masselink G., Scott T., Stokes C., Konstantinou A., Marieu V., Bujan S. (2021). Satellite-derived shoreline detection at a high-energy meso-macrotidal beach. _Geomorphology_. volume 383, 107707. https://doi.org/10.1016/j.geomorph.2021.107707

  5. Vos, K. and Deng, W. and Harley, M. D. and Turner, I. L. and Splinter, K. D. M. (2022). Beach-face slope dataset for Australia. _Earth System Science Data_. volume 14, 3, p. 1345--1357. https://doi.org/10.5194/essd-14-1345-2022

  6. Training dataset used for pixel-wise classification in CoastSat: https://doi.org/10.5281/zenodo.3334147


pkgId: 10a98940d98aa508845ef2757f210f64c132c0572065b6bb73ba3875aea3a02b
name: python-coastseg
arch: src
version: 1.2.16
epoch: 0
release: 1
summary: An interactive python package for satellite derived shoreline workflows
url: https://pypi.org/project/coastseg/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coastseg-1.2.16-1.src.rpm
checksum_type: sha256
description:
  Paper:
  [![DOI](https://joss.theoj.org/papers/10.21105/joss.06683/status.svg)](https://doi.org/10.21105/joss.06683)
  <!--  [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/2320sharon/CoastSeg/blob/main/coastseg_for_google_colab.ipynb) -->

  [![image](https://img.shields.io/pypi/v/coastseg.svg?color=%23ec3dc8)](https://pypi.python.org/pypi/coastseg)
  </br>
  [![image](https://github.com/SatelliteShorelines/CoastSeg/actions/workflows/pip_install_e.yml/badge.svg)](https://github.com/SatelliteShorelines/CoastSeg/actions)

  [![Last Commit](https://img.shields.io/github/last-commit/SatelliteShorelines/CoastSeg)](https://github.com/Doodleverse/segmentation_gym/commits/main)
  [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/SatelliteShorelines/CoastSeg/graphs/commit-activity)
  [![Wiki](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/SatelliteShorelines/CoastSeg/wiki)
  ![GitHub](https://img.shields.io/github/license/Doodleverse/segmentation_gym)
  [![Wiki](https://img.shields.io/badge/discussion-active-forestgreen)](https://github.com/SatelliteShorelines/CoastSeg/discussions)

  ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
  ![TensorFlow](https://img.shields.io/badge/TensorFlow-%23FF6F00.svg?style=for-the-badge&logo=TensorFlow&logoColor=white)
  ![Keras](https://img.shields.io/badge/Keras-%23D00000.svg?style=for-the-badge&logo=Keras&logoColor=white)


  <img src="https://user-images.githubusercontent.com/61564689/212394936-263ec9fc-fb82-45b8-bc79-bc57dafdae73.gif" width="350" height="350">




  Please read our [website](https://satelliteshorelines.github.io/CoastSeg/), which includes installation and usage guides, contribution guide, API description, case studies, and more.


  CoastSeg is an interactive browser-based program that aims to broaden the adoption of satellite-derived shoreline (SDS) detection and coastal landcover mapping workflows among coastal scientists and coastal resource management practitioners. SDS is a sub-field of coastal sciences that aims to detect and post-process a time-series of shoreline locations from publicly available satellite imagery.

  CoastSeg is a Python package installed via pip into a conda environment that serves as an toolkit for building custom SDS workflows. CoastSeg also provides full SDS workflow implementations via Jupyter notebooks and Python scripts that call functions and classes in the core CoastSeg toolkit for specific workflows. CoastSeg provides two fully functioning SDS workflows and its design allows for collaborators in the SDS software community to contribute additional workflows. All the codes, notebooks, scripts, and documentation are hosted on the [CoastSeg GitHub repository](https://github.com/SatelliteShorelines/CoastSeg).

  So-called `instantaneous' SDS workflows, such as the implementation of [CoastSat](https://github.com/kvos/CoastSat), where shorelines are extracted from each individual satellite image rather than temporal composites, follow a basic recipe, namely:

  1) waterline estimation, where the 2D (x,y) location of the land-sea interface is determined
  and
  2) water-level correction, where the waterline location is mapped onto a shore-perpendicular transect, converted to a linear distance along that transect, then corrected for water level, and referenced to a particular elevation contour on the beach.


  CoastSeg has three broad aims. The first aim is to be a toolkit consisting functions that operate the core SDS workflow functionalities. This includes file input/output, image downloading, geospatial conversion, tidal model API handling, mapping 2D shorelines to 1D transect-based measurements, and numerous other functions common to a basic SDS workflow, regardless of a particular waterline estimation methodology. This waterline detection algorithm will be crucial to the success of any SDS workflow because it is the step that identifies the the boundary between sea and land which serves as the basis for shoreline mapping. The idea behind the design of CoastSeg is that users could extend or customize functionality using scripts and notebooks.

  The second aim of CoastSeg is therefore to provide fully functioning SDS implementations in an accessible browser notebook format. Our principal objective to date has been to re-implement and improve upon a popular existing toolbox, [CoastSat](https://github.com/kvos/CoastSat), allowing the user to carry out the well-established CoastSat SDS workflow, but in a more accessible and convenient way within the CoastSeg platform. In order to achieve this, we developed [CoastSat-package](https://github.com/SatelliteShorelines/coastsat_package), a Python package that is installed into the CoastSeg conda environment. CoastSat-package contains re-implemented versions of the original CoastSat codes, addresses the lack of pip or conda installability of CoastSat, and isolates the CoastSeg-specific enhancements from the original CoastSat code.

  The third and final aim of CoastSeg is to implement a method to carry out SDS workflows in experimental and collaborative contexts, which aids both oversight and reproducibility as well as practical needs based on division of labor. We do this using sessions, a mechanism for saving the current state of the application into a session's folder. This folder contains all necessary inputs, outputs, and references to downloaded data used to generate the results. Sessions allow users to iteratively experiment with different combinations of settings and makes CoastSeg fully reproducible because everything needed to reproduce the session is saved to the folder. Users can share their sessions with others, enabling peers to replicate experiments, build upon previous work, or access data downloaded by someone else. This simplifies handovers to new users from existing users, simplifies teaching of the program, and encourages collective experimentation which may result in better shoreline data.

  CoastSeg is also designed to be extendable, serving as a hub that hosts alternative SDS workflows and similar workflows that can be encoded in a Jupyter notebook built upon the CoastSeg and CoastSat-package core functionalities. Additional notebooks can be designed to carry out shoreline extraction and coastal landcover mapping using alternative methods. We provide an example of an alternative SDS workflow based on a deep-learning based semantic segmentation model that is briefly summarized at the end of this paper. To implement a custom waterline detection workflow the originator of that workflow would contribute new Jupyter notebook, and add their specific waterline detection algorithm to the CoastSeg source code, so it could be used in their notebook's implementation.

  ![coastseg_main_flow_updated](https://github.com/Doodleverse/CoastSeg/assets/61564689/ac9076bd-bf40-44c5-a686-0fdc1acf8656)




  CoastSeg is a Jupyter and Python  based program that runs in a conda environment. Please see [the installation guide on the CoastSeg website](https://satelliteshorelines.github.io/CoastSeg/basic-install-guide/)



  Please see [the guide on the CoastSeg website](https://satelliteshorelines.github.io/CoastSeg/getting-started/), which includes instructions for

  * Pre-requisites (accounts, data access)
  * Installation and setup
  * Extracting shorelines
  * Applying tidal corrections to extracted shorelines



  The CoastSeg re-implementation of the  [CoastSat](https://github.com/kvos/CoastSat) workflow is end-to-end within a single notebook. That notebook allows the user to, among other tasks:

  a) define a Region of Interest (ROI) on a webmap and upload geospatial vector format files;
  b) define, download and post-process satellite imagery;
  c) identify waterlines in that imagery using the CoastSat method;
  d) correct those waterlines to elevation-based shorelines using tidal elevation-datum corrections provided through interaction with the [pyTMD](https://github.com/tsutterley/pyTMD) API; and
  e) save output files in a variety of modern geospatial and other formats for subsequent analysis.

  Additionally, CoastSeg's toolkit-based design enables it to run as non-interactive scripts, catering to larger scale shoreline analysis projects. This flexibility ensures that CoastSeg can accommodate a wide range of research needs, from detailed, interactive exploration to extensive, automated analyses.



  Please see [the guide on the CoastSeg website](https://satelliteshorelines.github.io/CoastSeg/CoastSeg-API-Guide/), which includes instructions for scripting workflows with the CoastSeg API



  A lot of work underpins the 'Zoo' method for SDS, which uses models and datasets developed over several years and still under an active cycle of improvement. That is, once we find the time!

  The models currently available are:

  * Buscombe, D. (2023). Doodleverse/CoastSeg Segformer models for 4-class (water, whitewater, sediment and other) segmentation of Sentinel-2 and Landsat-7/8 MNDWI images of coasts. (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8213443
  * Buscombe, D. (2023). Doodleverse/CoastSeg Segformer models for 4-class (water, whitewater, sediment and other) segmentation of Sentinel-2 and Landsat-7/8 NDWI images of coasts. (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8213427
  * Buscombe, D. (2023). Doodleverse/CoastSeg Segformer models for 4-class (water, whitewater, sediment and other) segmentation of Sentinel-2 and Landsat-7/8 3-band (RGB) images of coasts. (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8190958

  Made using the following software, implemented as [Doodleverse/Segmentation Gym]([Zoo](https://github.com/Doodleverse/segmentation_gym)):

  * Segmentation Gym: Buscombe, D., & Goldstein, E. B. (2022). A reproducible and reusable pipeline for segmentation of geoscientific imagery. Earth and Space Science, 9, e2022EA002332. https://doi.org/10.1029/2022EA002332

  Using the following datasets:

  * Buscombe, Daniel. (2022). Images and 2-class labels for semantic segmentation of Sentinel-2 and Landsat RGB, NIR, and SWIR satellite images of coasts (water, other) (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.7384263
  * Wernette, P.A., Buscombe, D.D., Favela, J., Fitzpatrick, S., and Goldstein E., 2022, Coast Train--Labeled imagery for training and evaluation of data-driven models for image segmentation: U.S. Geological Survey data release, https://doi.org/10.5066/P91NP87I. See https://coasttrain.github.io/CoastTrain/ for more information
  * Buscombe, Daniel. (2023). June 2023 Supplement Images and 4-class labels for semantic segmentation of Sentinel-2 and Landsat RGB, NIR, and SWIR satellite images of coasts (water, whitewater, sediment, other) (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8011926
  * Buscombe, Daniel, Goldstein, Evan, Bernier, Julie, Bosse, Stephen, Colacicco, Rosa, Corak, Nick, Fitzpatrick, Sharon, del Jesús González Guillén, Anais, Ku, Venus, Paprocki, Julie, Platt, Lindsay, Steele, Bethel, Wright, Kyle, & Yasin, Brandon. (2022). Images and 4-class labels for semantic segmentation of Sentinel-2 and Landsat RGB satellite images of coasts (water, whitewater, sediment, other) (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.7335647



  CoastSeg comes with a collection of pre-processing script utilities for common i/o problems. Please see [the guide on the CoastSeg website](https://satelliteshorelines.github.io/CoastSeg/How-to-Use-Scripts/), which includes the list of available scripts, and how to use them.



  The CoastSeg transect and slope database is [available]([https://zenodo.org/records/8187949](https://zenodo.org/records/11390980))

  * Buscombe, D., & Fitzpatrick, S. (2023). CoastSeg: Beach transects and beachface slope database v1.0 (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8187949

  Beach face slope and transect data have been derived from:

  1. Doran, K.S., Long, J.W., Birchler, J.J., Brenner, O.T., Hardy, M.W., Morgan, K.L.M, Stockdon, H.F., and Torres, M.L., 2017, Lidar-derived beach morphology (dune crest, dune toe, and shoreline) for U.S. sandy coastlines (ver. 4.0, October 2020): U.S. Geological Survey data release, https://doi.org/10.5066/F7GF0S0Z.

  2. Kilian Vos. (2023). Time-series of shoreline change along the Pacific Rim (v1.4) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.7758183

  3. Andrew Short. (2022). Sediment size dataset for Australia [Data set]. In Australian Coastal Systems (0.1, p. XXV, 1241). Springer Cham. https://doi.org/10.5281/zenodo.7127186

  4. Vos, Kilian, Wen, Deng, Harley, Mitchell D., Turner, Ian L., & Splinter, Kristen D. (2022). Beach-face slope dataset for Australia (Version 2) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.7272538

  5. Gibbs, A.E., Ohman, K.A., Coppersmith, R., and Richmond, B.M., 2017, National Assessment of Shoreline Change: A GIS compilation of updated vector shorelines and associated shoreline change data for the north coast of Alaska, U.S. Canadian border to Icy Cape: U.S. Geological Survey data release, https://doi.org/10.5066/F72Z13N1.

  6. Himmelstoss, E.A., Kratzmann, M., Hapke, C., Thieler, E.R., and List, J., 2010, The National Assessment of Shoreline Change: A GIS Compilation of Vector Shorelines and Associated Shoreline Change Data for the New England and Mid-Atlantic Coasts: U.S. Geological Survey Open-File Report 2010-1119, available at https://pubs.usgs.gov/of/2010/1119/.

  7. Snyder, A.G., and Gibbs, A.E., 2019, National assessment of shoreline change: A GIS compilation of updated vector shorelines and associated shoreline change data for the north coast of Alaska, Icy Cape to Cape Prince of Wales: U.S. Geological Survey data release, https://doi.org/10.5066/P9H1S1PV

  8. Romine, B.M., Fletcher, C.H., Genz, A.S., Barbee, M.M., Dyer, Matthew, Anderson, T.R., Lim, S.C., Vitousek, Sean, Bochicchio, Christopher, and Richmond, B.M., 2012, National Assessment of Shoreline Change:  A GIS compilation of vector shorelines and associated shoreline change data for the sandy shorelines of Kauai, Oahu, and Maui, Hawaii: U.S. Geological Survey Open-File Report 2011-1009, available online at https://pubs.usgs.gov/of/2011/1009/.

  9. Gibbs, A.E., Jones, B.M., and Richmond, B.M., 2020, A GIS compilation of vector shorelines and coastal bluff edge positions, and associated rate-of-change data for Barter Island, Alaska: U.S. Geological Survey data release, https://doi.org/10.5066/P9CRBC5I.

  10. Sturdivant, E.J., Zeigler, S.L., Gutierrez, B.T., and Weber, K.M., 2019, Barrier island geomorphology and shorebird habitat metrics–Sixteen sites on the U.S. Atlantic Coast, 2013–2014: U.S. Geological Survey data release, https://doi.org/10.5066/P9V7F6UX.

  Additional contributions:
  1. Sean Vitousek, USGS




  Package maintainers:
  - [@2320sharon](https://github.com/2320sharon) : Lead Software Developer / Contracted to USGS Pacific Coastal and Marine Science Center.
  - [@dbuscombe-usgs](https://github.com/dbuscombe-usgs)  Contracted to USGS Pacific Coastal and Marine Science Center.
  - [@mlundine](https://github.com/mlundine) : USGS Pacific Coastal and Marine Science Center.

  Contributions:
  - [@ebgoldstein](https://github.com/ebgoldstein)
  - [@venuswku](https://github.com/venuswku)
  - [@robbibt](https://github.com/robbibt)
  - [@edlazarus](https://github.com/edlazarus)
  - Beta testers: Catherine Janda, Ann Gibbs, Jon Warrick, Andrea O’Neill, Kathryn Weber, Julia Heslin (USGS)
  - We would like to express our gratitude to all the contributors who made this release possible. Thank you to everyone who tested the beta versions of coastseg and provided us with the feedback we needed to improve coastseg. Thanks also to the developers and maintainers of pyTMD, DEA-tools, xarray, and GDAL, without which this project would be impossible




  * [CoastSat](https://github.com/kvos/CoastSat)
  * [coastsat-package](https://github.com/SatelliteShorelines/coastsat_package)
  * [Zoo](https://github.com/Doodleverse/segmentation_zoo)
  * [pyTMD](https://github.com/tsutterley/pyTMD)
  * [dea-tools](https://knowledge.dea.ga.gov.au/notebooks/Tools/)

  See also other related repositories in the [Satellite Shorelines GitHub Organization](https://github.com/orgs/SatelliteShorelines/repositories)

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


pkgId: e7d8edee96b639d786335ad1366b6452d11244cd6b56618920caeee302b542dc
name: python-coauthor
arch: src
version: 0.0.9
epoch: 0
release: 1
summary: Coauthor Python Project
url: https://pypi.org/project/coauthor/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coauthor-0.0.9-1.src.rpm
checksum_type: sha256
description:
  agent:
    model: llama2:latest # default openai/gpt-4o
  workflows:
    - name: obsidian
      watch:
        filesystem:
          paths:
            - vaults
      tasks:
        - id: ai-file-update
          type: process_file_with_openai_agent
          modify_event_limit: 30  # seconds
          system: >-
              You are a co-author of Obsidian Markdown files tasked with enhancing and
              refining them based on specific embedded instructions.
          path_patterns:
            - .*\.md$
          content_patterns:
            - ".*@ai:.*"
  ```
  <!-- end installing -->
  <!-- start cli-usage -->
  Start Coauthor run the following commands:
  ```bash
  export OPENAI_API_KEY=<you api key>
  export OPENAI_API_URL=https://openrouter.ai/api/v1
  coauthor --watch
  ```
  To see command line options, run `coauthor --help`.
  <!-- end cli-usage -->

  This project welcomes contributions and suggestions. For details, visit the
  repository's [Contributor License Agreement
  (CLA)](https://cla.opensource.microsoft.com) and [Code of
  Conduct](https://opensource.microsoft.com/codeofconduct/) pages.


pkgId: 39ee6ab5015850d65a9c3ff069f15e35d488af6956449a6dc0344db9fc80e989
name: python-coba
arch: src
version: 8.0.5
epoch: 0
release: 1
summary: A contextual bandit research package
url: https://coba-docs.readthedocs.io/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coba-8.0.5-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/VowpalWabbit/coba/branch/master/graph/badge.svg?token=885XLZJ2D4)](https://codecov.io/gh/VowpalWabbit/coba)
  [![binder](https://img.shields.io/badge/launch%20example-binder-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5ydeVJLVIlV0e10PXk5k7dYeHu7Cj1j+49uKg7uLU61tGLw1lq27ugQYlclHC4bgv7VQ+TAyj5Zc/UjsPvs1sd5cWryWObtvWT2EPa4rtnWW3JkpjggEpbOsPr7F7EyNewtpBIslA7p43HCsnwooXTEc3UmPmCNn5lrqTJxy6nRmcavGZVt/3Da2pD5NHvsOHJCrdc1G2r3DITpU7yic7w/7Rxnjc0kt5GC4djiv2Sz3Fb2iEZg41/ddsFDoyuYrIkmFehz0HR2thPgQqMyQYb2OtB0WxsZ3BeG3+wpRb1vzl2UYBog8FfGhttFKjtAclnZYrRo9ryG9uG/FZQU4AEg8ZE9LjGMzTmqKXPLnlWVnIlQQTvxJf8ip7VgjZjyVPrjw1te5otM7RmP7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/VowpalWabbit/Coba/HEAD?filepath=doc/source/notebooks)
  [![doc](https://readthedocs.org/projects/coba-docs/badge/?version=latest)](https://coba-docs.readthedocs.io/?badge=v8.0.3)
  [![pypi](https://img.shields.io/badge/pypi-v8.0.3-blue)](https://pypi.org/project/coba/)



   

   Coba is a powerful framework built to facilitate research with online contextual bandit (CB) algorithms.

   

   To start using Coba right away we recommend visiting our [documentation](https://coba-docs.readthedocs.io/).

   

   Think for a second about the last time you considered evaluating CB methods for a research project

   1. Was it easy to incorporate your own data sets during CB analysis?
   2. Was it easy to incorporate the wide array of available CB algorithms?
   3. Was it easy to create, run and share the results of CB experiments?

   Coba was built from the ground up to do these three things and more.

   

   Coba is...

   * ... *light-weight* (there are minimal project dependencies to get started)
   * ... *verbose* (sophisticated logging is built-in for meaningful, readable feedback on log running jobs)
   * ... *robust* (results are frequently saved to disk so that no work is lost if research is interrupted for any reason)
   * ... *lazy* (resources are loaded just-in-time and then released quickly to minimize resource requirements)
   * ... *a duck?* (all code uses duck-typing so that inheritance is a non-issue when extending built-in functionality)

   But don't take our word for it. We encourage you to look at the code yourself or read more below.

   

   Coba is architected around a simple workflow: (Learners, Environments) -> Experiments -> Results -> Analysis.

   Environments represent unique CB problems that need to be solved. Learners are the CB algorithms that we can use to solve these problems. Experiments are combinations of Environments and Learners that we want to evaluate. And Results are the outcome of an Experiment, containing all the data from the Experiment.

   

   Learners are algorithms which are able to improve their action selection through interactions with environments.

   A number of algorithms are provided natively with Coba for quick comparsions. These include:

   * All contextual bandit learners in [Vowpal Wabbit](https://vowpalwabbit.org/)
   * UCB1-Tuned Bandit Learner (Auer et al., 2002)
   * LinUCB (Li and Chu et al., 2011)
   * Linear Thompson Sampling (Agrawal and Goyal et al., 2013)
   * Corral (Agarwal et al., 2017)

   

   Environments are the core unit of evaluation in Coba. They are nothing more than a sequence of interactions with contexts, actions and rewards. A number of tools have been built into Coba to make simulation creation easier. All these tools are defined in the `coba.environments` module. We describe a few of these tools here.

   

   Classification data sets are the easiest way to create Environments in Coba. Coba natively supports:

   * Binay, multiclass and multi-label problems
   * Dense and sparse representations
   * Openml, Csv, Arff, Libsvm, and the extreme classification (Manik) format
   * Local files and files over http (with local caching)

   

   If more customization is needed beyond what is offered above then you can easily create your own simulation by implementing Coba's `Environment` interface and generating interactions.

   

   Experiments are combinations of Learners and Environments. The Experiment class orchestrates the complex tasks of evaluating learners on environments in a resource efficient, repeatable, and robust manner. Experiments can be run on any number of processes (we often run on 96 core machines) and writes all results to file as it runs so that it can be restarted if it gets interrupted.

   

   The end result of an Experiment is a Result object that supports easy analysis. The result class provides a number of plots as well as filtering capabilities out of the box. If the built in functionality isn't advanced enough data can be exported to pandas dataframes where all manner of advanced filtering and plotting can be performed.

   

   To learn more, many working code examples are provided in the [documentation](https://coba-docs.readthedocs.io/).


pkgId: b68bd4e7112cc55dc259dbaa0e4ee929fd6d8ebb1de471b48001f7ada5067b5e
name: python-cobalt
arch: src
version: 9.0.0
epoch: 0
release: 1
summary: A lightweight library for working with Akoma Ntoso Act documents
url: https://github.com/laws-africa/cobalt
rpm_license: LGPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cobalt-9.0.0-1.src.rpm
checksum_type: sha256
description:
  ![image](https://laws.africa/img/icons/cobalt.png)

  [![image](https://badge.fury.io/py/cobalt.svg)](http://badge.fury.io/py/cobalt)

  Cobalt is a lightweight Python library for working with [Akoma Ntoso](http://www.akomantoso.org/) documents. It makes it
  easy to work with Akoma Ntoso documents, metadata and FRBR URIs.

  It is lightweight because most operations are done on the XML document directly without intermediate objects. You still
  need to understand how Akoma Ntoso works.

  Read the [full documentation at cobalt.readthedocs.io](http://cobalt.readthedocs.io/en/latest/).



  Install using:

      $ pip install cobalt

  Use it like this:

      >>> from cobalt import Act
      >>> act = Act()
      >>> act.title = "Act 10 of 1980"
      >>> act.frbr_uri = "/za/act/1980-05-03/10"
      >>> act.frbr_uri.year
      '1980'
      >>> act.frbr_uri.date
      '1980-05-03'
      >>> act.frbr_uri.number
      '10'
      >>> act.frbr_uri.doctype
      'act'
      >>> print act.to_xml()
      [ lots of xml ]



  1.  Clone the repo
  2.  Install development dependencies:

          pip install -e .[dev]

  3.  Make your changes
  4.  Run tests:

          nosetests && flake8 cobalt

  5.  Send a pull request



  1. Run the tests with `python -m unittest`
  2. Update the version by changing the `__version__` variable in [`cobalt/__init__.py`](cobalt/__init__.py)
  3. Commit your changes and push to the master branch on GitHub
  4. Create a release in GitHub and it will automatically be pushed to PyPi



  Cobalt is licensed under the LPGL 3.0 license.

  Copyright 2015-2020 AfricanLII.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program.  If not, see <https://www.gnu.org/licenses/>.


pkgId: 0f47f63e944ab5267200109ef20abaa2734160c5d275c8ddf9042459033b1444
name: python-cobaya
arch: src
version: 3.5.4
epoch: 0
release: 1
summary: Code for Bayesian Analysis
url: https://cobaya.readthedocs.io
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cobaya-3.5.4-1.src.rpm
checksum_type: sha256
description:
  **Cobaya** (**co**\ de for **bay**\ esian **a**\ nalysis, and Spanish for *Guinea Pig*) is a framework for sampling and statistical modelling: it allows you to explore an arbitrary prior or posterior using a range of Monte Carlo samplers (including the advanced MCMC sampler from CosmoMC_, and the advanced nested sampler PolyChord_). The results of the sampling can be analysed with GetDist_. It supports MPI parallelization (and very soon HPC containerization with Docker/Shifter and Singularity).
  Its authors are `Jesus Torrado`_ and `Antony Lewis`_. Some ideas and pieces of code have been adapted from other codes (e.g CosmoMC_ by `Antony Lewis`_ and contributors, and `Monte Python`_, by `J. Lesgourgues`_ and `B. Audren`_).
  **Cobaya** has been conceived from the beginning to be highly and effortlessly extensible: without touching **cobaya**'s source code, you can define your own priors and likelihoods, create new parameters as functions of other parameters...
  Though **cobaya** is a general purpose statistical framework, it includes interfaces to cosmological *theory codes* (CAMB_ and CLASS_) and *likelihoods of cosmological experiments* (Planck, Bicep-Keck, SDSS... and more coming soon). Automatic installers are included for all those external modules. You can also use **cobaya** simply as a wrapper for cosmological models and likelihoods, and integrate it in your own sampler/pipeline.
  The interfaces to most cosmological likelihoods are agnostic as to which theory code is used to compute the observables, which facilitates comparison between those codes. Those interfaces are also parameter-agnostic, so using your own modified versions of theory codes and likelihoods requires no additional editing of **cobaya**'s source.

rpm_license:
  Copyright 2017-2024 Jesus Torrado and Antony Lewis  You are licensed to use this software free of charge within the terms of the LGPL (see below), with two additional conditions (from CAMB.info):  - Any publication using results of the code must be submitted to arXiv.org at the same time as, or before, submitting to a journal. arXiv must be updated with a version equivalent to that accepted by the journal on journal acceptance.  - If you identify any bugs you report them as soon as confirmed.  The documentation of this program is released under the GNU Free Documentation License (see below)   Exceptions: ----------- - The copyright of the logos of the supporting institutions belong to the institutions themselves   Re-licensing of specific files: -------------------------------  The following files have been translated (some with large modification) and re-licensed from the more liberally licensed CosmoMC (https://github.com/cmbant/CosmoMC):  - mcmc.py and proposal.py - sn.py, cmblikes.py in base_classes - most of the files under grid_tools/   For this code and its documentation (with the exceptions above): ----------------------------------------------------------------  This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.  The documentation of this program is released under the GNU Free Documentation License. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.  ------------------------------------------------------------------------  GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.   This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.  0. Additional Definitions.  As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.  "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.  An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.  A "Combined Work" is a work produced by combining or linking an Application with the Library.  The particular version of the Library with which the Combined Work was made is also called the "Linked Version".  The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.  The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.  1. Exception to Section 3 of the GNU GPL.  You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.  2. Conveying Modified Versions.  If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:  a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or  b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.  3. Object Code Incorporating Material from Library Header Files.  The object code form of an Application may incorporate material from a header file that is part of the Library.  You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:  a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.  b) Accompany the object code with a copy of the GNU GPL and this license document.  4. Combined Works.  You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:  a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.  b) Accompany the Combined Work with a copy of the GNU GPL and this license document.  c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.  d) Do one of the following:  0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.  1) Use a suitable shared library mechanism for linking with the Library.  A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.  e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)  5. Combined Libraries.  You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:  a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.  b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.  6. Revised Versions of the GNU Lesser General Public License.  The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.  Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.  If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.   ------------------------------------------------------------------------  GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.  Preamble  The GNU General Public License is a free, copyleft license for software and other kinds of works.  The licenses for most software and other practical works are designed to take away your freedom to share and change the works.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.  We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors.  You can apply it to your programs, too.  When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.  To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights.  Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.  For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their rights.  Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.  For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software.  For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.  Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so.  This is fundamentally incompatible with the aim of protecting users' freedom to change the software.  The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable.  Therefore, we have designed this version of the GPL to prohibit the practice for those products.  If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.  Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary.  To prevent this, the GPL assures that patents cannot be used to render the program non-free.  The precise terms and conditions for copying, distribution and modification follow.  TERMS AND CONDITIONS  0. Definitions.  "This License" refers to version 3 of the GNU General Public License.  "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.  "The Program" refers to any copyrightable work licensed under this License.  Each licensee is addressed as "you".  "Licensees" and "recipients" may be individuals or organizations.  To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy.  The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.  A "covered work" means either the unmodified Program or a work based on the Program.  To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy.  Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.  To "convey" a work means any kind of propagation that enables other parties to make or receive copies.  Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.  An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License.  If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.  1. Source Code.  The "source code" for a work means the preferred form of the work for making modifications to it.  "Object code" means any non-source form of a work.  A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.  The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form.  A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.  The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities.  However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.  For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.  The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.  The Corresponding Source for a work in source code form is that same work.  2. Basic Permissions.  All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met.  This License explicitly affirms your unlimited permission to run the unmodified Program.  The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work.  This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.  You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force.  You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright.  Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.  Conveying under any other circumstances is permitted solely under the conditions stated below.  Sublicensing is not allowed; section 10 makes it unnecessary.  3. Protecting Users' Legal Rights From Anti-Circumvention Law.  No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.  When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.  4. Conveying Verbatim Copies.  You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.  You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.  5. Conveying Modified Source Versions.  You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:  a) The work must carry prominent notices stating that you modified it, and giving a relevant date.  b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7.  This requirement modifies the requirement in section 4 to "keep intact all notices".  c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.  This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged.  This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.  d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.  A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit.  Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.  6. Conveying Non-Source Forms.  You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:  a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.  b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.  c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source.  This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.  d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge.  You need not require recipients to copy the Corresponding Source along with the object code.  If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source.  Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.  e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.  A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.  A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling.  In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage.  For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product.  A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.  "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source.  The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.  If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information.  But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).  The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed.  Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.  Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.  7. Additional Terms.  "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law.  If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.  When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it.  (Additional permissions may be written to require their own removal in certain cases when you modify the work.)  You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.  Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:  a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or  b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or  c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or  d) Limiting the use for publicity purposes of names of licensors or authors of the material; or  e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or  f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.  All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10.  If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.  If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.  If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.  Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.  8. Termination.  You may not propagate or modify a covered work except as expressly provided under this License.  Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).  However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.  Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.  Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License.  If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.  9. Acceptance Not Required for Having Copies.  You are not required to accept this License in order to receive or run a copy of the Program.  Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance.  However, nothing other than this License grants you permission to propagate or modify any covered work.  These actions infringe copyright if you do not accept this License.  Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.  10. Automatic Licensing of Downstream Recipients.  Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.  You are not responsible for enforcing compliance by third parties with this License.  An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations.  If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.  You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.  For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.  11. Patents.  A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based.  The work thus licensed is called the contributor's "contributor version".  A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version.  For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.  Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.  In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement).  To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.  If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients.  "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.  If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.  A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License.  You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.  Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.  12. No Surrender of Others' Freedom.  If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all.  For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.  13. Use with the GNU Affero General Public License.  Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work.  The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.  14. Revised Versions of this License.  The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.  Each version is given a distinguishing version number.  If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.  If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.  Later license versions may give you additional or different permissions.  However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.  15. Disclaimer of Warranty.  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.  16. Limitation of Liability.  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  17. Interpretation of Sections 15 and 16.  If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.  END OF TERMS AND CONDITIONS  How to Apply These Terms to Your New Programs  If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.  To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.  <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.  Also add information on how to contact you by electronic and paper mail.  If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:  <program>  Copyright (C) <year>  <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.  The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, your program's commands might be different; for a GUI interface, you would use an "about box".  You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.  The GNU General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Lesser General Public License instead of this License.  But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.   ------------------------------------------------------------------------   GNU Free Documentation License Version 1.3, 3 November 2008   Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.  0. PREAMBLE  The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.  This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense.  It complements the GNU General Public License, which is a copyleft license designed for free software.  We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does.  But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book.  We recommend this License principally for works whose purpose is instruction or reference.   1. APPLICABILITY AND DEFINITIONS  This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License.  Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein.  The "Document", below, refers to any such manual or work.  Any member of the public is a licensee, and is addressed as "you".  You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.  A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.  A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject.  (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.)  The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.  The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License.  If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant.  The Document may contain zero Invariant Sections.  If the Document does not identify any Invariant Sections then there are none.  The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License.  A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.  A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters.  A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text.  A copy that is not "Transparent" is called "Opaque".  Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification.  Examples of transparent image formats include PNG, XCF and JPG.  Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.  The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page.  For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.  The "publisher" means any person or entity that distributes copies of the Document to the public.  A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language.  (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".)  To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.  The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document.  These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.  2. VERBATIM COPYING  You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License.  You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute.  However, you may accept compensation in exchange for copies.  If you distribute a large enough number of copies you must also follow the conditions in section 3.  You may also lend copies, under the same conditions stated above, and you may publicly display copies.   3. COPYING IN QUANTITY  If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover.  Both covers must also clearly and legibly identify you as the publisher of these copies.  The front cover must present the full title with all words of the title equally prominent and visible.  You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.  If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.  If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.  It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.   4. MODIFICATIONS  You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it.  In addition, you must do these things in the Modified Version:  A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document).  You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page.  If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on.  These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles.  Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements".  Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers.  If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant.  To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.  You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.  You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version.  Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity.  If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.  The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.   5. COMBINING DOCUMENTS  You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.  The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy.  If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.  In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications".  You must delete all sections Entitled "Endorsements".   6. COLLECTIONS OF DOCUMENTS  You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.  You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.   7. AGGREGATION WITH INDEPENDENT WORKS  A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.  If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.   8. TRANSLATION  Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections.  You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers.  In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.  If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.   9. TERMINATION  You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.  However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.  Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.  Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License.  If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.   10. FUTURE REVISIONS OF THIS LICENSE  The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.  See http://www.gnu.org/copyleft/.  Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation.  If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.  If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document.  11. RELICENSING  "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works.  A public wiki that anybody can edit is an example of such a server.  A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site.  "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.  "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document.  An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.  The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.


