text:
# node-red-contrib-mcp3201

A node-red custom node wrapper for the nodejs [mcp3201.js](https://github.com/fthome/mcp3201.js). by FredThx . This library uses the package [pi-spi](https://github.com/natevw/pi-spi) that enable the comunication with SPI devices in most commmon Linux SBCs. Raspberry Pi, C.H.I.P., BeagleBone, Orange Pi,  or Intel Edison are supported by this package.

## Installation

Under your node-red working directory.

``
npm install node-red-contrib-mcp3201
``

Node palette can be used as well to install the node.

After restarting node-red the "mcp3201" node should be available in "Input" category.

## Prerequisites

	Wiring :

MCP3201 :
              _ _
			       | U |
	   Vref ---|   |--- Vdd : 2.7V - 5V
		  IN+ ---|   |--- CLK
		  IN- ---|   |--- Dout
		   0V ---|   |--- CS
  		       |___|

sur Rpi (SPI0):

  Vref : 3.3V (ou 5V, ou ...)
	Vdd : 3.3V (ou 5V)
  CLK : SPI0_SCLK = GPIO11
  Dout : SPI MISO = GPIO09
	CS : - SPI0_CE0_N (GPIO08) => device : '/dev/spidev0.0'
       - SPI0_CE1_N_N (GPIO07) => device = '/dev/spidev0.1'

>__Caveat__:
> Check your permissions to the /dev/spidev devices. The user running node-red need access to writting and reading.
(on raspberry pi : sudo raspi-config)

## Usage

### Configuration & deployment
After installation place your mcp3201node in any of your flow and configure the following parameters:

1. __Name:__ Select the name of your sensor for easy indentifiation.
2. __Device:__ Select your spi device : '/dev/spidev0.0' (default) ou '/dev/spidev0.1' or ...
3. __Ref_voltage:__ Select then referencial voltage (default is 3.3)
4. __Topic:__ Select a topic

### Reading Data
As in other node-red nodes the actual measurement of sensor data require that an input msg arrive to the node. The input called __Trigger__ will start the reading of sensor data will send the data in the node's output.

The __output__ will have the follwing format:

```
msg = {
  _id: <node-red msg_id>,
  topic: "__topic__",
  payload: value_in_volt
}
```

## Notes
This node has been tested on Raspberry Pi 3

## Change log.
* 0.0.1 Firts version

gha_license_id: NOASSERTION


text:
---
layout: kanji
v4: 942
v6: 1013
kanji: 箱
keyword: box
elements: box , bamboo, inter, Inter Milan, tree, wood, eye
strokes: 15
image: E7AEB1
on-yomi: ソウ
kun-yomi: はこ
permalink: /rtk/箱/
prev: 筋
next: 筆
---

1) [Nukemarine] 28-8-2007(330): The best kind of BOX is made from BAMBOO sticks that are INTER-laced to make it air tight. Just picture such a box and you've mastered this kanji.

2) [fuaburisu] 15-8-2006(74): I think of a box made of inter-locking of bamboo strips.

3) [cornrow] 22-11-2008(50): Stick your bamboo in her box to have inter-.

4) [ruuku35] 3-3-2007(13): BAMBOO that INTER- locks makes a BOX. (thanks to Fuaburisu).

5) [jameserb] 3-5-2008(9): Bamboo interwoven, makes a nice box.

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Upgrade Guide

## Upgrading to v2.0

Version 2.0 is a major release that consolidates functionality and APIs, and a number of deprecated functions have been removed.

Some general changes:

- All exported loader and writer objects now expose a `mimeType` field. This field is not yet used by<EMAIL_ADDRESS>but is available for applications (e.g. see `selectLoader`).
- All (non-worker) loaders are now required to expose a `parse` function (in addition to any more specialized `parseSync/parseText/parseInBatches` functions). This simplifies using loaders without<EMAIL_ADDRESS>which can reduce footprint in small applications.

###<EMAIL_ADDRESS>
| Removal            | Replacement                                                            |
| ------------------ | ---------------------------------------------------------------------- |
| `TextEncoder`      | Use global `TextEncoder` instead and<EMAIL_ADDRESS>if needed |
| `TextDecoder`      | Use global `TextDecoder` instead and<EMAIL_ADDRESS>if needed |
| `createReadStream` | `fetch().then(resp => resp.body)`                                      |
| `parseFile`        | `parse`                                                                |
| `parseFileSync`    | `parseSync`                                                            |
| `loadFile`         | `load`                                                                 |

###<EMAIL_ADDRESS>
| Removal             | Replacement                                               |
| ------------------- | --------------------------------------------------------- |
| `ImageHTMLLoader`   | `ImageLoader` with `options.images.format: 'image'`       |
| `ImageBitmapLoader` | `ImageLoader` with `options.images.format: 'imagebitmap'` |
| `decodeImage`       | `parse(arrayBuffer, ImageLoader)`                         |
| `isImage`           | `isBinaryImage`                                           |
| `getImageMIMEType`  | `getBinaryImageMIMEType`                                  |
| `getImageSize`      | `getBinaryImageSize`                                      |
| `getImageMetadata`  | `getBinaryImageMIMEType` + `getBinaryImageSize`           |

### Loader Objects

- Loaders can no longer have a `loadAndParse` method. Remove it, and just make sure you define `parse` on your loaders instead.

###<EMAIL_ADDRESS>
The `GLTFLoader` now always uses the new v2 parser, and the original `GLTFParser` has been removed.

| Removal            | Replacement  |
| ------------------ | ------------ |
| `GLBParser`        | `GLBLoader`  |
| `GLBBuilder`       | `GLBWriter`  |
| `GLTFParser`       | `GLTFLoader` |
| `GLTFBuilder`      | `GLTFWriter` |
| `packBinaryJson`   | N/A          |
| `unpackBinaryJson` | N/A          |

Note that automatic packing of binary data (aka "packed JSON" support) was only implemented in the v1 `GLTFLoader` and has thus also been removed. Experience showed that packing of binary data for `.glb` files is best handled by applications.

**GLTFLoader option changes**

The foillowing top-level options are deprecated and will be removed in v2.0

| Removed Option         | Replacement                             | Descriptions                                                              |
| ---------------------- | --------------------------------------- | ------------------------------------------------------------------------- |
| `gltf.parserVersion`   | N/A                                     | No longer needs to be specied, only the new gltf parser is available.     |
| `fetchLinkedResources` | `gltf.fetchBuffers`, `gltf.fetchImages` |                                                                           |
| `fetchImages`          | `gltf.fetchImages`                      |                                                                           |
| `createImages`         | N/A                                     | Images are now always created when fetched                                |
| `decompress`           | `gltf.decompressMeshes`                 | Decompress Draco compressed meshes (if DracoLoader available).            |
| `DracoLoader`          | N/A                                     | Supply `DracoLoader` to `parse`, or call `registerLoaders(pDracoLoader])` |
| `postProcess`          | `gltf.postProcess`                      | Perform additional post processing before returning data.                 |
| `uri`                  | `baseUri`                               | Auto-populated when loading from a url-equipped source                    |
| `fetch`                | N/A                                     | fetch is automatically available to sub-loaders.                          |

###<EMAIL_ADDRESS>
| Removal        | Replacement   |
| -------------- | ------------- |
| `DracoParser`  | `DracoLoader` |
| `DracoBuilder` | `DracoWriter` |

### Loader Objects

- Loaders no longer have a `loadAndParse` removed. Just define `parse` on your loaders.

## Upgrading from v1.2 to v1.3

- As with v1.1, `GLTFLoader` will no longer return a `GLTFParser` object in v2.0. A new option `options.gltf.parserVersion: 2` is provided to opt in to the new behavior now.

## Upgrading from v1.0 to v1.1

A couple of functions have been deprecated and will be removed in v2.0. They now emit console warnings. Start replacing your use of these functions now to remove the console warnings and ensure a smooth future upgrade to v2.0.

Also, Node support now requires installing<EMAIL_ADDRESS>before use.

### @loaders.gl/core

- Removal: Node support for `fetchFile` now requires importing<EMAIL_ADDRESS>before use.
- Removal: Node support for `TextEncoder`, and `TextDecoder` now requires importing<EMAIL_ADDRESS>before use.
- Deprecation: `TextEncoder` and `TextDecoder` will not be exported from `loaders.gl/core` in v2.0.

### @loaders.gl/images

- Removal: Node support for images now requires importing<EMAIL_ADDRESS>before use.

### @loaders.gl/gltf

- Deprecation: `GLBParser`/`GLBBuilder` - These will be merged into GLTF classes..
- Deprecation: `GLTFParser`/`GLTFBuilder` - The new `GLTF` class can hold GLTF data and lets application access/modify it.
- Deprecation: `GLTFLoader` will no longer return a `GLTFParser` object in v2.0. Instead it will return a pure javascript object containing the parse json and any binary chunks. This object can be accessed through the `GLTF` class. Set `options.GLTFParser` to `false` to opt in to the new behavior now.

## v1.0

First official release of loaders.gl.


text:
# Quickstart

## Your first bot

The following bot is as simple as they come. It logs into a server, silently echoing back all the private messages it receives.

```
import teamtalk

t = teamtalk.TeamTalkServer("example.com", 10333)

@t.subscribe("messagedeliver")
def message(server, params):
	user = server.get_user(params["srcuserid"])
	if params["type"] == teamtalk.USER_MSG:
		nickname = user["nickname"]
		content = params["content"]
		print("private message")
		print("from: "+nickname)
		print("content: "+params["content"])
		server.user_message(user, content)

t.connect()
t.login("bot1", "admin", "password", "TeamTalkBotClient")
t.handle_messages()
```

The teamtalk.TeamTalkServer class fascilitates the connection and management of a single TeamTalk server. It gets innitialized with both a server's host and TCP port.
You then call connect() to establish a connection to the server, and login along with your nickname, username, password and a short string that identifies your client.
A connection is useless, however, without first having something to do. The preferred method is through an event-based approach.
Subscribe does just this. It can be used as a decorator as shown above, or a standard function call:

```
t.subscribe("messagedeliver", message)
```

In either case, we're telling TeamTalk to call our message function when ever a "messagedeliver" event is fired. Pay attention to the parameters:

```
def message(server, params):
```

