[![Test status](https://github.com/llm-workflow-engine/llm-workflow-engine/actions/workflows/python-app.yml/badge.svg)](https://github.com/llm-workflow-engine/llm-workflow-engine/actions/workflows/python-app.yml)
[![CodeQL status](https://github.com/llm-workflow-engine/llm-workflow-engine/actions/workflows/codeql.yml/badge.svg)](https://github.com/llm-workflow-engine/llm-workflow-engine/actions/workflows/codeql.yml)

    LLM Workflow Engine

LLM Workflow Engine (LWE) is a Power CLI and Workflow manager for LLMs.

    Read the documentation

    WATCH INTRO VIDEO

## Welcome!

What would you like to do?

* [Learn about the project](https://llm-workflow-engine.readthedocs.io)
* [Install LWE](https://llm-workflow-engine.readthedocs.io/en/latest/installation.html)
* [Learn how to use it](https://llm-workflow-engine.readthedocs.io/en/latest/how_it_works.html)
* [Read the documentation](https://llm-workflow-engine.readthedocs.io)
* [Learn more about configuration/features](https://llm-workflow-engine.readthedocs.io/en/latest/configuration.html)
* [Troubleshoot common issues](https://llm-workflow-engine.readthedocs.io/en/latest/troubleshooting.html)
* [Upgrade LWE](https://llm-workflow-engine.readthedocs.io/en/latest/upgrading.html)
* [Using GPT4](https://llm-workflow-engine.readthedocs.io/en/latest/model_access.html#gpt4)
* [Report a bug](ISSUES.md)
* [Get support](SUPPORT.md)

## What happend to the original ChatGPT Wrapper project?

See [CHATGPT_WRAPPER.md](CHATGPT_WRAPPER.md)

ChatGPT Wrapper was an amazing tool for its time, thank you to its original creator [mmabrouk](https://github.com/mmabrouk) for all your hard work, it lives on in a new form :)

## Highlights

🤖 LWE lets you use the powerful ChatGPT/GPT4 bot from the **command line**.

💬 **Runs in Shell**. You can call and interact with ChatGPT/GPT4 in the terminal.

💻  **Supports official ChatGPT API**. Make API calls directly to the OpenAI ChatGPT endpoint (all supported models accessible by your OpenAI account)

🔌 [**Simple plugin architecture**](https://llm-workflow-engine.readthedocs.io/en/latest/plugins.html#core-plugins). Extend LWE with custom functionality

🗣 **Supports multiple LLM providers**. Provider plugins allow interacting with other LLMs (GPT-3, Cohere, Hugginface, etc.)

🔄[**Build workflows**](https://llm-workflow-engine.readthedocs.io/en/latest/workflows.html). Easily integrate calls to an LLM into larger workflows via Ansible Playbooks

🔧 [**Tool use**](https://llm-workflow-engine.readthedocs.io/en/latest/tools.html). (for supported providers)

🐳 **Docker image**. LWE is also available as a docker image. (experimental)

🐍**Python API**. LWE also has a Python library that lets you use ChatGPT/GPT4 in your Python scripts.

## Projects built with the original ChatGPT Wrapper

- [bookast: ChatGPT Podcast Generator For Books](https://github.com/SamMethnani/bookast)
- [ChatGPT.el: ChatGPT in Emacs](https://github.com/joshcho/ChatGPT.el)
- [ChatGPT Reddit Bot](https://github.com/PopDaddyGames/ChatGPT-RedditBot)
- [Smarty GPT](https://github.com/citiususc/Smarty-GPT/tree/v1.1.0)
- [ChatGPTify](https://github.com/idilsulo/ChatGPTify)
- [selection-to-chatgpt](https://github.com/collin-murphy/selection-to-chatgpt)

## Contributing

We welcome contributions to LWE! If you have an idea for a new feature or have found a bug, please open an issue on the GitHub repository.

## License

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

## Acknowledgments

- The original ChatGPT Wrapper project (which LWE grew from) was created and maintained by [mmabrouk](https://github.com/mmabrouk)
- The original ChatGPT Wrapper project is a modification from [Taranjeet](https://github.com/taranjeet/chatgpt-api) code which is a modification of [Daniel Gross](https://github.com/danielgross/whatsapp-gpt) code.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=llm-workflow-engine/llm-workflow-engine&type=Date)](https://star-history.com/#llm-workflow-engine/llm-workflow-engine&Date)


# community

Voice command set for [Talon](https://talonvoice.com/), community-supported.

_(Originally called `knausj_talon`, after [its original creator :superhero:](https://github.com/knausj85))_

Can be used on its own, but shines when combined with:

- [Cursorless](https://www.cursorless.org/) for programming and text editing
- [Rango](https://github.com/david-tejada/rango) for browser navigation
- [gaze-ocr](https://github.com/wolfmanstout/talon-gaze-ocr) for advanced cursor control using eye tracking and text recognition (OCR)
- [AXKit](https://github.com/phillco/talon-axkit) (macOS only) to enhance Talon with native OS accessibility integrations
- [Other user file sets](https://talon.wiki/talon_user_file_sets/)

## Installation

### Prerequisites

- [Talon](https://talonvoice.com/)
- Mac, Windows, or Linux
- Can work with both Talon's built-in Conformer (wav2letter) speech recognition engine (recommended), or Dragon Naturally Speaking (Windows) / Dragon for Mac (although beware that Dragon for Mac is deprecated).
- Includes commands for working with an eye tracker, but not required

### Linux & Mac

It is recommended to install `community` using [`git`](https://git-scm.com/).

1. Install [`git`](https://git-scm.com/)
2. Open a terminal ([Mac](https://support.apple.com/en-gb/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac) / [Ubuntu](https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal))
3. Paste the following into the terminal and hit `enter`:

   ```bash
   cd ~/.talon/user
   git clone https://github.com/talonhub/community community
   ```

Note that it is also possible to install `community` by [downloading and extracting a zip file](#alternate-installation-method-zip-file), but this approach is discouraged because it makes it more difficult to keep track of any changes you may make to your copy of the files.

### Windows

It is recommended to install `community` using [`git`](https://git-scm.com/).

1. Install [`git`](https://git-scm.com/)
2. Open a [terminal](https://www.wikihow.com/Open-the-Command-Prompt-in-Windows)
3. Paste the following into the terminal and hit `enter`:

   ```
   cd %AppData%\Talon\user
   git clone https://github.com/talonhub/community community
   ```

Note that it is also possible to install `community` by [downloading and extracting a zip file](#alternate-installation-method-zip-file), but this approach is discouraged because it makes it more difficult to keep track of any changes you may make to your copy of the files.

## Getting started with Talon

1. `help active` will display the available commands for the active application.
   - Available commands can change with the application, or even window title that has focus.
   - You may navigate help using the displayed numbers. e.g., `help one one` or `help eleven` to open the 11th item in the help list.
   - Note that all help-related commands are defined in [`core/help/help.talon`](https://github.com/talonhub/community/blob/main/core/help/help.talon) and [`core/help/help_open.talon`](https://github.com/talonhub/community/blob/main/core/help/help_open.talon)
2. You can also search for commands by saying `help search <phrase>`. For example, `help search tab` displays all tab-related commands, and `help search help` displays all help-related commands.
3. You can also jump immediately into a particular help context display by recalling the name displayed in help window (based on the name of the .talon file) e.g. `help symbols` or `help visual studio`
4. `help alphabet` will display the alphabet
5. `command history` will toggle a display of the recent commands
6. `help format` will display the available formatters with examples.
7. Many useful, basic commands are defined in https://github.com/talonhub/community/blob/main/core/edit/edit.talon
   - `undo that` and `redo that` are the default undo/redo commands.
   - `paste that`, `copy that`, and `cut that` for pasting/copy/cutting, respectively.
8. For community-generated documentation on Talon itself, please visit https://talon.wiki/

It's recommended to learn the alphabet first, then get familiar with the keys, symbols, formatters, mouse, and generic_editor commands.

Once you have the basics of text input down, try copying some code from one window to another.

After that, explore using ordinal repetition for easily repeating a command without pausing (e.g., saying `go up fifth` will go up five lines), window switching (`focus chrome`), and moving around in your text editor of choice.

If you use vim, just start with the numbers and alphabet, otherwise look at generic_editor.talon as well at jetbrains, vscode, and any other integrations.

### Alphabet

The alphabet is defined here
https://github.com/talonhub/community/blob/main/core/keys/keys.py#L3

`help alphabet` will open a window that displays the alphabet. `help close` to hide the window.

Try saying e.g. `air bat cap` to insert abc.

### Keys

Keys are defined in keys.py. The alphabet is used for A-Z. For the rest, search for `modifier_keys` and then keep scrolling through the file, eg. roughly https://github.com/talonhub/community/blob/main/core/keys/keys.py#L111

All key commands are defined in [keys.talon](https://github.com/talonhub/community/blob/main/core/keys/keys.talon). For example, say `shift air` to press `shift-a`, which types a capital `A`.

On Windows, try commands such as

- `control air` to press `control-a` and select all.

- `super-shift-sun` to press `windows-shift-s` to trigger the screenshot application (Windows 10). Then try `escape` to exit the screenshot application.

On Mac, try commands such as

- `command air` to press `command-a` and select all.

- `control shift command 4` to press ` ctrl-shift-cmd-4` to trigger the screenshot application. Then try `escape` to exit the screenshot application. Please note the order of the modifiers doesn't matter.

Any combination of the modifiers, symbols, alphabet, numbers and function keys can be executed via voice to execute shorcuts. Modifier keys can be tapped using `press`, for example `press control` to tap the control key by itself.

### Symbols

Some symbols are defined in keys.py, so you can say e.g. `control colon` to press those keys.
https://github.com/talonhub/community/blob/main/core/keys/keys.py#L140

Some other symbols are defined here: https://github.com/talonhub/community/blob/main/plugin/symbols/symbols.talon

### Formatters

`help format` will display the available formatters with examples of the output.

Try using formatters by saying e.g. `snake hello world`, which will insert hello_world

Multiple formatters can be used together, e.g. `dubstring snake hello world`. This will insert "hello_world"

Formatters (snake, dubstring) are defined here
https://github.com/talonhub/community/blob/main/core/text/formatters.py#L137

All formatter-related commands are defined here
https://github.com/talonhub/community/blob/main/core/text/text.talon#L8

### Mouse commands

See https://github.com/talonhub/community/blob/main/plugin/mouse/mouse.talon for commands to click, drag, scroll, and use an eye tracker. To use a grid to click at a certain location on the screen, see [mouse_grid](https://github.com/talonhub/community/tree/main/core/mouse_grid).

### Generic editing commands

https://github.com/talonhub/community/blob/main/core/edit/edit.talon

These generic commands are global. Commands such as `go word left` will work in any text box.

### Repeating commands

For repeating commands, useful voice commands are defined here: https://github.com/talonhub/community/blob/main/plugin/repeater/repeater.talon

Try saying e.g. `go up fifth` will go up five lines.
Try saying e.g. `select up third` to hit `shift-up` three times to select some lines in a text field.

### Window management

Global window managment commands are defined here:
https://github.com/talonhub/community/blob/main/core/windows_and_tabs/window_management.talon

- `running list` will toggle a GUI list of words you can say to switch to running applications.
- `focus chrome` will focus the chrome application.
- `launch music` will launch the music application. Note this is currently only implemented on Mac OS X.

### Screenshot commands

https://github.com/talonhub/community/blob/main/plugin/screenshot/screenshot.talon

### Programming Languages

Specific programming languages may be activated by voice commands, or via title tracking.

Activating languages via commands will enable the commands globally, e.g. they'll work in any application. This will also disable the title tracking method (code.language in .talon files) until the "clear language modes" voice command is used.

The commands for enabling languages are defined here: https://github.com/talonhub/community/blob/main/core/modes/language_modes.talon

By default, title tracking activates coding languages in supported applications such as VSCode, Visual Studio (requires plugin), and Notepad++.

To enable title tracking for your application:

1. The active filename (including extension) must be included in the editor's title
2. Implement the required Talon-defined `filename` action to correctly extract the filename from the programs's title. See https://github.com/talonhub/community/blob/main/apps/vscode/vscode.py#L122-L138 for an example.

Python, C#, Talon and javascript language support is currently broken up into several tags in an attempt to define a common grammar where possible between languages. Each tag is defined by a .talon file, which defines the voice commands, and a Python file which declares the actions that should be implemented by each concrete language implementation to support those voice commands. Currently, the tags which are available are:

- `lang/tags/comment_block.{talon,py}` - block comments (e.g., C++'s `/* */`)
- `lang/tags/comment_documentation.{talon,py}` - documentation comments (e.g., Java's `/** */`)
- `lang/tags/comment_line.{talon,py}` - line comments (e.g., Python's `#`)
- `lang/tags/data_null.{talon,py}` - null & null checks (e.g., Python's `None`)
- `lang/tags/data_bool.{talon,py}` - booleans (e.g., Haskell's `True`)
- `lang/tags/functions.{talon,py}` - functions and definitions
- `lang/tags/functions_common.{talon,py}` - common functions (also includes a GUI for picking functions)
- `lang/tags/imperative.{talon,py}` - statements (e.g., `if`, `while`, `switch`)
- `lang/tags/libraries.{talon,py}` - libraries and imports
- `lang/tags/libraries_gui.{talon,py}` - graphical helper for common libraries
- `lang/tags/object_oriented.{talon,py}` - objects and classes (e.g., `this`)
- `lang/tags/operators_array.{talon,py}` - array operators (e.g., Ruby's `x[0]`)
- `lang/tags/operators_assignment.{talon,py}` - assignment operators (e.g., C++'s `x += 5`)
- `lang/tags/operators_bitwise.{talon,py}` - bitwise operators (e.g., C's `x >> 1`)
- `lang/tags/operators_lambda.{talon,py}` - anonymous functions (e.g., JavaScript's `x => x + 1`)
- `lang/tags/operators_math.{talon,py}` - numeric, comparison, and logical operators
- `lang/tags/operators_pointer.{talon,py}` - pointer operators (e.g., C's `&x`)

The support for the language-specific implementations of actions are then located in:

- `lang/{your-language}/{your-language}.py`

To start support for a new language, ensure the appropriate extension is added to the [`language_extensions` in language_modes.py](https://github.com/talonhub/community/blob/main/core/modes/language_modes.py#L9).
Then create the following files:

- `lang/{your-language}/{your-language}.py`
- `lang/{your-language}/{your-language}.talon`

Activate the appropriate tags in `{your-language}.talon` and implement the corresponding actions in `{your-language}.py`, following existing language implementations.
If you wish to add additional voice commands for your language, put those in `{your-language}.talon`.
You may also want to add a force command to `language_modes.talon`.

## File Manager commands

For the following file manager commands to work, your file manager must display the full folder path in the title bar. https://github.com/talonhub/community/blob/main/tags/file_manager/file_manager.talon

For Mac OS X's Finder, run this command in terminal to display the full path in the title.

```
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
```

For Windows Explorer, follow these directions
https://www.howtogeek.com/121218/beginner-how-to-make-explorer-always-show-the-full-path-in-windows-8/

For the Windows command line, the `refresh title` command will force the title to the current directory, and all directory commands (`follow 1`) will automatically update the title.

Notes:

• Both Windows Explorer and Finder hide certain files and folder by default, so it's often best to use the imgui to list the options before issuing commands.

• If there no hidden files or folders, and the items are displayed in alphabetical order, you can typically issue the `follow <number>`, `file <number>` and `open <number>` commands based on the displayed order.

To implement support for a new program, you need to implement the relevant file manager actions for your application and assert the user.file_manager tag.

- There are a number of example implementations in the repository. Finder is a good example to copy and customize to your application as needed.
  https://github.com/talonhub/community/blob/main/apps/finder/finder.py

## Terminal commands

Many terminal programs are supported out of the box, but you may not want all the commands enabled.

To disable various commandsets in your terminal, find the relevant talon file and enable/disable the tags for command sets as appropriate.

```
tag(): user.file_manager
tag(): user.git
tag(): user.kubectl
tag(): user.tabs
```

For instance, kubectl commands (kubernetes) aren't relevant to everyone.

Note also that while some of the command sets associated with these tags are defined in talon files within [tags](https://github.com/talonhub/community/tree/main/tags), others, like git, are defined within [apps](https://github.com/talonhub/community/tree/main/apps). Additionally, the commands for tabs are defined in [tabs.talon](https://github.com/talonhub/community/blob/main/core/windows_and_tabs/tabs.talon).

### Unix utilities

If you have a Unix (e.g. OSX) or Linux computer, you can enable support for a number of
common terminal utilities like `cat`, `tail`, or `grep` by uncommenting the following
line in [unix_shell.py](tags/terminal/unix_shell.py):

```
# ctx.tags = ["user.unix_utilities"]
```

Once you have uncommented the line, you can customize your utility commands by editing
`settings/unix_utilities.csv`. Note: this directory is created when first running Talon
with community enabled.

## Jetbrains commands

For Jetbrains commands to work you must install https://plugins.jetbrains.com/plugin/10504-voice-code-idea
into each editor.

## Additional commands

There are other commands not described fully within this file. As an overview:

- The apps folder has command sets for use within different applications
- The core folder has various commands described [here](https://github.com/talonhub/community/blob/main/core/README.md)
- The lang folder has commands for writing [programming languages](https://github.com/talonhub/community?tab=readme-ov-file#programming-languages)
- The plugin folder has various commands described [here](https://github.com/talonhub/community/blob/main/plugin/README.md)
- The tags folder has various other commands, such as using a browser, navigating a filesystem in terminal, and managing multiple cursors

## Settings

Several options are configurable via a [single settings file](settings.talon) out of the box. Any setting can be made context specific as needed (e.g., per-OS, per-app, etc).

The most commonly adjusted settings are probably

• `imgui.scale` to improve the visibility of all imgui-based windows (help, history, etc). This is simply a scale factor, 1.3 = 130%.

• `user.help_max_command_lines_per_page` and `user.help_max_contexts_per_page` to ensure all help information is visible.

• `user.mouse_wheel_down_amount` and `user.mouse_continuous_scroll_amount` for adjusting the scroll amounts for the various scroll commands.

Also, you can add additional vocabulary words, words to replace, search engines and more. Complete the community setup instructions above, then open the `settings` folder to see the provided CSV files and customize them as needed.

## Other talon user file sets

In addition to this repo, there are [other Talon user file sets](https://talon.wiki/talon_user_file_sets/) containing additional commands that you may want to experiment with if you're feeling adventurous 😊. Many of them are meant to be used alongside `community`, but a few of them are designed as replacements. If it's not clear which, please file an issue against the given GitHub repository for that user file set!

# Collaborators

This repository is now officially a team effort. The following contributors have direct access:

- @dwiel
- @fidgetingbits
- @knausj85
- @rntz
- @splondike
- @pokey

Collaborators will reply to issues and pull requests as time and health permits. Please be patient.

## Guidelines for collaborators

1. Collaborators prioritize their health and their personal/professional needs first. Their time commitment to this effort is limited.
2. For "minor" fixes and improvements/bugs/new apps, collaborators are free to contribute without any review
3. For "significant" new development and refactors, collaborators should seek appropriate input and reviews from each-other. Collaborators are encouraged to open a discussion before committing their time to any major effort.

# Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for our guidelines for contributors

## Automatic formatting/linters

This repository uses [`pre-commit`](https://pre-commit.com/) to run and manage its formatters/linters. Running these yourself is optional. If you wish to do so, first [install](https://pre-commit.com/#install) `pre-commit`:

```bash
$ pip install pre-commit
```

You then have a few options as to when to run it:

- Run yourself at any time on your locally changed files: `pre-commit run`
- Run yourself on all files in the repository: `pre-commit run --all-files`
- Run automatically on your PRs (fixes will be pushed automatically to your branch):
  - Visit https://pre-commit.ci/ and authorize the app to connect to your `community` fork.
- Set up an editor hook to run on save:
  - You could follow the instructions for [Black](https://black.readthedocs.io/en/stable/integrations/editors.html), which are well written; simply replace `black <path>` with `pre-commit run --files <file>`.
  - It's more performant to only reformat the specific file you're editing, rather than all changed files.
- Install a git pre-commit hook with `pre-commit install` (optional)
  - This essentially runs `pre-commit run` automatically before creating local commits, applying formatters/linters on all changed files. If it "fails", the commit will be blocked.
  - Note that because many of the rules automatically apply fixes, typically you just need to stage the changes that they made, then reattempt your commit.
  - Whether to use the hook comes down to personal taste. If you like to make many small incremental "work" commits developing a feature, it may be too much overhead.

If you run into setup difficulty with `pre-commit`, you might want to ensure that you have a modern Python 3 local environment first. [pyenv](https://github.com/pyenv/pyenv) is good way to install such Python versions without affecting your system Python (recommend installing 3.9 to match Talon's current version). On macOS you can also `brew install pre-commit`.

## Automated tests

There are a number of automated unit tests in the repository. These are all run _outside_ of the Talon environment (e.g. we don't have access to Talon's window management APIs). These make use of a set of stubbed out Talon APIs in `test/stubs/` and a bit of class loader trickery in `conftest.py`.

To run the test suite you just need to install the `pytest` python package in to a non-Talon Python runtime you want to use for tests (i.e. don't install in the `~/.talon/.venv directory`). You can then just run the `pytest` command from the repository root to execute all the tests.

## Talon documentation

For official documentation on Talon's API and features, please visit https://talonvoice.com/docs/.

For community-generated documentation on Talon, please visit https://talon.wiki/

## Alternate installation method: Zip file

It is possible to install `community` by downloading and extracting a zip file instead of using `git`. Note that this approach is discouraged, because it makes it more difficult to keep track of any changes you may make to your copy of the files.

If you wish to install `community` by downloading and extracting a zip file, proceed as follows:

1. Download the [zip archive of community](https://github.com/talonhub/community/archive/refs/heads/main.zip)
1. Extract the files. If you don’t know how to extract zip files, a quick google search for "extract zip files" may be helpful.
1. Place these extracted files inside the `user` folder of the Talon Home directory. You can find this folder by right clicking the Talon icon in taskbar, clicking Scripting > Open ~/talon, and navigating to `user`.


# scadnano Python package

![Python package](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/workflows/Python%20package/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/scadnano-python-package/badge/?version=latest)](https://scadnano-python-package.readthedocs.io/en/latest/?badge=latest)

[scadnano](http://scadnano.org) ("scriptable-cadnano") is a program for designing synthetic DNA structures such as DNA origami.
The scadnano Python package
([source code repository here](https://github.com/UC-Davis-molecular-computing/scadnano-python-package))
is a library for programmatically creating and editing these nanostructures.
The scadnano project is developed and maintained by the UC Davis Molecular Computing group.
Note that [cadnano](https://cadnano.org) is a separate project, developed and maintained by the [Douglas lab](https://bionano.ucsf.edu/) at UCSF.

If you find scadnano useful in a scientific project, please cite its associated paper:

> scadnano: A browser-based, scriptable tool for designing DNA nanostructures.
  David Doty, Benjamin L Lee, and Tristan Stérin.
  DNA 2020: *Proceedings of the 26th International Conference on DNA Computing and Molecular Programming*
  [ [paper](https://doi.org/10.4230/LIPIcs.DNA.2020.9) | [BibTeX](https://web.cs.ucdavis.edu/~doty/papers/scadnano.bib) ]

*Note:* If you are reading this on the PyPI website, some of the links below won't work. Many are relative links intended to be read on the [GitHub README page](https://github.com/UC-Davis-molecular-computing/scadnano-python-package#readme).

## Table of contents

* [Overview](#overview)
* [Reporting issues](#reporting-issues)
* [Installation](#installation)
* [Example](#example)
* [Abbreviated syntax with chained methods](#abbreviated-syntax-with-chained-methods)
* [StrandBuilder object for iteratively building up strands with many domains](#strandbuilder-object-for-iteratively-building-up-strands-with-many-domains)
* [Tutorial](#tutorial)
* [API documentation](#api-documentation)
* [Other examples](#other-examples)
* [Contributing](#contributing)

## Overview

This package is used to write Python scripts outputting `.sc` files readable by [scadnano](https://scadnano.org), a web application useful for displaying and manually editing these structures. The purpose of this module is to help automate some of the task of creating DNA designs, as well as making large-scale changes to them that are easier to describe programmatically than to do by hand in the scadnano web interface.

We will try to announce breaking changes (and possibly new features) under the [GitHub releases page](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/releases). The version numbers in this Python library repo and the [web interface repo](https://github.com/UC-Davis-molecular-computing/scadnano/releases) won't always advance at the same time, and sometimes a feature is supported in one before the other.

Following [semantic versioning](https://semver.org/), version numbers are major.minor.patch, i.e., version 0.9.2 has minor version number 9. Prior to version 1.0.0, when a breaking change is made, this will increment the minor version (for example, going from 0.9.4 to 0.10.0). After version 1.0.0, breaking changes will increment the major version.

## Reporting issues

Please report issues in the web interface at the [scadnano web interface GitHub repository](https://github.com/UC-Davis-molecular-computing/scadnano/issues), and report issues in the Python scripting library at the [scadnano Python package GitHub repository](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/issues).

## Installation

Short version: type this at the command line:

```console
pip install scadnano
```

Read below for troubleshooting suggestions if that didn't work.

### Getting Python
The scadnano Python package requires Python version 3.7 or later.

To check your current version of Python, open a command line and type

```
python --version
```

If it is version 2.7 or below, type

```
python3 --version
```

If that fails, or reports Python version 3.6 or below, you will have to install a later version of Python. Follow [this link](https://www.python.org/downloads/) to install Python. You may also use an alternative Python distribution, such as [Anaconda](https://www.anaconda.com/products/individual#Downloads).

### Installing the scadnano Python package

Once Python is installed, there are two ways you can install the scadnano Python package:

1. pip (recommended)

    Use [pip](https://pypi.org/project/pip/) to install the package by executing the following at the command line:
    ```console
    pip install scadnano
    ```

    If it worked, you should be able to open a Python interpreter and import the scadnano module:

    ```console
    Python 3.7.9 (default, Aug 31 2020, 17:10:11) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import scadnano as sc
    >>> print(sc.Domain(helix=1, forward=True, start=0, end=8))
    Domain(, helix=1, forward=True, start=0, end=8)
    >>>
    ```

    ### Troubleshooting
    If the above does not work for you, here are some things to try.

    If your Python installation does not already have pip installed, you may have to install it.
    Executing [this Python script](https://bootstrap.pypa.io/get-pip.py) should work;
    see also
    https://docs.python.org/3/installing/index.html
    or
    https://www.liquidweb.com/kb/install-pip-windows/.

    Once pip is installed, or if you believe it is already installed, check your version of `pip` by typing
    ```
    pip --version
    ```
    It should say something like
    ```
    pip 19.3.1 from ...lib\site-packages\pip (python 3.8)
    ```
    If the version of Python at the end is Python 3.7 or higher, you are good. If it is version 2.7 or lower, type
    ```
    pip3 --version
    ```
    If that works and shows Python 3.7 or higher, you are good, but you should type `pip3` in the subsequent instructions instead of `pip`.

    If it shows Python 3.6, install the [dataclasses backport module](https://pypi.org/project/dataclasses/) via
    ```
    pip install dataclasses
    ```
    If it shows Python 3.5 or lower, then you will need to upgrade your Python version (recommended Python 3.7 or higher).

2. download

    As a simple alternative (in case you run into trouble using pip), you can simply download the scadnano.py file. However, you need to first install two packages that are required by scadnano: Install [openpyxl](https://pypi.org/project/openpyxl/) and [tabulate](https://pypi.org/project/tabulate/) by typing the following at the command line: `pip install openpyxl tabulate`.

    Download and place the following files in your [PYTHONPATH](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH) (e.g., in the same directory as the scripts you are running). **Note:** If you are reading this on the PyPI website or anywhere other than GitHub, the links below won't work. They are relative links intended to be read on the [GitHub README page](https://github.com/UC-Davis-molecular-computing/scadnano-python-package#readme).

    - *required*: [scadnano.py](scadnano/scadnano.py)
    - *optional*: [modifications.py](scadnano/modifications.py); This contains some common DNA modifications such as biotin and Cy3.
    - *optional*: [origami_rectangle.py](scadnano/origami_rectangle.py); This can help create origami rectangles, but it is not necessary to use scadnano.

    To download them, right-click on "Raw" near the top and select (in Chrome or Firefox) "Save link as...":
    ![](images/download_raw_screenshot.png)

    The scadnano package uses the Python package [xlwt](https://pypi.org/project/xlwt/) to write Excel files, so xlwt must be installed in order to call the method [`Design.write_idt_plate_excel_file()`](https://scadnano-python-package.readthedocs.io/#scadnano.Design.write_idt_plate_excel_file) to export an Excel file with DNA sequences. To install xlwt, type `pip install xlwt` at the command line. (If you instead use pip to install the scadnano package, xlwt will be automatically installed.)

## Example

Consider the following design:

![](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano/master/doc-images/screenshot-initial.png)

The following Python script produces this design.

```python
import scadnano as sc
import modifications as mod

def create_design() -> sc.Design:
    # helices
    helices = [sc.Helix(max_offset=48), sc.Helix(max_offset=48)]

    # left staple
    stap_left_domain1 = sc.Domain(helix=1, forward=True, start=8, end=24)
    stap_left_domain0 = sc.Domain(helix=0, forward=False, start=8, end=24)
    stap_left = sc.Strand(domains=[stap_left_domain1, stap_left_domain0])

    # right staple
    stap_right_domain0 = sc.Domain(helix=0, forward=False, start=24, end=40)
    stap_right_domain1 = sc.Domain(helix=1, forward=True, start=24, end=40)
    stap_right = sc.Strand(domains=[stap_right_domain0, stap_right_domain1])
    stap_right.set_modification_5p(mod.biotin_5p)

    # scaffold
    scaf_domain1_left = sc.Domain(helix=1, forward=False, start=8, end=24)
    scaf_domain0 = sc.Domain(helix=0, forward=True, start=8, end=40)
    loopout = sc.Loopout(length=3)
    scaf_domain1_right = sc.Domain(helix=1, forward=False, start=24, end=40)
    scaf = sc.Strand(domains=[scaf_domain1_left, scaf_domain0, loopout, scaf_domain1_right], is_scaffold=True)

    # whole design
    design = sc.Design(helices=helices, strands=[scaf, stap_left, stap_right], grid=sc.square)

    # deletions and insertions added to design are added to both strands on a helix
    design.add_deletion(helix=1, offset=20)
    design.add_insertion(helix=0, offset=14, length=1)
    design.add_insertion(helix=0, offset=26, length=2)

    # also assigns complement to strands other than scaf bound to it
    design.assign_dna(scaf, 'AACGT' * 18)

    return design

if __name__ == '__main__':
    design = create_design()
    design.write_scadnano_file(directory='output_designs')
```

Running the code above produces a `.sc` file that, if loaded into scadnano, should appear as in the screenshot above. The [web interface README](https://github.com/UC-Davis-molecular-computing/scadnano/blob/master/README.md#terminology) explains many of the terms used in the code (domain, helix, loopout, insertion, etc.).

## Abbreviated syntax with chained methods
Instead of explicitly creating variables and objects representing each domain in each strand, there is a shorter syntax using chained method calls. Instead of the above, create only the helices first, then create the Design. Then strands can be added using a shorter syntax, to describe how to draw the strand starting at the 5' end and moving to the 3' end. The following is a modified version of the above `create_design` function using these chained methods:

```python
def create_design() -> sc.Design:
    # helices
    helices = [sc.Helix(max_offset=48), sc.Helix(max_offset=48)]

    # whole design
    design = sc.Design(helices=helices, grid=sc.square)

    # for absolute offsets, call method "to"
    # left staple
    design.draw_strand(1, 8).to(24).cross(0).to(8)

    # for relative offsets, call method "move"
    # right staple
    design.draw_strand(0, 40).move(-16).cross(1).move(16).with_modification_5p(mod.biotin_5p)

    # scaffold
    design.draw_strand(1, 24).move(-16).cross(0).move(32).loopout(1, 3).move(-16).as_scaffold()

    # deletions and insertions added to design are added to both strands on a helix
    design.add_deletion(helix=1, offset=20)
    design.add_insertion(helix=0, offset=14, length=1)
    design.add_insertion(helix=0, offset=26, length=2)

    # also assigns complement to strands other than scaf bound to it
    design.assign_dna(design.scaffold, 'AACGT' * 18)

    return design
```

Documentation is available in the [API docs](https://scadnano-python-package.readthedocs.io/en/latest/#scadnano.Design.draw_strand).

## StrandBuilder object for iteratively building up strands with many domains

The method [`Design.draw_strand`](https://scadnano-python-package.readthedocs.io/en/latest/#scadnano.Design.draw_strand), as well as all those that follow it in a chained method call (e.g., `move`, `cross`, etc.) all return an instance of the class [`StrandBuilder`](https://scadnano-python-package.readthedocs.io/en/latest/#scadnano.StrandBuilder).
Above, that `StrandBuilder` instance is anonymous, i.e., never assigned to a variable.
Some long strands may be easier to specify with loops, for example an M13 scaffold strand for an origami.
If so, then to use the above methods, assign the `StrandBuilder` object to a variable, and call the relevant methods on that object to build up the strand in each iteration of the loop.
For example, the following modification of the above `create_design` function creates a linear scaffold strand that zig-zags back and forth across 32 helices:

```python
def create_design() -> sc.Design:
    num_helices = 32
    helices = [sc.Helix(max_offset=200) for _ in range(num_helices)]
    design = sc.Design(helices=helices, grid=sc.square)
    strand_builder = design.draw_strand(0, 0)
    for helix in range(num_helices):
        # move forward if on an even helix, otherwise move in reverse
        move_distance = 200 if helix % 2 == 0 else -200
        strand_builder.move(move_distance)
        if helix < 31: # crossover to next helix, unless it's the last helix
            strand_builder.cross(helix + 1)
    strand_builder.as_scaffold()
    return design
```

## API Documentation

Online documentation of the package API (which classes, methods, functions, and constants are provided by the package) is located here:
https://scadnano-python-package.readthedocs.io

## Tutorial

A [tutorial](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/blob/master/tutorial/tutorial.md) shows how to create a "standard" 24-helix DNA origami rectangle using the scadnano Python package.

## Other examples

*Note:* If you are reading this on the PyPI website, the links below won't work. They are relative links intended to be read on the [GitHub README page](https://github.com/UC-Davis-molecular-computing/scadnano-python-package#readme).

Several example scripts are located in the
[examples/](examples) subfolder.
Their output is contained in the
[examples/output_designs/](examples/output_designs) subfolder.

## Contributing
If you wish to contribute to scadnano, please see the [CONTRIBUTING document](CONTRIBUTING.md) to contribute to the scadnano Python package. There is also a [CONTRIBUTING document](https://github.com/UC-Davis-molecular-computing/scadnano/blob/master/CONTRIBUTING.md) for the web interface.


# ![RaspiBlitz](pictures/raspilogo_tile_400px.png)

_Build your own Bitcoin & Lightning Fullnode on a RaspberryPi with an optional Display._

![RaspiBlitz](pictures/raspiblitz.jpg)

**The RaspiBlitz is a do-it-yourself Bitcoin & Lightning Fullnode running on a RaspberryPi 4&5 with a nice display for easy setup & monitoring.**

RaspiBlitz is mainly targeted for learning how to run your own node decentralized from home - because: Not your Node, Not your Rules. Discover & develop the open-source ecosystem of Bitcoin by becoming a full part of it.

**Links to Quickstart your RaspiBlitz journey:**

- [Project Homepage: raspiblitz.org](https://raspiblitz.org)
- [How to build & setup your own RaspiBlitz & Documentation](https://docs.raspiblitz.org/docs/setup/intro)
- [Download latest SD Card images](https://docs.raspiblitz.org/docs/setup/software-setup/download)
- [How to get Support](https://docs.raspiblitz.org/docs/community/support)

**Additional Resources:**

- [ChangeLog](CHANGES.md)
- [FAQ User](https://docs.raspiblitz.org/docs/faq)
- [FAQ Development](https://docs.raspiblitz.org/docs/faq/dev)
- [FAQ Core Lightning](https://docs.raspiblitz.org/docs/faq/cl)
- [Workshop Tutorial](https://docs.raspiblitz.org/docs/community/workshops)
- [Security Policy](https://docs.raspiblitz.org/docs/security)
- [Alternative Platforms](alternative.platforms/README.md)
- [Automated Builds](ci/README.md)
- [MIT OpenSource License](LICENSE)

**Developer Notes:**

This is main RaspiBlitz repo containing the **bash & python** scripts to build the RaspiBlitz software. It it complimented by the following side repos:

- [WebUI](https://github.com/raspiblitz/raspiblitz-web) (React & Tailwind)
- [API](https://github.com/fusion44/blitz_api) (Python FastAPI)
- [Documentation](https://github.com/raspiblitz/raspiblitz-docs) (Docusaurus)

To get started with RaspiBlitz Development check the [Community Development](CONTRIBUTING.md) notes.


================
ansible-rulebook
================

.. maintainenance status
.. image:: https://img.shields.io/badge/Maintained%3F-yes-green.svg

.. codecov
.. image:: https://codecov.io/gh/ansible/ansible-rulebook/branch/main/graph/badge.svg?token=U1mIB6PI9I
        :target: https://codecov.io/gh/ansible/ansible-rulebook

.. gh workflow
.. image:: https://github.com/ansible/ansible-rulebook/actions/workflows/ci.yml/badge.svg?branch=main
        :target: https://github.com/ansible/ansible-rulebook/actions/workflows/ci.yml?query=branch%3Amain

.. python versions
.. image:: https://img.shields.io/pypi/pyversions/ansible-rulebook.svg
        :target: https://pypi.org/project/ansible-rulebook/

.. pypi
.. image:: https://img.shields.io/pypi/v/ansible_rulebook.svg
        :target: https://pypi.python.org/pypi/ansible_rulebook

.. Docs
.. image:: https://readthedocs.org/projects/ansible-rulebook/badge/?version=latest
        :target: https://ansible-rulebook.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. Last release
.. image:: https://img.shields.io/github/v/release/ansible/ansible-rulebook.svg
        :target: https://github.com/ansible/ansible-rulebook/releases

.. License
.. image:: https://img.shields.io/github/license/ansible/ansible-rulebook.svg
        :target: https://github.com/ansible/ansible-rulebook/blob/main/LICENSE

* Free software: Apache Software License 2.0

Event driven automation for Ansible.

The real world is full of events that change the state of our software and systems.
Our automation needs to be able to react to those events. Introducing *ansible-rulebook*; a command
line tool that allows you to recognize events that you care about and react accordingly
by running a playbook or other actions.

Features
--------

* Connect to event streams and handle events in near real time.
* Conditionally launch playbooks or Tower's job templates based on rules that match events in event streams.
* Store facts about the world from data in events
* Limit the hosts where playbooks run based on event data
* Run smaller jobs that run more quickly by limiting the hosts where playbooks run based on event data

===============
Installation
===============
Please follow the `Installation guide <https://ansible-rulebook.readthedocs.io/en/stable/installation.html>`_ to install ``ansible-rulebook``.

===============
Documentation
===============
Please refer to the `Getting Started guide <https://ansible-rulebook.readthedocs.io/en/stable/getting_started.html>`_ to get started with ``ansible-rulebook``.

===============
Contributing
===============
We ask all of our community members and contributors to adhere to the `Ansible code of conduct <https://docs.ansible.com/ansible/latest/community/code_of_conduct.html>`_.
If you have questions or need assistance, please reach out to our community team at codeofconduct@ansible.com

Refer to the Contributing guide to get started developing, reporting bugs or providing feedback.

Credits
-------

ansible-rulebook is sponsored by `Red Hat, Inc <https://www.redhat.com>`_.

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


OpenPipeline
================

<!-- README.md is generated by running 'quarto render README.qmd' -->

Extensible single cell analysis pipelines for reproducible and
large-scale single cell processing using Viash and Nextflow.

The provided pipelines are built using the [Viash
framework](http://www.viash.io) on top of the nextflow workflow system.
For more information on Nextflow please visit the [Nextflow github
page](https://github.com/nextflow-io/nextflow) and the [Nextflow read
the docs page](https://www.nextflow.io/docs/latest/index.html).


## Fast and Accurate ML in 3 Lines of Code

[![Latest Release](https://img.shields.io/github/v/release/autogluon/autogluon)](https://github.com/autogluon/autogluon/releases)
[![Conda Forge](https://img.shields.io/conda/vn/conda-forge/autogluon.svg)](https://anaconda.org/conda-forge/autogluon)
[![Python Versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)](https://pypi.org/project/autogluon/)
[![Downloads](https://pepy.tech/badge/autogluon/month)](https://pepy.tech/project/autogluon)
[![GitHub license](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
[![Discord](https://img.shields.io/discord/1043248669505368144?logo=discord&style=flat)](https://discord.gg/wjUmjqAc2N)
[![Twitter](https://img.shields.io/twitter/follow/autogluon?style=social)](https://twitter.com/autogluon)
[![Continuous Integration](https://github.com/autogluon/autogluon/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/autogluon/autogluon/actions/workflows/continuous_integration.yml)
[![Platform Tests](https://github.com/autogluon/autogluon/actions/workflows/platform_tests-command.yml/badge.svg?event=schedule)](https://github.com/autogluon/autogluon/actions/workflows/platform_tests-command.yml)

[Installation](https://auto.gluon.ai/stable/install.html) | [Documentation](https://auto.gluon.ai/stable/index.html) | [Release Notes](https://auto.gluon.ai/stable/whats_new/index.html)

AutoGluon automates machine learning tasks enabling you to easily achieve strong predictive performance in your applications.  With just a few lines of code, you can train and deploy high-accuracy machine learning and deep learning models on image, text, time series, and tabular data.

## 💾 Installation

AutoGluon is supported on Python 3.8 - 3.11 and is available on Linux, MacOS, and Windows.

You can install AutoGluon with:

```python
pip install autogluon
```

Visit our [Installation Guide](https://auto.gluon.ai/stable/install.html) for detailed instructions, including GPU support, Conda installs, and optional dependencies.

## :zap: Quickstart

Build accurate end-to-end ML models in just 3 lines of code!

```python
from autogluon.tabular import TabularPredictor
predictor = TabularPredictor(label="class").fit("train.csv")
predictions = predictor.predict("test.csv")
```

| AutoGluon Task      |                                                                                Quickstart                                                                                |                                                                                API                                                                                |
|:--------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| TabularPredictor    | [![Quick Start](https://img.shields.io/static/v1?label=&message=tutorial&color=grey)](https://auto.gluon.ai/stable/tutorials/tabular/tabular-quick-start.html) |                 [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://auto.gluon.ai/stable/api/autogluon.tabular.TabularPredictor.html)                 |
| MultiModalPredictor | [![Quick Start](https://img.shields.io/static/v1?label=&message=tutorial&color=grey)](https://auto.gluon.ai/stable/tutorials/multimodal/multimodal_prediction/multimodal-quick-start.html)            | [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://auto.gluon.ai/stable/api/autogluon.multimodal.MultiModalPredictor.html) |
| TimeSeriesPredictor | [![Quick Start](https://img.shields.io/static/v1?label=&message=tutorial&color=grey)](https://auto.gluon.ai/stable/tutorials/timeseries/forecasting-quick-start.html)            | [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://auto.gluon.ai/stable/api/autogluon.timeseries.TimeSeriesPredictor.html) |

## :mag: Resources

### Hands-on Tutorials / Talks

Below is a curated list of recent tutorials and talks on AutoGluon. A comprehensive list is available [here](AWESOME.md#videos--tutorials).

| Title                                                                                | Format   | Location                                                                         | Date       |
|--------------------------------------------------------------------------------------------------------------------------|----------|----------------------------------------------------------------------------------|------------|
| :tv: [AutoGluon 1.0: Shattering the AutoML Ceiling with Zero Lines of Code](https://www.youtube.com/watch?v=5tvp_Ihgnuk) | Tutorial | [AutoML Conf 2023](https://2023.automl.cc/)                                      | 2023/09/12 |
| :sound: [AutoGluon: The Story](https://automlpodcast.com/episode/autogluon-the-story)                                    | Podcast  | [The AutoML Podcast](https://automlpodcast.com/)                                 | 2023/09/05 |
| :tv: [AutoGluon: AutoML for Tabular, Multimodal, and Time Series Data](https://youtu.be/Lwu15m5mmbs?si=jSaFJDqkTU27C0fa) | Tutorial | PyData Berlin                                                                    | 2023/06/20 |
| :tv: [Solving Complex ML Problems in a few Lines of Code with AutoGluon](https://www.youtube.com/watch?v=J1UQUCPB88I)    | Tutorial | PyData Seattle                                                                   | 2023/06/20 |
| :tv: [The AutoML Revolution](https://www.youtube.com/watch?v=VAAITEds-28)                                                | Tutorial | [Fall AutoML School 2022](https://sites.google.com/view/automl-fall-school-2022) | 2022/10/18 |

### Scientific Publications
- [AutoGluon-Tabular: Robust and Accurate AutoML for Structured Data](https://arxiv.org/pdf/2003.06505.pdf) (*Arxiv*, 2020) ([BibTeX](CITING.md#general-usage--autogluontabular))
- [Fast, Accurate, and Simple Models for Tabular Data via Augmented Distillation](https://proceedings.neurips.cc/paper/2020/hash/62d75fb2e3075506e8837d8f55021ab1-Abstract.html) (*NeurIPS*, 2020) ([BibTeX](CITING.md#tabular-distillation))
- [Benchmarking Multimodal AutoML for Tabular Data with Text Fields](https://datasets-benchmarks-proceedings.neurips.cc/paper/2021/file/9bf31c7ff062936a96d3c8bd1f8f2ff3-Paper-round2.pdf) (*NeurIPS*, 2021) ([BibTeX](CITING.md#autogluonmultimodal))
- [XTab: Cross-table Pretraining for Tabular Transformers](https://proceedings.mlr.press/v202/zhu23k/zhu23k.pdf) (*ICML*, 2023)
- [AutoGluon-TimeSeries: AutoML for Probabilistic Time Series Forecasting](https://arxiv.org/abs/2308.05566) (*AutoML Conf*, 2023) ([BibTeX](CITING.md#autogluontimeseries))
- [TabRepo: A Large Scale Repository of Tabular Model Evaluations and its AutoML Applications](https://arxiv.org/pdf/2311.02971.pdf) (*Under Review*, 2024)

### Articles
- [AutoGluon-TimeSeries: Every Time Series Forecasting Model In One Library](https://towardsdatascience.com/autogluon-timeseries-every-time-series-forecasting-model-in-one-library-29a3bf6879db) (*Towards Data Science*, Jan 2024)
- [AutoGluon for tabular data: 3 lines of code to achieve top 1% in Kaggle competitions](https://aws.amazon.com/blogs/opensource/machine-learning-with-autogluon-an-open-source-automl-library/) (*AWS Open Source Blog*, Mar 2020)
- [AutoGluon overview & example applications](https://towardsdatascience.com/autogluon-deep-learning-automl-5cdb4e2388ec?source=friends_link&sk=e3d17d06880ac714e47f07f39178fdf2) (*Towards Data Science*, Dec 2019)

### Train/Deploy AutoGluon in the Cloud
- [AutoGluon Cloud](https://auto.gluon.ai/cloud/stable/index.html) (Recommended)
- [AutoGluon on SageMaker AutoPilot](https://auto.gluon.ai/stable/tutorials/cloud_fit_deploy/autopilot-autogluon.html)
- [AutoGluon on Amazon SageMaker](https://auto.gluon.ai/stable/tutorials/cloud_fit_deploy/cloud-aws-sagemaker-train-deploy.html)
- [AutoGluon Deep Learning Containers](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#autogluon-training-containers) (Security certified & maintained by the AutoGluon developers)
- [AutoGluon Official Docker Container](https://hub.docker.com/r/autogluon/autogluon)
- [AutoGluon-Tabular on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-n4zf5pmjt7ism) (Not maintained by us)

## :pencil: Citing AutoGluon

If you use AutoGluon in a scientific publication, please refer to our [citation guide](CITING.md).

## :wave: How to get involved

We are actively accepting code contributions to the AutoGluon project. If you are interested in contributing to AutoGluon, please read the [Contributing Guide](https://github.com/autogluon/autogluon/blob/master/CONTRIBUTING.md) to get started.

## :classical_building: License

This library is licensed under the Apache 2.0 License.


**Machine learning metrics for distributed, scalable PyTorch applications.**

______________________________________________________________________

  What is Torchmetrics •
  Implementing a metric •
  Built-in metrics •
  Docs •
  Community •
  License

______________________________________________________________________

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/torchmetrics)](https://pypi.org/project/torchmetrics/)
[![PyPI Status](https://badge.fury.io/py/torchmetrics.svg)](https://badge.fury.io/py/torchmetrics)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/torchmetrics)
](https://pepy.tech/project/torchmetrics)
[![Conda](https://img.shields.io/conda/v/conda-forge/torchmetrics?label=conda&color=success)](https://anaconda.org/conda-forge/torchmetrics)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/torchmetrics/blob/master/LICENSE)

[![CI testing | CPU](https://github.com/Lightning-AI/torchmetrics/actions/workflows/ci-tests.yml/badge.svg?event=push)](https://github.com/Lightning-AI/torchmetrics/actions/workflows/ci-tests.yml)
[![Build Status](https://dev.azure.com/Lightning-AI/Metrics/_apis/build/status%2FTM.unittests?branchName=master)](https://dev.azure.com/Lightning-AI/Metrics/_build/latest?definitionId=54&branchName=master)
[![codecov](https://codecov.io/gh/Lightning-AI/torchmetrics/branch/master/graph/badge.svg?token=NER6LPI3HS)](https://codecov.io/gh/Lightning-AI/torchmetrics)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Lightning-AI/torchmetrics/master.svg)](https://results.pre-commit.ci/latest/github/Lightning-AI/torchmetrics/master)

[![Documentation Status](https://readthedocs.org/projects/torchmetrics/badge/?version=latest)](https://torchmetrics.readthedocs.io/en/latest/?badge=latest)
[![Discord](https://img.shields.io/discord/1077906959069626439?style=plastic)](https://discord.gg/VptPCZkGNa)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5844769.svg)](https://doi.org/10.5281/zenodo.5844769)
[![JOSS status](https://joss.theoj.org/papers/561d9bb59b400158bc8204e2639dca43/status.svg)](https://joss.theoj.org/papers/561d9bb59b400158bc8204e2639dca43)

______________________________________________________________________

## Installation

Simple installation from PyPI

```bash
pip install torchmetrics
```

  Other installations

Install using conda

```bash
conda install -c conda-forge torchmetrics
```

Pip from source

```bash
# with git
pip install git+https://github.com/Lightning-AI/torchmetrics.git@release/stable
```

Pip from archive

```bash
pip install https://github.com/Lightning-AI/torchmetrics/archive/refs/heads/release/stable.zip
```

Extra dependencies for specialized metrics:

```bash
pip install torchmetrics[audio]
pip install torchmetrics[image]
pip install torchmetrics[text]
pip install torchmetrics[all]  # install all of the above
```

Install latest developer version

```bash
pip install https://github.com/Lightning-AI/torchmetrics/archive/master.zip
```

______________________________________________________________________

## What is TorchMetrics

TorchMetrics is a collection of 100+ PyTorch metrics implementations and an easy-to-use API to create custom metrics. It offers:

- A standardized interface to increase reproducibility
- Reduces boilerplate
- Automatic accumulation over batches
- Metrics optimized for distributed-training
- Automatic synchronization between multiple devices

You can use TorchMetrics with any PyTorch model or with [PyTorch Lightning](https://lightning.ai/docs/pytorch/stable/) to enjoy additional features such as:

- Module metrics are automatically placed on the correct device.
- Native support for logging metrics in Lightning to reduce even more boilerplate.

## Using TorchMetrics

### Module metrics

The [module-based metrics](https://lightning.ai/docs/torchmetrics/stable/references/metric.html) contain internal metric states (similar to the parameters of the PyTorch module) that automate accumulation and synchronization across devices!

- Automatic accumulation over multiple batches
- Automatic synchronization between multiple devices
- Metric arithmetic

**This can be run on CPU, single GPU or multi-GPUs!**

For the single GPU/CPU case:

```python
import torch

# import our library
import torchmetrics

# initialize metric
metric = torchmetrics.classification.Accuracy(task="multiclass", num_classes=5)

# move the metric to device you want computations to take place
device = "cuda" if torch.cuda.is_available() else "cpu"
metric.to(device)

n_batches = 10
for i in range(n_batches):
    # simulate a classification problem
    preds = torch.randn(10, 5).softmax(dim=-1).to(device)
    target = torch.randint(5, (10,)).to(device)

    # metric on current batch
    acc = metric(preds, target)
    print(f"Accuracy on batch {i}: {acc}")

# metric on all batches using custom accumulation
acc = metric.compute()
print(f"Accuracy on all data: {acc}")
```

Module metric usage remains the same when using multiple GPUs or multiple nodes.

  Example using DDP

```python
import os
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
from torch import nn
from torch.nn.parallel import DistributedDataParallel as DDP
import torchmetrics

def metric_ddp(rank, world_size):
    os.environ["MASTER_ADDR"] = "localhost"
    os.environ["MASTER_PORT"] = "12355"

    # create default process group
    dist.init_process_group("gloo", rank=rank, world_size=world_size)

    # initialize model
    metric = torchmetrics.classification.Accuracy(task="multiclass", num_classes=5)

    # define a model and append your metric to it
    # this allows metric states to be placed on correct accelerators when
    # .to(device) is called on the model
    model = nn.Linear(10, 10)
    model.metric = metric
    model = model.to(rank)

    # initialize DDP
    model = DDP(model, device_ids=[rank])

    n_epochs = 5
    # this shows iteration over multiple training epochs
    for n in range(n_epochs):
        # this will be replaced by a DataLoader with a DistributedSampler
        n_batches = 10
        for i in range(n_batches):
            # simulate a classification problem
            preds = torch.randn(10, 5).softmax(dim=-1)
            target = torch.randint(5, (10,))

            # metric on current batch
            acc = metric(preds, target)
            if rank == 0:  # print only for rank 0
                print(f"Accuracy on batch {i}: {acc}")

        # metric on all batches and all accelerators using custom accumulation
        # accuracy is same across both accelerators
        acc = metric.compute()
        print(f"Accuracy on all data: {acc}, accelerator rank: {rank}")

        # Resetting internal state such that metric ready for new data
        metric.reset()

    # cleanup
    dist.destroy_process_group()

if __name__ == "__main__":
    world_size = 2  # number of gpus to parallelize over
    mp.spawn(metric_ddp, args=(world_size,), nprocs=world_size, join=True)
```

### Implementing your own Module metric

Implementing your own metric is as easy as subclassing an [`torch.nn.Module`](https://pytorch.org/docs/stable/generated/torch.nn.Module.html). Simply, subclass `torchmetrics.Metric`
and just implement the `update` and `compute` methods:

```python
import torch
from torchmetrics import Metric

class MyAccuracy(Metric):
    def __init__(self):
        # remember to call super
        super().__init__()
        # call `self.add_state`for every internal state that is needed for the metrics computations
        # dist_reduce_fx indicates the function that should be used to reduce
        # state from multiple processes
        self.add_state("correct", default=torch.tensor(0), dist_reduce_fx="sum")
        self.add_state("total", default=torch.tensor(0), dist_reduce_fx="sum")

    def update(self, preds: torch.Tensor, target: torch.Tensor) -> None:
        # extract predicted class index for computing accuracy
        preds = preds.argmax(dim=-1)
        assert preds.shape == target.shape
        # update metric states
        self.correct += torch.sum(preds == target)
        self.total += target.numel()

    def compute(self) -> torch.Tensor:
        # compute final result
        return self.correct.float() / self.total

my_metric = MyAccuracy()
preds = torch.randn(10, 5).softmax(dim=-1)
target = torch.randint(5, (10,))

print(my_metric(preds, target))
```

### Functional metrics

Similar to [`torch.nn`](https://pytorch.org/docs/stable/nn.html), most metrics have both a [module-based](https://lightning.ai/docs/torchmetrics/stable/references/metric.html) and functional version.
The functional versions are simple python functions that as input take [torch.tensors](https://pytorch.org/docs/stable/tensors.html) and return the corresponding metric as a [torch.tensor](https://pytorch.org/docs/stable/tensors.html).

```python
import torch

# import our library
import torchmetrics

# simulate a classification problem
preds = torch.randn(10, 5).softmax(dim=-1)
target = torch.randint(5, (10,))

acc = torchmetrics.functional.classification.multiclass_accuracy(
    preds, target, num_classes=5
)
```

### Covered domains and example metrics

In total TorchMetrics contains [100+ metrics](https://lightning.ai/docs/torchmetrics/stable/all-metrics.html), which
covers the following domains:

- Audio
- Classification
- Detection
- Information Retrieval
- Image
- Multimodal (Image-Text)
- Nominal
- Regression
- Segmentation
- Text

Each domain may require some additional dependencies which can be installed with `pip install torchmetrics[audio]`,
`pip install torchmetrics['image']` etc.

### Additional features

#### Plotting

Visualization of metrics can be important to help understand what is going on with your machine learning algorithms.
Torchmetrics have built-in plotting support (install dependencies with `pip install torchmetrics[visual]`) for nearly
all modular metrics through the `.plot` method. Simply call the method to get a simple visualization of any metric!

```python
import torch
from torchmetrics.classification import MulticlassAccuracy, MulticlassConfusionMatrix

num_classes = 3

# this will generate two distributions that comes more similar as iterations increase
w = torch.randn(num_classes)
target = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True)
preds = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True)

acc = MulticlassAccuracy(num_classes=num_classes, average="micro")
acc_per_class = MulticlassAccuracy(num_classes=num_classes, average=None)
confmat = MulticlassConfusionMatrix(num_classes=num_classes)

# plot single value
for i in range(5):
    acc_per_class.update(preds(i), target(i))
    confmat.update(preds(i), target(i))
fig1, ax1 = acc_per_class.plot()
fig2, ax2 = confmat.plot()

# plot multiple values
values = []
for i in range(10):
    values.append(acc(preds(i), target(i)))
fig3, ax3 = acc.plot(values)
```

For examples of plotting different metrics try running [this example file](_samples/plotting.py).

## Contribute!

The lightning + TorchMetrics team is hard at work adding even more metrics.
But we're looking for incredible contributors like you to submit new metrics
and improve existing ones!

Join our [Discord](https://discord.com/invite/tfXFetEZxv) to get help with becoming a contributor!

## Community

For help or questions, join our huge community on [Discord](https://discord.com/invite/tfXFetEZxv)!

## Citation

We’re excited to continue the strong legacy of open source software and have been inspired
over the years by Caffe, Theano, Keras, PyTorch, torchbearer, ignite, sklearn and fast.ai.

If you want to cite this framework feel free to use GitHub's built-in citation option to generate a bibtex or APA-Style citation based on [this file](https://github.com/Lightning-AI/torchmetrics/blob/master/CITATION.cff) (but only if you loved it 😊).

## License

Please observe the Apache 2.0 license that is listed in this repository.
In addition, the Lightning framework is Patent Pending.


[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bcgov_lear&metric=alert_status)](https://sonarcloud.io/dashboard?id=bcgov_lear)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=bcgov_lear&metric=ncloc)](https://sonarcloud.io/dashboard?id=bcgov_lear)
[![img](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)

# lear
Legal Entities and Asset Registry


========
holidays
========

A fast, efficient Python library for generating country- and subdivision- (e.g.
state or province) specific sets of government-designated holidays on the fly.
It aims to make determining whether a specific date is a holiday as fast and
flexible as possible.

.. |downloads| image:: https://img.shields.io/pypi/dm/holidays?color=41B5BE&style=flat
    :target: https://pypi.org/project/holidays
    :alt: PyPI downloads

.. |version| image:: https://img.shields.io/pypi/v/holidays?color=41B5BE&label=version&style=flat
    :target: https://pypi.org/project/holidays
    :alt: PyPI version

.. |release date| image:: https://img.shields.io/github/release-date/vacanza/python-holidays?color=41B5BE&style=flat
    :target: https://github.com/vacanza/python-holidays/releases
    :alt: PyPI release date

.. |status| image:: https://img.shields.io/github/actions/workflow/status/vacanza/python-holidays/ci-cd.yml?branch=dev&color=41BE4A&style=flat
    :target: https://github.com/vacanza/python-holidays/actions/workflows/ci-cd.yml?query=branch%3Adev
    :alt: CI/CD status

.. |documentation| image:: https://img.shields.io/readthedocs/python-holidays?color=41BE4A&style=flat
    :target: https://python-holidays.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation status

.. |license| image:: https://img.shields.io/github/license/vacanza/python-holidays?color=41B5BE&style=flat
    :target: https://github.com/vacanza/python-holidays/blob/dev/LICENSE
    :alt: License

.. |python versions| image:: https://img.shields.io/pypi/pyversions/holidays?label=python&color=41B5BE&style=flat
    :target: https://pypi.org/project/holidays
    :alt: Python supported versions

.. |style| image:: https://img.shields.io/badge/style-ruff-41B5BE?style=flat
    :target: https://github.com/astral-sh/ruff
    :alt: Code style

.. |coverage| image:: https://img.shields.io/codecov/c/github/vacanza/python-holidays/dev?color=41B5BE&style=flat
    :target: https://app.codecov.io/gh/vacanza/python-holidays
    :alt: Code coverage

.. |stars| image:: https://img.shields.io/github/stars/vacanza/python-holidays?color=41BE4A&style=flat
    :target: https://github.com/vacanza/python-holidays/stargazers
    :alt: GitHub stars

.. |forks| image:: https://img.shields.io/github/forks/vacanza/python-holidays?color=41BE4A&style=flat
    :target: https://github.com/vacanza/python-holidays/forks
    :alt: GitHub forks

.. |contributors| image:: https://img.shields.io/github/contributors/vacanza/python-holidays?color=41BE4A&style=flat
    :target: https://github.com/vacanza/python-holidays/graphs/contributors
    :alt: GitHub contributors

.. |last commit| image:: https://img.shields.io/github/last-commit/vacanza/python-holidays/dev?color=41BE4A&style=flat
    :target: https://github.com/vacanza/python-holidays/commits/dev
    :alt: GitHub last commit

+--------+------------------------------------------------+
| PyPI   | |downloads| |version| |release date|           |
+--------+------------------------------------------------+
| CI/CD  | |status| |documentation|                       |
+--------+------------------------------------------------+
| Code   | |license| |python versions| |style| |coverage| |
+--------+------------------------------------------------+
| GitHub | |stars| |forks| |contributors| |last commit|   |
+--------+------------------------------------------------+

Install
-------

The latest stable version can always be installed or updated via pip:

.. code-block:: shell

    $ pip install --upgrade holidays

The latest development (dev) version can be installed directly from GitHub:

.. code-block:: shell

    $ pip install --upgrade https://github.com/vacanza/python-holidays/tarball/dev

All new features are always first pushed to dev branch, then released on
main branch upon official version upgrades.

Documentation
-------------

.. _Read the Docs: https://python-holidays.readthedocs.io/

The documentation is hosted on `Read the Docs`_.

Quick Start
-----------

.. code-block:: python

    from datetime import date
    import holidays

    us_holidays = holidays.US()  # this is a dict-like object
    # the below is the same, but takes a string:
    us_holidays = holidays.country_holidays('US')  # this is a dict-like object

    nyse_holidays = holidays.NYSE()  # this is a dict-like object
    # the below is the same, but takes a string:
    nyse_holidays = holidays.financial_holidays('NYSE')  # this is a dict-like object

    date(2015, 1, 1) in us_holidays  # True
    date(2015, 1, 2) in us_holidays  # False
    us_holidays.get('2014-01-01')  # "New Year's Day"

The HolidayBase dict-like class will also recognize date strings and Unix
timestamps:

.. code-block:: python

    '2014-01-01' in us_holidays  # True
    '1/1/2014' in us_holidays    # True
    1388597445 in us_holidays    # True

Some holidays may be only present in parts of a country:

.. code-block:: python

    us_pr_holidays = holidays.country_holidays('US', subdiv='PR')
    '2018-01-06' in us_holidays     # False
    '2018-01-06' in us_pr_holidays  # True

.. _python-holidays documentation: https://python-holidays.readthedocs.io/

Please see the `python-holidays documentation`_ for additional examples and
detailed information.

Available Countries
-------------------

.. _ISO 3166-1 alpha-2 code: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
.. _ISO 3166-2 code: https://en.wikipedia.org/wiki/ISO_3166-2
.. _ISO 639-1 code: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
.. _ISO 639-2 code: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

We currently support 148 country codes. The standard way to refer to a country
is by using its `ISO 3166-1 alpha-2 code`_, the same used for domain names, and
for a subdivision its `ISO 3166-2 code`_. Some countries have common or foreign
names or abbreviations as aliases for their subdivisions. These are defined in
the (optional) ``subdivisions_aliases`` attribute.
Some of the countries support more than one language for holiday names output.
A default language is defined by ``default_language`` (optional) attribute
for each entity and is used as a fallback when neither user specified
language nor user locale language available. The default language code is
a `ISO 639-1 code`_. A list of all languages supported by country is defined by
``supported_languages`` (optional) attribute. If there is no designated
`ISO 639-1 code`_ then `ISO 639-2 code`_ can be used.

Many countries have other categories of holidays in addition to common (national-wide) holidays:
bank holidays, school holidays, additional (paid or non-paid) holidays, holidays of state or
public employees, religious holidays (valid only for these religions followers). A list of all
categories supported by country is defined by ``supported_categories`` (optional) attribute.

The following is a list of supported countries, their subdivisions followed by their
aliases (if any) in brackets, available languages and additional holiday categories.
All countries support **PUBLIC** holidays category by default.
All other default values are highlighted with bold:

.. list-table::
   :widths: 20 4 46 20 10
   :header-rows: 1
   :class: tight-table

   * - Country
     - Code
     - Subdivisions
     - Supported Languages
     - Supported Categories
   * - Albania
     - AL
     -
     -
     -
   * - Algeria
     - DZ
     -
     - **ar**, en_US, fr
     -
   * - American Samoa
     - AS
     - Can also be loaded as country US, subdivision AS
     -
     - UNOFFICIAL
   * - Andorra
     - AD
     - Parishes: 02, 03, 04, 05, 06, 07, 08
     -
     -
   * - Angola
     - AO
     -
     - en_US, **pt_AO**, uk
     -
   * - Argentina
     - AR
     -
     - en_US, **es**, uk
     -
   * - Armenia
     - AM
     -
     - en_US, **hy**
     -
   * - Aruba
     - AW
     -
     - en_US, nl, **pap_AW**, uk
     -
   * - Australia
     - AU
     - States and territories: ACT (Australian Capital Territory), NSW (New South Wales), NT (Northern Territory), QLD (Queensland), SA (South Australia), TAS (Tasmania), VIC (Victoria), WA (Western Australia)
     -
     - BANK, HALF_DAY
   * - Austria
     - AT
     - States: 1 (Burgenland, Bgld, B), 2 (Kärnten, Ktn, K), 3 (Niederösterreich, NÖ, N), 4 (Oberösterreich, OÖ, O), 5 (Salzburg, Sbg, S), 6 (Steiermark, Stmk, St), 7 (Tirol, T), 8 (Vorarlberg, Vbg, V), 9 (Wien, W)
     - **de**, en_US, uk
     - BANK
   * - Azerbaijan
     - AZ
     -
     - **az**, en_US, uk
     - WORKDAY
   * - Bahamas
     - BS
     -
     -
     -
   * - Bahrain
     - BH
     -
     - **ar**, en_US
     -
   * - Bangladesh
     - BD
     -
     -
     -
   * - Barbados
     - BB
     -
     -
     -
   * - Belarus
     - BY
     -
     - **be**, en_US
     -
   * - Belgium
     - BE
     -
     - de, en_US, fr, **nl**, uk
     - BANK
   * - Belize
     - BZ
     -
     -
     -
   * - Bolivia
     - BO
     - Departments: B, C, H, L, N, O, P, S, T
     - en_US, **es**, uk
     -
   * - Bosnia and Herzegovina
     - BA
     - Entities and district: BIH, BRC, SRP
     - **bs**, en_US, sr, uk
     -
   * - Botswana
     - BW
     -
     -
     -
   * - Brazil
     - BR
     - States: AC, AL, AM, AP, BA, CE, DF, ES, GO, MA, MG, MS, MT, PA, PB, PE, PI, PR, RJ, RN, RO, RR, RS, SC, SE, SP, TO
     -
     - OPTIONAL
   * - Brunei
     - BN
     -
     - en_US, **ms**, th
     -
   * - Bulgaria
     - BG
     -
     - **bg**, en_US, uk
     - SCHOOL
   * - Burkina Faso
     - BF
     -
     -
     -
   * - Burundi
     - BI
     -
     -
     -
   * - Cambodia
     - KH
     -
     - en_US, **km**, th
     -
   * - Cameroon
     - CM
     -
     -
     -
   * - Canada
     - CA
     - Provinces and territories: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT
     - ar, **en_CA**, en_US, fr, th
     - GOVERNMENT, OPTIONAL
   * - Chad
     - TD
     -
     -
     -
   * - Chile
     - CL
     - Regions: AI, AN, AP, AR, AT, BI, CO, LI, LL, LR, MA, ML, NB, RM, TA, VS
     - en_US, **es**, uk
     -
   * - China
     - CN
     -
     - en_US, th, **zh_CN**, zh_TW
     - HALF_DAY
   * - Colombia
     - CO
     -
     - en_US, **es**, uk
     -
   * - Costa Rica
     - CR
     -
     - en_US, **es**, uk
     - OPTIONAL
   * - Croatia
     - HR
     -
     - en_US, **hr**, uk
     -
   * - Cuba
     - CU
     -
     - en_US, **es**, uk
     -
   * - Curacao
     - CW
     -
     - en_US, nl, **pap_CW**, uk
     -
   * - Cyprus
     - CY
     -
     - **el**, en_CY, en_US, uk
     - BANK, OPTIONAL
   * - Czechia
     - CZ
     -
     - **cs**, en_US, sk, uk
     -
   * - Denmark
     - DK
     -
     - **da**, en_US, uk
     - OPTIONAL
   * - Djibouti
     - DJ
     -
     - ar, en_US, **fr**
     -
   * - Dominican Republic
     - DO
     -
     - en_US, **es**, uk
     -
   * - Ecuador
     - EC
     -
     - en_US, **es**, uk
     -
   * - Egypt
     - EG
     -
     - **ar**, en_US
     -
   * - El Salvador
     - SV
     - Departments: AH, CA, CH, CU, LI, MO, PA, SA, SM, SO, SS, SV, UN, US
     -
     -
   * - Estonia
     - EE
     -
     - en_US, **et**, uk
     -
   * - Eswatini
     - SZ
     -
     -
     -
   * - Ethiopia
     - ET
     -
     - **am**, ar, en_US
     -
   * - Finland
     - FI
     -
     - en_US, **fi**, sv, uk
     -
   * - France
     - FR
     - Départements: BL, GES, GP, GY, MF, MQ, NC, PF, RE, WF, YT
     - en_US, **fr**, uk
     -
   * - Gabon
     - GA
     -
     -
     -
   * - Georgia
     - GE
     -
     - en_US, **ka**, uk
     - GOVERNMENT
   * - Germany
     - DE
     - States: BB, BE, BW, BY, BYP, HB, HE, HH, MV, NI, NW, RP, SH, SL, SN, ST, TH
     - **de**, en_US, uk
     -
   * - Ghana
     - GH
     -
     -
     -
   * - Greece
     - GR
     -
     - **el**, en_US, uk
     - HALF_DAY
   * - Greenland
     - GL
     -
     - da, en_US, **kl**
     - OPTIONAL
   * - Guam
     - GU
     - Can also be loaded as country US, subdivision GU
     -
     - UNOFFICIAL
   * - Guatemala
     - GT
     -
     - en_US, **es**
     -
   * - Honduras
     - HN
     -
     - en_US, **es**, uk
     -
   * - Hong Kong
     - HK
     -
     -
     - OPTIONAL
   * - Hungary
     - HU
     -
     - en_US, **hu**, uk
     -
   * - Iceland
     - IS
     -
     - en_US, **is**, uk
     -
   * - India
     - IN
     - States: AN, AP, AR, AS, BR, CG, CH, DH, DL, GA, GJ, HP, HR, JH, JK, KA, KL, LA, LD, MH, ML, MN, MP, MZ, NL, OD, PB, PY, RJ, SK, TN, TR, TS, UK, UP, WB
     -
     -
   * - Indonesia
     - ID
     -
     - en_US, **id**, uk
     - GOVERNMENT
   * - Iran
     - IR
     -
     - en_US, **fa**
     -
   * - Ireland
     - IE
     -
     -
     -
   * - Isle of Man
     - IM
     -
     -
     -
   * - Israel
     - IL
     -
     - en_US, **he**, uk
     - OPTIONAL, SCHOOL
   * - Italy
     - IT
     - Provinces: AG, AL, AN, AO, AP, AQ, AR, AT, AV, BA, BG, BI, BL, BN, BO, BR, BS, BT, BZ, CA, CB, CE, CH, CL, CN, CO, CR, CS, CT, CZ, EN, FC, FE, FG, FI, FM, FR, GE, GO, GR, IM, IS, KR, LC, LE, LI, LO, LT, LU, MB, MC, ME, MI, MN, MO, MS, MT, NA, NO, NU, OR, PA, PC, PD, PE, PG, PI, PN, PO, PR, PT, PU, PV, PZ, RA, RC, RE, RG, RI, RM, RN, RO, SA, SI, SO, SP, SR, SS, SU, SV, TA, TE, TN, TO, TP, TR, TS, TV, UD, VA, VB, VC, VE, VI, VR, VT, VV. Cities: Andria, Barletta, Cesena, Forli, Pesaro, Trani, Urbino
     -
     -
   * - Jamaica
     - JM
     -
     -
     -
   * - Japan
     - JP
     -
     - en_US, **ja**, th
     - BANK
   * - Jersey
     - JE
     -
     -
     -
   * - Jordan
     - JO
     -
     - **ar**, en_US
     -
   * - Kazakhstan
     - KZ
     -
     -
     -
   * - Kenya
     - KE
     -
     -
     -
   * - Kuwait
     - KW
     -
     - **ar**, en_US
     -
   * - Kyrgyzstan
     - KG
     -
     -
     -
   * - Laos
     - LA
     -
     - en_US, **lo**, th
     - BANK, SCHOOL, WORKDAY
   * - Latvia
     - LV
     -
     - en_US, **lv**, uk
     -
   * - Lesotho
     - LS
     -
     -
     -
   * - Liechtenstein
     - LI
     -
     - **de**, en_US, uk
     - BANK
   * - Lithuania
     - LT
     -
     - en_US, **lt**, uk
     -
   * - Luxembourg
     - LU
     -
     - de, en_US, fr, **lb**, uk
     -
   * - Madagascar
     - MG
     -
     - en_US, **mg**, uk
     -
   * - Malawi
     - MW
     -
     -
     -
   * - Malaysia
     - MY
     - States and federal territories: 01 (Johor), 02 (Kedah), 03 (Kelantan), 04 (Melaka), 05 (Negeri Sembilan), 06 (Pahang), 07 (Pulau Pinang), 08 (Perak), 09 (Perlis), 10 (Selangor), 11 (Terengganu), 12 (Sabah), 13 (Sarawak), 14 (WP Kuala Lumpur), 15 (WP Labuan), 16 (WP Putrajaya)
     - en_US, **ms_MY**
     -
   * - Maldives
     - MV
     -
     -
     -
   * - Malta
     - MT
     -
     - en_US, **mt**
     -
   * - Marshall Islands (the)
     - MH
     -
     -
     -
   * - Mexico
     - MX
     -
     - en_US, **es**, uk
     -
   * - Moldova
     - MD
     -
     - en_US, **ro**, uk
     -
   * - Monaco
     - MC
     -
     - en_US, **fr**, uk
     -
   * - Montenegro
     - ME
     -
     -
     -
   * - Morocco
     - MA
     -
     - **ar**, en_US, fr
     -
   * - Mozambique
     - MZ
     -
     - en_US, **pt_MZ**, uk
     -
   * - Namibia
     - NA
     -
     -
     -
   * - Netherlands
     - NL
     -
     - en_US, **nl**, uk
     - OPTIONAL
   * - New Zealand
     - NZ
     - Regions: AUK, BOP, CAN, CIT, GIS, HKB, MBH, MWT, NSN, NTL, OTA, STL, TAS, TKI, WGN, WKO, WTC
     -
     -
   * - Nicaragua
     - NI
     - Departments: AN, AS, BO, CA, CI, CO, ES, GR, JI, LE, MD, **MN**, MS, MT, NS, RI, SJ
     - en_US, **es**, uk
     -
   * - Nigeria
     - NG
     -
     -
     -
   * - Northern Mariana Islands (the)
     - MP
     - Can also be loaded as country US, subdivision MP
     -
     - UNOFFICIAL
   * - North Macedonia
     - MK
     -
     -
     -
   * - Norway
     - NO
     -
     - en_US, **no**, uk
     -
   * - Pakistan
     - PK
     -
     -
     -
   * - Palau
     - PW
     -
     -
     - ARMED_FORCES, HALF_DAY
   * - Panama
     - PA
     -
     -
     -
   * - Papua New Guinea
     - PG
     -
     -
     -
   * - Paraguay
     - PY
     -
     - en_US, **es**, uk
     - GOVERNMENT
   * - Peru
     - PE
     -
     - en_US, **es**, uk
     -
   * - Philippines
     - PH
     -
     -
     -
   * - Poland
     - PL
     -
     - en_US, **pl**, uk
     -
   * - Portugal
     - PT
     - Districts: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 30
     - en_US, **pt_PT**, uk
     - OPTIONAL
   * - Puerto Rico
     - PR
     - Can also be loaded as country US, subdivision PR
     -
     - UNOFFICIAL
   * - Romania
     - RO
     -
     - en_US, **ro**, uk
     -
   * - Russia
     - RU
     -
     - en_US, **ru**
     -
   * - San Marino
     - SM
     -
     -
     -
   * - Saudi Arabia
     - SA
     -
     - **ar**, en_US
     -
   * - Serbia
     - RS
     -
     - en_US, **sr**
     -
   * - Seychelles
     - SC
     -
     - **en_SC**, en_US
     -
   * - Singapore
     - SG
     -
     -
     -
   * - Slovakia
     - SK
     -
     - en_US, **sk**, uk
     - WORKDAY
   * - Slovenia
     - SI
     -
     - en_US, **sl**, uk
     -
   * - South Africa
     - ZA
     -
     -
     -
   * - South Korea
     - KR
     -
     - en_US, **ko**, th
     - BANK
   * - Spain
     - ES
     - Autonomous communities: AN, AR, AS, CB, CE, CL, CM, CN, CT, EX, GA, IB, MC, MD, ML, NC, PV, RI, VC
     - en_US, **es**, uk
     -
   * - Sweden
     - SE
     -
     - en_US, **sv**, uk
     -
   * - Switzerland
     - CH
     - Cantons: AG, AI, AR, BL, BS, BE, FR, GE, GL, GR, JU, LU, NE, NW, OW, SG, SH, SZ, SO, TG, TI, UR, VD, VS, ZG, ZH
     - **de**, en_US, fr, it, uk
     - HALF_DAY, OPTIONAL
   * - Taiwan
     - TW
     -
     - en_US, th, zh_CN, **zh_TW**
     -
   * - Tanzania
     - TZ
     -
     - en_US, **sw**
     - BANK
   * - Thailand
     - TH
     -
     - en_US, **th**
     - ARMED_FORCES, BANK, GOVERNMENT, SCHOOL, WORKDAY
   * - Timor Leste
     - TL
     -
     - en_US, **pt_TL**, tet
     - GOVERNMENT, WORKDAY
   * - Tonga
     - TO
     -
     - en_US, **to**
     -
   * - Tunisia
     - TN
     -
     - **ar**, en_US
     -
   * - Turkey
     - TR
     -
     - en_US, **tr**, uk
     - HALF_DAY
   * - Ukraine
     - UA
     -
     - ar, en_US, **uk**
     -
   * - United Arab Emirates
     - AE
     -
     - **ar**, en_US
     -
   * - United Kingdom
     - GB
     - Subdivisions: ENG, NIR, SCT, WLS
     -
     -
   * - United States Minor Outlying Islands
     - UM
     - Can also be loaded as country US, subdivision UM
     -
     - UNOFFICIAL
   * - United States of America (the)
     - US
     - States and territories: AK, AL, AR, AS, AZ, CA, CO, CT, DC, DE, FL, GA, GU, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MP, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UM, UT, VA, VI, VT, WA, WI, WV, WY
     -
     - UNOFFICIAL
   * - United States Virgin Islands (the)
     -
     - See Virgin Islands (U.S.)
     -
     - UNOFFICIAL
   * - Uruguay
     - UY
     -
     - en_US, **es**, uk
     - BANK
   * - Uzbekistan
     - UZ
     -
     - en_US, uk, **uz**
     -
   * - Vanuatu
     - VU
     -
     -
     -
   * - Vatican City
     - VA
     -
     -
     -
   * - Venezuela
     - VE
     -
     - en_US, **es**, uk
     -
   * - Vietnam
     - VN
     -
     -
     -
   * - Virgin Islands (U.S.)
     - VI
     - Can also be loaded as country US, subdivision VI
     -
     - UNOFFICIAL
   * - Zambia
     - ZM
     -
     -
     -
   * - Zimbabwe
     - ZW
     -
     -
     -

Available Financial Markets
===========================

.. _ISO 10383 MIC: https://www.iso20022.org/market-identifier-codes

The standard way to refer to a financial market is to use its `ISO 10383 MIC`_
(Market Identifier Code) as a "country" code when available. The
following financial markets are available:

.. list-table::
   :widths: 23 4 83
   :header-rows: 1
   :class: tight-table

   * - Entity
     - Code
     - Info
   * - European Central Bank
     - ECB
     - Trans-European Automated Real-time Gross Settlement (TARGET2)
   * - ICE Futures Europe
     - IFEU
     - A London-based Investment Exchange holidays
   * - New York Stock Exchange
     - XNYS
     - NYSE market holidays (used by all other US-exchanges, including NASDAQ, etc.)

Contributions
-------------

.. _Issues: https://github.com/vacanza/python-holidays/issues
.. _pull requests: https://github.com/vacanza/python-holidays/pulls
.. _here: https://github.com/vacanza/python-holidays/blob/dev/CONTRIBUTING.rst

Issues_ and `pull requests`_ are always welcome.  Please see
`here`_ for more information.

License
-------

.. __: https://github.com/vacanza/python-holidays/blob/dev/LICENSE

Code and documentation are available according to the MIT License
(see LICENSE__).


[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com)
[![NPM version](https://badge.fury.io/js/%40pulumi%2Fazure-native.svg)](https://npmjs.com/package/@pulumi/azure-native)
[![Python version](https://badge.fury.io/py/pulumi-azure-native.svg)](https://pypi.org/project/pulumi-azure-native)
[![NuGet version](https://badge.fury.io/nu/pulumi.azurenative.svg)](https://badge.fury.io/nu/pulumi.azurenative)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-azure-native/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-azure-native/sdk/go)
[![License](https://img.shields.io/npm/l/%40pulumi%2Fazure-native.svg)](https://github.com/pulumi/pulumi-azure-native/blob/master/LICENSE)

# Native Azure Pulumi Provider

The [Azure Native](https://www.pulumi.com/docs/intro/cloud-providers/azure/) provider for Pulumi lets you use Azure resources in your cloud programs.
This provider uses the Azure Resource Manager REST API directly and therefore provides full access to the ARM API.

The Azure Native provider is the recommended provider for projects targeting Azure.

To use this package, [install the Pulumi CLI](https://www.pulumi.com/docs/get-started/install/).

## Installing

This package is available in many languages in the standard packaging formats.

### Node.js (Java/TypeScript)

To use from JavaScript or TypeScript in Node.js, install using either `npm`:

    npm install @pulumi/azure-native

or `yarn`:

    yarn add @pulumi/azure-native

### Python

To use from Python, install using `pip`:

    pip install pulumi_azure_native

### Go

To use from Go, use `go get` to grab the latest version of the library

    go get github.com/pulumi/pulumi-azure-native/sdk

### .NET

To use from .NET, install using `dotnet add package`:

    dotnet add package Pulumi.AzureNative

## Concepts

The `@pulumi/azure-native` package provides a strongly-typed means to build cloud applications that create
and interact closely with Azure resources.  Resources are exposed for the entire Azure surface area,
including (but not limited to) 'compute', 'keyvault', 'network', 'storage', and more.

The Azure Native provider works directly with the Azure Resource Manager (ARM) platform instead of depending on a
handwritten layer as with the [classic provider](https://github.com/pulumi/pulumi-azure). This approach ensures higher
quality and higher fidelity with the Azure platform.

## Configuring credentials

To learn how to configure credentials refer to the [Azure configuration options](https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#configuration-options).

## Other Configuration

In addition to the configuration options in the official documentation linked above, the following environment variables can be used to tweak lower-level behavior of the provider:

  - `PULUMI_FORCE_NEW_FROM_SUBTYPES`: if, after a change in your program, the provider does not replace a resource that should be replaced because it cannot be updated, setting this variable to `true` might allow the provider to infer the correct behavior. For more details please see PR #2970. We're planning to make this behavior the default in the future.

## Building

See [contributing](CONTRIBUTING.md) for details on how to build and contribute to this provider.

## Reference

For further information, visit [Azure Native in the Pulumi Registry](https://www.pulumi.com/registry/packages/azure-native/)
or for detailed API reference documentation, visit [Azure Native API Docs in the Pulumi Registry](https://www.pulumi.com/registry/packages/azure-native/api-docs/).