[![PyPI version](https://badge.fury.io/py/msgraph-core.svg)](https://badge.fury.io/py/msgraph-core)
[![CI Actions Status](https://github.com/microsoftgraph/msgraph-sdk-python-core/actions/workflows/build.yml/badge.svg)](https://github.com/microsoftgraph/msgraph-sdk-python-core/actions/workflows/build.yml)
[![Downloads](https://pepy.tech/badge/msgraph-core)](https://pepy.tech/project/msgraph-core)

## Microsoft Graph Core Python Client Library

The Microsoft Graph Core Python Client Library contains core classes used by [Microsoft Graph Python Client Library](https://github.com/microsoftgraph/msgraph-sdk-python) to send native HTTP requests to [Microsoft Graph API](https://graph.microsoft.com).

> NOTE:
> This is a new major version of the Python Core library for Microsoft Graph based on the [Kiota](https://microsoft.github.io/kiota/) project. We recommend to use this library with the [full Python SDK](https://github.com/microsoftgraph/msgraph-sdk-python).
> Upgrading to this version from the [previous version of the Python Core library](https://pypi.org/project/msgraph-core/0.2.2/) will introduce breaking changes into your application.

## Prerequisites

    Python 3.8+

This library doesn't support [older](https://devguide.python.org/versions/) versions of Python.

## Getting started

### 1. Register your application

To call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this -

- [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/en-us/graph/auth/auth-concepts)
- [Register your app with the Microsoft identity platform](https://docs.microsoft.com/en-us/graph/auth-register-app-v2)

### 2. Install the required packages

msgraph-core is available on PyPI.

```cmd
pip3 install msgraph-core
pip3 install azure-identity
```

### 3. Configure an Authentication Provider Object

An instance of the `BaseGraphRequestAdapter` class handles building client. To create a new instance of this class, you need to provide an instance of `AuthenticationProvider`, which can authenticate requests to Microsoft Graph.

> **Note**: This client library offers an asynchronous API by default. Async is a concurrency model that is far more efficient than multi-threading, and can provide significant performance benefits and enable the use of long-lived network connections such as WebSockets. We support popular python async environments such as `asyncio`, `anyio` or `trio`. For authentication you need to use one of the async credential classes from `azure.identity`.

```py
# Using EnvironmentCredential for demonstration purposes.
# There are many other options for getting an access token. See the following for more information.
# https://pypi.org/project/azure-identity/#async-credentials
from azure.identity.aio import EnvironmentCredential
from msgraph_core.authentication import AzureIdentityAuthenticationProvider

credential=EnvironmentCredential()
auth_provider = AzureIdentityAuthenticationProvider(credential)
```

> **Note**: `AzureIdentityAuthenticationProvider` sets the default scopes and allowed hosts.

### 5. Pass the authentication provider object to the BaseGraphRequestAdapter constructor

```python
from msgraph_core import BaseGraphRequestAdapter
adapter = BaseGraphRequestAdapter(auth_provider)
```

### 6. Make a requests to the graph

After you have a `BaseGraphRequestAdapter` that is authenticated, you can begin making calls against the service.

```python
import asyncio
from kiota_abstractions.request_information import RequestInformation

request_info = RequestInformation()
request_info.url = 'https://graph.microsoft.com/v1.0/me'

# User is your own type that implements Parsable or comes from the service library
user = asyncio.run(adapter.send_async(request_info, User, {}))
print(user.display_name)
```

## Telemetry Metadata

This library captures metadata by default that provides insights into its usage and helps to improve the developer experience. This metadata includes the `SdkVersion`, `RuntimeEnvironment` and `HostOs` on which the client is running.

## Issues

View or log issues on the [Issues](https://github.com/microsoftgraph/msgraph-sdk-python-core/issues) tab in the repo.

## Contributing

Please see the [contributing guidelines](CONTRIBUTING.md).

## Copyright and license

Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT [license](LICENSE).

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.


[![CI](https://github.com/comictagger/comictagger/actions/workflows/build.yaml/badge.svg?branch=develop&event=push)](https://github.com/comictagger/comictagger/actions/workflows/build.yaml)
[![GitHub release (latest by date)](https://img.shields.io/github/downloads/comictagger/comictagger/latest/total)](https://github.com/comictagger/comictagger/releases/latest)
[![PyPI](https://img.shields.io/pypi/v/comictagger)](https://pypi.org/project/comictagger/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/comictagger)](https://pypistats.org/packages/comictagger)
[![Chocolatey package](https://img.shields.io/chocolatey/dt/comictagger?color=blue&label=chocolatey)](https://community.chocolatey.org/packages/comictagger)
[![PyPI - License](https://img.shields.io/pypi/l/comictagger)](https://opensource.org/licenses/Apache-2.0)

[![GitHub Discussions](https://img.shields.io/github/discussions/comictagger/comictagger)](https://github.com/comictagger/comictagger/discussions)
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/comictagger/community)
[![Google Group](https://img.shields.io/badge/discuss-on%20groups-%23207de5)](https://groups.google.com/forum/#!forum/comictagger)
[![Twitter](https://img.shields.io/badge/%40comictagger-twitter-lightgrey)](https://twitter.com/comictagger)
[![Facebook](https://img.shields.io/badge/comictagger-facebook-lightgrey)](https://www.facebook.com/ComicTagger-139615369550787/)

# ComicTagger

ComicTagger is a **multi-platform** app for **writing metadata to digital comics**, written in Python and PyQt.

![ComicTagger logo](https://raw.githubusercontent.com/comictagger/comictagger/develop/comictaggerlib/graphics/app.png)

## Features

* Runs on macOS, Microsoft Windows, and Linux systems
* Get comic information from [Comic Vine](https://comicvine.gamespot.com/)
* **Automatic issue matching** using advanced image processing techniques
* **Batch processing** in the GUI for tagging hundreds or more comics at a time
* Support for **ComicRack** and **ComicBookLover** tagging formats
* Native full support for **CBZ** digital comics
* Native read only support for **CBR** digital comics: full support enabled installing additional [rar tools](https://www.rarlab.com/download.htm)
* Command line interface (CLI) enabling **custom scripting** and **batch operations on large collections**

For details, screen-shots, and more, visit [the Wiki](https://github.com/comictagger/comictagger/wiki)

## Installation

### Binaries

Windows, Linux and MacOS binaries are provided in the [Releases Page](https://github.com/comictagger/comictagger/releases).

Just unzip the archive in any folder and run, no additional installation steps are required.

### PIP installation

A pip package is provided, you can install it with:

```
 $ pip3 install comictagger[GUI]
```

There are optional dependencies. You can install the optional dependencies by specifying one or more of them in braces e.g. `comictagger[CBR,GUI]`

Optional dependencies:
1. `ICU`: Ensures that comic pages are supported correctly. This should always be installed. *Currently only exists in the latest alpha release *
1. `CBR`: Provides support for CBR/RAR files.
1. `GUI`: Installs the GUI.
1. `7Z`: Provides support for CB7/7Z files.
1. `all`: Installs all of the above optional dependencies.

### Chocolatey installation (Windows only)

A [Chocolatey package](https://community.chocolatey.org/packages/comictagger), maintained by @Xav83, is provided, you can install it with:
```powershell
choco install comictagger
```
### From source

 1. Ensure you have python 3.9 installed
 2. Clone this repository `git clone https://github.com/comictagger/comictagger.git`
 7. `pip3 install .[ICU]` or `pip3 install .[GUI,ICU]`

## Contributors

            beville

            davide-romanini

            fcanc

            lordwelch

            mizaki

            MichaelFitzurka

            abuchanan920

            AlbanSeurat

            rhaussmann

            jpcranford

            PawlakMarek

            DrMcCoy

            Xav83

            thFrgttn

            tlc


# Aiogram Dialog

[![PyPI version](https://badge.fury.io/py/aiogram-dialog.svg)](https://badge.fury.io/py/aiogram-dialog)
[![Doc](https://readthedocs.org/projects/aiogram-dialog/badge/?version=latest&style=flat)](https://aiogram-dialog.readthedocs.io)
[![downloads](https://img.shields.io/pypi/dm/aiogram_dialog.svg)](https://pypistats.org/packages/aiogram_dialog)
[![license](https://img.shields.io/github/license/Tishka17/aiogram_dialog.svg)](https://github.com/Tishka17/aiogram_dialog/blob/master/LICENSE)
[![license](https://img.shields.io/badge/💬-Telegram-blue)](https://t.me/aiogram_dialog)

#### Version status:
* v2.x - actual release, supports aiogram v3.x
* v1.x - old release, supports aiogram v2.x, critical fix only

### About
`aiogram-dialog` is a framework for developing interactive messages and menus in your telegram bot like a normal GUI application.

It is inspired by ideas of Android SDK and other tools.

Main ideas are:
* **split data retrieving, rendering and action processing** - you need nothing to do for showing same content after some actions, also you can show same data in multiple ways.
* **reusable widgets**  - you can create calendar or multiselect at any point of your application without copy-pasting its internal logic
* **limited scope of context** - any dialog keeps some data until closed, multiple opened dialogs process their data separately

Designing you bot with `aiogram-dialog` you **think about user**, what he sees and what he does. Then you split this vision into reusable parts and design your bot combining dialogs, widows and widgets. By this moment you can review interface and add your core logic.

Many components are ready for use, but you can extend and add your own widgets and even core features.

For more details see [documentation](https://aiogram-dialog.readthedocs.io) and [examples](example)

### Supported features:
* Rich text rendering using `format` function or `Jinja2` template engine.
* Automatic message updating after user actions
* Multiple independent dialog stacks with own data storage and transitions
* Inline keyboard widgets like `SwitchTo`, `Start`, `Cancel` for state switching, `Calendar` for date selection and others.
* Stateful widgets: `Checkbox`, `Multiselect`, `Counter`, `TextInput`. They record user actions and allow you to retrieve this data later.
* Multiple buttons layouts including simple grouping (`Group`, `Column`), page scrolling (`ScrollingGroup`), repeating of same buttons for list of data (`ListGroup`).
* Sending media (like photo or video) with fileid caching and handling switching to/from message with no media.
* Different rules of transitions between windows/dialogs like keeping only one dialog on top of stack or force sending enw message instead of updating one.
* Offline HTML-preview for messages and transitions diagram. They can be used to check all states without emulating real use cases or exported for demonstration purposes.

### Usage

Example below is suitable for aiogram_dialog v2.x and aiogram v3.x

#### Declaring Window

Each window consists of:

* Text widgets. Render text of message.
* Keyboard widgets. Render inline keyboard
* Media widget. Renders media if need
* Message handler. Called when user sends a message when window is shown
* Data getter functions (`getter=`). They load data from any source which can be used in text/keyboard
* State. Used when switching between windows

**Info:** always create `State` inside `StatesGroup`

```python
from aiogram.fsm.state import StatesGroup, State
from aiogram_dialog.widgets.text import Format, Const
from aiogram_dialog.widgets.kbd import Button
from aiogram_dialog import Window

class MySG(StatesGroup):
    main = State()

async def get_data(**kwargs):
    return {"name": "world"}

Window(
    Format("Hello, {name}!"),
    Button(Const("Empty button"), id="nothing"),
    state=MySG.main,
    getter=get_data,
)
```

### Declaring dialog

Window itself can do nothing, just prepares message. To use it you need dialog:

```python
from aiogram.fsm.state import StatesGroup, State
from aiogram_dialog import Dialog, Window

class MySG(StatesGroup):
    first = State()
    second = State()

dialog = Dialog(
    Window(..., state=MySG.first),
    Window(..., state=MySG.second),
)
```

> **Info:** All windows in a dialog MUST have states from then same `StatesGroup`

After creating a dialog you need to register it into the Dispatcher and set it up using the `setup_dialogs` function:

```python
from aiogram import Dispatcher
from aiogram_dialog import setup_dialogs

...
dp = Dispatcher(storage=storage)  # create as usual
dp.include_router(dialog)
setup_dialogs(dp)
```

Then start dialog when you are ready to use it. Dialog is started via `start` method of `DialogManager` instance. You
should provide corresponding state to switch into (usually it is state of first window in dialog).

For example in `/start` command handler:

```python
async def user_start(message: Message, dialog_manager: DialogManager):
    await dialog_manager.start(MySG.first, mode=StartMode.RESET_STACK)

dp.message.register(user_start, CommandStart())
```

> **Info:** Always set `mode=StartMode.RESET_STACK` in your top level start command. Otherwise, dialogs are stacked just as they do
on your mobile phone, so you can reach stackoverflow error


===========================================
Plata - the lean and mean Django-based Shop
===========================================

Instead of fighting against a big and all-knowing shop system, which
never does the right thing although it "only requires pushing a few
configuration buttons here and there", Plata only provides order,
payment and discount models. Building a shop on top of Django
and Plata requires programming -- but that's what we do -- programming!

Visit these sites for more information
======================================

* Documentation: http://plata-django-shop.readthedocs.io
* Plata on github: https://github.com/matthiask/plata
* Once upon a time Plata came with an included product model.
  It is still available in its own repository:
  https://github.com/matthiask/plata-options-product


|Python version| |Python version windows| |Build Status| |Documentation|

Cosmic Ray: mutation testing for Python
=======================================

   "Four human beings -- changed by space-born cosmic rays into something more than merely human."

   -- The Fantastic Four

Cosmic Ray is a mutation testing tool for Python 3.

It makes small changes to your source code, running your test suite for each
one. Here's how the mutations look:

.. image:: docs/source/cr-in-action.gif

|full_documentation|_

Contributing
------------

The easiest way to contribute is to use Cosmic Ray and submit reports for defects or any other issues you come across.
Please see CONTRIBUTING.rst for more details.

.. |Python version| image:: https://img.shields.io/badge/Python_version-3.5+-blue.svg
   :target: https://www.python.org/
.. |Python version windows| image:: https://img.shields.io/badge/Python_version_(windows)-3.7+-blue.svg
   :target: https://www.python.org/
.. |Build Status| image:: https://github.com/sixty-north/cosmic-ray/actions/workflows/python-package.yml/badge.svg
   :target: https://github.com/sixty-north/cosmic-ray/actions/workflows/python-package.yml
.. |Code Health| image:: https://landscape.io/github/sixty-north/cosmic-ray/master/landscape.svg?style=flat
   :target: https://landscape.io/github/sixty-north/cosmic-ray/master
.. |Code Coverage| image:: https://codecov.io/gh/sixty-north/cosmic-ray/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/Vimjas/covimerage/branch/master
.. |Documentation| image:: https://readthedocs.org/projects/cosmic-ray/badge/?version=latest
   :target: http://cosmic-ray.readthedocs.org/en/latest/
.. |full_documentation| replace:: **Read the full documentation at readthedocs.**
.. _full_documentation: http://cosmic-ray.readthedocs.org/en/latest/


Siphon
======

|License| |PRWelcome|

|Docs| |PyPI| |Conda|

|Travis| |AppVeyor| |CodeCov|

|Codacy|

.. |License| image:: https://img.shields.io/pypi/l/siphon.svg
    :target: https://pypi.python.org/pypi/siphon/
    :alt: License

.. |PyPI| image:: https://img.shields.io/pypi/v/siphon.svg
    :target: https://pypi.python.org/pypi/siphon/
    :alt: PyPI Package

.. |Conda| image:: https://anaconda.org/conda-forge/siphon/badges/version.svg
    :target: https://anaconda.org/conda-forge/siphon
    :alt: Conda Package

.. |Travis| image:: https://travis-ci.org/Unidata/siphon.svg?branch=master
    :target: https://travis-ci.org/Unidata/siphon
    :alt: Travis Build Status

.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/stxqunhdyqu75u3r/branch/master?svg=true
    :target: https://ci.appveyor.com/project/Unidata/siphon/branch/master
    :alt: AppVeyor Build Status

.. |CodeCov| image:: https://codecov.io/github/Unidata/siphon/coverage.svg?branch=master
    :target: https://codecov.io/github/Unidata/siphon?branch=master
    :alt: Code Coverage Status

.. |Codacy| image:: https://api.codacy.com/project/badge/grade/ebacd20b84ab4673bd6cd34f65c48af6
    :target: https://www.codacy.com/app/Unidata/siphon
    :alt: Codacy code issues

.. |Docs| image:: https://img.shields.io/badge/docs-stable-brightgreen.svg
    :target: http://unidata.github.io/siphon
    :alt: Latest Docs

.. |PRWelcome| image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=round-square
    :target: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
    :alt: PRs Welcome

Siphon is a collection of Python utilities for downloading data from Unidata
data technologies. See our `support page`__ for ways to get help with Siphon.

__ https://github.com/Unidata/siphon/blob/master/SUPPORT.md

Siphon follows `semantic versioning <https://semver.org>`_ in its version number. With our
current 0.x version, that implies that Siphon's APIs (application programming interfaces) are
still evolving (we won't break things just for fun, but many things are still changing as we
work through design issues). Also, for a version `0.x.y`, we change `x` when we
release new features, and `y` when we make a release with only bug fixes.

We support Python >= 3.7.

Important Links
---------------

- Source code repository: https://github.com/Unidata/siphon
- HTML Documentation: http://unidata.github.io/siphon/
- Unidata Python Gallery: https://unidata.github.io/python-gallery/
- Issue tracker: http://github.com/Unidata/siphon/issues
- "python-siphon" tagged questions on Stack Overflow: https://stackoverflow.com/questions/tagged/python-siphon
- Gitter chat room: https://gitter.im/Unidata/siphon

Dependencies
------------

- requests>=1.2
- numpy>=1.8
- protobuf>=3.0.0a3
- beautifulsoup4>=4.6
- pandas

Developer Dependencies
----------------------

- pytest
- vcrpy
- flake8


Pecan
=====

A WSGI object-dispatching web framework, designed to be lean and fast with few
dependencies.

.. image:: https://badge.fury.io/py/pecan.png
    :target: https://pypi.python.org/pypi/pecan/
    :alt: Latest PyPI version

Installing
----------

::

    $ pip install pecan

...or, for the latest (unstable) tip::

    $ git clone https://github.com/pecan/pecan.git
    $ cd pecan && python setup.py install

Running Tests
-------------

::

    $ python setup.py test

...or, to run all tests across all supported environments::

    $ pip install tox && tox

Viewing Documentation
---------------------
`Available online <https://pecan.readthedocs.io>`_, or to build manually::

    $ cd docs && make html
    $ open docs/build/html/index.html

...or::

    $ cd docs && make man
    $ man docs/build/man/pecan.1

Contributing
------------
For information on contributing to Pecan, please read our `Contributing
Guidelines <https://github.com/pecan/pecan/blob/master/CONTRIBUTING.rst>`_.

Bugs should be reported at:

https://github.com/pecan/pecan/issues/new

Additional Help/Support
-----------------------
Most Pecan interaction is done via the `pecan-dev Mailing List
<https://groups.google.com/forum/#!forum/pecan-dev>`_.


[![ECDS](https://circleci.com/gh/ecds/readux.svg?style=svg)](<LINK>)

# Readux

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3572679.svg)](https://doi.org/10.5281/zenodo.3572679)

Readux is a platform developed by the Emory Center for Digital Scholarship which allows users to read, take notes on, and publish with digitized texts from libraries’ archival collections. With Readux, users are able to:

- browse digitized page images,
- search and select the texts of these digitized books,
- annotate text or illustrations in these works, and then
- publish digital copies of the texts with their annotations.

Administrators can organize digitized books into collections, facilitating user access to digitized books available through the platform. Since its release, Readux has proved to be an innovative research and pedagogy tool for scholars and faculty at Emory University and beyond, with an array of use-cases ranging from teaching to publishing.

## Motivation

...

### Deployment

...

## Installation (development)

### Requirements

1. Python 3
2. PostgreSQL
3. Elasticsearch (>7.0, <7.14.0)
4. Node

### Set up Elasticsearch

Elasticsearch will need to be running as a background process on port 9200. Read the Elastic guides for [setting up](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/getting-started.html) (self-managed) and [securing your instance](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/secure-cluster.html). Ignore all instructions related to Kibana.

### Set up development environment

1. Clone this repository.
2. Navigate to the readux directory.
3. Create virtual environment and activate it.

~~~bash
python3 -m venv venv
source venv/bin/activate
~~~

4. Install the dependencies.

Note: You will need to install Rust and have it in your path.

~~~bash
pip install -r requirements/local.txt
bundle install
npm install && npx webpack
~~~

5. Copy and set up your local settings.

~~~bash
cp config/settings/local.dst config/settings/local.py
~~~

6. Add your database settings to the local.py file or set an environment variable. For example:

~~~bash
export DATABASE_URL=postgres://<database user>:<database password>@127.0.0.1:5432/<database name>
export ELASTICSEARCH_URL=http://<elastic user>:<elastic password>@127.0.0.1:9200
~~~

7. Run the migrations, load the example data, and build the search index.

~~~bash
python manage.py migrate
python manage.py loaddata apps/fixtures/dump.json
python manage.py search_index --rebuild -f
~~~

### Running local development server

Run the development under https to avoid mix content errors. Note: this will generate a self-signed certificate. There are ways to tell your browser to trust these certs, but that is beyond the scope of this README.

~~~bash
DJANGO_ENV=develop python manage.py runserver_plus --cert-file cert.crt  0.0.0.0:3000
~~~

### Running the tests

[![Coverage Status](https://coveralls.io/repos/github/ecds/readux/badge.svg?branch=release)](https://coveralls.io/github/ecds/readux?branch=release)

Readux uses Django's default test framework, but is configured to use pytest.

Your database user will need to be able to create a database:

~~~bash
alter user readux createdb;
~~~

To run the tests, simply run:

~~~bash
DJANGO_ENV=test pytest apps/
~~~

Readux is configured to use [CircleCI](https://app.circleci.com/pipelines/github/ecds/readux). Any push will trigger build.

### Deploy

For dev:

~~~bash
fab deploy:branch=develop,path=/data/readux -H <IP>
~~~

For public alpha:

~~~bash
fab deploy:branch=release,path=/data/readux.io -H <IP>
~~~

Note: if no branch is passed, the deploy will default to release.

### Start Background Job

A background job needs to be started to handel creating the static site zip export and notify the person when the export is ready to be downloaded. The job also cleans up the export after 24 hours.

There are many ways to background a job. For example:

~~~bash
nohup python manage.py process_tasks &
~~~

## Contribute

We use the [Git-Flow](https://danielkummer.github.io/git-flow-cheatsheet/) branching model. Please submit pull requests against the develop branch.

### Code of conduct

[Code of Conduct](CODE_OF_CONDUCT.md)

## Tech/framework used

[![Build with Cookiecutter Django](https://img.shields.io/badge/built%20with-Cookiecutter%20Django-ff69b4.svg)](https://github.com/pydanny/cookiecutter-django/)

[Mirador](http://projectmirador.org/) for displaying and annotating [IIIF](http://iiif.io) images.

??? for exporting.

## License

This software is distributed under the Apache 2.0 License.

## Autocomplete

Use the fork of Wagtail Autocomplete because of UUID. https://github.com/jcmundy/wagtail-autocomplete

## When importing with Import-Export

Import Collections, then Manifests, then I Servers, then Canvases.  Annotations will populate based on Canvases.
When importing collections, images for the "Original" field must already be in the apps/media/originals/ folder.  List `originals/filename.jpg` in the column for original.


=======
redrock
=======

|Actions Status| |Coveralls Status| |Documentation Status|

.. |Actions Status| image:: https://github.com/desihub/redrock/workflows/CI/badge.svg
    :target: https://github.com/desihub/redrock/actions
    :alt: GitHub Actions CI Status

.. |Coveralls Status| image:: https://coveralls.io/repos/desihub/redrock/badge.svg
    :target: https://coveralls.io/github/desihub/redrock
    :alt: Test Coverage Status

.. |Documentation Status| image:: https://readthedocs.org/projects/redrock/badge/?version=latest
    :target: https://redrock.readthedocs.io/en/latest/
    :alt: Documentation Status

Introduction
------------

Redshift fitting for spectroperfectionism.

Installation
------------

To install::

    git clone https://github.com/desihub/redrock
    cd redrock
    git clone https://github.com/desihub/redrock-templates py/redrock/templates
    python setup.py install

That will install the templates with the code.  Alternatively, the templates
can be put elsewhere and set ``$RR_TEMPLATE_DIR`` to that location.

We recommend users see details of ``rrdesi`` before running ``redrock`` to understand the arguments in more detail.

Run::

    rrdesi --help

Running Redrock on desi spectra
-------------------------------

**1) Without Archetypes**::

    rrdesi -i <spectra_file> -o <output_file> -d <details_file.h5>

**2) With Archetypes**::

In archetype mode, redrock can be run either with one particular archetype file (e.g., GALAXY, QSO or STAR), or you can also provide the directory that contains archetypes for different spectral classes.

You can also define your own set of archetypes. However, users must follow the file structure of redrock archetypes. To start with, the user should clone the following repository to run redrock in Archetype mode.::

    git clone https://github.com/abhi0395/new-archetypes.git

Or::

    git clone https://github.com/desihub/redrock-archetypes.git

In summary, the archetypes method uses a combination of physical galaxy spectra and Legendre polynomials to construct a new set of templates and then solve for the coefficients using the bounded value least square method for a few redshifts defined by ``--nminima``.

The method solves for the coefficients of the Legendre polynomials in each camera (b, r, z cameras of desi, ``--archetype-legendre-percamera`` keyword is introduced for that). Another argument is ``--archetype-legendre-prior``, which can be prescribed to add a prior while solving for the coefficients (e.g. ``--archetype-legendre-prior 0.1``). If ``--archetype-legendre-degree 0`` is provided, the method will only use archetypes to fit the spectra; no Legendre polynomials will be used. Note that a single ``--archetypes-no-legendre`` flag will deactivate all other archetype and legendre-related flags.

If you do not want to use default values, you should separately provide those arguments without the ``--archetypes-no-legendre`` flag.

Example run (with all the default values)::

    rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d <details_file.h5>

Example run (with no archetype related default values)::

    rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d <details_file.h5> --archetypes-no-legendre

**3) Archetypes + Nearest neighbours (in chi2 space) approach**::

Similar to archetypes (method - 2), it also looks for the nearest neighbours of the best archetypes in chi2 space, selects a few nearest neighbours (input provided by the user, ``--archetype-nnearest``) and then constructs a new set of templates combining these archetypes and Legendre polynomials to fit the galaxy spectra as described above.

Example run::

    rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d  <details_file.h5> --archetype-nnearest 2

For comment or help regarding archetypes, please contact AbhijeetAnand [at] lbl.gov

License
-------

redrock is free software licensed under a 3-clause BSD-style license. For details see
the ``LICENSE.rst`` file.

| Stephen Bailey & David Schlegel
| Lawrence Berkeley National Lab
| Spring 2017


# MarkdownEditing

**Markdown plugin for Sublime Text**

![MarkdownEditing][preview]

with...

*   useful Markdown editing features for Sublime Text
*   color schemes optimized for writing
*   robust syntax definitions for
    -   Standard Markdown
    -   Github flavored Markdown
    -   MultiMarkdown

Please visit [User Guide][UserGuide] to learn more about the full set of features and how to use them.

## Features

### Folding and Navigation

*   displays headings in _Goto Symbol..._
*   displays headings in _Goto Symbol in Project..._
*   fold current section
*   fold by heading levels
*   navigate between adjacent headings with `Find Next/Previous Heading` command.

### Headings

*   automatic detection and maintenance of open or closed [atx headings][AtxHeadings] style while typing
*   change [headings levels][HeadingsLevels] via key bindings
*   auto-complete [Setext-style headings][SeHeadings] underlines
*   convert [Setext-style headings][SeHeadings] to ATX headings
*   new documents are named automatically based on first header

### Lists

*   At the end of a list item, pressing Enter will automatically insert the new list item bullet.
*   Pressing Tab on the blank list item will indent it and switch the list bullet to another one (Order is `*`, `-`, `+` in a cycle).
*   Pressing Shift + Tab on the blank list item will unindent it in the same way as above.
*   Sequential Tab s or Shift Tab s are supported.
*   You can disable automatic bullet switching or choose which bullets to be used, in your settings file (`mde.list_indent_bullets`).
*   If a list item contains a [GFM Task][], pressing
    - Enter at the end of the line continues with a new blank task.
    - Alt+X in the line toggles the check mark.

### Blockquotes

*   At the end of a blockquote line, pressing Enter will automatically extend blockquote.
*   Selecting some text and pressing > will convert it to blockquote. The first and the last line don't have to be fully selected; partial select works, too.

### Critic Markup

*   Syntax highlighting for inline critic markup
    -   `{++ addition ++}`
    -   `{>> comment <<}`
    -   `{-- deletion --}`
    -   `{== highlight==}{>> comment <<}`
    -   `{~~ substitution ~> by ~~}`
*   Reviewers can add critic via key bindings
*   Authors can accept or reject critic via key bindings

### Links and References

*   Left bracket pairing is modified to eliminate the selection and leave the cursor at a point where you can insert a `[]` or `()` pair for a link.
*   URL part of images, links and references is automatically folded if caret is not within brackets
*   Convert inline links to references
*   Jump between definitions and references
*   Organize references
*   Add or remove footnotes

### Text Formatting

*   Asterisks (\*), backticks (\`) and underscores (\_) are auto-paired and wrap selected text
*   ~ wraps selected text with `~~` (strike-through)
*   Backspace deletes an empty pair
*   Space or Tab deletes right element of empty pair of asterisks or underscores

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

## Credits

MarkdownEditing was originally created by [Brett Terpstra][] and has become a community project with the goal of consolidating the best features from the varied collection of Markdown packages for Sublime Text.

Related blog posts from Brett:

*   http://brettterpstra.com/2012/05/17/markdown-editing-for-sublime-text-2-humble-beginnings
*   http://brettterpstra.com/2013/11/23/markdownediting-for-sublime-text-updates

Development was headed by [Ali Ayas][] and [Felix Hao][] until early 2021.

Current development is headed up by [DeathAxe][].

This plugin contains portions of code from [Knockdown][].

Footnote commands were submitted by [J. Nicholas Geist][] and originated at [geekabouttown][].

## License

MarkdownEditing is released under the [MIT License][opensource].

[preview]: docs/img/preview.png
[Knockdown]: https://github.com/aziz/knockdown
[geekabouttown]: http://geekabouttown.com/posts/sublime-text-2-markdown-footnote-goodness
[opensource]: http://www.opensource.org/licenses/MIT
[UserGuide]: https://sublimetext-markdown.github.io/MarkdownEditing
[AtxHeadings]: docs/usage.md#atx-style
[HeadingsLevels]: docs/usage.md#headings-levels
[SeHeadings]: docs/usage.md#setext-style
[GFM Task]: https://github.github.com/gfm/#task-list-items-extension-

[Ali Ayas]: https://github.com/maliayas
[Brett Terpstra]: http://brettterpstra.com
[DeathAxe]: https://github.com/deathaxe
[Felix Hao]: https://github.com/felixhao28
[J. Nicholas Geist]: https://github.com/jngeist


Reticulum Network Stack β
==========

Reticulum is the cryptography-based networking stack for building local and wide-area
networks with readily available hardware. It can operate even with very high latency
and extremely low bandwidth. Reticulum allows you to build wide-area networks
with off-the-shelf tools, and offers end-to-end encryption and connectivity,
initiator anonymity, autoconfiguring cryptographically backed multi-hop
transport, efficient addressing, unforgeable delivery acknowledgements and
more.

The vision of Reticulum is to allow anyone to be their own network operator,
and to make it cheap and easy to cover vast areas with a myriad of independent,
inter-connectable and autonomous networks. Reticulum **is not** *one* network.
It is **a tool** for building *thousands of networks*. Networks without
kill-switches, surveillance, censorship and control. Networks that can freely
interoperate, associate and disassociate with each other, and require no
central oversight. Networks for human beings. *Networks for the people*.

Reticulum is a complete networking stack, and does not rely on IP or higher
layers, but it is possible to use IP as the underlying carrier for Reticulum.
It is therefore trivial to tunnel Reticulum over the Internet or private IP
networks.

Having no dependencies on traditional networking stacks frees up overhead that
has been used to implement a networking stack built directly on cryptographic
principles, allowing resilience and stable functionality, even in open and
trustless networks.

No kernel modules or drivers are required. Reticulum runs completely in
userland, and can run on practically any system that runs Python 3.

## Read The Manual
The full documentation for Reticulum is available at [markqvist.github.io/Reticulum/manual/](https://markqvist.github.io/Reticulum/manual/).

You can also download the [Reticulum manual as a PDF](https://github.com/markqvist/Reticulum/raw/master/docs/Reticulum%20Manual.pdf) or [as an e-book in EPUB format](https://github.com/markqvist/Reticulum/raw/master/docs/Reticulum%20Manual.epub).

For more info, see [reticulum.network](https://reticulum.network/)

## Notable Features
- Coordination-less globally unique addressing and identification
- Fully self-configuring multi-hop routing
- Initiator anonymity, communicate without revealing your identity
- Asymmetric X25519 encryption and Ed25519 signatures as a basis for all communication
- Forward Secrecy with ephemeral Elliptic Curve Diffie-Hellman keys on Curve25519
- Reticulum uses the following format for encrypted tokens:
  - Keys are ephemeral and derived from an ECDH key exchange on Curve25519
  - AES-128 in CBC mode with PKCS7 padding
  - HMAC using SHA256 for authentication
  - IVs are generated through os.urandom()
- Unforgeable packet delivery confirmations
- A variety of supported interface types
- An intuitive and easy-to-use API
- Reliable and efficient transfer of arbitrary amounts of data
  - Reticulum can handle a few bytes of data or files of many gigabytes
  - Sequencing, transfer coordination and checksumming are automatic
  - The API is very easy to use, and provides transfer progress
- Lightweight, flexible and expandable Request/Response mechanism
- Efficient link establishment
  - Total cost of setting up an encrypted and verified link is only 3 packets, totalling 297 bytes
  - Low cost of keeping links open at only 0.44 bits per second
- Reliable sequential delivery with Channel and Buffer mechanisms

## Roadmap
While Reticulum is already a fully featured and functional networking stack,
many improvements and additions are actively being worked on, and planned for the future.

To learn more about the direction and future of Reticulum, please see the [Development Roadmap](./Roadmap.md).

## Examples of Reticulum Applications
If you want to quickly get an idea of what Reticulum can do, take a look at the
following resources.

- You can use the [rnsh](https://github.com/acehoss/rnsh) program to establish remote shell sessions over Reticulum.
- [LXMF](https://github.com/markqvist/lxmf) is a distributed, delay and disruption tolerant message transfer protocol built on Reticulum
- For an off-grid, encrypted and resilient mesh communications platform, see [Nomad Network](https://github.com/markqvist/NomadNet)
- The Android, Linux, macOS and Windows app [Sideband](https://github.com/markqvist/Sideband) has a graphical interface and focuses on ease of use.
- [MeshChat](https://github.com/liamcottle/reticulum-meshchat) is a user-friendly LXMF client, that also supports voice calls.

## Where can Reticulum be used?
Over practically any medium that can support at least a half-duplex channel
with greater throughput than 5 bits per second, and an MTU of 500 bytes. Data radios,
modems, LoRa radios, serial lines, AX.25 TNCs, amateur radio digital modes,
WiFi and Ethernet devices, free-space optical links, and similar systems are
all examples of the types of physical devices Reticulum can use.

An open-source LoRa-based interface called
[RNode](https://markqvist.github.io/Reticulum/manual/hardware.html#rnode) has
been designed specifically for use with Reticulum. It is possible to build
yourself, or it can be purchased as a complete transceiver that just needs a
USB connection to the host.

Reticulum can also be encapsulated over existing IP networks, so there's
nothing stopping you from using it over wired Ethernet, your local WiFi network
or the Internet, where it'll work just as well. In fact, one of the strengths
of Reticulum is how easily it allows you to connect different mediums into a
self-configuring, resilient and encrypted mesh, using any available mixture of
available infrastructure.

As an example, it's possible to set up a Raspberry Pi connected to both a LoRa
radio, a packet radio TNC and a WiFi network. Once the interfaces are
configured, Reticulum will take care of the rest, and any device on the WiFi
network can communicate with nodes on the LoRa and packet radio sides of the
network, and vice versa.

## How do I get started?
The best way to get started with the Reticulum Network Stack depends on what
you want to do. For full details and examples, have a look at the
[Getting Started Fast](https://markqvist.github.io/Reticulum/manual/gettingstartedfast.html)
section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).

To simply install Reticulum and related utilities on your system, the easiest way is via `pip`.
You can then start any program that uses Reticulum, or start Reticulum as a system service with
[the rnsd utility](https://markqvist.github.io/Reticulum/manual/using.html#the-rnsd-utility).

```bash
pip install rns
```

If you are using an operating system that blocks normal user package installation via `pip`,
you can return `pip` to normal behaviour by editing the `~/.config/pip/pip.conf` file,
and adding the following directive in the `[global]` section:

```text
[global]
break-system-packages = true
```

Alternatively, you can use the `pipx` tool to install Reticulum in an isolated environment:

```bash
pipx install rns
```

When first started, Reticulum will create a default configuration file,
providing basic connectivity to other Reticulum peers that might be locally
reachable. The default config file contains a few examples, and references for
creating a more complex configuration.

If you have an old version of `pip` on your system, you may need to upgrade it first with `pip install pip --upgrade`. If you no not already have `pip` installed, you can install it using the package manager of your system with `sudo apt install python3-pip` or similar.

For more detailed examples on how to expand communication over many mediums such
as packet radio or LoRa, serial ports, or over fast IP links and the Internet using
the UDP and TCP interfaces, take a look at the [Supported Interfaces](https://markqvist.github.io/Reticulum/manual/interfaces.html)
section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).

## Included Utilities
Reticulum includes a range of useful utilities for managing your networks,
viewing status and information, and other tasks. You can read more about these
programs in the [Included Utility Programs](https://markqvist.github.io/Reticulum/manual/using.html#included-utility-programs)
section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).

- The system daemon `rnsd` for running Reticulum as an always-available service
- An interface status utility called `rnstatus`, that displays information about interfaces
- The path lookup and management tool `rnpath` letting you view and modify path tables
- A diagnostics tool called `rnprobe` for checking connectivity to destinations
- A simple file transfer program called `rncp` making it easy to transfer files between systems
- The identity management and encryption utility `rnid` let's you manage Identities and encrypt/decrypt files
- The remote command execution program `rnx` let's you run commands and
  programs and retrieve output from remote systems

All tools, including `rnx` and `rncp`, work reliably and well even over very
low-bandwidth links like LoRa or Packet Radio. For full-featured remote shells
over Reticulum, also have a look at the [rnsh](https://github.com/acehoss/rnsh)
program.

## Supported interface types and devices

Reticulum implements a range of generalised interface types that covers most of
the communications hardware that Reticulum can run over. If your hardware is
not supported, it's relatively simple to implement an interface class. I will
gratefully accept pull requests for custom interfaces if they are generally
useful.

Currently, the following interfaces are supported:

- Any Ethernet device
- LoRa using [RNode](https://unsigned.io/rnode/)
- Packet Radio TNCs (with or without AX.25)
- KISS-compatible hardware and software modems
- Any device with a serial port
- TCP over IP networks
- UDP over IP networks
- External programs via stdio or pipes
- Custom hardware via stdio or pipes

## Performance
Reticulum targets a *very* wide usable performance envelope, but prioritises
functionality and performance on low-bandwidth mediums. The goal is to
provide a dynamic performance envelope from 250 bits per second, to 1 gigabit
per second on normal hardware.

Currently, the usable performance envelope is approximately 150 bits per second
to 40 megabits per second, with physical mediums faster than that not being
saturated. Performance beyond the current level is intended for future
upgrades, but not highly prioritised at this point in time.

## Current Status
Reticulum should currently be considered beta software. All core protocol
features are implemented and functioning, but additions will probably occur as
real-world use is explored. There will be bugs. The API and wire-format can be
considered relatively stable at the moment, but could change if warranted.

## Dependencies
The installation of the default `rns` package requires the dependencies listed
below. Almost all systems and distributions have readily available packages for
these dependencies, and when the `rns` package is installed with `pip`, they
will be downloaded and installed as well.

- [PyCA/cryptography](https://github.com/pyca/cryptography)
- [pyserial](https://github.com/pyserial/pyserial)

On more unusual systems, and in some rare cases, it might not be possible to
install or even compile one or more of the above modules. In such situations,
you can use the `rnspure` package instead, which require no external
dependencies for installation. Please note that the contents of the `rns` and
`rnspure` packages are *identical*. The only difference is that the `rnspure`
package lists no dependencies required for installation.

No matter how Reticulum is installed and started, it will load external
dependencies only if they are *needed* and *available*. If for example you want
to use Reticulum on a system that cannot support
[pyserial](https://github.com/pyserial/pyserial), it is perfectly possible to
do so using the `rnspure` package, but Reticulum will not be able to use
serial-based interfaces. All other available modules will still be loaded when
needed.

**Please Note!** If you use the `rnspure` package to run Reticulum on systems
that do not support [PyCA/cryptography](https://github.com/pyca/cryptography),
it is important that you read and understand the [Cryptographic
Primitives](#cryptographic-primitives) section of this document.

## Public Testnet
If you just want to get started experimenting without building any physical
networks, you are welcome to join the RNS Development Testnet.

The testnet is just that, an informal network for testing and experimenting.
It will be up most of the time, and anyone can join, but it also means that
there's no guarantees for service availability.

It probably goes without saying, but *don't use the testnet entry-points as
hardcoded or default interfaces in any applications you ship to users*. When
shipping applications, the best practice is to provide your own default
connectivity solutions, if needed and applicable, or in most cases, simply
leave it up to the user which networks to connect to, and how.

The testnet runs the very latest version of Reticulum (often even a short while
before it is publicly released). Sometimes experimental versions of Reticulum
might be deployed to nodes on the testnet, which means strange behaviour might
occur. If none of that scares you, you can join the testnet via either TCP or
I2P. Just add one of the following interfaces to your Reticulum configuration
file:

```
# TCP/IP interface to the RNS Amsterdam Hub
  [[RNS Testnet Amsterdam]]
    type = TCPClientInterface
    enabled = yes
    target_host = amsterdam.connect.reticulum.network
    target_port = 4965

# TCP/IP interface to the BetweenTheBorders Hub (community-provided)
  [[RNS Testnet BetweenTheBorders]]
    type = TCPClientInterface
    enabled = yes
    target_host = betweentheborders.com
    target_port = 4242

# Interface to Testnet I2P Hub
  [[RNS Testnet I2P Hub]]
    type = I2PInterface
    enabled = yes
    peers = g3br23bvx3lq5uddcsjii74xgmn6y5q325ovrkq2zw2wbzbqgbuq.b32.i2p
```

The testnet also contains a number of [Nomad Network](https://github.com/markqvist/nomadnet) nodes, and LXMF propagation nodes.

## Support Reticulum
You can help support the continued development of open, free and private communications systems by donating via one of the following channels:

- Monero:
  ```
  84FpY1QbxHcgdseePYNmhTHcrgMX4nFfBYtz2GKYToqHVVhJp8Eaw1Z1EedRnKD19b3B8NiLCGVxzKV17UMmmeEsCrPyA5w
  ```
- Ethereum
  ```
  0xFDabC71AC4c0C78C95aDDDe3B4FA19d6273c5E73
  ```
- Bitcoin
  ```
  35G9uWVzrpJJibzUwpNUQGQNFzLirhrYAH
  ```
- Ko-Fi: https://ko-fi.com/markqvist

Are certain features in the development roadmap are important to you or your
organisation? Make them a reality quickly by sponsoring their implementation.

## Cryptographic Primitives
Reticulum uses a simple suite of efficient, strong and modern cryptographic
primitives, with widely available implementations that can be used both on
general-purpose CPUs and on microcontrollers. The necessary primitives are:

- Ed25519 for signatures
- X22519 for ECDH key exchanges
- HKDF for key derivation
- Modified Fernet for encrypted tokens
  - AES-128 in CBC mode
  - HMAC for message authentication
  - No Fernet version and timestamp fields
- SHA-256
- SHA-512

In the default installation configuration, the `X25519`, `Ed25519` and
`AES-128-CBC` primitives are provided by [OpenSSL](https://www.openssl.org/)
(via the [PyCA/cryptography](https://github.com/pyca/cryptography) package).
The hashing functions `SHA-256` and `SHA-512` are provided by the standard
Python [hashlib](https://docs.python.org/3/library/hashlib.html). The `HKDF`,
`HMAC`, `Fernet` primitives, and the `PKCS7` padding function are always
provided by the following internal implementations:

- [HKDF.py](RNS/Cryptography/HKDF.py)
- [HMAC.py](RNS/Cryptography/HMAC.py)
- [Fernet.py](RNS/Cryptography/Fernet.py)
- [PKCS7.py](RNS/Cryptography/PKCS7.py)

Reticulum also includes a complete implementation of all necessary primitives
in pure Python. If OpenSSL & PyCA are not available on the system when
Reticulum is started, Reticulum will instead use the internal pure-python
primitives. A trivial consequence of this is performance, with the OpenSSL
backend being *much* faster. The most important consequence however, is the
potential loss of security by using primitives that has not seen the same
amount of scrutiny, testing and review as those from OpenSSL.

If you want to use the internal pure-python primitives, it is **highly
advisable** that you have a good understanding of the risks that this pose, and
make an informed decision on whether those risks are acceptable to you.

Reticulum is relatively young software, and should be considered as such. While
it has been built with cryptography best-practices very foremost in mind, it
_has not_ been externally security audited, and there could very well be
privacy or security breaking bugs. If you want to help out, or help sponsor an
audit, please do get in touch.

## Acknowledgements & Credits
Reticulum can only exist because of the mountain of Open Source work it was
built on top of, the contributions of everyone involved, and everyone that has
supported the project through the years. To everyone who has helped, thank you
so much.

A number of other modules and projects are either part of, or used by
Reticulum. Sincere thanks to the authors and contributors of the following
projects:

- [PyCA/cryptography](https://github.com/pyca/cryptography), *BSD License*
- [Pure-25519](https://github.com/warner/python-pure25519) by [Brian Warner](https://github.com/warner), *MIT License*
- [Pysha2](https://github.com/thomdixon/pysha2) by [Thom Dixon](https://github.com/thomdixon), *MIT License*
- [Python-AES](https://github.com/orgurar/python-aes) by [Or Gur Arie](https://github.com/orgurar), *MIT License*
- [Curve25519.py](https://gist.github.com/nickovs/cc3c22d15f239a2640c185035c06f8a3#file-curve25519-py) by [Nicko van Someren](https://gist.github.com/nickovs), *Public Domain*
- [I2Plib](https://github.com/l-n-s/i2plib) by [Viktor Villainov](https://github.com/l-n-s)
- [PySerial](https://github.com/pyserial/pyserial) by Chris Liechti, *BSD License*
- [Configobj](https://github.com/DiffSK/configobj) by Michael Foord, Nicola Larosa, Rob Dennis & Eli Courtwright, *BSD License*
- [Six](https://github.com/benjaminp/six) by [Benjamin Peterson](https://github.com/benjaminp), *MIT License*
- [ifaddr](https://github.com/pydron/ifaddr) by [Pydron](https://github.com/pydron), *MIT License*
- [Umsgpack.py](https://github.com/vsergeev/u-msgpack-python) by [Ivan A. Sergeev](https://github.com/vsergeev)
- [Python](https://www.python.org)


SublimeLinter
=============

[![tests](https://github.com/SublimeLinter/SublimeLinter/actions/workflows/test.yml/badge.svg)](https://github.com/SublimeLinter/SublimeLinter/actions/workflows/test.yml)

The code linting framework for [Sublime Text](http://sublimetext.com/).
No linters included: get them via [Package Control](https://packagecontrol.io/search/SublimeLinter).

## Installation

> [!NOTE]
> The current stable version of Sublime Text, Build 4169, has a bug and cannot install
> SublimeLinter without requiring a restart.  You're fine if you have a later dev build, e.g.
> build 4173.

> [!NOTE]
>
> We're in a transition phase to the newer ST4 plugin host.  Unless we have
> more experience for the process, it _may_ be necessary to restart Sublime Text
> after installing or upgrading _helper packages_.  Just check if everything works
> or if the console shows permanent errors.  On my machine, no restarts were
> necessary.

Probably don't get fancy and just install SublimeLinter via [Package Control](https://packagecontrol.io/search/SublimeLinter).
Refer <https://www.sublimelinter.com/en/latest/installation.html> for further information,
but, spoiler!,
usually you install SublimeLinter, the plugin you're currently looking at,
some command line tools, these are the actual linters (e.g. _eslint_ or _flake8_),
and then some plugins/adapters between both.
These are typically named after the linter and should be installed via Package Control
as well, examples would be [SublimeLinter-eslint](https://packagecontrol.io/packages/SublimeLinter-eslint) or [SublimeLinter-flake8](https://packagecontrol.io/packages/SublimeLinter-flake8).

By default, SublimeLinter will run in the background and most linters support this
mode so you should get squiggles immediately.

Note that you find all commands we're installing using the Command Palette (ctrl+shift+p). Just search for `SublimeLinter`. You may find <https://github.com/kaste/SublimeLinter-addon-toggler>
and/or <https://github.com/kaste/SublimeLinter-addon-goto-flash> useful.

## Settings

Settings are documented in the [default settings](https://github.com/SublimeLinter/SublimeLinter/blob/master/SublimeLinter.sublime-settings).
Open the settings using the Command Palette (ctrl+shift+p) searching for `Preferences: SublimeLinter Settings` (mnemonic: `sls`).

When you open the SublimeLinter settings you'll see the defaults on the left
or top. Usually that's all that is needed for end-users but some additional information
is in our docs at [sublimelinter.com](https://www.sublimelinter.com/en/latest/linter_settings.html).

## Key Bindings

SublimeLinter comes with some pre-defined keyboard shortcuts. You can customize these via the Package Settings menu.

| Command | Linux & Windows | MacOS |
|---|---|---|
| Lint this view | Ctrl + k, l | Ctrl + ⌘ + l |
| Open diagnostics panel | Ctrl + k, a | Ctrl + ⌘ + a |
| Goto next error | Ctrl + k, n | Ctrl + ⌘ + e |
| Goto prev error | Ctrl + k, p | Ctrl + ⌘ + Shift + e |

Take also a look at the [default bindings](<https://github.com/SublimeLinter/SublimeLinter/blob/master/keymaps/Default (Windows).sublime-keymap>) because
we document other commands and have usually some tricks in there too.

For example, it is very advisable to bind `sublime_linter_quick_actions`, e.g.

```jsonc
    // To trigger a quick action
    // { "keys": ["ctrl+k", "ctrl+f"],
    //   "command": "sublime_linter_quick_actions"
    // },
```

## Quick Actions/Fixers

As we do *just* linting SublimeLinter naturally does not come with fixers
and/or code formatters. However, we have a fixer API, see the Command Palette: `SublimeLinter: Quick Action`, and ship (mostly)
"fix by ignoring" actions. These allow you to quickly ignore specific error messages *inline* and ad hoc.[1]

SublimeLinter currently ships actions for
[eslint](https://github.com/SublimeLinter/SublimeLinter-eslint),
[stylelint](https://github.com/SublimeLinter/SublimeLinter-stylelint),
[flake8](https://github.com/SublimeLinter/SublimeLinter-flake8),
[mypy](https://github.com/fredcallaway/SublimeLinter-contrib-mypy),
shellcheck,
[codespell](https://github.com/kaste/SublimeLinter-contrib-codespell)
and
[phpcs](https://github.com/SublimeLinter/SublimeLinter-phpcs).

Want to see actions for your favourite linter? Please open a PR with your addition to
[quick_fix.py](https://github.com/SublimeLinter/SublimeLinter/blob/master/lint/quick_fix.py).
We have [tests](https://github.com/SublimeLinter/SublimeLinter/tree/master/tests/test_ignore_fixers.py) for them!

[1]  Why this limitation though? Well it is usually easy to add a semicolon here and a space there, but the inline ignore rules and syntaxes are very cumbersome to type and to remember. And there is basically no project of any size where you don't have to ignore ad-hoc something somewhere once.

## Support & Bugs

Yeah, totally! Often if it doesn't work, Sublime will have something in the
console (*View -> Show Console*). Warnings will go there by default.

You can enable `debug` mode in the settings to get much more information about what's going on.
Especially seeing the exact command and working dir SublimeLinter will use
should be noted and helpful.

As some code only runs on startup, it is good practice to restart Sublime Text
and to examine the console output for anything odd.

If your issue is specific to a particular linter, please report it on that linter's repository,
otherwise open it right [here](https://github.com/SublimeLinter/SublimeLinter/issues).

## Hack on it

Sure, you're welcome! Just clone the repository into your Packages folder (*Preferences -> Browse Packages*).

```shell
> git clone https://github.com/SublimeLinter/SublimeLinter.git
> subl SublimeLinter
```

This will overrule the installed package straight away.  Just delete the folder
to reverse the process.  The dev requirements can be read in the `pyproject.toml` file.
Just use `rye` and install them:

```shell
> rye sync
```

## Creating a linter plugin

Use the [template](https://github.com/SublimeLinter/SublimeLinter-template) to get started on your plugin.
It contains a how-to with all the information you need. Refer to <https://www.sublimelinter.com/en/master/linter_plugin.html> for more detailed information. Of course, take a look at a similar linter plugin and let it inspire you.

## Also Support :heart:

SublimeLinter is the kind of software that needs active maintenance all the time.
If you find SublimeLinter helpful and would like to show your appreciation, you can support
its development by buying me a coffee! :smile::coffee: <https://paypal.me/herrkaste>

:smirk:


# ![AmpliGraph](docs/img/ampligraph_logo_transparent_300.png)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2595043.svg)](https://doi.org/10.5281/zenodo.2595043)

[![Documentation Status](https://readthedocs.org/projects/ampligraph/badge/?version=latest)](http://ampligraph.readthedocs.io/?badge=latest)

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Accenture/AmpliGraph/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Accenture/AmpliGraph/tree/main)

[Join the conversation on Slack](https://join.slack.com/t/ampligraph/shared_invite/enQtNTc2NTI0MzUxMTM5LTRkODk0MjI2OWRlZjdjYmExY2Q3M2M3NGY0MGYyMmI4NWYyMWVhYTRjZDhkZjA1YTEyMzBkMGE4N2RmNTRiZDg)
![](docs/img/slack_logo.png)

**Open source library based on TensorFlow that predicts links between concepts in a knowledge graph.**

**AmpliGraph** is a suite of neural machine learning models for relational Learning, a branch of machine learning
that deals with supervised learning on knowledge graphs.

**Use AmpliGraph if you need to**:

* Discover new knowledge from an existing knowledge graph.
* Complete large knowledge graphs with missing statements.
* Generate stand-alone knowledge graph embeddings.
* Develop and evaluate a new relational model.

AmpliGraph's machine learning models generate **knowledge graph embeddings**, vector representations of concepts in a metric space:

![](docs/img/kg_lp_step1.png)

It then combines embeddings with model-specific scoring functions to predict unseen and novel links:

![](docs/img/kg_lp_step2.png)

## AmpliGraph 2.0.0 is now available!
The new version features TensorFlow 2 back-end and Keras style APIs that makes it faster, easier to use and
extend the support for multiple features. Further, the data input/output pipeline has changed, and the support for
some obsolete models was discontinued.
 See the Changelog for a more thorough list of changes.

## Key Features

* **Intuitive APIs**: AmpliGraph APIs are designed to reduce the code amount required to learn models that predict links in knowledge graphs. The new version AmpliGraph 2 APIs are in Keras style, making the user experience even smoother.
* **GPU-Ready**: AmpliGraph 2 is based on TensorFlow 2, and it is designed to run seamlessly on CPU and GPU devices - to speed-up training.
* **Extensible**: Roll your own knowledge graph embeddings model by extending AmpliGraph base estimators.

## Modules

AmpliGraph includes the following submodules:

* **Datasets**: helper functions to load datasets (knowledge graphs).
* **Models**: knowledge graph embedding models. AmpliGraph 2 contains **TransE**, **DistMult**, **ComplEx**, **HolE** (More to come!)
* **Evaluation**: metrics and evaluation protocols to assess the predictive power of the models.
* **Discovery**: High-level convenience APIs for knowledge discovery (discover new facts, cluster entities, predict near duplicates).
* **Compat**: submodule that extends the compatibility of AmpliGraph 2 APIs to those of AmpliGraph 1.x for the user already familiar with them.

## Installation

### Prerequisites

* Linux, macOS, Windows
* Python ≥ 3.8

### Provision a Virtual Environment

To provision a virtual environment for installing AmpliGraph, any option can work; here we will give provide the
instruction for using `venv` and `Conda`.

#### venv

The first step is to create and activate the virtual environment.

```
python3.8 -m venv PATH/TO/NEW/VIRTUAL_ENVIRONMENT
source PATH/TO/NEW/VIRTUAL_ENVIRONMENT/bin/activate
```

Once this is done, we can proceed with the installation of TensorFlow 2:

```
pip install "tensorflow==2.9.0"
```

If you are installing Tensorflow on MacOS, instead of the following please use:

```
pip install "tensorflow-macos==2.9.0"
```

**IMPORTANT**: the installation of TensorFlow can be tricky on Mac OS with the Apple silicon chip. Though `venv` can
provide a smooth experience, we invite you to refer to the [dedicated section](#install-tensorflow-2-for-mac-os-m1-chip)
down below and consider using `conda` if some issues persist in alignment with the
[Tensorflow Plugin page on Apple developer site](https://developer.apple.com/metal/tensorflow-plugin/).

#### Conda

The first step is to create and activate the virtual environment.

```
conda create --name ampligraph python=3.8
source activate ampligraph
```

Once this is done, we can proceed with the installation of TensorFlow 2, which can be done through `pip` or `conda`.

```
pip install "tensorflow==2.9.0"

or

conda install "tensorflow==2.9.0"
```

#### Install TensorFlow 2 for Mac OS M1 chip

When installing TensorFlow 2 for Mac OS with Apple silicon chip we recommend to use a conda environment.

```
conda create --name ampligraph python=3.8
source activate ampligraph
```

After having created and activated the virtual environment, run the following to install Tensorflow.

```
conda install -c apple tensorflow-deps
pip install --user tensorflow-macos==2.9.0
pip install --user tensorflow-metal==0.6
```

In case of problems with the installation or for further details, refer to
[Tensorflow Plugin page](https://developer.apple.com/metal/tensorflow-plugin/) on the official Apple developer website.

### Install AmpliGraph

Once the installation of Tensorflow is complete, we can proceed with the installation of AmpliGraph.

To install the latest stable release from pip:

```
pip install ampligraph
```

To sanity check the installation, run the following:

```python
>>> import ampligraph
>>> ampligraph.__version__
'2.1.0'
```

If instead you want the most recent development version, you can clone the repository from
[GitHub](https://github.com/Accenture/AmpliGraph.git), install AmpliGraph from source and checkout the `develop`
branch. In this way, your local working copy will be on the latest commit on the `develop` branch.

```
git clone https://github.com/Accenture/AmpliGraph.git
cd AmpliGraph
git checkout develop
pip install -e .
```
Notice that the code snippet above installs the library in editable mode (`-e`).

To sanity check the installation run the following:

```python
>>> import ampligraph
>>> ampligraph.__version__
'2.1-dev'
```

## Predictive Power Evaluation (MRR Filtered)

AmpliGraph includes implementations of TransE, DistMult, ComplEx, HolE and RotatE. Versions <2.0 also includes ConvE,
and ConvKB.
Their predictive power is reported below and compared against the state-of-the-art results in literature.
[More details available here](https://docs.ampligraph.org/en/latest/experiments.html).

|                              | FB15K-237 | WN18RR    | YAGO3-10 | FB15k      | WN18      |
|------------------------------|-----------|-----------|----------|------------|-----------|
| Literature Best              | **0.35*** | 0.48*     | 0.49*    | **0.84**** | **0.95*** |
| TransE                       | 0.31      | 0.22      | **0.50** | 0.62       | 0.66      |
| DistMult                     | 0.30      | 0.47      | 0.48     | 0.71       | 0.82      |
| ComplEx                      | 0.31      | **0.51**  | 0.49     | 0.73       | 0.94      |
| HolE                         | 0.30      | 0.47      | 0.47     | 0.73       | 0.94      |
| RotatE                       | 0.31      | **0.51**  | 0.43     | 0.70       | **0.95**  |
| ConvE (AmpliGraph v1.4)      | 0.26      | 0.45      | 0.30     | 0.50       | 0.93      |
| ConvE (1-N, AmpliGraph v1.4) | 0.32      | 0.48      | 0.40     | 0.80       | **0.95**  |
| ConvKB (AmpliGraph v1.4)     | 0.23      | 0.39      | 0.30     | 0.65       | 0.80      |

* Timothee Lacroix, Nicolas Usunier, and Guillaume Obozinski. Canonical tensor decomposition for knowledge base
completion. In International Conference on Machine Learning, 2869–2878. 2018.

**  Kadlec, Rudolf, Ondrej Bajgar, and Jan Kleindienst. "Knowledge base completion: Baselines strike back.
 " arXiv preprint arXiv:1705.10744 (2017).

Results above are computed assigning the worst rank to a positive in case of ties.
Although this is the most conservative approach, some published literature may adopt an evaluation protocol that assigns
 the best rank instead.

## Documentation

**[Documentation available here](http://docs.ampligraph.org)**

The project documentation can be built from your local working copy with:

```
cd docs
make clean autogen html
```

## How to contribute

See [guidelines](http://docs.ampligraph.org) from AmpliGraph documentation.

## How to Cite

If you like AmpliGraph and you use it in your project, why not starring the project on GitHub!

[![GitHub stars](https://img.shields.io/github/stars/Accenture/AmpliGraph.svg?style=social&label=Star&maxAge=3600)](https://GitHub.com/Accenture/AmpliGraph/stargazers/)

If you instead use AmpliGraph in an academic publication, cite as:

```
@misc{ampligraph,
 author= {Luca Costabello and
          Alberto Bernardi and
          Adrianna Janik and
          Aldan Creo and
          Sumit Pai and
          Chan Le Van and
          Rory McGrath and
          Nicholas McCarthy and
          Pedro Tabacof},
 title = {{AmpliGraph: a Library for Representation Learning on Knowledge Graphs}},
 month = mar,
 year  = 2019,
 doi   = {10.5281/zenodo.2595043},
 url   = {https://doi.org/10.5281/zenodo.2595043}
}
```

## License

AmpliGraph is licensed under the Apache 2.0 License.


Mastodon.py
===========
Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
Feature complete for public API as of Mastodon version 3.5.5 and easy to get started with:

.. code-block:: python

    from mastodon import Mastodon

    # Register your app! This only needs to be done once (per server, or when
    # distributing rather than hosting an application, most likely per device and server).
    # Uncomment the code and substitute in your information:
    '''
    Mastodon.create_app(
        'pytooterapp',
        api_base_url = 'https://mastodon.social',
        to_file = 'pytooter_clientcred.secret'
    )
    '''

    # Then, log in. This can be done every time your application starts (e.g. when writing a
    # simple bot), or you can use the persisted information:
    mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
    mastodon.log_in(
        'my_login_email@example.com',
        'incrediblygoodpassword',
        to_file = 'pytooter_usercred.secret'
    )

    # If you are logging in for the first time you need to give permissions to the app
    # via OAuth, at the URL given by auth_request_url() and then pass code instead of
    # username and password.
    mastodon.log_in(
            to_file = 'pytooter_usercred.secret',
            code='code_from_oauth,
            scopes=['read', 'write'],
        )

    # Note that this won't work when using 2FA - you'll have to use OAuth, in that case.
    # To post, create an actual API instance:
    mastodon = Mastodon(access_token = 'pytooter_usercred.secret')
    mastodon.toot('Tooting from Python using #mastodonpy !')

You can install Mastodon.py via pypi:

.. code-block:: Bash

   # Python 3
   pip3 install Mastodon.py

We currently try to support Python 3.7 and above, and try to at least not break Python 3 versions
below that. Python 2 support is no longer a goal.

Full documentation and basic usage examples can be found
at https://mastodonpy.readthedocs.io/en/stable/ . Some more extensive examples can be
found at https://github.com/halcy/MastodonpyExamples

Acknowledgements
----------------
Mastodon.py contains work by a large amount of contributors, many of which have
put significant work into making it a better library. You can find some information
about who helped with which particular feature or fix in the changelog.

.. image:: https://circleci.com/gh/halcy/Mastodon.py.svg?style=svg
    :target: https://app.circleci.com/pipelines/github/halcy/Mastodon.py
.. image:: https://codecov.io/gh/halcy/Mastodon.py/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/halcy/Mastodon.py


# ADL LRS

_Note:_ This LRS has recently been updated to match the IEEE 9274.1.1 Base Standard -- also known as xAPI 2.0.

This version is stable, but only intended to support a small amount of users as a proof of concept.

## Installation

The simplest way to install the ADL LRS is via Docker and Docker Compose. You can find detailed instructions on this process [here](https://github.com/adlnet/ADL_LRS/wiki).

## Helpful Information

* [Test Coverage](https://github.com/adlnet/ADL_LRS/wiki/Code-Coverage)
* [Code Profiling](https://github.com/adlnet/ADL_LRS/wiki/Code-Profiling-with-cProfile)
* [Setting up Nginx and uWSGI](https://github.com/adlnet/ADL_LRS/wiki/Using-uWSGI-with-Nginx)
* [OAuth Help](https://github.com/adlnet/ADL_LRS/wiki/Using-OAuth)
* [Clearing the Database](https://github.com/adlnet/ADL_LRS/wiki/Clearing-the-Database)

## Contributing to the Project
We welcome contributions to this project. Fork this repository, make changes, and submit pull requests. If you're not comfortable with editing the code, please [submit an issue](https://github.com/adlnet/ADL_LRS/issues) and we'll be happy to address it.

## License
   Copyright ©2016 Advanced Distributed Learning

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

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

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


# phy: interactive visualization and manual spike sorting of large-scale ephys data

[![Build Status](https://travis-ci.org/cortex-lab/phy.svg)](https://travis-ci.org/cortex-lab/phy)
[![codecov.io](https://img.shields.io/codecov/c/github/cortex-lab/phy.svg)](http://codecov.io/github/cortex-lab/phy)
[![Documentation Status](https://readthedocs.org/projects/phy/badge/?version=latest)](https://phy.readthedocs.io/en/latest/?badge=latest)
[![GitHub release](https://img.shields.io/github/release/cortex-lab/phy.svg)](https://github.com/cortex-lab/phy/releases/latest)
[![PyPI release](https://img.shields.io/pypi/v/phy.svg)](https://pypi.python.org/pypi/phy)

[**phy**](https://github.com/cortex-lab/phy) is an open-source Python library providing a graphical user interface for visualization and manual curation of large-scale electrophysiological data. It is optimized for high-density multielectrode arrays containing hundreds to thousands of recording sites (mostly [Neuropixels probes](https://www.ucl.ac.uk/neuropixels/)).

Phy provides two GUIs:

* **Template GUI** (recommended): for datasets sorted with KiloSort and Spyking Circus,
* **Kwik GUI** (legacy): for datasets sorted with klusta and klustakwik2.

[![phy 2.0b1 screenshot](https://user-images.githubusercontent.com/1942359/74028054-c284b880-49a9-11ea-8815-1b7e727a8644.png)](https://user-images.githubusercontent.com/1942359/74028054-c284b880-49a9-11ea-8815-1b7e727a8644.png)

## What's new
* [5 June 2024] phy 2.0 beta 6, bug fixes, install work, fixing some deprecations
* [7 Sep 2021] Release of phy 2.0 beta 5, with some install and bug fixes
* [7 Feb 2020] Release of phy 2.0 beta 1, with many new views, new features, various improvements and bug fixes...

## Links

* [Documentation](http://phy.readthedocs.org/en/latest/)
* [Mailing list](https://groups.google.com/forum/#!forum/phy-users)

## Hardware requirements

It is recommanded to store the data on a SSD for performance reasons.

There are no specific GPU requirements as long as relatively recent graphics and OpenGL drivers are installed on the system.

## Installation instructions

Run the following commands in a terminal:

1. Create a new conda environment with the conda dependencies:

    ```
    conda create -n phy2 -y python=3.11 cython dask h5py joblib matplotlib numpy pillow pip pyopengl pyqt pyqtwebengine pytest python qtconsole requests responses scikit-learn scipy traitlets
    ```

2. Activate the new conda environment with `conda activate phy2`

3. Install the development version of phy: `pip install git+https://github.com/cortex-lab/phy.git`

4. [OPTIONAL] If you plan to use the Kwik GUI, type `pip install klusta klustakwik2`

5. Phy should now be installed. Open the GUI on a dataset as follows (the phy2 environment should still be activated):

```bash
cd path/to/my/spikesorting/output
phy template-gui params.py
```

6. If there are problems with this method we also have an `environment.yml` file which allows for
automatic install of the necessary packages. Give that a try.

### Dealing with the error `ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidget`

In some environments, you might get an error message related to QtWebEngineWidget. Run the command `pip install PyQtWebEngine` and try launching phy again. This command should not run if the error message doesn't appear, as it could break the PyQt5 installation.

### Upgrading from phy 1 to phy 2

* Do not install phy 1 and phy 2 in the same Python environment.
* It is recommended to delete `~/.phy/*GUI/state.json` when upgrading.

### Developer instructions

To install the development version of phy in a fresh environment, do:

```bash
git clone git@github.com:cortex-lab/phy.git
cd phy
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
cd ..
git clone git@github.com:cortex-lab/phylib.git
cd phylib
pip install -e . --upgrade
```

### Troubleshooting

* [See a list of common issues.](https://phy.readthedocs.io/en/latest/troubleshooting/)
* [Raise a GitHub issue.](https://github.com/cortex-lab/phy/issues)

## Running phy from a Python script

In addition to launching phy from the terminal with the `phy` command, you can also launch it from a Python script or an IPython terminal. This may be useful when debugging or profiling. Here's a code example to copy-paste in a new `launch.py` text file within your data directory:

```
from phy.apps.template import template_gui
template_gui("params.py")
```

## Credits

**phy** is developed and maintained by [Cyrille Rossant](https://cyrille.rossant.net).

* [International Brain Laboratory](https://internationalbrainlab.org)
* [Cortex Lab (UCL)](https://www.ucl.ac.uk/cortexlab/) ([Kenneth Harris](https://www.ucl.ac.uk/biosciences/people/harris-kenneth) and [Matteo Carandini](https://www.carandinilab.net/)).

Contributors to the repository are:

* [Alessio Buccino](https://github.com/alejoe91)
* [Michael Economo](https://github.com/mswallac)
* [Cedric Gestes](https://github.com/cgestes)
* [Dan Goodman](http://thesamovar.net/)
* [Max Hunter](https://iris.ucl.ac.uk/iris/browse/profile?upi=MLDHU99)
* [Shabnam Kadir](https://iris.ucl.ac.uk/iris/browse/profile?upi=SKADI56)
* [Christopher Nolan](https://github.com/crnolan)
* [Martin Spacek](http://mspacek.github.io/)
* [Nick Steinmetz](http://www.nicksteinmetz.com/)


# Cement Framework

[![Built on Cement™](https://img.shields.io/badge/Built%20on%20Cement%E2%84%A2-3.0-yellow)](https://builtoncement.com)
[![PyPi Downloads](https://img.shields.io/pypi/dm/cement)](https://pypistats.org/packages/cement)
[![Continuous Integration Status](https://app.travis-ci.com/datafolklabs/cement.svg?branch=master)](https://app.travis-ci.com/github/datafolklabs/cement/)

Cement is an advanced Application Framework for Python, with a primary focus on Command Line Interfaces (CLI).  Its goal is to introduce a standard, and feature-full platform for both simple and complex command line applications as well as support rapid development needs without sacrificing quality.  Cement is flexible, and it's use cases span from the simplicity of a micro-framework to the complexity of a mega-framework. Whether it's a single file script, or a multi-tier application, Cement is the foundation you've been looking for.

The first commit to Git was on Dec 4, 2009.  Since then, the framework has seen several iterations in design, and has continued to grow and improve since it's inception.  Cement is the most stable, and complete framework for command line and backend application development.

## Core Features

Cement core features include (but are not limited to):

- Core pieces of the framework are customizable via handlers/interfaces
- Handler system connects implementation classes with Interfaces
- Extension handler interface to easily extend framework functionality
- Config handler supports parsing multiple config files into one config
- Argument handler parses command line arguments and merges with config
- Log handler supports console and file logging
- Plugin handler provides an interface to easily extend your application
- Output handler interface renders return dictionaries to console
- Cache handler interface adds caching support for improved performance
- Controller handler supports sub-commands, and nested controllers
- Hook support adds a bit of magic to apps and also ties into framework
- Zero external dependencies* (not including optional extensions)
- 100% test coverage (`pytest`, `coverage`)
- 100% PEP8 compliant (`ruff`)
- Extensive API Reference (`sphinx`)
- Tested on Python 3.8+

## Optional Extensions

Some extensions that are shipped with the mainline Cement source do require external dependencies.  It is the responsibility of the application developer to include these dependencies along with their application, as Cement explicitly does not include them. Dependencies can be installed via each extensions optional package (ex: `cement[colorlog]`, `cement[redis]`, etc).

See: [https://docs.builtoncement.com/extensions](https://docs.builtoncement.com/extensions)

## More Information

- [Official Website / Developer Documentation](http://builtoncement.com/)
- [PyPi Packages](http://pypi.python.org/pypi/cement/)
- [Github Source Code / Issue Tracking](http://github.com/datafolklabs/cement/)
- [Travis CI](https://travis-ci.org/datafolklabs/cement/)
- [Slack Channel](https://join.slack.com/t/cementframework/shared_invite/enQtMzU0OTc5MDQ4NDA0LWMwMzZiOTczZjM4ZjFiZDE3MDk4MzA5ZmYxNmZjNTk4NzUwMzcyN2VlMDc5NzIxYjQ1NzlmNzgyNDFjMWJmMWY)

## License

The Cement CLI Application Framework is Open Source and is distributed under the BSD License (three clause).  Please see the LICENSE file included with this software.

## Development

### Docker

This project includes a `docker-compose` configuration that sets up all required services, and dependencies for development and testing.  This is the recommended path for local development, and is the only fully supported option.

The following creates all required docker containers, and launches an BASH shell within the `cement` dev container for development.
```
$ make dev

|> cement <| src #
```

The above is the equivalent of running:

```
$ docker-compose up -d

$ docker-compose exec cement /bin/bash
```

All execution is done *inside the docker containers*.

**Testing Alternative Versions of Python**

The latest stable version of Python 3 is the default, and target version accessible as the `cement` container within Docker Compose.  For testing against alternative versions of python, additional containers are created (ex: `cement-py38`, `cement-py39`, etc). You can access these containers via:

```
$ docker-compose ps
        Name                      Command               State     Ports
-------------------------------------------------------------------------
cement_cement-py38_1   /bin/bash                        Up
cement_cement-py39_1   /bin/bash                        Up
cement_cement-py310_1   /bin/bash                        Up
cement_cement-py311_1   /bin/bash                        Up
cement_cement_1        /bin/bash                        Up
cement_memcached_1     docker-entrypoint.sh memcached   Up      11211/tcp
cement_redis_1         docker-entrypoint.sh redis ...   Up      6379/tcp

$ docker-compose exec cement-py39 /bin/bash

|> cement-py39 <| src #
```

### Vagrant

An alternative option is included to run Vagrant for development.  This is partially supported, primarily for the purpose of developing/testing on Windows as well as testing specific issues on target operating systems.

To see a list of configured systems:

```
$ vagrant status
```

#### Linux

```
$ vagrant up linux

$ vagrant ssh linux

vagrant@linux $ cd /vagrant

vagrant@linux $ bash scripts/vagrant/bootstrap.sh

vagrant@linux $ make virtualenv

vagrant@linux $ pdm venv activate

|> cement >| $
```

#### Windows

*Windows development and support is not 100% complete.  Cement is known to run and work on Windows, however it is not a primary target for development and as such the setup is not as streamlined and currently has several known errors.*

The following assumes you're running these two initial commands from a unix based system:

```
$ make clean

$ vagrant up windows
```

RDP or Login to Desktop/Console, and open a PowerShell terminal:

```
C:\> cd C:\Vagrant

C:\Vagrant> powershell.exe scripts\vagrant\bootstrap.ps1

C:\Vagrant> make virtualenv

C:\Vagrant> pdm venv activate

C:\Vagrant> make test-core
```

*Note that only the core library is fully tested on Windows.*

### Running Tests and Compliance

Cement has a strict policy that all code and tests meet PEP8 guidelines, therefore `ruff` is called before any unit tests run.  All code submissions require 100% test coverage and PEP8 compliance:

Execute the following to run all compliance and unit tests:

```
$ make test
```

A coverage report is printed to console, as well as the HTML version created in `coverage-report`:

```
$ open coverage-report/index.html
```

See `Makefile` for all other common development actions.


# DroneKit Python

![dronekit_python_logo](https://cloud.githubusercontent.com/assets/5368500/10805537/90dd4b14-7e22-11e5-9592-5925348a7df9.png)

[![PyPi published version](https://img.shields.io/pypi/v/dronekit.svg)](https://pypi.org/project/dronekit/)
[![Windows Build status](https://img.shields.io/appveyor/ci/3drobotics/dronekit-python/master.svg?label=windows)](https://ci.appveyor.com/project/3drobotics/dronekit-python/branch/master)
[![OS X Build Status](https://img.shields.io/travis/dronekit/dronekit-python/master.svg?label=os%20x)](https://travis-ci.org/dronekit/dronekit-python)
[![Linux Build Status](https://img.shields.io/circleci/project/dronekit/dronekit-python/master.svg?label=linux)](https://circleci.com/gh/dronekit/dronekit-python)

DroneKit-Python helps you create powerful apps for UAVs.

# ⚠ ATTENTION: MAINTAINERS NEEDED ⚠

Hey it's true this project is not very active, but it could be with your help. We are looking for maintainers interested in keeping the project alive by keep up with CI and PRs. If you are interested in helping please apply by [creating an issue]([url](https://github.com/dronekit/dronekit-python/issues/new)) and listing the reasons why you would like to help, in return we will be granting committer access to folks who are truly interested in helping.

## Overview

DroneKit-Python (formerly DroneAPI-Python) contains the python language implementation of DroneKit.

The API allows developers to create Python apps that communicate with vehicles over MAVLink. It provides programmatic access to a connected vehicle's telemetry, state and parameter information, and enables both mission management and direct control over vehicle movement and operations.

The API is primarily intended for use in onboard companion computers (to support advanced use cases including computer vision, path planning, 3D modelling etc). It can also be used for ground station apps, communicating with vehicles over a higher latency RF-link.

## Getting Started

The [Quick Start](https://dronekit-python.readthedocs.io/en/latest/guide/quick_start.html) guide explains how to set up DroneKit on each of the supported platforms (Linux, Mac OSX, Windows) and how to write a script to connect to a vehicle (real or simulated).

A basic script looks like this:

```python
from dronekit import connect

# Connect to UDP endpoint.
vehicle = connect('127.0.0.1:14550', wait_ready=True)
# Use returned Vehicle object to query device state - e.g. to get the mode:
print("Mode: %s" % vehicle.mode.name)
```

Once you've got DroneKit set up, the [guide](https://dronekit-python.readthedocs.io/en/latest/guide/index.html) explains how to perform operations like taking off and flying the vehicle. You can also try out most of the tasks by running the [examples](https://dronekit-python.readthedocs.io/en/latest/examples/index.html).

## Resources

The project documentation is available at [https://readthedocs.org/projects/dronekit-python/](https://readthedocs.org/projects/dronekit-python/). This includes [guide](https://dronekit-python.readthedocs.io/en/latest/guide/index.html), [example](https://dronekit-python.readthedocs.io/en/latest/examples/index.html) and [API Reference](https://dronekit-python.readthedocs.io/en/latest/automodule.html) material.

The example source code is hosted here on Github as sub-folders of [/dronekit-python/examples](https://github.com/dronekit/dronekit-python/tree/master/examples).

The [DroneKit Forums](http://discuss.dronekit.io) are the best place to ask for technical support on how to use the library. You can also check out our [Gitter channel](https://gitter.im/dronekit/dronekit-python?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) though we prefer posts on the forums where possible.

* **Documentation:** [https://dronekit-python.readthedocs.io/en/latest/about/index.html](https://dronekit-python.readthedocs.io/en/latest/about/index.html)
* **Guides:** [https://dronekit-python.readthedocs.io/en/latest/guide/index.html)
* **API Reference:** [https://dronekit-python.readthedocs.io/en/latest/automodule.html)
* **Examples:** [/dronekit-python/examples](https://github.com/dronekit/dronekit-python/tree/master/examples)
* **Forums:** [http://discuss.dronekit.io/](http://discuss.dronekit.io)
* **Gitter:** [https://gitter.im/dronekit/dronekit-python](https://gitter.im/dronekit/dronekit-python?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) though we prefer posts on the forums where possible.

## Users and contributors wanted!

We'd love your [feedback and suggestions](https://github.com/dronekit/dronekit-python/issues) about this API and are eager to evolve it to meet your needs, please feel free to create an issue to report bugs or feature requests.

If you've created some awesome software that uses this project, [let us know on the forums here](https://discuss.dronekit.io/t/notable-projects-using-dronekit/230)!

If you want to contribute, see our [Contributing](https://dronekit-python.readthedocs.io/en/latest/contributing/index.html) guidelines, we welcome all types of contributions but mostly contributions that would help us shrink our [issues list](https://github.com/dronekit/dronekit-python/issues).

## Licence

DroneKit-Python is made available under the permissive open source [Apache 2.0 License](http://python.dronekit.io/about/license.html).

***

Copyright 2015 3D Robotics, Inc.


veyepar - Video Eyeball Processor and Review

Video metadata manager - given file names of raw footage, construct cut list (with human intervention), transcode, upload, announce.

based on DebConf system

authors: Carl Karsten <carl@personnelware.com>

Install and usage:

1. install dependancies: INSTALL.sh
This installs all of the python modules in a virtualenv sandbox using virtualenvwrapper.  So before running any python apps, you must activate the virtualenv with:
workon veyepar.
This has been added to ~/.bashrc so it should be setup.
Then you must run everything with
python <script name>.py
Running ./<script>.py won't work.
Using virtualenv makes develoment easier and reduces the amount of things that require root/sudo privs.

1.1 create the database
INSTAL.sh calls rt.sh (run tests) which will create the db
and an admin username: test, password abc.
For production you should use a secure set of credentials
so delete veyepar.db and run:
veyepar/dj$ python ./manage.py (new stuff)
This will prompt for an admin username and password.

2. create a location, client, show, and episode records in the db
browse to http://localhost:8080
log in
a. click "Locations"
b. enter Location Name, hit save.
c. click "Clients"
d. enter Client Name, hit save.
f. enter Show Name, select Location(s) from step b, hit Save.
g. click on show link

If you have many Episodes it might be worth the effort to import locaion and episodes from a json or .csv file using addeps.py.   Otherwise, continue to use the browser:

h. enter Episode Name, start/duration - hit Save.
i. repeat for each Episode

3. veyepar.cfg: set client and show to the client and show slugs.
review settings,  pal/ntsc is one of the more important ones.

4. create the dirs for the .dv files:
veyepar/dj/scripts$ python mkdirs.py  # Makes the dir tree to put files into

4.1. Put in place the show's title.svg:
mkdirs.py (previous step) drops a copy in the show dir:
~/Videos/veyepar/test_client/test_show/bling$ inkscape title.svg
show stats: shows longest title and name

mk_titles.py - makes title screens for all videos
and uploads to datacenter

Do some sanity checks:
browse to the show page:
check "overlapping episodes" - there shouldn't be any.
show stats: grid of days by room.  should look like your show
schedule: crude grid of events in a room and time slot.
review titles
meeting announcement: meant for usergroup meetings, doesn't scale well to a large event.

add_to_richard.py = creates landing page for videos

email_title.py - emails url of title image and landing page to presenters for review.

recording sheets: pdf to be printed and put next to each recoreding station runing DVswitch.

Use DVswitch to record talks.  Note the actual start/end time on the recoding sheet.

4.2. put the dv files into the dirs
Use your mad file copy skilz to rsync, mv, whatever.

5. for all dv files, add records into the db:
veyepar/dj/scripts$ python adddv.py
Adds the .dv filenames to the raw files table

6.0 collect dv metadata
6.1 start/end
veyepar/dj/scripts$ python tsdv.py - timestamp dv
Gets start from one of:
the file name (assumes hh_mm_ss.dv format)
There is code to read the time stamp from the .dv file frames, but that doesn't work well at all.

6.2 ocr/thumbnail (don't bother, not used for anything any more)
use ocr to find some text, which makes for a good thumnail.
veyepar/dj/scripts$ python mkthumbs.py - find thumbs, ocr untill we find some text, saves png.

7. Associte dv files with Episodes.
(This now happens automatically when you browse to an Episode that does not have a cutlist.  I am leaving this here because their may be a performance hit for larger 100+ Episode shows.)
Create cutlist records for each intersection of a dv file and episodes start/end time and location.
veyepar/dj/scripts$ python assocdv.py: # creates cutlist items for dv files that might belong to an episode

8. make low quality versions of all the dv files so you can preview each file in a browser using <video> (not necessary, skip if you are rushing.)
veyepar/dj/scripts$ python dv2ogv.py:# makes .ogv for all dv in a show

9. Post production editing

9.1 for each episode, look at what .dv files have been assigned to it.

browse http://0.0.0.0:8080/main/E/1  (for a fresh system, else find your show)

DV files that might belong to the talk are marked to be included.  un mark [x]Apply the ones that should not be included.

If there are ones missing, .. get help.
use "add raw file" at bottom of page.
or use fixdv.py to fix batches, or use django's admin UI to add one by one.

If a dv needs junk trimmed from the start or end, put the time offset in "Cut List - Start/End"
1 or 0:0:1 means trim 1 second from start.  1:2:3 means the clip ends 1 hour 2 min 3 seconds from the start of the file, so in this case 1h 2m 3 seconds would be used.

Set Episode.state to Encode (2)

10. encode files to upload
enc.py:# encodes to ogg, flv, m4v, webm, mpeg
adds titles too.

11.
upload
push.py - sends copy to private cloud stoage.  (currently disabled)
post_yt.py - sends to youtube (and archive and rax cuz eww, terible hack.)
post_blip.py - posts to blip.tv,
post_vimeo.py - posts to vimeo (not used in years, suffers from bit rot)
pw.py holds user/passwords, not checked in, make one from pw_samp.py

add_to_richard.py - adds video url's to landing page

12. visually review: richard, youtube, archive, title slide, encoding quality.  If good, manualy move state to email.  Once satified that everything is in place and no longer needs every video to be reviewed, run review_1.py to move evertyhing to next step.

email_url.py - emails presenter the richard URL again, this time encouraging them to advertise the URL to their social network, or report back any problmes they see.

13. If needed, wait for presenter to reply.  for instance, if they never singed a release.  Move state to public when it is ready for public consumption.  Either using the web UI for each one, or review_2.py for all.

mk_public.py - changes state from draft/hidden to public in youtube and richard

12. tweet
tweet.py

HACKING ON THE CODE
There are no useful docs for setting up a development environment.

If you want to hack on this:
Ubuntu LTS, likely any ubuntu/debian in the last 3 years.

Build the encoder binary: https://github.com/CarlFK/veyepar/blob/master/setup/melt/mkmlt.sh
Setup a box for production using the steps at the top of this file.

The test suite is often in a broken state, tyically it will error.  If it completes but shows tests failing, that is typically a real problem that should be addressed asap.


Payu
====

.. image:: https://github.com/payu-org/payu/actions/workflows/CI.yml/badge.svg
    :target: https://github.com/payu-org/payu/actions/workflows/CI.yml
.. image:: https://github.com/payu-org/payu/actions/workflows/CD.yml/badge.svg
    :target: https://github.com/payu-org/payu/actions/workflows/CD.yml
.. image:: https://coveralls.io/repos/github/payu-org/payu/badge.svg?branch=master&killcache=1
    :target: https://coveralls.io/github/payu-org/payu?branch=master
.. image:: https://readthedocs.org/projects/docs/badge/?version=latest
    :target: https://payu.readthedocs.io/en/latest/

Payu is a climate model workflow management tool for supercomputing
environments.

Payu is currently only configured for use on computing clusters maintained by
NCI (National Computational Infrastructure) in Australia.

See the documentation_ for more details.

.. _documentation: http://payu.readthedocs.org/en/latest/