Server references the caller, in this case our TeamTalkServer instance. In most cases server == t, unless handling multiple concurrently. It's advised to use the parameter whenever possible.
Params is a dict containing all the parameters passed along with this event.
In this case, a messagedeliver always contains "type" (an int specifying the message type, user/channel/broadcast), "srcuserid" (the ID of the sender), "destuserid" (the ID of the recipient) and "content" (the message's content).

## Attributes

The server instance contains some useful attributes. Some are described below.
Read the code for a more exhaustive list.
Note that, as per the TeamTalk protocol, certain attributes may optionally be excluded when they don't apply. When in doubt, assume this is the case.

* server.channels: A list of dicts containing attributes for every channel on this server.
* server.users: a list of dicts containing attributes for every logged-in user.
* server.me: A dict containing attributes for this user.
* server.server_params: A dict containing info about this server's configuration.

### User Attributes

* userid
* nickname
* username
* ipaddr (if admin). Note this may be IPv4 or IPv6
* statusmode
* statusmsg
* version
* packetprotocol
* usertype
* sublocal
* subpeer
* userdata
* clientname
* chanid (if in a channe)

The following are only included for the current user, unless additional info is requested by an admin. They can be accessed from the me attribute of a server connection along with all of the above.

* ipaddr, even if not an admin. Note this may be IPv4 or IPv6
* userrights
* note
* initchan
* opchannels
* audiocodeclimit
* cmdflood

### Channel Attributes

* channel: The path to this channel, e.g. "/stereo/"
* chanid
* parentid
* password (only present if admin)
* oppassword (only present if admin)
* protected: 1 if a password is required to join, otherwise 0
* topic
* operators
* diskquota
* maxusers
* type
* userdata
* audiocodec (list)
* audiocfg (list)

### Server Attributes

* servername
* maxusers
* maxloginattempts
* autosave
* maxiplogins
* logindelay
* usertimeout
* motd
* voicetxlimit
* videotxlimit
* mediafiletxlimit
* desktoptxlimit
* totaltxlimit
* version

license: MIT

repository: cartertemm/PyTeamTalk

gha_language: Python

gha_license_id: MIT

repo_name: cartertemm/PyTeamTalk


text:
# Manual

## Installation / Updating

To install the package execute the following command in the REPL:
```julia
Pkg.clone("https://github.com/crstnbr/MonteCarlo.jl")
```

To obtain the latest version of the package just do `Pkg.update()` or specifically `Pkg.update("MonteCarlo")`.

## Usage

This is a simple demontration of how to perform a Monte Carlo simulation of the 2D Ising model:

```julia
# load packages
using MonteCarlo, MonteCarloObservable

# load your model
m = IsingModel(dims=2, L=8);

# choose a Monte Carlo flavor and run the simulation
mc = MC(m, beta=0.35);
run!(mc, sweeps=1000, thermalization=1000, verbose=false);

# analyze results
observables(mc) # what observables do exist for that simulation?
m = mc.obs["m"] # magnetization
mean(m)
std(m) # one-sigma error

# create standard plots
hist(m)
plot(m)
```

![](../assets/ts_hist.png)

## Create custom models

Probably the most important idea underlying the package design is extensibility. Users should be able to define custom physical models and utilize already implemented Monte Carlo flavors to study them. To that end, all Monte Carlo flavors have rather well defined interfaces, that is specifications of mandatory and optional fields and methods, that the user must implement for any model that he wants to simulate. The definition of the interface for the above used Monte Carlo can for example be found here: [Interface: Monte Carlo (MC)](@ref). Practically, it is probably a good idea to start from a copy of one of the preimplemented models.

We hope that MonteCarlo.jl allows the user to put his focus on the physical model rather than having to tediously implement general Monte Carlo schemes, often over and over again.


text:
# Geometry.circle_rating

| Parameter Name | Default value | Types | Value range | Description |
| :---: | :---: | :---: | :---: | :---: |
| contour | No default | ndarray (numpy array) | N/A | A numpy array that defines a group of points. |
| area_factor | 0.9 | int, float | 0 < x ≤ 1 | The tolerance of the contour's area compared to the smallest enclosing circle's area. |
| radius_factor | 0.8 | int, float | 0 < x ≤ 1 | The tolerance of the contour's radius compared to the smallest enclosing circle's radius. |

`circle.rating` is a function that receives a contour, finds the smallest circle and straight rectangle that enclose it,
uses them in order to find the contour's fill ratio and radius ratio, multiplies each one with its tolerance and multiplies the results.
The function returns a rating of how close the contour is to being a full circle. The perfect score is one.


text:
# nf-core/funcscan: Output

## Introduction

The output of nf-core/funcscan provides reports for each of the functional groups:

- antibiotic resistance genes (tools: [ABRicate](https://github.com/tseemann/abricate), [AMRFinderPlus](https://www.ncbi.nlm.nih.gov/pathogens/antimicrobial-resistance/AMRFinder), [DeepARG](https://bitbucket.org/gusphdproj/deeparg-ss/src/master), [fARGene](https://github.com/fannyhb/fargene), [RGI](https://card.mcmaster.ca/analyze/rgi) – summarised by [hAMRonization](https://github.com/pha4ge/hAMRonization))
- antimicrobial peptides (tools: [Macrel](https://github.com/BigDataBiology/macrel), [AMPlify](https://github.com/bcgsc/AMPlify), [ampir](https://ampir.marine-omics.net), [hmmsearch](http://hmmer.org) – summarised by [AMPcombi](https://github.com/Darcy220606/AMPcombi))
- biosynthetic gene clusters (tools: [antiSMASH](https://docs.antismash.secondarymetabolites.org), [DeepBGC](https://github.com/Merck/deepbgc), [GECCO](https://gecco.embl.de), [hmmsearch](http://hmmer.org) – summarised by [comBGC](#combgc))

As a general workflow, we recommend to first look at the summary reports ([ARGs](#hamronization), [AMPs](#ampcombi), [BGCs](#combgc)), to get a general overview of what hits have been found across all the tools of each functional group. After which, you can explore the specific output directories of each tool to get more detailed information about each result. The tool-specific output directories also includes the output from the functional annotation steps of either [prokka](https://github.com/tseemann/prokka), [pyrodigal](https://github.com/althonos/pyrodigal), [prodigal](https://github.com/hyattpd/Prodigal), or [Bakta](https://github.com/oschwengers/bakta) if the `--save_annotations` flag was set.

Similarly, all downloaded databases are saved (i.e. from [antiSMASH](https://docs.antismash.secondarymetabolites.org), [AMRFinderPlus](https://www.ncbi.nlm.nih.gov/pathogens/antimicrobial-resistance/AMRFinder), [Bakta](https://github.com/oschwengers/bakta), [DeepARG](https://bitbucket.org/gusphdproj/deeparg-ss/src/master), and/or [AMPcombi](https://github.com/Darcy220606/AMPcombi)) into the output directory `<outdir>/downloads/` if the `--save_databases` flag was set.

Furthermore, for reproducibility, versions of all software used in the run is presented in a [MultiQC](http://multiqc.info) report.

The directories listed below will be created in the results directory (specified by the `--outdir` flag) after the pipeline has finished. All paths are relative to this top-level output directory. The default directory structure of nf-core/funcscan is:

```console
results/
├── annotation/
|   ├── bakta/
|   ├── prodigal
|   ├── prokka/
|   └── pyrodigal/
├── amp/
|   ├── ampir/
|   ├── amplify/
|   ├── hmmsearch/
|   └── macrel/
├── arg/
|   ├── abricate/
|   ├── amrfinderplus/
|   ├── deeparg/
|   ├── fargene/
|   ├── hamronization/
|   └── rgi/
├── bgc/
|   ├── antismash/
|   ├── deepbgc/
|   ├── gecco/
|   └── hmmsearch/
├── reports/
|   ├── ampcombi/
|   ├── comBGC/
|   └── hamronization_summarize/
├── databases/
├── multiqc/
└── pipeline_info/
work/
```

## Pipeline overview

The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes prokaryotic sequence data through the following steps:

ORF prediction and annotation with any of:

- [Pyrodigal](#pyrodigal) (default) – for open reading frame prediction.
- [Prodigal](#prodigal) – for open reading frame prediction.
- [Prokka](#prokka) – open reading frame prediction and functional protein annotation.
- [Bakta](#bakta) – open reading frame prediction and functional protein annotation.

Antimicrobial Resistance Genes (ARGs):

- [ABRicate](#abricate) – antimicrobial resistance gene detection, based on alignment to one of several databases.
- [AMRFinderPlus](#amrfinderplus) – antimicrobial resistance gene detection, using NCBI’s curated Reference Gene Database and curated collection of Hidden Markov Models.
- [DeepARG](#deeparg) – antimicrobial resistance gene detection, using a deep learning model.
- [fARGene](#fargene) – antimicrobial resistance gene detection, using Hidden Markov Models.
- [RGI](#rgi) – antimicrobial resistance gene detection, based on alignment to the CARD database.

Antimicrobial Peptides (AMPs):

- [ampir](#ampir) – antimicrobial peptide detection, based on a supervised statistical machine learning approach.
- [amplify](#amplify) – antimicrobial peptide detection, using a deep learning model.
- [hmmsearch](#hmmsearch) – antimicrobial peptide detection, based on hidden Markov models.
- [Macrel](#macrel) – antimicrobial peptide detection, using a machine learning approach.

Biosynthetic Gene Clusters (BGCs):

- [antiSMASH](#antismash) – biosynthetic gene cluster detection.
- [deepBGC](#deepbgc) - biosynthetic gene cluster detection, using a deep learning model.
- [GECCO](#gecco) – biosynthetic gene cluster detection, using Conditional Random Fields (CRFs).
- [hmmsearch](#hmmsearch) – biosynthetic gene cluster detection, based on hidden Markov models.

Output Summaries:

- [AMPcombi](#ampcombi) – summary of antimicrobial peptide gene output from various detection tools.
- [hAMRonization](#hamronization) – summary of antimicrobial resistance gene output from various detection tools.
- [comBGC](#combgc) – summary of biosynthetic gene cluster output from various detection tools.
- [MultiQC](#multiqc) – report of all software and versions used in the pipeline.
- [Pipeline information](#pipeline-information) – report metrics generated during the workflow execution.

## Tool details

### Annotation tools

[Pyrodigal](#pyrodigal), [Prodigal](#prodigal), [Prokka](#prokka), [Bakta](#bakta)

#### Prodigal

Output files

- `prodigal/`
  - `<samplename>/`:
    - `*.gff`: annotation in GFF3 format, containing both sequences and annotations
    - `*.fna`: nucleotide FASTA file of the input contig sequences
    - `*.faa`: protein FASTA file of the translated CDS sequences
    - `*.gbk`: annotation in GBK format, containing both sequences and annotations

> Descriptions taken from the [Prodigal documentation](https://github.com/hyattpd/prodigal/wiki)

[Prodigal](https://github.com/hyattpd/Prodigal) annotates whole (meta-)genomes by identifying ORFs in a set of genomic DNA sequences. The output is used by some of the functional screening tools.

#### Pyrodigal

Output files

- `pyrodigal/`
  - `<samplename>/`:
    - `*.gff`: annotation in GFF3 format, containing both sequences and annotations
    - `*.fna`: nucleotide FASTA file of the input contig sequences
    - `*.faa`: protein FASTA file of the translated CDS sequences

> Descriptions taken from the [Pyrodigal documentation](https://pyrodigal.readthedocs.io/)

[Pyrodigal](https://github.com/althonos/pyrodigal) annotates whole (meta-)genomes by identifying ORFs in a set of genomic DNA sequences. It produces the same results as [Prodigal](#prodigal) while being more resource-optimized, thus faster. Unlike Prodigal, Pyrodigal cannot produce output in GenBank format. The output is used by some of the functional screening tools.

#### Prokka

Output files

- `prokka/`
  - `<samplename>/`
    - `*.gff`: annotation in GFF3 format, containing both sequences and annotations
    - `*.gbk`: standard Genbank file derived from the master .gff
    - `*.fna`: nucleotide FASTA file of the input contig sequences
    - `*.faa`: protein FASTA file of the translated CDS sequences
    - `*.ffn`: nucleotide FASTA file of all the prediction transcripts (CDS, rRNA, tRNA, tmRNA, misc_RNA)
    - `*.sqn`: an ASN1 format "Sequin" file for submission to Genbank
    - `*.fsa`: nucleotide FASTA file of the input contig sequences, used by "tbl2asn" to create the .sqn file
    - `*.tbl`: feature Table file, used by "tbl2asn" to create the .sqn file
    - `*.err`: unacceptable annotations - the NCBI discrepancy report
    - `*.log`: logging output that Prokka produced during its run
    - `*.txt`: statistics relating to the annotated features found
    - `*.tsv`: tab-separated file of all features

> Descriptions directly from the [Prokka documentation](https://github.com/tseemann/prokka#output-files)

[Prokka](https://github.com/tseemann/prokka) performs whole genome annotation to identify features of interest in a set of (meta-)genomic DNA sequences. The output is used by some of the functional screening tools.

#### Bakta

Output files

- `bakta/`
  - `<samplename>.gff3`: annotations & sequences in GFF3 format
  - `<samplename>.gbff`: annotations & sequences in (multi) GenBank format
  - `<samplename>.ffn`: feature nucleotide sequences as FASTA
  - `<samplename>.fna`: replicon/contig DNA sequences as FASTA
  - `<samplename>.embl`: annotations & sequences in (multi) EMBL format
  - `<samplename>.faa`: CDS/sORF amino acid sequences as FASTA
  - `<samplename>_hypothetical.faa`: further information on hypothetical protein CDS as simple human readble tab separated values
  - `<samplename>_hypothetical.tsv`: hypothetical protein CDS amino acid sequences as FASTA
  - `<samplename>.tsv`: annotations as simple human readble TSV
  - `<samplename>.txt`: summary in TXT format

> Descriptions directly from the [Bakta documentation](https://github.com/oschwengers/bakta#output).

[Bakta](https://github.com/oschwengers/bakta) is a tool for the rapid & standardised annotation of bacterial genomes and plasmids from both isolates and MAGs. It provides dbxref-rich, sORF-including and taxon-independent annotations in machine-readable JSON & bioinformatics standard file formats for automated downstream analysis. The output is used by some of the functional screening tools.

### AMP detection tools

[ampir](#ampir), [AMPlify](#amplify), [hmmsearch](#hmmsearch), [Macrel](#macrel)

#### ampir

Output files

- `ampir/`
  - `<samplename>.ampir.faa`: predicted AMP sequences in FAA format
  - `<samplename>.ampir.tsv`: predicted AMP metadata in TSV format, contains contig name, sequence and probability score

[ampir](https://github.com/Legana/ampir) (**a**nti**m**icrobial **p**eptide **p**rediction **i**n **r**) was designed to predict antimicrobial peptides (AMPs) from any given size protein dataset. ampir uses a supervised statistical machine learning approach to predict AMPs. It incorporates two support vector machine classification models, “precursor” and “mature” that have been trained on publicly available antimicrobial peptide data.

#### AMPlify

Output files

- `amplify/`
  - `*_results.tsv`: table of contig amino-acid sequences with prediction result (AMP or non-AMP) and information on sequence length, charge, probability score, AMPlify log-scaled score)

[AMPlify](https://github.com/bcgsc/AMPlify) is an attentive deep learning model for antimicrobial peptide prediction. It takes in contig annotations (as protein sequences) and classifies them as either AMP or non-AMP.

#### hmmsearch

Output files

- `hmmersearch/`
  - `*.txt.gz`: human readable output summarizing hmmsearch results
  - `*.sto.gz`: optional multiple sequence alignment (MSA) in Stockholm format
  - `*.tbl.gz`: optional tabular (space-delimited) summary of per-target output
  - `*.domtbl.gz`: optional tabular (space-delimited) summary of per-domain output

[HMMER/hmmsearch](http://hmmer.org) is used for searching sequence databases for sequence homologs, and for making sequence alignments. It implements methods using probabilistic models called profile hidden Markov models (profile HMMs). `hmmsearch` is used to search one or more profiles against a sequence database.

#### Macrel

Output files

- `macrel_contigs/`
  - `*.smorfs.faa.gz`: zipped fasta file containing amino acid sequences of small peptides (<100 aa, small open reading frames) showing the general gene prediction information in the contigs
  - `*.all_orfs.faa.gz`: zipped fasta file containing amino acid sequences showing the general gene prediction information in the contigs
  - `prediction.gz`: zipped file, with all predicted and non-predicted AMPs in a table format
  - `*.md`: readme file containing tool specific information (e.g. citations, details about the output, etc.)
  - `*_log.txt`: log file containing the information pertaining to the run

[Macrel](https://github.com/BigDataBiology/macrel) is a tool that mines antimicrobial peptides (AMPs) from (meta)genomes by predicting peptides from genomes (provided as contigs) and outputs predicted antimicrobial peptides that meet specific criteria/thresholds.

### ARG detection tools

[ABRicate](#abricate), [AMRFinderPlus](#amrfinderplus), [DeepARG](#deeparg), [fARGene](#fargene), [RGI](#rgi)

#### ABRicate

Output files

- `abricate/`
  - `*.{csv,tsv}`: search results in tabular format

[ABRicate](https://github.com/tseemann/abricate) screens contigs for antimicrobial resistance or virulence genes. It comes bundled with multiple databases: NCBI, CARD, ARG-ANNOT, Resfinder, MEGARES, EcOH, PlasmidFinder, Ecoli_VF and VFDB.

#### AMRFinderPlus

Output files

- `amrfinderplus/`
  - `*.tsv`: search results in tabular format

[AMRFinderPlus](https://www.ncbi.nlm.nih.gov/pathogens/antimicrobial-resistance/AMRFinder) relies on NCBI’s curated Reference Gene Database and curated collection of Hidden Markov Models. It identifies antimicrobial resistance genes, resistance-associated point mutations, and select other classes of genes using protein annotations and/or assembled nucleotide sequences.

#### DeepARG

Output files

- `deeparg/`
  - `*.align.daa*`: Intermediate DIAMOND alignment output
  - `*.align.daa.tsv`: DIAMOND alignment output as .tsv
  - `*.mapping.ARG`: ARG predictions with a probability >= --prob (0.8 default).
  - `*.mapping.potential.ARG`: ARG predictions with a probability < --prob (0.8 default)

[deepARG](https://bitbucket.org/gusphdproj/deeparg-ss/src/master) uses deep learning to characterize and annotate antibiotic resistance genes in metagenomes. It is composed of two models for two types of input: short sequence reads and gene-like sequences. In this pipeline we use the `ls` model, which is suitable for annotating full sequence genes and to discover novel antibiotic resistance genes from assembled samples. The tool `DIAMOND` is used as an aligner.

#### fARGene

Output files

- `fargene/`
  - `fargene_analysis.log`: logging output that fARGene produced during its run
  - `<sample_name>/`:
    - `hmmsearchresults/`: output from intermediate hmmsearch step (only if `--arg_fargene_savetmpfiles` supplied)
    - `predictedGenes/`:
      - `*-filtered.fasta`: nucleotide sequences of predicted ARGs
      - `*-filtered-peptides.fasta`: amino acid sequences of predicted ARGs
    - `results_summary.txt`: text summary of results, listing predicted genes and ORFs for each input file
    - `tmpdir/`: temporary output files and fasta files (only if `--arg_fargene_savetmpfiles` supplied)

[fARGene](https://github.com/fannyhb/fargene) (**F**ragmented **A**ntibiotic **R**esistance **Gene** Identifier) is a tool that takes either fragmented metagenomic data or longer sequences as input and predicts and delivers full-length antibiotic resistance genes as output. The tool includes developed and optimised models for a number of resistance gene types. By default the pipeline runs all models, thus you will receive output for all models. If only a sub-list or single model is required, this can be specified with the `--hmm-model` flag. Available models are:

- `class_a`: class A beta-lactamases
- `class_b_1_2`: subclass B1 and B2 beta-lactamases
- `class_b3`: subclass B3 beta-lactamases
- `class_c`: class C beta-lactamases
- `class_d_1, class_d_2`: class D beta-lactamases
- `qnr`: quinolone resistance genes
- `tet_efflux`, `tet_rpg`, `tet_enzyme`: tetracycline resistance genes

#### RGI

Output files

- `rgi/`
  - `<samplename>.txt`: hit results table separated by '#'
  - `<samplename>.json`: hit results in json format (only if `--arg_rgi_savejson` supplied)
  - `temp/`:
    - `<samplename>.fasta.temp.*.json`: temporary json files, '\*' stands for 'homolog', 'overexpression', 'predictedGenes' and 'predictedGenes.protein' (only if `--arg_rgi_savetmpfiles` supplied).

[RGI](https://github.com/arpcard/rgi) (**R**esistance **G**ene **I**dentifier) predicts resistome(s) from protein or nucleotide data based on homology and SNP models. It uses reference data from the Comprehensive Antibiotic Resistance Database (CARD).

### BGC detection tools

[antiSMASH](#antismash), [deepBGC](#deepbgc), [GECCO](#gecco), [hmmsearch](#hmmsearch)

#### antiSMASH

Output files

- `antismash/`
  - `css`: accessory files for the HTML output
  - `clusterblastoutput.txt` (optional): raw BLAST output of known clusters previously predicted by antiSMASH using the built-in ClusterBlast algorithm
  - `images`: accessory files for the HTML output
  - `index.html`: interactive web view of results in HTML format
  - `js`: accessory files for the HTML output
  - `knownclusterblast/`: directory with MIBiG hits (optional)
    - `*_c*.txt`: tables with MIBiG hits
  - `knownclusterblastoutput.txt` (optional): raw BLAST output of known clusters of the MIBiG database.
  - `regions.js`: sideloaded annotations of protoclusters and/or subregions
  - `*region*.gbk`: nucleotide sequence + annotations in GenBank file format; one file per antiSMASH hit.
  - `<sample name>.gbk`: nucleotide sequence and annotations in GenBank format; converted from input file
  - `<sample name>.json`: nucleotide sequence and annotations in JSON format; converted from GenBank file
  - `<sample name>.log`: logging output that antiSMASH produced during its run
  - `<sample name>.zip`: compressed version of the output folder in zip format

[antiSMASH](https://docs.antismash.secondarymetabolites.org) (**anti**biotics & **S**econdary **M**etabolite **A**nalysis **SH**ell) is a tool for rapid genome-wide identification, annotation and analysis of secondary metabolite biosynthesis gene clusters in bacterial genomes. It identifies biosynthetic loci covering all currently known secondary metabolite compound classes in a rule-based fashion using profile HMMs and aligns the identified regions at the gene cluster level to their nearest relatives from a database containing experimentally verified gene clusters (MIBiG).

#### deepBGC

Output files

- `deepbgc/`
  - `README.txt`: Summary of output files generated
  - `LOG.txt`: Log output of DeepBGC
  - `*.antismash.json`: AntiSMASH JSON file for sideloading
  - `*.bgc.gbk`: Sequences and features of all detected BGCs in GenBank format
  - `*.bgc.tsv`: Table of detected BGCs and their properties
  - `*.full.gbk`: Fully annotated input sequence with proteins, Pfam domains (PFAM_domain features) and BGCs (cluster features)
  - `*.pfam.tsv`: Table of Pfam domains (pfam_id) from given sequence (sequence_id) in genomic order, with BGC detection scores
  - `evaluation/`
    - `*.bgc.png`: Detected BGCs plotted by their nucleotide coordinates
    - `*.pr.png`: Precision-Recall curve based on predicted per-Pfam BGC scores
    - `*.roc.png`: ROC curve based on predicted per-Pfam BGC scores
    - `*.score.png`: BGC detection scores of each Pfam domain in genomic order

[deepBGC](https://github.com/Merck/deepbgc) detects BGCs in bacterial and fungal genomes using deep learning. DeepBGC employs a Bidirectional Long Short-Term Memory Recurrent Neural Network and a word2vec-like vector embedding of Pfam protein domains. Product class and activity of detected BGCs is predicted using a Random Forest classifier.

#### GECCO

Output files

- `gecco/`
  - `*.genes.tsv/`: TSV file containing detected/predicted genes with BGC probability scores
  - `*.features.tsv`: TSV file containing identified domains
  - `*.clusters.tsv`: TSV file containing coordinates of predicted clusters and BGC types
  - `*_cluster_*.gbk`: GenBank file (if clusters were found) containing sequence with annotations; one file per GECCO hit

[GECCO](https://gecco.embl.de) is a fast and scalable method for identifying putative novel Biosynthetic Gene Clusters (BGCs) in genomic and metagenomic data using Conditional Random Fields (CRFs).

### Summary tools

[AMPcombi](#ampcombi), [hAMRonization](#hamronization), [comBGC](#combgc), [MultiQC](#multiqc), [pipeline information](#pipeline-information)

#### AMPcombi

Output files

- `ampcombi/`
  - `ampcombi_complete_summary.csv.gz`: summarised output from all AMP workflow tools (except hmmer_hmmsearch) in compressed csv format
  - `ampcombi.log`: a log file generated by ampcombi
  - `*_ampcombi.csv`: summarised output in csv for each sample
  - `*_amp.faa*`: fasta file containing the amino acid sequences for all AMP hits for each sample
  - `*_diamond_matches.txt*`: alignment file generated by DIAMOND for each sample

AMP summary table header descriptions

| Table column              | Description                                                                                |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                    | Name of the sample                                                                                |
| `contig_id`               | Contig header                                                                                |
| `prob_macrel`             | Probability associated with the AMP prediction using `MACREL`                                                                                |
| `prob_neubi`              | Probability associated with the AMP prediction using `NEUBI`                                                                                |
| `prob_ampir`              | Probability associated with the AMP prediction using `AMPIR`                                                                                |
| `prob_amplify`            | Probability associated with the AMP prediction using `AMPLIFY`                                                                                |
| `evalue_hmmer`            | Expected number of false positives (nonhomologous sequences) with a similar of higher score. This stands for how significant the hit is, the lower the evalue, the more significant the hit                                                                                |
| `aa_sequence`             | Amino acid sequence that forms part of the contig and is AMP encoding                                                                                |
| `target_id`               | [DRAMP](http://dramp.cpu-bioinfor.org/) ID within the database found to be similar to the predicted AMP by `DIAMOND` alignment                                                                                |
| `pident`                  | Percentage identity of amino acid residues that fully aligned between the `DRAMP` sequence and the predicted AMP sequence                                                                                |
| `evalue`                  | Number of alignments of similar or better qualities that can be expected when searching a database of similar size with a random sequence distribution. This is generated by `DIAMOND` alignments using the [DRAMP](http://dramp.cpu-bioinfor.org/) AMP database. The lower the value the more significant that the hit is positive. An e-value of < 0.001 means that the this hit will be found by chance once per 1,0000 queries |
| `Sequence`                | Sequence corresponding to the `DRAMP` ID found to be similar to the predicted AMP sequence                                                                                |
| `Sequence_length`         | Number of amino acid residues in the `DRAMP` sequence                                                                                |
| `Name`                    | Full name of the peptide copied from the database it was uploaded to                                                                                |
| `Swiss_Prot_Entry`        | Entry name of the peptide within the [UniProtKB/Swiss-Prot](https://www.uniprot.org/help/entry_name) database                                                                                |
| `Family`                  | Name of the family, group or class of AMPs this peptide belongs to, e.g. bacteriocins                                                                                |
| `Gene`                    | Name of the gene (if available in the database) that encodes the peptide                                                                                |
| `Source`                  | Name of the source organism (if available in the database) from which the peptide was extracted                                                                                |
| `Activity`                | Peptide activity, e.g. Antimicrobial, Antibacterial, Anti-Gram+, Anti-Gram-, Insecticidal or Antifungal                                                                                |
| `Protein_existence`       | Peptide status, e.g. only a homology, protein level, predicted or transcript level                                                                                |
| `Structure`               | Type of peptide structure, e.g. alpha helix, bridge, etc.                                                                                |
| `Structure_Description`   | Further description of the structure if available                                                                                |
| `PDB_ID`                  | The ID of an equivalent peptide found in the protein data bank [PDB](https://www.rcsb.org/docs/general-help/organization-of-3d-structures-in-the-protein-data-bank)                                                                                |
| `Comments`                | Further details found in the database regarding the peptide                                                                                |
| `Target_Organism`         | Name of the target organism to which the peptide is effective against                                                                                |
| `Hemolytic_activity`      | Type of hemolytic activity if any                                                                                |
| `Linear/Cyclic/Branched`  | Whether the hit is a linear, cyclic or branched peptide                                                                                |
| `N-terminal_Modification` | Whether it contains N-terminal_Modification                                                                                |
| `C-termina_Modification`  | Whether it contains C-terminal_Modification                                                                                |
| `Other_Modifications`     | Whether there are any other modifications found in the peptide structure                                                                                |
| `Stereochemistry`         | Type of peptide stereochemistry if available                                                                                |
| `Cytotoxicity`            | Cytotoxicity mechanism of the peptide if available                                                                                |
| `Binding_Target`          | Peptide binding target, e.g. lipid, cell membrane or chitin binding                                                                                |
| `Pubmed_ID`               | Pubmed ID if a publication is associated with the peptide                                                                                |
| `Reference`               | Citation of the associated publication if available                                                                                |
| `Author`                  | Authors' names associated with the publication or who have uploaded the peptide                                                                                |
| `Title`                   | Publication title if available                                                                                |

[AMPcombi](https://github.com/Darcy220606/AMPcombi) summarizes the results of **antimicrobial peptide (AMP)** prediction tools (AMPIR, AMPLIFY, MACREL, and other non nf-core tools) into a single table and aligns the hits against a reference AMP database for functional and taxonomic classification.

#### hAMRonization

Output files

- `hamronization/` one of the following:
  - `hamronization_combined_report.json`: summarised output in .json format
  - `hamronization_combined_report.tsv`: summarised output in .tsv format
  - `hamronization_combined_report.html`: interactive output in .html format

ARG summary table headers

| Table column                                      | Description                                                                                |
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input_file_name`                                 | Name of the file containing the sequence data to be analysed                                                                                |
| `gene_symbol`                                     | Short name of a gene; a single word that does not contain white space characters. It is typically derived from the gene name                                                        |
| `gene_name`                                       | Name of a gene                                                                                |
| `reference_database_name`                         | Identifier of a biological or bioinformatics database                                                                                |
| `reference_database_version`                      | Version of the database containing the reference sequences used for analysis                                                                                |
| `reference_accession`                             | Identifier that specifies an individual sequence record in a public sequence repository                                                                                |
| `analysis_software_name`                          | Name of a computer package, application, method or function used for the analysis of data                                                                                |
| `analysis_software_version`                       | Version of software used to analyze data                                                                                |
| `genetic_variation_type`                          | Class of genetic variation detected                                                                                |
| `antimicrobial_agent` (optional)                  | A substance that kills or slows the growth of microorganisms, including bacteria, viruses, fungi and protozoans                                                                     |
| `coverage_percentage` (optional)                  | Percentage of the reference sequence covered by the sequence of interest                                                                                |
| `coverage_depth` (optional)                       | Average number of reads representing a given nucleotide in the reconstructed sequence                                                                                |
| `coverage_ratio` (optional)                       | Ratio of the reference sequence covered by the sequence of interest.                                                                                |
| `drug_class` (optional)                           | Set of antibiotic molecules, with similar chemical structures, molecular targets, and/or modes and mechanisms of action                                                             |
| `input_gene_length` (optional)                    | Length (number of positions) of a target gene sequence submitted by a user                                                                                |
| `input_gene_start` (optional)                     | Position of the first nucleotide in a gene sequence being analysed (input gene sequence)                                                                                |
| `input_gene_stop` (optional)                      | Position of the last nucleotide in a gene sequence being analysed (input gene sequence)                                                                                |
| `input_protein_length` (optional)                 | Length (number of positions) of a protein target sequence submitted by a user                                                                                |
| `input_protein_start` (optional)                  | Position of the first amino acid in a protein sequence being analysed (input protein sequence)                                                                                |
| `input_protein_stop` (optional)                   | Position of the last amino acid in a protein sequence being analysed (input protein sequence)                                                                                |
| `input_sequence_id` (optional)                    | Identifier of molecular sequence(s) or entries from a molecular sequence database                                                                                |
| `nucleotide_mutation` (optional)                  | Nucleotide sequence change(s) detected in the sequence being analysed compared to a reference                                                                                |
| `nucleotide_mutation_interpretation` (optional)   | Description of identified nucleotide mutation(s) that facilitate clinical interpretation                                                                                |
| `predicted_phenotype` (optional)                  | Characteristic of an organism that is predicted rather than directly measured or observed                                                                                |
| `predicted_phenotype_confidence_level` (optional) | Confidence level in a predicted phenotype                                                                                |
| `amino_acid_mutation` (optional)                  | Amino acid sequence change(s) detected in the sequence being analysed compared to a reference                                                                                |
| `amino_acid_mutation_interpretation` (optional)   | Description of identified amino acid mutation(s) that facilitate clinical interpretation.                                                                                |
| `reference_gene_length` (optional)                | Length (number of positions) of a gene reference sequence retrieved from a database                                                                                |
| `reference_gene_start` (optional)                 | Position of the first nucleotide in a reference gene sequence                                                                                |
| `reference_gene_stop` (optional)                  | Position of the last nucleotide in a reference sequence                                                                                |
| `reference_protein_length` (optional)             | Length (number of positions) of a protein reference sequence retrieved from a database                                                                                |
| `reference_protein_start` (optional)              | Position of the first amino acid in a reference protein sequence                                                                                |
| `reference_protein_stop` (optional)               | Position of the last amino acid in a reference protein sequence                                                                                |
| `resistance_mechanism` (optional)                 | Antibiotic resistance mechanisms evolve naturally via natural selection through random mutation, but it could also be engineered by applying an evolutionary stress on a population |
| `strand_orientation` (optional)                   | Orientation of a genomic element on the double-stranded molecule                                                                                |
| `sequence_identity` (optional)                    | Sequence identity is the number (%) of matches (identical characters) in positions from an alignment of two molecular sequences                                                     |

[hAMRonization](https://github.com/pha4ge/hAMRonization) summarizes the outputs of the **antimicrobial resistance gene** detection tools (ABRicate, AMRFinderPlus, DeepARG, fARGene, RGI) into a single unified tabular format. It supports a variety of summary options including an interactive summary.

#### comBGC

Output files

- `comBGC/`
  - `combgc_complete_summary.tsv`: summarised output from all BGC detection tools used in tsv format (all samples concatenated).
  - `*/combgc_summary.tsv`: summarised output from all applied BGC detection tools in tsv format for each sample.

BGC summary table headers

| Table column      | Description                                                                                |
| ----------------- | ----------------------------------------------------------------------------------------------------------- |
| `Sample_ID`       | ID of the sample                                                                                |
| `Prediction_tool` | BGC prediction tool (antiSMASH, DeepBGC, and/or GECCO)                                                      |
| `Contig_ID`       | ID of the contig containing the candidate BGC                                                               |
| `Product_class`   | Predicted BGC type/class                                                                                |
| `BGC_probability` | Confidence of BGC candidate as inferred by the respective tool                                              |
| `BGC_complete`    | Whether BGC sequence is assumed to be complete or truncated by the edge of the contig                       |
| `BGC_start`       | Predicted BGC start position on the ontig                                                                   |
| `BGC_end`         | Predicted BGC end position on the contig                                                                    |
| `BGC_length`      | Length of the predicted BGC                                                                                |
| `CDS_ID`          | ID of the coding sequence(s) (CDS) from the annotation step (prodigal/prokka/bakta) if provided by the tool |
| `CDS_count`       | Number of CDSs the BGC contains                                                                             |
| `PFAM_domains`    | Inferred PFAM IDs or annotations if provided by the tool                                                    |
| `MIBiG_ID`        | Inferred MIBiG IDs if provided by the tool                                                                  |
| `InterPro_ID`     | Inferred InterPro IDs if provided by the tool                                                               |

**comBGC** is a tool built for nf-core/funcscan which summarizes the results of the **Biosynthetic Gene Cluster (BGC)** prediction tools (antiSMASH, deepBGC, GECCO) used in the pipeline into one comprehensive tabular summary with standardised headers.

> ℹ comBGC does not feature `hmmer_hmmsearch` support. Please check the hmmsearch results directory.

#### MultiQC

Output files

- `multiqc/`
  - `multiqc_report.html`: a standalone HTML file that can be viewed in your web browser
  - `multiqc_data/`: directory containing raw parsed data used for MultiQC report rendering
  - `multiqc_plots/`: directory containing any static images from the report in various formats

[MultiQC](http://multiqc.info) is used in nf-core/funcscan to report the versions of all software used in the given pipeline run, and provides a suggested methods text. This allows for reproducible analysis and transparency in method reporting in publications.

#### Pipeline information

Output files

- `pipeline_info/`
  - Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`.
  - Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline.
  - Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`.

[Nextflow](https://www.nextflow.io/docs/latest/tracing.html) provides excellent functionality for generating various reports relevant to the running and execution of the pipeline. This will allow you to troubleshoot errors with the running of the pipeline, and also provide you with other information such as launch commands, run times and resource usage.

repository: nf-core/funcscan

gha_language: Nextflow

repo_name: nf-core/funcscan


text:
### Basic info

**This part is auto generated, add your details in Appendix**

* Model size/M: 16.82
* GPU info \[2\]
  * \[2\] Tesla P100-PCIE-16GB

### Appendix

* Based on CommonVoice Thai VGGBLSTM model training

### WER
```
%WER 10.92 [ 1518 / 13902, 558 ins, 321 del, 639 sub ] exp/VGG/decode_test/wer_17_1.0
```

### Monitor figure
![monitor](./monitor.png)

repository: ishine/CAT

repo_name: ishine/CAT


text:
# Sespool [![Build Status](https://travis-ci.org/ags/sespool.png?branch=master)](https://travis-ci.org/ags/sespool)

Bounce parser for Amazon SES SNS notifications. Currently only supports JSON.

## Usage

```ruby
>> bounce = Sespool::Bounce.new("raw sns json request body")
>> bounce.type
=> 'Transient'
>> bounce.bounced_recipients.first.email_address
=><EMAIL_ADDRESS>>> bounce.mail.message_id
=> '123-456-789'
```

## Example Integration

In a Rails app, you might want to setup your SES SNS bounces be be handled
by something like the following:

```ruby
class SnsController < ApplicationController

  def bounce_notification
    # parse the SNS bounce JSON
    bounce = Sespool::Bounce.new(request.raw_post)

    # do something with it, probably persist it
    EmailBounce.create_from_sns_message(bounce)

    render nothing: true, status: 204
  end

end
```

repository: ags/sespool

repo_name: ags/sespool


text:
# API

| Function                | Description                                     |
| ---                     | ---                                             |
| [`html`](#html)         | response helper, type `text/html`               |
| [`json`](#json)         | response helper, type `application/json`        |
| [`mount`](#mount)       | converts a paperplane handler to koa middleware |
| [`redirect`](#redirect) | redirect response helper                        |
| [`send`](#send)         | basic response helper                           |

### html

```haskell
html :: (String | Buffer | Stream) -> Response
```

Port from [`paperplane`](https://github.com/articulate/paperplane/blob/v3.1.1/docs/API.md#html).

Returns a [`Response`](getting-started.md#response-object), with the `content-type` header set to `text/html`.

See also [`json`](#json), [`redirect`](#redirect), [`send`](#send).

```js
const { html } = require('@articulate/koala')
const template = require('../views/template.pug')

const usersPage = () =>
  fetchUsers()
    .then(template)
    .then(html)
```

In the example above, it resolves with a [`Response`](getting-started.md#response-object) similar to:

```js
{
  body: '<html>...</html>',
  headers: {
    'content-type': 'text/html'
  },
  statusCode: 200
}
```

### json

```haskell
json :: a -> Response
```

Port from [`paperplane`](https://github.com/articulate/paperplane/blob/v3.1.1/docs/API.md#json).

Returns a [`Response`](getting-started.md#response-object), with a `body` encoded with `JSON.stringify`, and the `content-type` header set to `application/json`.

See also [`html`](#html), [`redirect`](#redirect), [`send`](#send).

```js
const { json } = require('@articulate/koala')

const users = () =>
  fetchUsers()
    .then(json)
```

In the example above, it resolves with a [`Response`](getting-started.md#response-object) similar to:

```js
{
  body: '[{"id":1,"name":"John"}]',
  headers: {
    'content-type': 'application/json'
  },
  statusCode: 200
}
```

### mount

```haskell
mount :: Request -> Promise Response
```

Wraps a paperplane handler in Koa v2 middleware.

```js
const Koa = require('koa')
const { mount } = require('@articulate/koala')

const handler = () =>
  Promise.resolve({ statusCode: 200 })

const server = new Koa()
server.use(mount(handler))

server.listen(3000)
```

### redirect

```haskell
redirect :: (String, Number) -> Response
```

Port from [`paperplane`](https://github.com/articulate/paperplane/blob/v3.1.1/docs/API.md#redirect).

Accept a `Location` and optional `statusCode` (defaults to `302`), and returns a [`Response`](getting-started.md#response-object) denoting a redirect.

**Pro-tip:** if you want an earlier function in your composed application to respond with a redirect and skip everything else, just wrap it in a `Promise.reject` (see example below).  The error-handling code in `koala` will ignore it since it's not a real error.

See also [`html`](#html), [`json`](#json), [`send`](#send).

```js
const Koa = require('koa')
const Router = require('koa-router')
const { compose, composeP } = require('ramda')
const { html, mount, send } = require('@articulate/koala')

const login = require('./views/login')

// Please make your authorization better than this
const authorize = req =>
  req.headers.authorization
    ? Promise.resolve(req)
    : Promise.reject(redirect('/login'))

const echo = req =>
  Promise.resolve(req.body).then(send)

const router = new Router()
router.post('/echo', mount(composeP(echo, authorize)))
router.get('/login', mount(compose(html, loginPage)))

const server = new Koa()
server.use(router.routes())
server.use(router.allowedMethods())

server.listen(3000)
```

In the example above, `redirect()` returns a [`Response`](getting-started.md#response-object) similar to:

```js
{
  body: '',
  headers: {
    Location: '/login'
  },
  statusCode: 302
}
```

### send

```haskell
send :: (String | Buffer | Stream) -> Response
```

Port from [`paperplane`](https://github.com/articulate/paperplane/blob/v3.1.1/docs/API.md#send).

The most basic response helper.  Simply accepts a `body`, and returns a properly formatted [`Response`](getting-started.md#response-object), without making any further assumptions.

See also [`html`](#html), [`json`](#json), [`redirect`](#redirect).

```js
const { send } = require('@articulate/koala')

send('This is the response body')
```

In the example above, it returns a [`Response`](https://github.com/articulate/paperplane/blob/master/docs/getting-started.md#response-object) similar to:

```js
{
  body: 'This is the response body',
  headers: {},
  statusCode: 200
}
```

repository: articulate/koala

gha_language: JavaScript

repo_name: articulate/koala


text:
# Invoke-EzNameApi
A Powershell Module that provides a Client for the easyname.com API base on the PHP SDK
at https://github.com/easyname/php-sdk

All sensitive informations are handled as SecureStrings.
The API Client tries its best to keep all values as SecureStrings
for as long as possible and clear all plaintext informations from
memory as soon as possible.

## First Time Use
Invoke the Client based on your API Credentials
Please use this only for the first time you use this Client.

```powershell
$APIClient = Invoke-EzNameAPI -APIKey <..> -APISalt <..> -APIUserID >..> -APIUserMail <..> -APISigningSalt <..>
```

## Save your API Config securely
You can save your APIConfig securely and encrypted as a File for later use

```powershell
$APIClient.APIConfigToFile("<Your Filepath>")
```

This saves a CliXML where all sensitve data is stored as a SecureString
and is therefore encrypted by the Microsoft Data Protection API

## Use your encrypted API Config

Invoke the Client on a saved Config File
```powershell
$APIClient = Invoke-EzNameAPI -FilePath <your config clixml>
```

## Methods

Unfortunately there is no documentation on the API besides the PHP-SDK
Take a look at the Powershell Help for Invoke-EzNameAPI and the
Methods in EzNameClass.ps1 to see all available Methods and their parameters

## Debugging

Use the -Debug switch to Output Request related Data for troubleshooting

repository: ArchitektApx/Invoke-EzNameApi

branch_name: refs/heads/main

repo_name: ArchitektApx/Invoke-EzNameApi


text:
# mxn-favicons

[![npm@latest](https://badgen.net/npm/v/mxn-favicons)](https://www.npmjs.com/package/mxn-favicons)
[![Install size](https://packagephobia.now.sh/badge?p=mxn-favicons)](https://packagephobia.now.sh/result?p=mxn-favicons)
[![Downloads](https://img.shields.io/npm/dm/mxn-favicons.svg)](https://npmjs.com/package/mxn-favicons)

**mxn-favicons** is a fork of [**connect-favicons**](https://github.com/theworkers/connect-favicons), a simple [**connect**](https://github.com/senchalabs/connect) middleware to serve site icons (favicon.ico and apple-touch-icon.png and all its flavours) from any directory.

## Install

```
$ npm install mxn-favicons
```

## Usage

Add **mxn-favicons** to your middleware stack before everything else. The whole point here is to serve **favicon.ico** and **apple-touch-icon.png** (et al.) quickly, without involving any routing.

In this case, you may have all your site icons, including favicon.ico in `/public/icons`:

```js
app.use(favicons(__dirname + "/public/icons"));
```

Now any request to the `example.com/favicon.ico` or `example.com/apple-touch-icon.png` will be served by MXN Favicons, reading from the folder you specified.

Example:

```js
// HTTP server
const http  = require("http");

// MXN Connect Framework and Middleware
const connect = require("mxn-connect");
const favicon = require("mxn-favicons");
const sstatic = require("serve-static");

// Instantiating the App
const app = connect();

// Adding Middleware
app.use(favicon(__dirname + "/public/icons"));
app.use(sstatic(__dirname + "/public"));

// Create node.js http server and listen on port
const options = { };
const server = http.createServer(options, app).listen(3000, function() {
    console.log("MXN Connect server is running on port " + 3000);
});

server.on("error" , function(error) {
    console.error("Error event handler called: " + error);
});
```

## License

This module is released under the MIT license.
The original author of **connect-favicons** is [Tommaso Lanza and The Workers Ltd](https://github.com/theworkers/connect-favicons).

## Related

- [mxn-connect](https://github.com/ZimNovich/mxn-connect) - High performance middleware framework based on connect
- [mxn-jsx-ast-transformer](https://github.com/ZimNovich/mxn-jsx-ast-transformer) - Transforms JSX AST into regular JS AST
- [mxn-jsx-transpiler](https://github.com/ZimNovich/mxn-jsx-transpiler) - Transpiles JSX to regular JavaScript

repository: ZimNovich/mxn-favicons

repo_name: ZimNovich/mxn-favicons


text:
---
hrs_structure:
  division: '5'
  volume: '14'
  title: '38'
  chapter: '804'
  section: 804-62
type: hrs_section
tags:
  - Crime
  - Criminal Proceeding
menu:
  hrs:
    identifier: HRS_0804-0062
    parent: HRS0804
    name: 804-62 Limit of compensation; penalty
weight: 35195
title: Limit of compensation; penalty
full_title: 804-62 Limit of compensation; penalty
---
**§804-62 Limit of compensation; penalty.** (a) The amount of compensation which may be collected on any bail bond or bond to keep the peace by one or more persons acting as sureties thereon shall not exceed a one time only fee from five to fifteen per cent of the amount thereof, but need not be less than $50 in any event; provided that additional fees, subject to subsection (b), may be collected for:

(1) The posting of a surety insurance bond as defined in section 431:1-210(1);

(2) The posting of a bond on behalf of a person whose case is pending appeal; or

(3) The posting of a bond in which more than one year has passed since the filing thereof.

(b) The compensation collected pursuant to sections 804-62(a)(2) and (a)(3), in any year after the first year, may be collected annually, and:

(1) Shall be charged on a prorated basis; and

(2) Shall not exceed the percentage charged in the first year.

(c) Every person holding a license to act as surety on any bail bond or bond to keep the peace who violates this section shall be fined not more than $250 and shall forfeit the license and shall not be entitled to receive a similar license for a period of one year thereafter. [L 1990, c 164, pt of §3; am L 1993, c 181, §3]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Lambo Recipies

Recipies of my favorite categories of food. You can filter through Chicken, Pasta, and Seafood dishes. You navigate to a certain dish to know about the ingredients and how to prepare it.

- Hero Section.
![screenshot](./docs/img-2.png)
- Meals that you can filter.
![screenshot](./docs/img-1.png)
- ingredients and how to prepare the meal.
![screenshot](./docs/img-3.png)
### Live Demo

[Live Demo](https://lambo-res.herokuapp.com/).

## Built With 🔨
- React
- Redux Toolkit
- Tailwind CSS

## Run tests 🔨
```sh
   npm run test
```

## Getting Started 💻

## Installation

To get a local copy of the repository please run the following commands on your terminal:

1. Clone the repo
   ```sh
   git clone https://github.com/omar-labana/lambo.git
   ```
2. Install NPM packages
   ```sh
   npm install
   ```
3. Run dev server
    ```sh
      npm run start
    ```
4. navigato to http://localhost:3000/ in your brwoser

## 👤 Author

👤 **Omar Labana**

- Github: [@omarlabana](https://github.com/omar-labana)
- Twitter: [@panda4cs](https://twitter.com/panda4cs)
- Linkedin: [Omar Labana](https://www.linkedin.com/in/omar-labana/)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!

## Show your support

Give a ⭐ if you like this project!

repository: omar-labana/lambo

branch_name: refs/heads/dev

repo_name: omar-labana/lambo


text:
Cascade
=======

A consul cluster management shell

Set up the build on Ubuntu
============

### Install go and checkout source
1. install go, version should be 1.6.
```
curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
tar xvf go1.6.linux-amd64.tar
sudo mv go /usr/local
```
2. append /usr/local/go/bin to your PATH
```
export PATH=$PATH:/usr/local/go/bin
```
3. setup the GOPATH to the directory where you are going to checkout the source, assume your home directory is /home/boundary
```
mkdir git/casdade
export GOPATH=/home/boundary/git/cascade
```
4. checkout the source
```
go get github.com/boundary/cascade
```
### install fpm
```
sudo apt-get update
sudo apt-get install ruby-dev build-essential
sudo gem install fpm
```

### run build
```
cd /home/boundary/git/cascade/src/github.com/boundary/cascade
make
```


text:
# Usage

Include rembrandt.js in your html file:

```html
<script src="js/rembrandt.js"></script>
```

When a Rembrandt object is created, it focuses on a specific element of
the page, identified by class or id:

```html
<script>
  var rembr = new Rembrandt("#example");

  // Functions are called as follows:
  rembr.fill("#0b0b0c"); // (fill element example with #0b0b0c);
</script>
```

If no argument is given to the `Rembrandt` object, the element of focus will be `document.body`.

# Features

* `rembrandt.fill(color)` - Fills the focus element with any valid CSS color.
* `rembrandt.stroke(color, [width])` - Changes the border color of the focus element, and the width (optionally).
* `rembrandt.size(width, height)` - Change the width and height of the focus element accordingly.
* `rembrandt.opacity(opacity)` - Set the opacity to a number, like with CSS, or a string: "transparent", "translucent", or "opaque".
* `rembrandt.move(x, y)` - Puts the focus element in position [x, y] on the page.
* `rembrandt.shape(shape)` - Change the shape of the element with a string. Currently supported: "square", "circle", "ellipse".
* `rembrandt.graph(data, width, unit, [label])` - Generate a bar chart for each value in data, where one unit is `unit` pixels tall, and the total width is equal to `width`. If `label` is `true`, each bar will have its value written at the top of it.

# Feedback

This project is designed for me to improve my web development skills. If
I've made a mistake, or something can be improved, please tell me how.


text:
# NewsletterContent Panel

Shows a confirmation message after the customer has subscribed to the store newsletter.

### Available Variables
|||
|---|---|
| `%%GLOBAL_SubscriptionHeading%%` |
| `%%GLOBAL_Class%%` |
| `%%GLOBAL_SubscriptionMessage%%` |

repository: hegrec/slate

repo_name: hegrec/slate


text:
# Notes For The Future

This is my collection of notes, experiments, tips and tricks to write more effectively saved in cloud for the future me.

I get a lot of questions how I write and how I can think of stuff. I have tried my best to answer those here.

Also, this repo would serve as vault to many of my unpublished, on the spot or _write while you wait till parents finish shopping_ works.

---

**Note:** These are _rough_ notes, not quality tested. They have't experienced birth nor have they enjoyed life at _literaturepolis_.  I'm sorry.

## F.A.Q

**Q.1** _If you could time travel and talk to yourself when you were around 10 years old what advice would you give to yourself?_

**Answer:** Just one, **read more books.** I had a pretty introverted childhood. My school life was fragmented, a broken timeline of geology, culture and tradition, changing 8 schools than spanned two countries and various states inside India. I learnt a lot though. Adapting and never taking any friend for granted. I also don't miss something or someone as I have got used to loosing best friends and memories. It's harsh, you might say but it's what I have become which sometimes is a silver lining and also a curse.

The best thing that had happened to me was reading so many books. I started with manga, `Astroboy`, moved to `Asterix and Obelix`, `Tintin` and `Duck Tales.` By the age of 8, I was reading around 7-10 double digest comics in a week trying to finish the all the comics in the library. My parent were pushing me to go out, get sun but I sat and read and read.

Result: _I got glasses._

Going back to the question, **read more books, get some sunshine, don't read in the dark with a torch under your bedsheets and eat more carrots!**

**Q.2** I'm already `x^42` years now! What can I do to improve my writing/reading skills?

**Answer:**  _Chuckles_, you know what to do don't you? Look up.

**Q.3** Can you suggest me some books I should read?

**Answer:**  Sure! Glad you asked! You can look my stuff at `goodreads.com/sudoankit` for stuff I have read.

It's better to group books so here's the _definite Ankit's list of must read books for you to spend your time in Summer:_

( in no order or priority )

1. Character Building:
	- **The Song of Ice and Fire, George R.R Martin.** _Quite long, starts slow (character building!), lot's of "f**k you" moments to the reader but an epic classic._

2. Imagery, Scene Construction:
	- **The Hunger Games,  Suzanne Collins.** _Loved the style of writing, totally recommended._

`- TO BE UPDATED, SOOOOOON -`

## My Styles

### Fiction
I tend to focus more on environment creation and human emotions. Let me explain with some examples,

**Character** building.

> Longbottom was a mutinous kid. His appearance reflected his life.  He knew he had to go forward the weary and painful path that his family had laid in the past. Treachery. Deceit. Rotten intentions.

Notice that after I wrote "`His appearance reflected his life`", I added a paragraph of how he looked. Once you read it'll be obvious that his life wasn't easy.

I also love to use one-two word sentences. `Treachery. Deceit. Rotten intentions.` Keeping the meaning short and to the point adds more poetry ( I feel so ) to the writing.

**Environment.**

> Present day. 1789 Olyvie. The Victorian fused steam punk city. Steam and oil drove it’s life. Metal and bismuth gave it’s protection. Corruption and greed of powerful men, were slowly eating it’s glory.

Short sentences give great imagery.

#### Sarcasm

A lovely way to express your anger is by laughing out loud.

### Non Fiction

### Academia

## Random

### Email Etiquette

Examples:

- I’m sure you’re busy and will want time to mull this opportunity over. I’ll follow up in two weeks if I haven’t heard from you.

- For the project to stay on schedule, I’ll need a response from you in the next 24 hours if possible.

- I’m a longtime admirer of your work and have the greatest respect for your filmmaking expertise. I would love to ask you a few questions about how you financed your first film. Would you be game for a 15–20 minute phone call next week? My schedule is wide open all day Thursday and Friday if you have availability then. I promise to keep it brief.

### Favorite Quotes

> Like spider's silk, code flows from my fingertips, defining structures complex and elegant, lightweight yet strong.

  ---

> Money is just a tool for buying time.

  ---

repository: sudoankit/notes-for-the-future

repo_name: sudoankit/notes-for-the-future


text:
- [YouTube Channels](#youtube-courses)
  - [Universities](#universities)
  - [Experts](#experts)

---

## YouTube Courses

Recommending to watch experts courses instead of university courses.

### Universities

- [Massachusetts Institute of Technology OpenCourseWare](https://youtube.com/c/mitocw)
- [CS50 Harvard University](https://youtube.com/playlist?list=PLhQjrBD2T381L3iZyDTxRwOBuUt6m1FnW)
- [IIT Madras BSc Programme](https://youtube.com/channel/UCvKzzGO37oT83K0FwnUucxw)

### Experts

- [Free Code Camp](https://youtube.com/c/Freecodecamp)
- [Tech With Tim](https://youtube.com/c/TechWithTim)
- [Crossroads (Malayalam)](https://youtube.com/c/Crossroadstalk)

---


text:
---
title: 访问应用
---

After deploying the application, the next station is publishing your service.

There are multiple ways to do this, for testing, such as Port Forward and Node Port. for production, such as LoadBalancer and via cluster gateway. This section focus on the production environment.

## Use LoadBalancer by Cloud Provider

This way is only suitable for the cloud environment, such as Aliyun, AWS, and Azure.

For the webservice component, you only need to set the `ExposeType` to `LoadBalancer`, it means this component will generate a Kubernetes Service with LoadBalancer type. After deployment, you could get the service endpoints.

For Example:

```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: webservice-app
spec:
  components:
    - name: frontend
      type: webservice
      properties:
        image: oamdev/testapp:v1
        cmd: ["node", "server.js"]
        ports:
          - port: 8080
            expose: true
        exposeType: LoadBalancer
```

For other components, similarly, only need to generate the Kubernetes Service with LoadBalancer type.

## Use HTTP Domain by Ingress Gateway

This way required installed the ingress controller in the cluster.

Users could bound the `gateway` trait for the component to generate the Ingress. for example:

```yaml
traits:
- type: gateway
  properties:
    domain: testsvc.example.com
    http:
        "/": 8000
        "/manage": 8090
```

This means accessing the component service by domain `testsvc.example.com`, there are two rules, the request path begins with `/manage` will request the component 8090 port. others request path request the component 8000 port.

In VelaUX, you can click the `Add Trait` button and select the `gateway` trait type. refer to follow configuration:

![gateway trait](https://static.kubevela.net/images/1.4/gateway-trait.jpg)

## Use Traefik

This way required installed the traefik addon firstly.

```bash
$ vela addon enable traefik
```

Get more info about this addon, refer to [Traefik Addon](../reference/addons/traefik)

This addon provides three traits, including [http-route](../reference/addons/traefik#http-routetrait), [https-route](../reference/addons/traefik#https-routetrait) and [tcp-route](../reference/addons/traefik#tcp-routetrait).

### HTTP/HTTPS

For HTTP, you can click the `Add Trait` button and select the `http-route` trait type. refer to follow configuration:

![http route trait](https://static.kubevela.net/images/1.4/http-route-trait.jpg)

```yaml
traits:
- type: http-route
  properties:
    domains:
    - testsvc.example.com
    rules:
    - port: 80
    gatewayName: traefik-gateway
    listenerName: web
```

There must be one route rule. The port is the same as the service port, the route condition supports the Header and Request Path.

For HTTPS, you must create the TLS certificate firstly. In VelaUX, open the Integrations page, there is a `TLS Certificate` type. Click the New button, You need to provide the certificate public and private keys and encoded the content by base64.

![new tls](https://static.kubevela.net/images/1.4/new-tls.jpg)

This will generate the secret and distribute to managed clusters with the application.

Then open the application configuration page and click the `Add Trait` button and select the `https-route` trait type. refer to follow configuration:

![https route trait](https://static.kubevela.net/images/1.4/https-route-trait.jpg)

```yaml
traits:
- type: https-route
  properties:
    domains:
    - testsvc.example.com
    TLSPort: 8443
    secrets:
    - name: kubevela
    rules:
    - port: 80
```

The secret name is the same as the name of the certificate configuration.

### TCP

This way is suitable for the service with the stream protocol, reusing the same public IP address.

You can click the `Add Trait` button and select the `tcp-route` trait type. refer to follow configuration:

![tcp route trait](https://static.kubevela.net/images/1.4/tcp-route.jpg)

```yaml
traits:
- type: https-route
  properties:
    rules:
    - gatewayPort: 16379
        port: 6379
        serviceName: redis-master
```


text:
# Atomist 'spring-cloud-config-repository'

[![Build Status](https://travis-ci.org/atomist-rugs/sample-config-repo.svg?branch=master)](https://travis-ci.org/atomist-rugs/sample-config-repo)
[![Slack Status](https://join.atomist.com/badge.svg)](https://join.atomist.com)

This [Rug][rug] archive contains a Generator for a [Spring Cloud Configuration Repository][spring-cloud-config] project.

[rug]: http://docs.atomist.com/
[spring-cloud-config]: https://cloud.spring.io/spring-cloud-config/

This repository itself is used, by default, from the [Spring Cloud Configuration Server](https://github.com/atomist-rugs/spring-cloud-config-server) generator.

## Rugs

### NewSpringCloudConfigRepository

The NewSpringCloudConfigRepository generator creates a new [Spring
Cloud][spring-cloud] [Config Repository][spring-cloud-config] project.

[spring-cloud]: http://projects.spring.io/spring-cloud/
[spring-cloud-config]: https://cloud.spring.io/spring-cloud-config/

[<img src="http://images.atomist.com/button/create-project.png" width="267" alt="Create a project with Atomist"/>](https://api.atomist.com/v1/projects/generators/5c30ace7-3263-451b-abb7-413072209bbb)

#### Prerequisites

There are no prerequisites to running this generator.

#### Parameters

To run this generator you must supply the following parameters.

Name | Required | Default | Description
-----|----------|---------|------------
`project_name` | Yes | |  A valid GitHub repository name.  It must be 21 characters or less to avoid truncating name when the its Slack channel is created.
`description` | No | My new project | A brief description of the project.

#### Running

Run it as follows:

```
$ cd parent/directory
$ rug generate atomist-rugs:spring-cloud-config-repository:NewSpringCloudConfigRepository \
    my-config-repo \
    description="My default Spring Cloud Config Repository"
```

Note the first parameter, the `project_name`, is different in that you
do not need to supply the name of the parameter, just the value.  This
is because the `project_name` parameter is required for all
generators.  This will create a directory named `my-config-repo` and
populate it with a working Spring Boot REST service.  If you are happy
with the change, commit the changes.

```
$ cd my-config-repo
$ git init
$ git add .
$ git commit -m 'Initial version generated by Atomist'
```

## Support

General support questions should be discussed in the `#support`
channel on our community Slack team
at [atomist-community.slack.com][slack].

If you find a problem, please create an [issue][].

[issue]: https://github.com/atomist-rugs/spring-boot-rest-service/issues

## Development

You can build, test, and install the project locally with
the [Rug CLI][cli].

[cli]: https://github.com/atomist/rug-cli

```
$ rug test
$ rug install
```

To create a new release of the project, simply push a tag of the form
`M.N.P` where `M`, `N`, and `P` are integers that form the next
appropriate [semantic version][semver] for release.  For example:

[semver]: http://semver.org

```
$ git tag -a 1.2.3
```

The Travis CI build (see badge at the top of this page) will
automatically create a GitHub release using the tag name for the
release and the comment provided on the annotated tag as the contents
of the release notes.  It will also automatically upload the needed
artifacts.

---
Created by [Atomist][atomist].
Need Help?  [Join our Slack team][slack].

[atomist]: https://www.atomist.com/
[slack]: https://join.atomist.com/

repository: zuaa/spring-cloud-config-repository

repo_name: zuaa/spring-cloud-config-repository


text:
# Bite Your Thumb: Week 1 MVP
---

### NOTICE

The scope of this week is subject to change.

We will 100% be doing everything in this list for this week's MVP, but a bit more may be added as well. Keep checking your Trello and Slack daily to stay on top of these requests

---

### Links:

#### [FoaasAPI](http://www.foaas.com/)
#### [Week 1 MVP Info](https://github.com/AccessLite/BoardingPass/blob/master/Week%201%20-%20MVP/Week1MVP_TechLeadInstructions.md)

---
### Adapting to the keyboard

This one is a request from our PM that we're going to push through for this week. We need to ensure that none of our text fields in the `OperationPreviewViewController` get obstructed by the keyboard when it appears (as currently can, and does, happen).

I would recommend that you embed all of your existing UI elements in a scroll view. Add a reference to the bottom constraint of the scroll view in storyboard so that you can adjust it later in code. Then add an observer to your `OperationPreviewViewController` to listen for `UIKeyboardWillShowNotification` and `UIKeyboardWillHideNotification` notifications, similar to how you added a notification observer to the `FoaasViewController` (check out the [Apple doc](https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW16) if needed). You can then call on the bottom constraint of the scroll view and adjust it's position by adding/subtracting the height of the frame of the keyboard.

It won't be a perfect experience yet, but this next stepp will please the PM.

### Sharing a `Foaas` with others

This is another request from the PM that we push through as part of the week 2 MVP experience. Add a tap gesture to the view in order to start this sharing flow.

1. Use of `UIActivityViewController` to do allow users to share the `Foaas` they create
2. We should allow users to share this via email or iMessage
3. For now, copy the text of the `Foaas` message and subtitle and add it to a user's pasteboard
4. Pass this info along in the share action so that it gets pasted into the body of a user's email or text

### Creating a screenshot

Now, the following is a request of mine: I'd like for us to do a beta version of saving the `FoaasViewController` as a screenshot to our camera roll. Let's add this option as a long-press gesture on the view for now.

1. Add the `NSPhotoLibraryUsageDescription` key to your plist along with a relevant message
1. Make use of `UIGraphicsBeginImageContextWithOptions(_:_:_:)` to create a screenshot of the `FoaasViewController`.
2. Save it to the user's camera roll using `UIImageWriteToSavedPhotosAlbum(_:_:_:_:)`
3. Present an alert using `UIAlertViewController` to indicate success/failure to the user

Please use this function as the `selector` parameter of `UIImageWriteToSavedPhotosAlbum`

```swift
internal func createScreenShotCompletion(image: UIImage, didFinishSavingWithError: NSError?, contextInfo: UnsafeMutableRawPointer?) {
  // check if error != nil
  // present appropriate message in UIAlertViewController
  // double check that the image actually gets saved to the camera roll
}
```

### Animating the button

1. `Use UIView.animate(withDuration:animations:)` to do a simple press-down effect on the octobutton.
2. The effect should scale the image down 20% in `0.1s`, and then return it to its normal size
3. Where you're hooking up the `IBAction` for this, make sure you select `TouchDown` and not `TouchUpInside`

Your `IBAction` code will look something like
```swift
    // create references to the different transforms
    let newTransform = CGAffineTransform(scaleX: 0.8, y: 0.8)
    let originalTransform = sender.imageView!.transform

    UIView.animate(withDuration: 0.1, animations: {
      // animate to newTransform
    }, completion: { (complete) in
      // return to original transform
    })
```

### Foul language filter
This one is straight forward

1. Replace the first vowel of any "curse" word with an asterisk before displaying the message on the `FoaasViewController`

Just keep in mind this feature will be toggle-able in the future in a settings menu. So make it possible to easily alternate between "profanity mode" and "clean mode".

---
# Code Refactors

### `FoaasPathBuilder`

We're creating a new class specifically meant to generating the path components to our `URL`s. I'm not thrilled by our implementations the first time around so I have a new spec, read this carefully as it will seek to challenge your abstract thinking and your proficiency with higher-order functions in swift

#### `init(operation: FoaasOperation)`
This init should set self.operation, and self.operationFields. OperationFields intends to be a dictionary corresponding to flipping the key/value pairs of the `FoaasField`s in each `FoaasOperation` and flattening the array.

__Why is this needed?__
We want to extract *unique* key values to be able to use later. But every `FoaasField` uses nearly the same keys for their values, specifically `name`, `field`. We want to use the values contained in the `.name` and `.field` properties as those will be unique per `FoaasOperation`

ie. using the /ballmer endpoint
Normally, the `FoaasOperation.fields` array would look like:
```
  fields = [  [ "name" : "Name",    "field" : "name"    ],
              [ "name" : "Company", "field" : "company" ],
              [ "name" : "From",    "field" : "from"    ]
           ]
```
Which is problematic since we want to flatten this array of `[String : String]`. So instead, we want reverse the key/values in each element, then flatten that array to look like:
```
  operationFields = [ "Name" : "name",
                      "name" : "field",
                      "Company" : "name",
                      "company" : "field",
                      "From" : "name",
                      "from" : "field" ]
```

While we're at it, we should also ignore keys that only differ due to capitalization. So the final operation fields dict should look like:

```
  operationFields = [ "name" : "field",
                      "company" : "field",
                      "from" : "field" ]
```

Here is what the class *should* look like. I've included documentation comments to help guide you:

```swift
class FoaasPathBuilder {
  var operation: FoaasOperation!
  var operationFields: [String : String]!

  /**
   Flattens an array of [FoaasField] with identical keys, into a one-dimensional array of [String:String] while performing
   a case-insensitive comparison of key-value pairs to store only unique keys.

   - parameter operation: The `FoaasOperation` to use in building a URL path.
   */
  init(operation: FoaasOperation) {
  }

  /**
   Goes through a `FoaasOperation.url` to replace placeholder text with its corresponding value stored in self.operationsField
   in the correct order. The String is also passed back with percent encoding automatically applied.

   example:
   self.operationFields = [ "from" : "Grumpy Cat", "name" : "Nala Cat"]
   self.operation.url = "/bus/:name/:from/"

   build() // returns "/bus/Nala%20Cat/Grumpy%20Cat"

   - returns: A `String` that corresponds to the path component needed to create a `URL` to request a `Foaas` object
   */
  func build() -> String {
  }

  /**
   Updates the `value` of an element with the corresponding `key`. If the `key` does not exist, nothing happens.

   - parameter key: The key of an element in `self.operationFields`
   - parameter value: The value to change to.
   */
  func update(key: String, value: String)  {
  }

  /**
   Utility function to get the index of a specified key in its correct order in the `FoaasOperation.url` property.

   For example, for the Ballmer operation, its corresponding FoaasOperation.url is `/ballmer/:name/:company/:from`

   - indexOf(key: "name") // should return 0
   - indexOf(key: "company") // should return 1
   - indexOf(key: "from") // should return 2
   - indexOf(key: ":name") // should return nil
   - indexOf(key: "tool") // should return nil

   - parameter key: The key in self.operationFields to search for.
   - returns: The index position of the key if it exists in self.operationFields. `nil` otherwise.
   - seealso: `FoaasPathBuilder.allKeys`
  */
  func indexOf(key: String) -> Int? {
  }

  /**
   Utility method that returns all of the keys for a `FoaasOperation`'s `field`s

   - returns: The keys contained in `self.operation.fields` as `[String]`
  */
  func allKeys() -> [String] {
    return self.operation.fields.map { $0.field }
  }
}

```
---
### Refactoring FoaasAPIManager/FoaasDataManager

Update you code so that only the FoaasDataManager makes calls to the FoaasAPIManager.

For example, you would need to replace your code in the AppDelegate:
```swift
  if !FoaasDataManager.shared.load() {
    FoaasAPIManager.getOperations { (foaas: [FoaasOperation]?) in
      guard let validFoaas = foaas else {return}
      print(validFoaas.count)
      FoaasDataManager.shared.save(operations: validFoaas)
    }
  }
```

with a new function in `FoaasDataManager` that would have the exact same functionality contained in a single function:
```swift
internal func requestOperations(_ operations: @escaping ([FoaasOperation]?)->Void) {
}
```

But be aware that YOU MUST NOT call `FoaasAPIManager` from anywhere besides within your `FoaasDataManager`
---

### Other MANDATORY Requirements:
1. Bug fixes listed in your Week 1 PR Code Comments.
1. The text of the `FoaasViewController` label should be bound by the top of the octo-image at the bottom of the screen. Meaning, the text should not be large enough so that it would be covered by the image (or going further than the bottom edge of the screen!).
  - You may want to test your code using the `/madison` endpoint, as it seems to produce the longest text.
2. You must implement something to "live preview" the `Foaas` message in your `OperationPreviewViewController`. For now, it is acceptable that the preview text updates on `textFieldDidEndEditing` or `textFieldShouldReturn`.
3. Your app must make proper use of the icons provided by Design.
4. Your repo MUST HAVE A .gitignore ALWAYS. If I haven't already corrected this for you in a PR, please add one on.

Failure to meet these mandatory requirements will immediately disqualify you from continuing to next week.

repository: AccessLite/BoardingPass

path: /Week 2 - MVP/Week2MVP_TechLeadInstructions.md

repo_name: AccessLite/BoardingPass


text:
# DeepRemove

Removes folder or directory structures that are too deep
to remove by traditional tools or shell commands in Windows.

Written in C# with calls into Kernel32.

This tool will help you to remove nested folder structures that
seem infinitively deep.

![DeepRemove Main Screen](./images/DeepRemove.jpg)

The only requirement is that you must be the owner of the entire
structure, in order to succesfully remove all folders.
If you are unsure about owning the entire structure;
then, take ownership of the root folder using any of the following
guides:

- How to take ownership of a file or a folder in Windows XP
  - http://support.microsoft.com/kb/308421
- Quick Tip: Take ownership of files and folders in Windows
  - http://www.techrepublic.com/blog/window-on-windows/quick-tip-take-ownership-of-files-and-folders-in-windows/3688

In some really deep folder structures,
you might need to run the application more than once.
My worst case was deleting a 230 GB restore,
made with robocopy,
where I needed to run the app 4 times
(actually the app was run once; the button had to be pressed 4 times).

Best regards,

JuanPablo
Last edited Jul 5 at 12:08 PM by JPJofre, version 8

repository: jpjsm/deepremove

repo_name: jpjsm/deepremove


text:
## Find Loop

#### Problem Statement

Write a function that takes in the head of a Singly Linked List that contains a loop (in other words, the
list's tail node points to some node in the list instead of the None (null) value). The function should
return the node (the actual node - not just its value) from which the loop originates in constant space.
Note that every node in the Singly Linked List has a "value" property storing its value as well as a "next"
property pointing to the next node in the list.

Sample input:
n0 -> n1 -> n2 -> n3 -> n4 -> n5 -> n6
                        ^           v
                        n9 <- n8 <- n7
Sample output: n4

#### Explanation

#### Solution

Check this [Python](../python/Find_Loop.py) code.


text:
# September 27, 2017 - Wednesday Meeting Notes

Members Present: All
Advisor Present: Yes

## 1:00pm - 2:00pm

- Discussed week's progress and changed timeline for tech analysis and SRS deliverables
- Talked about future meeting schedule
- Dr. Thomas really liked the code of conduct
- Talked about why process is important

### Future Meeting Scheduling

- Dr. Thomas will be out of town weeks 7, 9, and 10
- Week 7 - Meeting will be over google hangouts at same time as normal
- Week 9 - Can meet on Wednesday at normal time. Will need deliverable/draft by Thursday.
- Week 10 - Will not have wednesday meeting. Will have a demo/presentation on Friday from 12pm-1pm.

path: /Documentation/meeting notes/20170927 q1w4 wednesday.md

filename: 20170927 q1w4 wednesday.md