text:
## Adapter description and scope

The Tribute adapter allows potential and existing DAO members to contribute any amount of ERC-20 tokens to the DAO in exchange for any amount of DAO internal tokens (e.g., SHARE or LOOT tokens already registered with the DAO Bank). If the proposal passes, the requested internal tokens are minted to the applicant and the tokens provided as tribute are transferred to the Bank Extension. In addition, the applicant becomes a member of the DAO (if not already one).

The Tribute adapter is similar to the Onboarding adapter in that both allow for joining the DAO (or increasing a stake in the DAO) through the exchange of contributed assets for DAO internal tokens. However, there are key differences:

- The Onboarding adapter allows both Ether and ERC-20 tokens to be contributed, whereas the Tribute adapter accepts only ERC-20 tokens.

- The Onboarding adapter mints a fixed amount of internal tokens to the applicant based on the amount of assets contributed. In other words, an onboarding proposal does not specify the amount of internal tokens requested. That is calculated from the DAO's configurations and the amount of assets contributed. The Tribute adapter has more open-ended proposal parameters. The proposer can request any amount of internal tokens to be minted in exchange for any amount of any ERC-20 tokens contributed. The worthiness of that transfer proposal for the DAO is left to the vote of its members.

## Adapter workflow

A tribute is made by first submitting a proposal specifying (1) the applicant who wishes to join the DAO (or increase his stake in the DAO), (2) the amount and type of internal tokens the applicant desires (e.g., member SHARE tokens), and (3) the amount and type of ERC-20 tokens the proposer will transfer to the DAO in exchange for those internal tokens. The applicant and proposer can be separate accounts (e.g., proposer is applying and providing tribute on behalf of the applicant). The internal token type requested must be already registered with the DAO Bank and will usually be pre-defined SHARE or LOOT tokens in the DAO. Prior to submitting the proposal, the proposer must first separately `approve` the adapter as spender of the ERC-20 tokens provided as tribute. The proposal submission will transfer the tribute tokens from the proposer to the adapter to be held in escrow.

If the proposal has not been sponsored yet, the proposer can cancel the proposal. Upon cancellation, the proposal is marked as processed and the tribute tokens are refunded to the proposer. Only the proposer can cancel the proposal.

When a DAO member sponsors the proposal, the voting period begins allowing members to vote for or against the proposal. Only a member can sponsor the proposal.

After the voting period is done along with its subsequent grace period, the proposal can be processed. Any account can process the proposal. Upon processing, if the vote has passed, the requested internal tokens are minted to the applicant and the applicant is added as a DAO member (if not already one). The tribute token is registered with the DAO Bank (if not already registered), and the amount of tribute tokens are added to the Guild balance and transferred out of escrow from the adapter to the Bank Extension.

Upon processing, if the vote has failed, the tribute tokens are refunded to the proposer.

## Adapter configuration

A DAO Bank extension must exist and be configured with proper access for this adapter.

The DAO internal tokens to be minted to the applicant must be registered with the DAO Bank.

DAORegistry Access Flags: `SUBMIT_PROPOSAL`, `NEW_MEMBER`.

Bank Extension Access Flags: `ADD_TO_BALANCE`, `REGISTER_NEW_TOKEN`, `SUB_FROM_BALANCE`.

## Adapter state

- `proposals`: All tribute proposals handled by each DAO.
- `ProposalDetails`:
  - `id`: The proposal id.
  - `applicant`: The applicant address (who will receive the DAO internal tokens and become a member).
  - `proposer`: The proposer address (who will provide the token tribute).
  - `tokenToMint`: The address of the DAO internal token to be minted to the applicant.
  - `requestAmount`: The amount requested of DAO internal tokens.
  - `token`: The address of the ERC-20 tokens provided as tribute by the proposer.
  - `tributeAmount`: The amount of tribute tokens.

## Dependencies and interactions (internal / external)

- BankExtension

  - Registers DAO internal token to be minted to the applicant in adapter configuration.
  - Checks if tribute token (ERC-20) is registered with the DAO Bank.
  - Registers tribute token for a passed proposal (if not already registered).
  - Adds to the Guild balance the amount of tribute tokens.
  - Checks if the DAO internal token to be minted to the applicant is registered with the DAO Bank.
  - Adds to the applicant balance the amount of requested DAO internal tokens.

- DaoRegistry

  - Gets Bank extension address.
  - Checks if applicant address is not reserved.
  - Gets Voting adapter address.
  - Submits/sponsors/processes the tribute proposal.
  - Checks if proposal flag is `SPONSORED`, `PROCESSED`.
  - Checks if applicant is `JAILED`.
  - Creates a new member entry (if applicant is not already a member).

- Voting

  - Gets address that sent the sponsorProposal transaction.
  - Starts new voting for the tribute proposal.
  - Checks the voting results.

## Functions description and assumptions / checks

### receive() external payable

```solidity
    /**
     * @notice default fallback function to prevent from sending ether to the contract.
     */
    receive() external payable
```

### function configureDao

```solidity
    /**
     * @notice Configures the adapter for a particular DAO.
     * @notice Registers the DAO internal token with the DAO Bank.
     * @dev Only adapters registered to the DAO can execute the function call (or if the DAO is in creation mode).
     * @dev A DAO Bank extension must exist and be configured with proper access for this adapter.
     * @param dao The DAO address.
     * @param tokenAddrToMint The internal token address to be registered with the DAO Bank.
     */
    function configureDao(DaoRegistry dao, address tokenAddrToMint)
        external
        onlyAdapter(dao)
```

### function provideTribute

```solidity
    /**
     * @notice Creates a tribute proposal and escrows received tokens into the adapter.
     * @dev Applicant address must not be reserved.
     * @dev The proposer must first separately `approve` the adapter as spender of the ERC-20 tokens provided as tribute.
     * @param dao The DAO address.
     * @param proposalId The proposal id (managed by the client).
     * @param applicant The applicant address (who will receive the DAO internal tokens and become a member).
     * @param tokenToMint The address of the DAO internal token to be minted to the applicant.
     * @param requestAmount The amount requested of DAO internal tokens.
     * @param tokenAddr The address of the ERC-20 tokens provided as tribute by the proposer.
     * @param tributeAmount The amount of tribute tokens.
     */
    function provideTribute(
        DaoRegistry dao,
        bytes32 proposalId,
        address applicant,
        address tokenToMint,
        uint256 requestAmount,
        address tokenAddr,
        uint256 tributeAmount
    ) public override
```

### function sponsorProposal

```solidity
    /**
     * @notice Sponsors a tribute proposal to start the voting process.
     * @dev Only members of the DAO can sponsor a tribute proposal.
     * @param dao The DAO address.
     * @param proposalId The proposal id.
     * @param data Additional details about the proposal.
     */
    function sponsorProposal(
        DaoRegistry dao,
        bytes32 proposalId,
        bytes memory data
    ) external override
```

### function \_sponsorProposal

```solidity
    /**
     * @notice Sponsors a tribute proposal to start the voting process.
     * @dev Only members of the DAO can sponsor a tribute proposal.
     * @param dao The DAO address.
     * @param proposalId The proposal id.
     * @param data Additional details about the proposal.
     * @param sponsoredBy The address of the sponsoring member.
     * @param votingContract The voting contract used by the DAO.
     */
    function _sponsorProposal(
        DaoRegistry dao,
        bytes32 proposalId,
        bytes memory data,
        address sponsoredBy,
        IVoting votingContract
    ) internal
```

### function cancelProposal

```solidity
    /**
     * @notice Cancels a tribute proposal which marks it as processed and initiates refund of the tribute tokens to the proposer.
     * @dev Proposal id must exist.
     * @dev Only proposals that have not already been sponsored can be cancelled.
     * @dev Only proposer can cancel a tribute proposal.
     * @param dao The DAO address.
     * @param proposalId The proposal id.
     */
    function cancelProposal(DaoRegistry dao, bytes32 proposalId)
        external
        override
```

### function processProposal

```solidity
    /**
     * @notice Processes a tribute proposal to handle minting and exchange of DAO internal tokens for tribute tokens (passed vote) or the refund of tribute tokens (failed vote).
     * @dev Proposal id must exist.
     * @dev Only proposals that have not already been processed are accepted.
     * @dev Only sponsored proposals with completed voting are accepted.
     * @dev ERC-20 tribute tokens must be registered with the DAO Bank (a passed proposal will check and register the token if needed).
     * @param dao The DAO address.
     * @param proposalId The proposal id.
     */
    function processProposal(DaoRegistry dao, bytes32 proposalId)
        external
        override
```

### function \_submitTributeProposal

```solidity
    /**
     * @notice Submits a tribute proposal to the DAO.
     * @dev Proposal ids must be valid and cannot be reused.
     * @param dao The DAO address.
     * @param proposalId The proposal id.
     * @param applicant The applicant address (who will receive the DAO internal tokens and become a member).
     * @param proposer The proposer address (who will provide the token tribute).
     * @param tokenToMint The address of the DAO internal token to be minted to the applicant.
     * @param requestAmount The amount requested of DAO internal tokens.
     * @param tokenAddr The address of the ERC-20 tokens provided as tribute by the proposer.
     * @param tributeAmount The amount of tribute tokens.
     */
    function _submitTributeProposal(
        DaoRegistry dao,
        bytes32 proposalId,
        address applicant,
        address proposer,
        address tokenToMint,
        uint256 requestAmount,
        address tokenAddr,
        uint256 tributeAmount
    ) internal
```

### function \_refundTribute

```solidity
    /**
     * @notice Refunds tribute tokens to the proposer.
     * @param tokenAddr The address of the ERC-20 tokens provided as tribute by the proposer.
     * @param proposer The proposer address (who will receive back the tribute tokens).
     * @param amount The amount of tribute tokens to be refunded.
     */
    function _refundTribute(
        address tokenAddr,
        address proposer,
        uint256 amount
    ) internal
```

### function \_mintTokensToMember

```solidity
    /**
     * @notice Adds DAO internal tokens to applicant's balance and creates a new member entry (if applicant is not already a member).
     * @dev Internal tokens to be minted to the applicant must be registered with the DAO Bank.
     * @param dao The DAO address.
     * @param applicant The applicant address (who will receive the DAO internal tokens and become a member).
     * @param proposer The proposer address (who will be refunded the tribute tokens if the minting of internal tokens fails).
     * @param tokenToMint The address of the DAO internal token to be minted to the applicant.
     * @param requestAmount The amount requested of DAO internal tokens.
     * @param token The address of the ERC-20 tokens provided as tribute by the proposer.
     * @param tributeAmount The amount of tribute tokens to be refunded if the minting of internal tokens fails.
     */
    function _mintTokensToMember(
        DaoRegistry dao,
        address applicant,
        address proposer,
        address tokenToMint,
        uint256 requestAmount,
        address token,
        uint256 tributeAmount
    ) internal
```

## Events

No events are emitted from this adapter.

repository: SenaryBV/labsDAO-base

repo_name: SenaryBV/labsDAO-base


text:
superlists
==========

A django, web-dev, tdd learning project from the book
*Test-Driven Development with Python*.

Usage
-----

    python3 manage.py runserver
    python3 manage.py test lists
    python3 manage.py test functional_tests

References
----------
* *Test-Driven Web Development with Python*
  http://chimera.labs.oreilly.com/books/1234000000754/ch06.html
* http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

license: MIT

repository: micviklui/superlists

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: micviklui/superlists


text:
# Branch and Merge

#### A place to practice creating branches and merging, 02/10/2020

#### By Tristen Everett

## Description

This aplication is ment to give me practice in creating branches of code and merging them back together to create an island resort website.

## Setup/Installation Requirements

* Clone this repository
* Launch the index.html in your browser
* Explore

## Known Bugs

Pages are not finished being built

## Technologies Used

HTML

CSS

### License

This software is licensed under the MIT license.

Copyright (c) 2020 Tristen Everett

repository: TJEverett/branch-and-merge

repo_name: TJEverett/branch-and-merge


text:
---
title: "Professional Resume"
permalink: "/resume/"
author_profile: true
---

## SUMMARY

Offensive Security practitioner pursuing new opportunities in penetration testing space. Experienced in web application testing, network analysis, finding, and mitigating vulnerabilities. Eager to apply my knowledge in the security industry and willing to go the extra mile to learn and refine my skills. I am detail-oriented and confident in my practice of pen testing and reporting. Also, possess excellent customer service skills to transfer technical knowledge to non-technical customers. Always have a learning approach toward my job and calm composure in the face of a difficult customer situation.

## EDUCATION

- The University of Texas at Arlington
  December 2018
- B.S Information Systems & Cybersecurity GPA 3.6/4.0

## CERTIFICATION & AWARDS

- Offensive Security Certified Professional (OSCP), July 2020.
- CompTIA Security+ Certified, March 2017.
- Hacker rank on HackTheBox (Global Ranking 850).
- Fidelity Investments – Award of excellence in Customer Support.

## CYBERSECURITY EXPERIENCE

- Proficient in assessing client networks and applications for security vulnerabilities and how to mitigate them.
- Used information gathering techniques to identify and enumerate targets running various OS and services.
- Identified and exploited XSS, SQL Injection, LFI/RFI vulnerabilities in web apps on HackerOne and BugCrowd.
- Designed and competed in Capture the Flag competition all year long.
- Leveraged tunneling techniques to pivot between networks.
- Analyzed, corrected, modified, and cross-compiled public exploit code.

## INDUSTRY EXPERIENCE

*Fidelity Investments, Westlake*
Feb 2019 - present

_End User Support Specialist_

- Provided top-notch software troubleshooting service for Fidelity associates.
- Strengthened and maintained an outstanding Service Level Agreement of 92% throughout tenure.
- Consistently achieved top ranks in monthly metrics, call duration, number of calls per shift, and customer satisfaction ratings.
- Proficient in detail-oriented ticket documentation using ServiceNow, while exhausting every avenue to resolve software bugs and maintaining quick service.

## TECHNICAL SKILLS

-  **Software:**  Python, PHP, JavaScript, Perl, Bash/Shell, PowerShell.
-  **Platform:**  Docker, AWS, VMware Workstation/Fusion, Active Directory.
-  **Tooling:** Ansible, OpenVAS, Powershell Empire, Nmap, Metasploit Pro, BurpSuite Pro, AD attacks, etc.
- **Web Application Vulnerabilities:** SQL Injection, XSS(Stored, DOM, Reflected), OWASP top 10 2020, etc.
- **SIEM tools:** Splunk, Sumo Logic, ELK(Kibana)

branch_name: refs/heads/main


text:
------------

# explain

>bdocs-tab:example Get the documentation of the resource and its fields

```bdocs-tab:example_shell
kubectl explain pods
```

>bdocs-tab:example Get the documentation of a specific field of a resource

```bdocs-tab:example_shell
kubectl explain pods.spec.containers
```

Documentation of resources.

Valid resource types include:

  * clusters (valid only for federation apiservers)
  * componentstatuses (aka 'cs')
  * configmaps (aka 'cm')
  * daemonsets (aka 'ds')
  * deployments (aka 'deploy')
  * endpoints (aka 'ep')
  * events (aka 'ev')
  * horizontalpodautoscalers (aka 'hpa')
  * ingresses (aka 'ing')
  * jobs
  * limitranges (aka 'limits')
  * namespaces (aka 'ns')
  * networkpolicies
  * nodes (aka 'no')
  * persistentvolumeclaims (aka 'pvc')
  * persistentvolumes (aka 'pv')
  * pods (aka 'po')
  * podsecuritypolicies (aka 'psp')
  * podtemplates
  * replicasets (aka 'rs')
  * replicationcontrollers (aka 'rc')
  * resourcequotas (aka 'quota')
  * secrets
  * serviceaccounts (aka 'sa')
  * services (aka 'svc')
  * statefulsets
  * storageclasses
  * thirdpartyresources

### Usage

`$ explain RESOURCE`

### Flags

Name | Shorthand | Default | Usage
---- | --------- | ------- | -----
include-extended-apis |  | true | If true, include definitions of new APIs via calls to the API server. [default true]
recursive |  | false | Print the fields of fields (Currently only 1 level deep)

repository: blademainer/kubernetes-book

repo_name: blademainer/kubernetes-book


text:
# Note Taker

![license](https://img.shields.io/badge/license-MIT-blue?style=plastic)

## Description

This application is created to write and save notes. The notes may used for any information. For example, they may contain tasks or thoughts to keep them organized.

Once "Get Started" button is clicked, the main page will be presented. A new note may be created immediately after opening it. It is required to write "Note Title" and "Note Text" fields and click the save icon which will be displayed on the right top corner when the both fields are filled.

All existing notes are available in the left-hand column. Their text may be displayed in the right-hand column by clicking on them. If an existing note is open, a new note may be added by clicking on the add icon on the right top corner.

All saved notes may be deleted by clicking on the trash icon for a selected note.

## Table of Contents

* [Link](#link)
* [Screenshot](#screenshot)
* [Installation Instructions](#installation-instructions)
* [Usage Information](#usage-information)
* [License](#license)

## Link

https://gentle-lowlands-76861.herokuapp.com/

## Screenshot

![Screenshot](./misc/screenshot.jpg?raw=true)

## Installation Instructions

Clone the code from this repository. Run "npm install" in the console from the app directory.

## Usage Information

Run "node index" in the console from the app directory.

## License

MIT

## Questions

GitHub profile: https://github.com/alexgorshkov02

In case of additional questions, please reach out to me at<EMAIL_ADDRESS>

gha_language: JavaScript


text:
A variety of exporters are available to the OpenCensus Service (both Agent and Collector)

## Collector

In addition to the normal `exporters`, the OpenCensus Collector supports a special configuration.
`queued-exporters` offer bounded buffer retry logic for multiple destinations.

```yaml
queued-exporters:
  omnition: # A friendly name for the processor
    # num-workers is the number of queue workers that will be dequeuing batches and sending them out (default is 10)
    num-workers: 2
    # queue-size is the maximum number of batches allowed in the queue at a given time (default is 5000)
    queue-size: 100
    # retry-on-failure indicates whether queue processor should retry span batches in case of processing failure (default is true)
    retry-on-failure: true
    # backoff-delay is the amount of time a worker waits after a failed send before retrying (default is 5 seconds)
    backoff-delay: 3s
    # sender-type is the type of sender used by this processor, the default is an invalid sender so it forces one to be specified
    sender-type: jaeger-thrift-http
    # configuration of the selected sender-type, in this example jaeger-thrift-http. Which supports 3 settings:
    # collector-endpoint: address of Jaeger collector thrift-http endpoint
    # headers: a map of any additional headers to be sent with each batch (e.g.: api keys, etc)
    # timeout: the timeout for the sender to consider the operation as failed
    jaeger-thrift-http:
      collector-endpoint: "https://ingest.omnition.io"
      headers: { "x-omnition-api-key": "00000000-0000-0000-0000-000000000001" }
      timeout: 5s
  my-org-jaeger: # A second processor with its own configuration options
    num-workers: 2
    queue-size: 100
    retry-on-failure: true
    backoff-delay: 3s
    sender-type: jaeger-thrift-http
    jaeger-thrift-http:
      collector-endpoint: "http://jaeger.local:14268/api/traces"
      timeout: 5s
```

repository: pjanotti/opencensus-service

gha_language: Go

repo_name: pjanotti/opencensus-service


text:
# Full Post HTML Representation

In this chapter, you are going

## Learning Objectives

* You should be able to explain ow to create a new date object in JavaScript.
* You should be able to identify where a ternary statement is being used in a string template.
* You should be able to explain the purpose of using a ternary statement in a string template.
* You should be able to the benefit of appending the `id` property of objects into the string template.

## Learning Resources

## Setup

Right-click each of these images and save them to the `giffygram/src/scripts/post` directory.

## Updated HTML Representation

Up to this point, you might only be showing the title and image for each post. Perhaps in an earlier chapter, you decided to add description or timestamp properties. If you did not, don't fret!

Update the code in the **`PostList`** component to have the following HTML representation generated for each post object in application state.

The sections below will discuss the new code in further detail.

```js
const htmlRepresentationOfThisPost = `
    <section class="post">
        <header>
            <h2 class="post__title">${postObject.title}</h2>
        </header>
        <img class="post__image" src="${postObject.imageURL}" />
        <div class="post__description">
            ${postObject.description}
        </div>
        <div class="post__tagline">
            Posted by
            <a href="#" class="profileLink" id="profile--${postObject.userId}">
                User #${postObject.userId}
            </a>
            on ${new Date(postObject.timestamp).toLocaleDateString('en-US')}
        </div>
        <div class="post__actions">
            <div>
                <img id="favoritePost--${postObject.id}"
                    class="actionIcon"
                    src="./favorite-star-blank.svg"
                />
            </div>
            <div>
                <img id="blockPost--${postObject.id}" class="actionIcon" src="./block.svg" />
            </div>
        </div>
    </section>
`
```

## User's Id in the HTML

The `id` attribute of HTML elements needs to be unique. It's just like the `id` property that you created on each one of your application state objects. It uniquely identifies that thing.

By interpolating the `id` property of each individual post into the `id` of the image, you are setting up the ability _(in a later chapter)_ to the exact post when the user clicks on a star to favorite the post.

```html
<img id="favoritePost--${postObject.id}"
    class="actionIcon"
    src="./favorite-star-blank.svg"
/>
```

## React to a User Being Selected

For now, detect when the user clicks on a favorite icon or any post, and display the `id` of the corresponding post.

```js
applicationElement.addEventListener("change", event => {
    if (event.target.id.startsWith("favoritePost")) {
        const [, postId] = event.target.id.split("--")

        window.alert(`User wants to favorite post ${postId}`)
    }
})
```

### Splitting a String

When you split a string, you specify the delimiter, or character(s), where the split should happen. The result of invoking the `.split()` method on a string is an array filled with what's left.

```js
const amountString = "1,5,2,1,7"
const amounts = amountString.split(",")

console.log(amounts)
> [1, 5, 2, 1, 7]
```

Watch the [How To Split a String In JavaScript](https://www.youtube.com/watch?v=u2ZocmM93yU) and [Split a String in JavaScript](https://www.youtube.com/watch?v=Upf6H4klZcw) videos for more ideas.

### Deconstructing an Array

While `split()` creates an array, you can pull out the values from an array and assign each one to a variable.

```js
const [bird, mammal] = ["Flamingo", "Mouse"]

console.log(bird)    // "Flamingo"
console.log(mammal)  // "Mouse"
```

Watch the [JS Destructuring in 100 Seconds](https://www.youtube.com/watch?v=UgEaJBz3bjY) and [Array Destructuring in Javascript](https://www.youtube.com/watch?v=fsybVOVcNg0) for more examples.

## Displaying Timestamps for Humans

The timestamp format that you are using in your posts is called the epoch timestamp. It's the number of milliseconds since 1970.

If you take the number and pass it as an argument when creating new date object, you get a somewhat more human readable format.

```js
const timestamp =<PHONE_NUMBER>812
const better = new Date(ts)

console.log(better)   // "Sun Jun 16 2019 09:23:42 GMT-0500 (Central Daylight Time)"
```

To convert it into a concise format of `month/day/year`, you can invoke the `toLocaleDateString()` method on that result.

```js
const best = better.toLocaleDateString('en-US')

console.log(best)   // "6/16/2019"
```

gha_language: Shell


text:
# Evaluation-of-Machine-Learning-in-Asset-Pricing

GitHub Repository for my honours thesis at Monash University

Topic: Evaluation of Machine Learning in Asset Pricing

Supervisor: David Frazier

This thesis aims to evaluate the application of machine learning methods to the problems of prediction and causal inference in empirical finance, with specific regards to low signal to noise ratios and regressors which exhibit persistence and cross sectional correlation. This is explored via a simulation study and an empirica study.

All code is in the R folder, and all files related to the actual thesis are in the Thesis folder.

# Simulation

Simulation code should be finished, in "Simulation.rmd". This includes flexible options to specify different parameters and properties. Generation of each panel dataset in a panel dataframe format, along with diagnostics such as various r squared values are all possible with provided functions. This section is to be run to generate the actual datasets first.

"Simulation Models.rmd" contains all the functions required to fit models to the datasets. Coded up to be as modular as possible, so in theory you could just specify a single dataset and run each model individually in this section (indeed this is what I've done to test them).

"Simulation Models_run.rmd" contains all the wrapper functions to iteratively loop over all the simulation realisations, and will spit out list objects that contain all specified model results. Model results are already provided in .rds format in the repo.

"Simulation Model_results.rmd" contains all the code to load in the results and produce pretty tables (in LaTeX, or optionally html with a bit of fiddling) and plots. Some functions are also available to extract/average over results in certain ways.

Generally speaking, the project has been coded up in an efficient manner. Simulation, model fitting, variable importance calculation etc are all parallelized in addition to using efficient packages for maximum effiency. There are some exceptions to this where the implementation of the methods does not play nicely with parallelization (e.g. python packages run through "reticulate" on Windows, or random forest variable importance functions which are already parallelized).

Note that the random forests and neural networks are VERY computationally intensive. On an i5 6600K @ 4.4GHz + NVidia GTX 960 running a set of either of these typically requires a least a few hours, often overnight.

# Real Dataset

The majority of the real dataset is provided by Dacheng Xiu, available from his website http://dachxiu.chicagobooth.edu/ under "Empirical Asset Pricing via Machine Learning." This dataset notably excludes the RET (holding period return) or Price columns, which have to be queried from WRDS/CRSP separately. Code to combine these two elements is provided.

This was then combined with Welch Goyal's dataset containing various macroeconomic factors, available from Amit Goyal's website http://www.hec.unil.ch/agoyal/. Specifically, the updated dataset up until 2018 was used.

For robustness checks the Fama French Five Factors were also used, available from Kenneth French's website https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html.

## FFORMA

An alternative implementation of FFORMA (https://github.com/robjhyndman/M4metalearning and https://www-sciencedirect-com.ezproxy.lib.monash.edu.au/science/article/pii/S0169207019300895) was produced for ease of use with data in a tidy format. Because FFORMA requires running XGBoost with a custom loss function which is not officially supported, instructions to clone and install a fixed fork of XGBoost are provided.

## Amazon DeepAR

This part of the project needs to be run on an AWS EC2 instance with permissions to an S3 bucket. There are some alternative implementations of this, but they are unofficial and very tricky to compile and get running.

Instructions with how to set up the required AWS services up and running are included in the AWS folder. This includes commented instructions for how to set up an Ubuntu Machine Learning Server hosting Rstudio Server, as well as many wrapper functions to get the data generated from R into a JSON format which Sagemaker likes.

Note that AWS is quite costly - running this part of the project cost ~160 USD (mostly from EC2 and Sagemaker instances).


text:
Example of Yite Framework Application
=====================================

## To run the application

```bash
$ node app.js
```

Go to http://localhost:3000

repository: justin-john/yite

repo_name: justin-john/yite


text:
---
layout: layout.pug
navigationTitle: Operator SDK
title: Operator SDK
menuWeight: 8
beta: false
enterprise: false
---

<!-- markdownlint-disable MD004 MD007 MD025 MD030 -->

## Operator SDK

[Operator SDK][operator-sdk] is a popular way to create a Kubernetes [operator][operator]. The [Operator Hub][operator-hub] is the official repository to find operators built using Operator SDK.

## Before you Begin
To run an SDK Operator workload beyond the standard workload prerequisties, you will need:

- [Operator Lifecycle Manager (OLM)][olm] service running in the cluster

The details for its installation are part of the install instructions when searching on [Operator Hub][operator-hub].

## Run an SDK Operator Workload

[CockroachDB][cockroach] is used as an example. Search Operator Hub for "cockroach db" results in the operators [detail page][cockroach-operator]. Pressing the "Install" button reveals the installation instructions which include the [OLM][olm] instructions. Only one OLM is needed for a cluster. The details provided are as follows:

Installation of OLM

```bash
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.16.1/install.sh | bash -s 0.16.1
```

Installation of the Operator

```bash
kubectl create -f https://operatorhub.io/install/cockroachdb.yaml
```

Some of the SDK Operators are based on [Helm][helm]. This allows for the configuration of operator configuration values using helm values files. Details are provided on the operator landing page. [CockroachDB Operator page][cockroach-operator] provides an example.

[cockroach]: https://github.com/cockroachdb/cockroach
[cockroach-operator]: https://operatorhub.io/operator/cockroachdb
[helm]: ../../helm
[olm]: https://sdk.operatorframework.io/docs/olm-integration/
[operator]: ..
[operator-sdk]: https://sdk.operatorframework.io/
[operator-hub]: https://operatorhub.io/

repository: mesosphere/dcos-docs-site

gha_language: SCSS

repo_name: mesosphere/dcos-docs-site


text:
---
title: Compression
page_title: Compression
description: "Learn more about the Telerik UI for ASP.NET AJAX Compression module and the ways for compression it provides."
slug: controls/radcompression
previous_url: controls/radcompression
CTAControlName: RadCompression
tags: radcompression
published: True
position: 2
---

# WebForms Compression Overview

>The Telerik UI for ASP.NET AJAX Compression module is now deprecated. It is recommended that you use the IIS 7 or later dynamic content compression feature. If you are still concerned about the response size, consider storing the ViewState on the server instead of using the default hidden field.

The Compression module was initially designed for solving issues when AJAX requests to dynamic content, such as ASPX pages and WebResource requests, were not compressed by IIS.

This article explains what the Compression feature is and contains the following sections:

- [Compression Overview](#compression-overview)
- [Enabling Compression](#enabling-compression)
- [ViewState compression](#viewstate-compression)
- [Compression and SessionPageState](#compression-and-sessionpagestate)
- [Enabling compression for regular postbacks](#enabling-compression-for-regular-postbacks)
- [Known issues](#known-issues)
- [Benefits](#benefits)
- [Optimization tip summary](#optimization-tip-summary)

{% if site.has_cta_panels == true %}
{% include cta-panel-overview.html %}
{% endif %}

## Compression Overview

Simply put, the Telerik UI for ASP.NET AJAX Compression is an HttpModule that is shipped with the suite and is designed to automatically compress your AJAX and Web Service responses. Compression intercepts the bits that your server is sending back to a browser (or Silverlight-client, for that matter) and compress them. Once the compressed bits reach the browser, standard browser technology takes over and decompresses the response, so your application can work with it normally.

The compression process is completely transparent to your client-side code (JavaScript or Silverlight) and your server-side code. It reduces the number of bits that are sent over the wire (from your server to your client) and thus improves your page performance by reducing the time to last byte (TTLB).

The Compression feature is designed based on other HTTPcompression tools, such as the built-in HTTP Compression in IIS7 and later versions. By adding the Compression to your project, you start compressing your AJAX and Web Service responses.

Compression automatically detects and compresses requests that expect the following content response types (as found in the HTTP request's `ContentType` or `AcceptsTypes` headers):

* `application/x-www-form-urlencoded`

* `application/json`

* `application/xml`

* `application/atom+xml`

Generally, these types reflect the content types returned by AJAX Web Services, ADO.NET Data Services, and AJAX UpdatePanel responses, though there certainly are other scenarios that return these content types (such as a typical RSS feed).

If a browser supports compression (most modern browsers do) and the Compression feature	is enabled, all content of this type will be compressed. The one exception is IE6, which does not support this compression well, so the Compression will automatically ignore requests coming fromIE6 clients.

## Enabling Compression

To enable Compression, add an `HttpModule` registration to the `web.config` file of the site. Specifically, you need the following implementation:

````web.config
<httpModules>
    ...
    <!-- Add this line exactly as is - the name value is important -->
    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
</httpModules>
<!-- If you're using IIS7, then add this, too-->
<system.webServer>
 <modules>
   ...
   <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
 </modules>
...
</system.webServer>
````

By default, the Compression module will compress AJAX requests only (with the content type headers specified above). However, you can enable compression for regular postbacks as well setting the `enablePostbackCompression` property to `true`, which is `false` by default. You also have the option to disable the compression for particular pages if necessary by using the `RadCompressionSettings` attribute of the page in question:

````C#
[Telerik.Web.UI.RadCompressionSettings(HttpCompression = Telerik.Web.UI.CompressionType.None)]
public partial class Default_Cs : System.Web.UI.Page
{
    ...
}
````
````VB
<Telerik.Web.UI.RadCompressionSettings(HttpCompression:=Telerik.Web.UI.CompressionType.None)> _
Partial Public Class _Default
    Inherits System.Web.UI.Page
    '...
End Class
````

Another aspect of the Compression model allows you to exclude particular request handlers through the `web.configconfiguration` settings of the module. Note that the `matchExact` attribute determines whether the rule will be forced for the specified path only or globally for the entire web site or web application project

When you are using IIS dynamic compression, enabling the Compression feature is not required as this will result in doubling the compression of the response.

````web.config
<configSections>
....................
<sectionGroup name="telerik.web.ui">
      <section name="radCompression" type="Telerik.Web.UI.RadCompressionConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication" requirePermission="false"/>
</sectionGroup>
....................
</configSections>
<telerik.web.ui>
    <radCompression>
        <excludeHandlers>
            <!--This will match only the defaultcs.aspx file inside a grid folder in web site root-->
            <add handlerPath="grid/defaultcs.aspx" matchExact="true"/>
            <!--This will match every defaultvb.aspx file regardless of its location in the web site-->
            <add handlerPath="defaultvb.aspx" matchExact="false"/>
            <!--This will match the handlers of all pages which reside in the MyFolder sub-folder of the web site-->
            <add handlerPath="MyFolder/" matchExact="false"/>
        </excludeHandlers>
    </radCompression>
</telerik.web.ui>
````

## ViewState Compression

When you enable the Compression module, you get the entire response compressed including the ViewState.

However, you can turn on only the ViewState compression and store it either in a hidden field or in the `Session` to pass and retrieve it from there on form submits without compressing the rest of the response. For this purpose, you can use additional page adapters which override the default page adapter for the ViewState storage.

To enable the ViewState compression, register these Compression `controlAdapters` by using the `BrowserFile.browser` file in the `App_Browsers` folder of your project.

The following example demonstrates how to register a hidden field which will be used as a container for the compressed page ViewState.

````ASP.NET
<browsers>
 <browser refID="Default">
   <controlAdapters>
     <adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadHiddenFieldPageStateCompression" />
   </controlAdapters>
 </browser>
</browsers>
````

To use this adapter, you do not need to enable the Compression module through the `web.config` file as described above. You can use `RadHiddenFieldPageStateCompression`  separately from the Compression module in cases where only the ViewState compression is needed. Using both at the same time can result in compressing the ViewState twice.

The following example demonstrates how to store the compressed ViewState in the `Session`. In this case, enabling the Compression module at the same time is fine because when the compressed ViewState is saved in `Session`, it is not included in the response and the Compression module will not compress it.

````ASP.NET
<browsers>
 <browser refID="Default">
   <controlAdapters>
     <adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression" />
   </controlAdapters>
 </browser>
</browsers>
````

## Compression and SessionPageState

Due to the fact that the Compression module takes advantage of the ASP.NET `SessionPageStatePersister`, in some scenarios you may need to fine-tune its settings:

* `ControlState`—By default, the `SessionPageStatePersister` doesn't add the `ControlState` to the `Session` so you may need to add it manually.

    **ASP.NET**

        <system.web>
            <browserCaps>
                <case>
                    RequiresControlStateInSession=true
                </case>
            </browserCaps>
        </system.web>

* `Page history`—In applications where you have a lot of popup windows, it is important to increase the	amount of the pages that are persisted in the `Session`. The default value of the history size is `9`. Note that when the IIS dynamic compression is enabled, the ViewState will be automatically compressed even if the Compression module is not enabled.

    **web.config**

        <system.web>
        <sessionPageState historySize="15" />
        </system.web>

## Enabling Compression for Regular Postbacks

You can enable the postback compression by setting the `enablePostbackCompression` property of the Compression module to `true` (the default value is `false`).

The following example demonstrates how to do this at the application level. Note that setting the same attribute at page level will override the `web.config` settings because it will be treated with higher priority.

````web.config
<configSections>
....................
<sectionGroup name="telerik.web.ui">
      <section name="radCompression" type="Telerik.Web.UI.RadCompressionConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication" requirePermission="false"/>
</sectionGroup>
....................
</configSections>
<telerik.web.ui>
   <radCompression enablePostbackCompression="true"/>
</telerik.web.ui>
````

## Known Issues

This section lists some of the common known issues you might encounter when using the Compression module.

* **Problem** When Compression is enabled and you are using .NET 4.0 or .NET 4.5, event handlers might not be raised in a default document in the Integrated Mode of IIS 7 and later versions.

  **Solution** This problem is caused by a breaking change in .NET 4.0 described [here](https://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770154). To work around the issue, set `preCondition="managedHandler"` for the Compression module. You may also need to remove the `runAllManagedModulesForAllRequests` setting from your `web.config` if you have it, or, alternatively, set it to `false`.

* **Problem** Controls bound to WCF services do not work in classic AppPool scenarios with Windows authentication enabled.

  **Solution** Try removing the Compression from the HttpModules section of the `web.config`. On some machines the Compression module halts the WCF responses effectively breaking the pages that consume the services.

* **Problem** The control state cannot be loaded properly after a postback. This can happen if the ViewState is stored in the session and popup windows cause a number of postbacks, which causes the session history to be lost for the main page.

  **Solution** Disable the Compression module and use the IIS dynamic content compression. Alternatively, you can store the ViewState in the hidden field only. Yet another option is to increase the history cache but this will consume system resources and will only delay the issue.

## Benefits

For more information about using page adapters, refer to the results from eight unique tests made by evangelist Todd Anglin in the [following blog post](https://blogs.telerik.com/toddanglin/posts/09-01-28/Optimization-Tips-RadCompression-Module.aspx) and in [this blog post](https://blogs.telerik.com/toddanglin/posts/09-02-27/Optimization-Tip-RadCompression-for-ViewState.aspx).

## Optimization Tip Summary

The impact the usage of the Compression module has on your site depends on the location of your users. If you have a site that is deployed over the web where latency and connection speeds are unpredictable, reducing the bytes you send over the wire is	an easy way to improve your site performance. And since the Compression can literally be implemented with a single change to your	`config` file, you do not have much to lose. Therefore, using the Compression is an easy way to reduce the bytes sent over the wire for XHR operations.

Note that the Compression approach is now deprecated in favor of the IIS dynamic content compression that solves the same problem at the server level.

repository: telerik/ajax-docs

gha_language: C#

repo_name: telerik/ajax-docs


text:
# pr-express-body-parser

Express middleware for parsing different body-types

## Philosophy

Parsing of all different body-types in Express under one roof

## Installation

```bash
$ npm install pr-express-body-parser
```

## APIs

The module exports express-middleware function bodyParsingMiddleware(config); the config is a JSON object with options for different body-types.

The default config-options are:
```js
{
    "json": {
        "limit": "1mb",
        "type": ["json", "*/json", "+json"]
    },
    "text": {
        "limit": "1mb",
        "type": ["text/*"]
    },
    "urlencoded": {
        "limit": "1mb",
        "extended": true
    },
    "raw": {
        "limit": "1mb",
        "type": "application/*"
    },
    "multipart": {} // use busboy defaults
}
```

Refer to the individual module documentation for detailed config-options:
* [json](https://github.com/expressjs/body-parser#bodyparserjsonoptions)
* [text](https://github.com/expressjs/body-parser#bodyparsertextoptions)
* [urlencoded](https://github.com/expressjs/body-parser#bodyparserurlencodedoptions)
* [raw](https://github.com/expressjs/body-parser#bodyparserrawoptions)
* [multipart](https://www.npmjs.com/package/busboy#busboy-methods)

## Usage

```js
var express = require("express").
    expressBodyParser = require("pr-express-body-parser");

var app = express();
express.use(expressBodyParser());
```

For all body-types except multipart, the request-body data is available in req.body property. In case of multiparty data, it is available via req.busboy as [Busboy events](https://www.npmjs.com/package/busboy#busboy-special-events) and related streams.

Refer to test [server.js](https://gitlab.com/partharamanujam/pr-express-body-parser/blob/master/test/server.js) implementation for usage details.

NOTE: In case of multipart, the request-body is piped to req.busboy by default

## Test

```bash
$ npm install # inside pr-express-body-parser
$ npm test
```


text:
# github-to-slack-notification

## About
Notification script from github to slack

Convert github mentions to slack mentions

## Development
- `npm ci`
- `npm run test`

## Commit
- `npm run commit`

## Setting
### Create slack app
- Aaccess to https://api.slack.com
- Create new app
- Set permission `chat:write:bot`
- Remember the OAuth Access Token
  - Use OAuth Access Token when you make a Lambda Script

### Create Lambda Script
- Create a AWS Lambda Script
  - Use Node.js
  - Trigger is AWS API Gateway
- Copy to index.js and common.js
- Create mapping.json
  - From github_id to slack_id
- Setting ENV Vals
  - API_TOKEN
    - OAuth Access Token
  - CHANNEL_ID
    - Notification slack channel id

### Setting Webhook
- Create GitHub repository Webhook setting
  - Payload URL
    - URL of API Gateway
  - Content type
    - application/json
  - SSL verification
    - Enable SSL verification
  - Which events would you like to trigger this webhook?
    - Send me everything.
  - Active
    - Check it

gha_license_id: MIT


text:
---
title: "Inspire!"
layout: post
date: 2016-04-30 22:10
tag:
- Front-end
- Inspiration
- HTTP
- Heroku
image: /assets/images/Inspire.png
headerImage: false
projects: true
hidden: true # don't count this post in blog pagination
description: Looking for inspiration with one click of a button?
author: aralyaphinith
---

Photo by Aralya Phinith

Looking for inspiration with a simple push of a button? Check it out here!

This app makes api calls to get random quotes from the theysaidso.com api. You can save some of your favorite quotes as well. Click here to check out the repo on my github.

Tech stack used: Express, Angular, and Node

extension: markdown

gha_language: CSS


text:
# memonow

Offline-enabled Web Text Editor

## Overview

Offline-enabled Web Text Editor. You can edit your text memo with this.

You can use this app even if you miss online network. In that case, this app would store information in local DB, and sync them then your network would be re-activated.

When you use smartphone(with small screen), your text editor would be very simple one(simple textarea). But when you use large-enough screen device, you can edit/preview your text with Mard-Down text editor.

## Pre-requisite before install

- Node.js and npm needed to be installed in your application server.

- IBM Cloudant instance needed.

- Create 'pouchdb' database on your IBM Cloudant instance.

    - This Cloudant instance need to be configured to allow Cross-Origin access. See http://dotnsf.blog.jp/archives/1070438078.html

- Create Query Index Design Document in that database for **user_id** string field:

    - ``{ "index": { "fields": [ { "name": "user_id", "type": "string" } ] }, "name": "user_id-index", "type": "text", .. }``

- Set username and password for IBM Cloudant in settings.js as db_username and db_password.

- Get consumer_key and consumer_secret in Twitter Apps, and set them with callback_url in settings.js

    - https://apps.twitter.com/

## Install & Setup

- $ npm install

- $ node app

## Working Demo

https://memonow.mybluemix.net/

## Clean local db

If you want to clean your local db(in browser), you can do that by accessing /resetdb :

https://memonow.mybluemix.net/resetdb

## Using Technologies/Services

- IBM Cloudant

    - https://www.ibm.com/jp-ja/marketplace/database-management

- PouchDB

    - https://pouchdb.com/

- Node.js

    - https://nodejs.org/

## Licensing

This code is licensed under MIT.

## Copyright

2018 [K.Kimura @ Juge.Me](https://github.com/dotnsf) all rights reserved.

repository: dotnsf/memonow

repo_name: dotnsf/memonow


text:
---
title: archive
type: processor
---

<!--
     THIS FILE IS AUTOGENERATED!

     To make changes please edit the contents of:
     lib/processor/archive.go
-->

Archives all the messages of a batch into a single message according to the
selected archive format. Supported archive formats are:
`tar`, `zip`, `binary`, `lines` and `json_array`.

```yaml
archive:
  format: binary
  path: ${!count:files}-${!timestamp_unix_nano}.txt
```

Some archive formats (such as tar, zip) treat each archive item (message part)
as a file with a path. Since message parts only contain raw data a unique path
must be generated for each part. This can be done by using function
interpolations on the 'path' field as described
[here](/docs/configuration/interpolation#functions). For types that aren't file based
(such as binary) the file field is ignored.

The `json_array` format attempts to JSON parse each message and append
the result to an array, which becomes the contents of the resulting message.

The resulting archived message adopts the metadata of the _first_ message part
of the batch.

The functionality of this processor depends on being applied across messages
that are batched. You can find out more about batching [in this doc](/docs/configuration/batching).

## Fields

### `format`

`string` The archiving format to apply.

Options are: `tar`, `zip`, `binary`, `lines`, `json_array`.

### `path`

`string` The path to set for each message in the archive (when applicable).

This field supports [interpolation functions](/docs/configuration/interpolation#functions).

repository: Mofehintolu-mumuni/benthos

repo_name: Mofehintolu-mumuni/benthos


text:
---
id: "modulo"
title: "Function: modulo"
sidebar_label: "modulo"
custom_edit_url: null
hide_title: true
---

# Function: modulo

▸ **modulo**(`x`: *any*, `y`: *any*): *number*

Gets the modulo of dividing two given NumberLikes.

**`remarks`**

In most languages, ‘%’ is a remainder operator, but in some (e.g. Python, Perl) it is a modulo operator.
For positive values, the two are equivalent, but when the dividend and divisor are of different signs, they give different results.

**`see`** https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder

#### Parameters:

Name | Type | Description |
:------ | :------ | :------ |
`x` | *any* | The dividend.   |
`y` | *any* | The divisor.   |

**Returns:** *number*

number - The resulting modulo.

Defined in: [unsafe/math/modulo.ts:15](https://github.com/kaihodev/hikidashi/blob/ef3ca16/src/unsafe/math/modulo.ts#L15)


text:
---
title: "How to: Specify When Concurrency Exceptions are Thrown | Microsoft Docs"
ms.custom: ""
ms.date: "03/30/2017"
ms.prod: ".net-framework"
ms.reviewer: ""
ms.suite: ""
ms.technology:
  - "dotnet-ado"
ms.tgt_pltfrm: ""
ms.topic: "article"
ms.assetid: 344ae068-ff63-4a2e-8b00-af22e143675f
caps.latest.revision: 2
author: "JennieHubbard"
ms.author: "jhubbard"
manager: "jhubbard"
---
# How to: Specify When Concurrency Exceptions are Thrown
In [!INCLUDE[vbtecdlinq](../../../../../../includes/vbtecdlinq-md.md)], a <xref:System.Data.Linq.ChangeConflictException> exception is thrown when objects do not update because of optimistic concurrency conflicts. For more information, see [Optimistic Concurrency: Overview](../../../../../../docs/framework/data/adonet/sql/linq/optimistic-concurrency-overview.md).

 Before you submit your changes to the database, you can specify when concurrency exceptions should be thrown:

-   Throw the exception at the first failure (<xref:System.Data.Linq.ConflictMode>).

-   Finish all update tries, accumulate all failures, and report the accumulated failures in the exception (<xref:System.Data.Linq.ConflictMode>).

 When thrown, the <xref:System.Data.Linq.ChangeConflictException> exception provides access to a <xref:System.Data.Linq.ChangeConflictCollection> collection. This collection provides details for each conflict (mapped to a single failed update try), including access to the <xref:System.Data.Linq.ObjectChangeConflict.MemberConflicts%2A> collection. Each member conflict maps to a single member in the update that failed the concurrency check.

## Example
 The following code shows examples of both values.

 [!code-csharp[System.Data.Linq.ConflictModeEnumeration#1](../../../../../../samples/snippets/csharp/VS_Snippets_Data/system.data.linq.conflictmodeenumeration/cs/program.cs#1)]
 [!code-vb[System.Data.Linq.ConflictModeEnumeration#1](../../../../../../samples/snippets/visualbasic/VS_Snippets_Data/system.data.linq.conflictmodeenumeration/vb/module1.vb#1)]

## See Also
 [How to: Manage Change Conflicts](../../../../../../docs/framework/data/adonet/sql/linq/how-to-manage-change-conflicts.md)
 [Making and Submitting Data Changes](../../../../../../docs/framework/data/adonet/sql/linq/making-and-submitting-data-changes.md)


text:
# abb_libegm

[![Build Status: Ubuntu Bionic (Actions)](https://github.com/ros-industrial/abb_libegm/workflows/CI%20-%20Ubuntu%20Bionic/badge.svg?branch=master)](https://github.com/ros-industrial/abb_libegm/actions?query=workflow%3A%22CI+-+Ubuntu+Bionic%22)
[![Build Status: Ubuntu Focal (Actions)](https://github.com/ros-industrial/abb_libegm/workflows/CI%20-%20Ubuntu%20Focal/badge.svg?branch=master)](https://github.com/ros-industrial/abb_libegm/actions?query=workflow%3A%22CI+-+Ubuntu+Focal%22)
[![Github Issues](https://img.shields.io/github/issues/ros-industrial/abb_libegm.svg)](http://github.com/ros-industrial/abb_libegm/issues)

[![license - bsd 3 clause](https://img.shields.io/:license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

[![support level: community](https://img.shields.io/badge/support%20level-community-lightgray.svg)](http://rosindustrial.org/news/2016/10/7/better-supporting-a-growing-ros-industrial-software-platform)

## Important Notes

RobotWare versions less than `6.07.01` are now incompatible with *abb_libegm* (due to changes in the EGM communication protocol).

Pull request [abb_libegm#63](https://github.com/ros-industrial/abb_libegm/pull/63) turned this package from a Catkin package into a plain CMake package. ROS users may use any of the following build tools to build the library:

* ROS 1: `catkin_make_isolated` or [catkin_tools](https://catkin-tools.readthedocs.io/en/latest/index.html).
* ROS 2: [colcon](https://colcon.readthedocs.io/en/released/).

## Overview

A C++ library for interfacing with ABB robot controllers supporting *Externally Guided Motion* (EGM). See the *Application manual - Externally Guided Motion* (document ID: `3HAC073319-001`, revision: `B`) for a detailed description of what EGM is and how to use it.

* See [abb_librws](https://github.com/ros-industrial/abb_librws) for a companion library that interfaces with *Robot Web Services* (RWS).
* See StateMachine Add-In ([1.0](https://robotapps.robotstudio.com/#/viewApp/7fa7065f-457f-47ce-98d7-c04882e703ee) or [1.1](https://robotapps.robotstudio.com/#/viewApp/c163de01-792e-4892-a290-37dbe050b6e1)) for an optional *RobotWare Add-In* that can be useful when configuring an ABB robot controller for use with this library.

Please note that this package has not been productized, it is provided "as-is" and only limited support can be expected.

### Sketch

The following is a conceptual sketch of how this EGM library can be viewed, in relation to an ABB robot controller as well as the RWS companion library mentioned above. The optional *StateMachine Add-In* is related to the robot controller's RAPID program and system configuration.

![EGM sketch](docs/images/egm_sketch.png)

### Requirements

* RobotWare version `6.07.01` or higher (lower versions are incompatible due to changes in the EGM communication protocol).
* A license for the RobotWare option *Externally Guided Motion* (`689-1`).

### Dependencies

* [Boost C++ Libraries](https://www.boost.org)
* [Google Protocol Buffers](https://developers.google.com/protocol-buffers)

### Limitations

This library is intended to be used with the UDP variant of EGM, and it supports the following EGM modes:

* Joint Mode
* Pose Mode

### Recommendations

* This library has been verified to work with RobotWare version `<IP_ADDRESS>`. Other versions are expected to work, except versions older than RobotWare `6.07.01` which are incompatible due to changes in the EGM communication protocol.
* It is a good idea to perform RobotStudio simulations before working with a real robot.
* It is prudent to familiarize oneself with general safety regulations (e.g. described in ABB manuals).
* Consider cyber security aspects, before connecting robot controllers to networks.

## Usage Hints

This is a generic library, which can be used together with any RAPID program that is using the RAPID `EGMRunJoint` and/or `EGMRunPose` instructions, and system configuration. The library's primary classes are:

* [UDPServer](include/abb_libegm/egm_udp_server.h): Sets up and manages asynchronous UDP communication loops. During an EGM communication session, the robot controller requests new references over a UDP channel, at the rate specified with RAPID `EGMAct` instructions. When an `UDPServer` instance receives an EGM message from the robot controller the message is passed on to an EGM interface instance (see below). The interface is expected to generate the reply message, containing the new references, which the server then sends back to the robot controller.
* [AbstractUDPServerInterface](include/abb_libegm/egm_udp_server.h): An abstract interface, which specifies how to interact with the `UDPServer` class. Can be inherited from to implement custom EGM interfaces.
* [EGMBaseInterface](include/abb_libegm/egm_base_interface.h): Inherits from `AbstractUDPServerInterface`, encapsulates an `UDPServer` instance, and implements a basic EGM interface. Can be configured to use demo references, which are intended for testing that EGM communication channels works.
* [EGMControllerInterface](include/abb_libegm/egm_controller_interface.h): Inherits from `EGMBaseInterface` and implements an EGM interface variant for execution inside an external control loop that needs to be implemented by the user. Provides interaction methods, which can be used inside external control loops to affect EGM communication sessions.
* [EGMTrajectoryInterface](include/abb_libegm/egm_trajectory_interface.h): Inherits from `EGMBaseInterface` and implements an EGM interface variant for execution of a queue of trajectories. Provides interaction methods, which can be called by a user to for example add trajectories to the queue and to stop/resume the trajectory execution.

The optional *StateMachine Add-In* for RobotWare can be used in combination with any of the classes above.

### StateMachine Add-In [Optional]

The purpose of the RobotWare Add-In is to *ease the setup* of ABB robot controllers. It is made for both *real controllers* and *virtual controllers* (simulated in RobotStudio). If the Add-In is selected during a RobotWare system installation, then the Add-In will load several RAPID modules and system configurations based on the system specifications (e.g. number of robots and present options).

The RAPID modules and configurations constitute a customizable, but ready to run, RAPID program which contains a state machine implementation. Each motion task in the robot system receives its own state machine instance, and the intention is to use this in combination with external systems that require interaction with the robot(s). The following is a conceptual sketch of the RAPID program's execution flow.

To install the Add-In:

1. Go to the *Add-Ins* tab in RobotStudio.
2. Search for *StateMachine Add-In* in the *RobotApps* window.
3. Select the desired Add-In version and retrieve it by pressing the *Add* button.
4. Verify that the Add-In was added to the list *Installed Packages*.
5. The Add-In should appear as an option during the installation of a RobotWare system.

See the Add-In's user manual ([1.0](https://robotapps.blob.core.windows.net/appreferences/docs/27e5bd15-b5ec-401d-986a-30c9d2934e97UserManual.pdf) or [1.1](https://robotapps.blob.core.windows.net/appreferences/docs/cd504500-80e2-4cb6-9419-c60ea4ad6d56UserManual.pdf)) for more details, as well as for install instructions for RobotWare systems. The manual can also be accessed by right-clicking on the Add-In in the *Installed Packages* list and selecting *Documentation*.

#### Notes

If the EGM option is selected during system installation, then the Add-In will load RAPID code for using `EGMRunJoint` and `EGMRunPose` RAPID instructions. System configurations will also be loaded, and it is important to update the robot controller's EGM configurations. Especially the *Remote Address* and *Remote Port Number* configurations, under the *Transmission Protocol* topic, are vital to edit so that the robot controller will send EGM messages to the correct host address. This configuration can be found in RobotStudio -> Controller tab -> Configuration -> Communication -> Transmission Protocol -> Edit each `ROB_X` instance. There will be one instance for each robot in the system.

The RWS companion library contains a class specifically designed to interact with the StateMachine Add-In. It allows for example to control the RAPID program by starting and stopping EGM communication sessions.

## Acknowledgements

The **core development** has been supported by the European Union's Horizon 2020 project [SYMBIO-TIC](http://www.symbio-tic.eu/).
The SYMBIO-TIC project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement no. 637107.

The **open-source process** has been supported by the European Union's Horizon 2020 project [ROSIN](http://rosin-project.eu/).
The ROSIN project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement no. 732287.

The opinions expressed reflects only the author's view and reflects in no way the European Commission's opinions.
The European Commission is not responsible for any use that may be made of the contained information.

### Special Thanks

Special thanks to [gavanderhoorn](https://github.com/gavanderhoorn) for guidance with open-source practices and ROS-Industrial conventions.


text:
ltorg client
============

A command line client for updating leightonturner.org. Source code for the site
can be found at the companion repository [ltorg](https://github.com/leighton/ltorg).

Two programs:

1. `cpu-daemon`, a CPU daemon that broadcasts your CPU usage to the site.
2. `activity`, a script that updates the website with a user defined message for a
user defined period of time.

Usages:

    ./bin/cpu-daemon

and

    ./bin/activity -t <timeout: 30s, 1m, 1h, etc> -m "<message>"

It's that simple.

repository: leighton/ltorg-client

repo_name: leighton/ltorg-client


text:
[This document is automatically generated. All changed made to it WILL be lost]: <>

# SQL Server Rule: SRN0006

|    |    |
|----|----|
| Assembly | SqlServer.Rules.dll   |
| Namespace | SqlServer.Rules.Naming |
| Class | UseTwoPartNames |

## Rule Information

|    |    |
|----|----|
| Id | SRN0006 |
| Friendly Name | Use of default schema |
| Category | Naming |
| Ignorable | false |
| Applicable Types | Default  |
|   | Dml Trigger |
|   | Procedure |
|   | Scalar Function |
|   | Sequence |
|   | Table |
|   | Table Type |
|   | Table Valued Function |
|   | User Defined Type |
|   | View |

## Description

Two part naming on objects is required.

## Summary

Using two part naming on objects [Schema].[Name] is recommended


text:
# Asana Integration #

This example parses commit messages for Asana task IDs and adds the commit message as a comment in the related Asana task.

Example comments:

  [389749465118801]: Adjust layout spacing

Commits that contain multiple Asana tasks will post comments to each issue mentioned. A comment will be added each time a commit is pushed to any dev or multidev branch; each Asana comment is labeled with the appropriate commit hash and Pantheon environment that triggered the post.

## Instructions ##

- In Asana, go to My Profile Settings -> Apps -> Manage Developer Apps -> Create New Personal Access Token and copy the new token.
- Store the Asana Personal Access Token into a file called `secrets.json` and store it in the private files area of your site

```shell
  $> echo '{"asana_access_token" : "Your generated Personal Access Token" }' > secrets.json
  # Note, you'll need to copy the secrets into each environment where you want to save commit messages to Asana
  $> `terminus site connection-info --env=dev --site=your-site --field=sftp_command`
      Connected to appserver.dev.d1ef01f8-364c-4b91-a8e4-f2a46f14237e.drush.in.
  sftp> cd files
  sftp> mkdir private
  sftp> cd private
  sftp> put secrets.json

```
- Add the example `asana_integration.php` script to the `private` directory of your code repository.
- Add a Quicksilver operation to your `pantheon.yml` to fire the script after a deploy.
- Push code with a commit message containing an Asana task ID!

Note: If you open the task in Asana the URL will look something like this: https://app.asana.com/0/389749465118800/389749465118801
The second number is your task ID. Surround it with [] in your commits.

Optionally, you may want to use the `terminus workflow:watch` command to get immediate debugging feedback.

### Example `pantheon.yml` ###

Here's an example of what your `pantheon.yml` would look like if this were the only Quicksilver operation you wanted to use:

```yaml
api_version: 1

workflows:
  sync_code:
    after:
      - type: webphp
        description: Asana Integration
        script: private/scripts/asana_integration.php
```

repository: pantheon-systems/quicksilver-examples

gha_language: PHP

repo_name: pantheon-systems/quicksilver-examples


text:
bla bla bla

# [bel](https://en.wikipedia.org/wiki/Bel_(mythology))
Generate TypeScript interfaces from Go structs/interfaces - useful for JSON RPC

[![Go Report Card](https://goreportcard.com/badge/github.com/32leaves/bel)](https://goreportcard.com/report/github.com/32leaves/bel)
[![GoDoc](https://godoc.org/github.com/32leaves/bel?status.svg)](https://godoc.org/github.com/32leaves/bel)
[![gocover.run](https://gocover.run/github.com/32leaves/bel.svg?style=flat&tag=1.10)](https://gocover.run?tag=1.10&repo=github.com%2F32leaves%2Fbel)
[![Stability: Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#github.com/32leaves/bel)

`bel` is used in production in https://gitpod.io.

## Getting started
`bel` is easy to use. There are two steps involved: extract the Typescript information, and generate the Typescript code.
```Go
package main

import (
    "github.com/32leaves/bel"
)

type Demo struct {
    Foo string `json:"foo,omitempty"`
    Bar uint32
    Baz struct {
        FirstField  bool
        SecondField *string
    }
}

func main() {
    ts, err := bel.Extract(Demo{})
    if err != nil {
        panic(err)
    }

    err = bel.Render(ts)
    if err != nil {
        panic(err)
    }
}
```

produces something akin to (sans formatting):

```TypeScript
export interface Demo {
    foo?: string
    Bar: number
    Baz: {
        FirstField: boolean
        SecondField: string
    }
}
```

### Converting interfaces
You can also convert Golang interfaces to TypeScript interfaces. This is particularly handy for JSON RPC:
```Go
package main

import (
    "os"
    "github.com/32leaves/bel"
)

type DemoService interface {
    SayHello(name, msg string) (string, error)
}

func main() {
    ts, err := bel.Extract((*DemoService)(nil))
    if err != nil {
        panic(err)
    }

    err = bel.Render(ts)
    if err != nil {
        panic(err)
    }
}
```

produces something akin to (sans formatting):

```TypeScript
export interface DemoService {
    SayHello(arg0: string, arg1: string): string
}
```

## Advanced Usage
You can try all the examples mentioned below in [Gitpod](https://gitpod.io#github.com/32leaves/bel).

### FollowStructs
Follow structs enable the transitive generation of types. See [examples/embed-structs.go](examples/follow-structs.go).

would produce code for the interface `UserService`, as well as the struct it refers to `AddUserRequest`, and `User` because it's referenced by `AddUserRequest`.
Without `FollowStructs` we'd simply refer to the types by name, but would not generate code for them.

### SortAlphabetically
SortAlphabetically sorts all types and their members by alphabetical order.
This produces more deterministic/stable output, which is great for making things comparable across pull requests.
See [examples/sort-alphabetically.go](examples/sort-alphabetically.go).

### EmbedStructs
Embed structs is similar to `FollowStructs` except that it produces a single canonical type for each structure.
Whenever one struct references another, that reference is resolved and the definition of the other is embedded.
See [examples/embed-structs.go](examples/embed-structs.go).

### NameAnonStructs
`NameAnonStructs` is kind of the opposite of `EmbedStructs`. When we encounter a nested anonymous struct, we make give this previously anonymous structure a name and refer to it using this name.
See [examples/name-anon-structs.go](examples/name-anon-structs.go).

### CustomNamer
`CustomNamer` enables full control over the TypeScript type names. This is handy to enforce a custom coding guideline, or to add a prefix/suffix to the generated type names.
See [examples/custom-namer.go](examples/custom-namer.go).

### Enums
See [examples/enums.go](examples/enums.go).

Go famously does not have enums, but rather type aliases and consts. Using reflection alone there is no way to obtain a comprehensive list of type values, as the linker might optimize and remove some.
_bel_ supports the extraction of enums by parsing the Go source code. Note that this is merely a heuristic and may fail in your case. If it does not work, _bel_ falls back to the underlying type.

Enums can be generated as TypeScript `enum` or as sum types. Use the `bel.GenerateEnumsAsSumTypes` flag to change this behaviour.

### Code Generation
See [examples/code-generation.go](examples/code-generation.go).

When generating the TypeScript code you might want to wrap everything in a namespace. To that end `bel.GenerateNamespace("myNamespaceName")` can be used.

By default _bel_ adds a comment to the files it generates. You can influcence this comment (and any other code that comes before the generated code)
using `bel.GeneratePreamble` and `bel.GenerateAdditionalPreamble`.

You can configure the `io.Writer` that _bel_ uses using `bel.GenerateOutputTo`.

# Contributing
All contributions/PR/issue/beer are welcome ❤.

It's easiest to work with _bel_ using Gitpod: [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#github.com/32leaves/bel)

another test 🎉
🎉 HELLO WORLD🎉 HELLO WORLD🎉 HELLO WORLD

repository: AlexTugarev/bel

repo_name: AlexTugarev/bel


text:
[![infra as code with Terraform](/docs/images/banner.png)](/README.md)

# Import Resources

Maybe sometimes resources are created outside terraform. In portal azure for example

## Step 1 - Add RG in portal Azure

```
Add Resource group lab-2-3
```

Now run:

```
terraform plan
```

Notice that resource group lab-2-3 should be created

Now run:

```
terraform import azurerm_resource_group.lab /subscriptions/xxx/resourceGroups/lab
```

# Next Step
[2.4 VMs](../2.4)

repository: andonisan/azure-terraform-lab

repo_name: andonisan/azure-terraform-lab


text:
# Exercise 1

In this exercise, you will place yourselves into groups and issue a pull request adding yourself to the `project_groups.md` file of the class repository.

This will mean that you have also created a GitHub username and learned how to use the basics of git.


text:
# Overview

AWS DevOps SpringBoard is a readymade automated solution to create an automated pipeline to deploy microservices on ECS.
AWS Devops Springboard consists of following components.

* A VPC, an Application Load Balancer, an ECS cluster

* CI/CD Pipeline to deploy infrastructure

* Pipelines to build, test and deploy microservice applications

This repository contains the templates to create landing-zone resources for devops-springboard. Landing zone includes
* **IAM Roles**
* **Network infrastructure**
    * A highly available architecture that spans two Availability Zones.
    * A VPC configured with public and private subnets according to AWS best practices, to provide you with your own virtual network on AWS.
    * An internet gateway to allow access to the internet.
    * In the public subnets, managed NAT gateways (in each Availability Zones) to allow outbound internet access for resources in the private subnets.
* **Cluster Resources**
    * A Public facing [application load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html)
    * [An ECS Cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_clusters.html)
    * An [autoscaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html) to run containers if [Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) is not available
    * An RDS instance for [anchore-engine](https://anchore.com/) as a persistent store.
* **Service Manager Pipeline**:
   This is a CodePipeline which detects changes made to service deployment pipeline in [devops-springboard-pipelines](https://github.com/Flux7Labs/devops-springboard-pipelines) repository and creates or updates Service Catalog Products.

## Landing Zone Architecture
Following diagram describes landing zone architecture

![image alt Lz Arch](images/lz-arch.png)
## Getting started

* Create a GitHub access token. Follow the instructions provided in https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
* Create a keypair named `devops-springboard` if Fargate is not available in the region you want to deploy.

* Deploy the landing zone pipeline stack using the template [lz-pipeline.yml](cf-templates/landing-zone-pipeline/lz-pipeline.yml)
Following diagram describes the infrastructure deployment pipeline

![image alt Lz Pipeline](images/landing-zone-pipeline.png)


text:
# Angular Drag & Drop

[![Join the chat at https://join.slack.com/t/ng-drag-drop/shared_invite/MjM5ODY5MDUyODY1LTE1MDUyOTk0OTMtNjFhZmJiOTE2Zg](https://img.shields.io/badge/chat-on_slack-ff69b4.svg?style=flat-square)](https://join.slack.com/t/ng-drag-drop/shared_invite/MjM5ODY5MDUyODY1LTE1MDUyOTk0OTMtNjFhZmJiOTE2Zg)
[![npm version](https://img.shields.io/npm/v/ng-drag-drop.svg?style=flat-square)](https://www.npmjs.com/package/ng-drag-drop)
[![npm downloads](https://img.shields.io/npm/dm/ng-drag-drop.svg?style=flat-square)](https://www.npmjs.com/package/ng-drag-drop)
[![Build Status](https://img.shields.io/travis/ObaidUrRehman/ng-drag-drop.svg?style=flat-square)](https://travis-ci.org/ObaidUrRehman/ng-drag-drop)
[![Codacy Badge](https://img.shields.io/codacy/grade/98ef19fdf92448d699bd93badd16e2f5.svg?style=flat-square)](https://www.codacy.com/app/orehman/ng-drag-drop?utm_source=github.com&utm_medium=referral&utm_content=ObaidUrRehman/ng-drag-drop&utm_campaign=Badge_Grade)

Drag & Drop for [Angular](http://angular.io), based on HTML5 with no external dependencies. Provides `draggable` & `droppable` directives. Features:
* Transfer data from `draggable` to `droppable`.
* Restrict drop based on drag-drop scopes.
* Restrict drag to happen from either drag handles or the entire element.
* Add custom drag Helper Image
* Ability to add custom visual cue styles.

![Demo](https://raw.githubusercontent.com/ObaidUrRehman/ng-drag-drop/master/drag-drop.gif)

# Content

1. [Demo](#demo)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Limitations](#limitations)
5. [Development](#development)
6. [API Doc](#api-doc)

# Demo

Check out the [Plunker demo](http://plnkr.co/edit/2bjGgzWnbFrciEiCKLew?p=preview).

The [demo folder](https://github.com/ObaidUrRehman/ng-drag-drop/tree/master/demo) of the repository contains the same demo as Plunkr that uses SystemJS. To run that demo do an `npm install` in that folder followed by `npm start` to serve the demo app.

# Installation
```js
npm install ng-drag-drop --save
```

# Usage

### Import default styles
Import `style.css` into your index.html. It has a set of default styles that will be applied upon drag operations. This is totally optional and you can modify the styles as per your need. See the [Adding visual cues](#adding-visual-cues) Section.

```html
<link rel="stylesheet" href="node_modules/ng-drag-drop/style.css">
```

### Update SystemJS config
If you use SystemJS as your module loader then you will need to update the config to load the `ng-drag-drop` module.
```js
System.config({
    map: {
        'ng-drag-drop': 'node_modules/ng-drag-drop'
    },
    packages: {
        'ng-drag-drop':  { main: 'index.js',  defaultExtension: 'js' },
    }
});
```
### Import `NgDragDropModule`

You need to import the `NgDragDropModule` in the module of your app where you want to use it.

```js
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { DemoComponent } from "./components/demo-component";
import { NgDragDropModule } from 'ng-drag-drop';

@NgModule({
  imports: [
      BrowserModule,
      NgDragDropModule.forRoot()
  ],
  declarations: [DemoComponent],
  bootstrap: [DemoComponent]
})
export class AppModule {}
```

### Use the `draggable` & `droppable` directives
Place the `draggable` directive on an element that you want to be draggable. The following example makes the
 List item draggable:

```html
<ul>
  <li draggable>Coffee</li>
  <li draggable>Tea</li>
  <li draggable>Milk</li>
</ul>
```

Similarly use the `droppable` directive on an element where you want to drop `draggable`:

 ```html
 <div droppable>
   <p>Drop items here</p>
 </div>
 ```

### Restrict Drop based on Scopes
You can use the `dragScope` & `dropScope` property on `draggable` and `droppable` respectively to restrict user from dropping a `draggable` element into a `droppable`.
 The Scope properties can be string, an Array of string (to indicate multiple scope) or a function. The scopes must match in both to indicate compatible drag-drop zones.

 In the following example, only the `draggable` with the `drink` dropScope can be dropped on the first `droppable` and both `drink` and `meal` can be dropped in the second one.

```html
<ul>
  <li draggable [dragScope]="'drink'">Coffee</li>
  <li draggable [dragScope]="'drink'">Tea</li>
  <li draggable [dragScope]="'meal'">Biryani</li>
  <li draggable [dragScope]="'meal'">Kebab</li>
  ...
</ul>
```

```html
<div droppable [dropScope]="'drink'" [dragOverClass]="'drag-target-border'">
  <p>Only Drinks can be dropped in the above container</p>
</div>

<div droppable [dropScope]="['drink', 'meal']" [dragOverClass]="'drag-target-border'">
  <p>Both Meal and Drinks can be dropped in the above container</p>
</div>
```
### Drop Scope as Functions

The `DropScope` of the `droppable` can be a function whose return value will determine if drop is allowed.
This can be useful to implement complex logic that is otherwise not possible with string or array of string.

```html
<div droppable [dropScope]="dropAllowed" [dragOverClass]="'drag-target-border'">
  <p>Only those items are droppable for which the `isDropAllowed()` function returns true</p>
</div>
```
Here is how the function is defined in the component:
```js
export class MyComponent {
  val = 500;
  isDropAllowed = (dragData: any) => {
    return dragData > this.val;
  }
}
```
Notice how the function is defined as an [Arrow Function](https://www.typescriptlang.org/docs/handbook/functions.html). You need to do this so the
lexical scope of `this` is preserved. You also get the `dragData` in the parameter so you can compare it with whatever you want.

If `DropScope` is a function, it can also return an `Observable`, which needs to later resolve to `true` or `false`. This can help in cases when
you need to check asynchronously (eg: via http) whether the drop is allowed.

```js
export class MyComponent {
  val = 500;
  isDropAllowed = (dragData: any) => {
    // Resolves to true or false after 1 second
    return Observable.of(dragData > this.val).delay(1000);
  }
}
```

### Transfer Data via Drag Drop
You can transfer data from the `draggable` to the `droppable` via the `dragData` property on the `draggable` directive.
 The data will be received in the `(onDrop)` event of the `droppable`:

```js
import {Component} from '@angular/core';

@Component({
    selector: 'app',
    template: `
<h3>Transfer Data via Drag Drop</h3>
<div class="row">
    <div class="col-sm-3">
        <ul class="list-group">
            <li draggable *ngFor="let item of items" [dragData]="item" class="list-group-item">{{item.name}}</li>
        </ul>
    </div>

    <div class="col-sm-3">
    <div class="panel panel-default" droppable (onDrop)="onItemDrop($event)">
        <div class="panel-heading">Drop Items here</div>
            <div class="panel-body">
                <li *ngFor="let item of droppedItems" class="list-group-item">{{item.name}}</li>
            </div>
        </div>
    </div>
</div>
`
})
export class AppComponent {
    items = [
            {name: "Apple", type: "fruit"},
            {name: "Carrot", type: "vegetable"},
            {name: "Orange", type: "fruit"}];

    onItemDrop(e: any) {
        // Get the dropped data here
        this.droppedItems.push(e.dragData);
    }
    constructor() { }
}
```

### Drag Handle
Drag Handle can be defined for a `draggable` item which will restrict drag of the element unless the item is dragged from the specified element.
 The handle should be a valid selector string. Example:
```html
<li draggable [dragHandle]="'.drag-handle'">
   Not Draggable by list item but by the handle only.
   <div class="pull-right"><i class="drag-handle fa fa-bars fa-lg" aria-hidden="true"></i></div>
</li>
```

### Drag Helper Image
By default when an element is dragged, a translucent image is generated from the drag target. This image is generated automatically and varies with browser. A custom image can be used if desired. Pass the url of the image to `[dragImage]` on the `draggable` directive.

```html
<li draggable [dragImage] = "'../../images/drag-helper.png'" >
   Not Draggable by list item but by the handle only.
   <div class="pull-right"><i class="drag-handle fa fa-bars fa-lg" aria-hidden="true"></i></div>
</li>
```
__Compatibility:__ This only works on Chrome & Firefox. Not supported on Edge.

 You can find the list below. Another thing you can do is clone the `style.css` that comes with this package and customize it as per your requirement.

__Draggable Directive__
1. [dragHandleClass](#draggable-directive)
2. [dragClass](#draggable-directive)
3. [dragTransitClass](#draggable-directive)

__Droppable Directive__
1. [dragOverClass](#droppable-directive)
2. [dragHintClass](#droppable-directive)

 Here is how a custom class is applied to a draggable element:
 ```html
 <div draggable [dragHandleClass]="'my-draggable'">
   <p>Drop items here</p>
 </div>
 ```
 # Limitations
This library uses [Native Html5 drag & drop API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API) to accomplish what it does. Because of this, certain aspects are not customizable and some UI behaviour is browser specific.

So if you were to see the demo under Edge or Chrome/Firefox you'll see that these browsers show a different behaviour when an Item is being dragged. Simlarly Edge does not let you set a custom dragImage while others do. Another major issues is that we can't control the opacity of the ghost element of item being dragged.

To overcome these issues we'll need to implement our own drag drop functionality instead of relying on the Native Html API which at this point in time, is beyond the scope of this component. Libraries like [Dragula](http://valor-software.com/ng2-dragula/), [JQuery Draggable](https://jqueryui.com/draggable/), [Interact.js](http://interactjs.io/) to name a few, can provide you with alternatives.

## Touch Support
HTML5 Drag drop is not touch supported but you can use the [DragDropTouch](https://github.com/Bernardo-Castilho/dragdroptouch) Polyfill.

# Development
To start the dev flow on your system, follow these steps:

1. `npm install` on the root of this repo.
2. `npm install` in the demo folder. This is where the demo app resides. Sort of a test & play yard for ng-drag-drop package.
3. Next you need to sym-link your package with the demo folder so your changes to the package are reflected in the demo app. Please remember the demo and the package are seperate apps & the demo app does not get published to npm. To link run `npm link` on the root of the repo followed by `npm link ng-drag-drop` in demo folder. You can read more about `npm link` [here](https://docs.npmjs.com/cli/link).
4. Finally run `npm run dev` at the root. This will open up the demo app in browser.
5. Now you can make changes to the actual component or the demo app and debug. Please note that changing the code of demo app will autoreload the browser but you'll need to manually refresh the page if you change the component code.

__Note:__ The steps are a bit involved at this time and will be simplified to an npm script in later releases.

# API Doc
### Draggable directive

### Attributes

| Name   | Type      |Default Value |Description |
|:-------|:----------|:-------------|:-----------|
| `dragData`    |   `any` | `null` | The data that will be avaliable to the droppable directive on its `onDrop()` event. |
| `dragScope`   |    `string | Array<string>` | `'default'`   |  Defines compatible drag drop pairs. Values must match with `droppable.dropScope`. |
| `dragClass` (previously `dragOverClass`) | `string` | `'drag-border'` | CSS class applied on the draggable that is applied when the item is being dragged. |
| `dragTransitClass` | `string` | `'drag-transit'` | CSS class applied on the drag helper translucent element clone. |
| `dragHandleClass`  | `string` | `'drag-handle'` | The CSS class applied to a draggable element. If a dragHandle is defined then its applied to that handle element only. By default it is used to change the mouse over pointer. |
| `draghandle` | `string` | `null` | The selector that defines the drag Handle. If defined drag will only be allowed if dragged from the selector element. |
| `dragImage` | `string` | `null` | The url to image that will be used as custom drag image when the draggable is being dragged. |
| `dragEnabled` | `boolean` | `true` | Defines if drag is enabled. `true` by default. |

### Events

| Name   | Parameters  |Description |
|:-------|:------------|:-----------|
| `onDragStart`  | e: DOM event   | Event fired when Drag is started  |
| `onDrag`       | e: DOM event   | Event fired while the element is being dragged |
| `onDragEnd`    | e: DOM event   | Event fired when dragged ends |

For more information on Drag DOM Events: [Drag Event](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent)

### Droppable directive

### Attributes

| Name   | Type      |Default Value |Description |
|:-------|:----------|:-------------|:-----------|
| `dropScope` |    `string | Array<string>` | `'default'`   |   Defines compatible drag drop pairs. Values must match with `draggable.dragScope` |
| `dragOverClass` | `string` | `'drag-over-border'` | CSS class applied on the droppable element when the item is being dragged over valid drop target. |
| `dragHintClass` | `string` | `'drag-hint-border'` | CSS class applied on this droppable when a compatible draggable item is being dragged. This can be used to visually show allowed drop zones. |
| `dropEnabled` | `boolean` | `true` | Defines if drop is enabled. `true` by default. |

### Events

| Name   | Parameters  |Description |
|:-------|:------------|:-----------|
| `onDragEnter`  | e: DOM event   | Event fired when Drag dragged element enters a valid drop target.  |
| `onDragOver`       | e: DOM event   | Event fired when an element is being dragged over a valid drop target. |
| `onDragLeave`    | e: DOM event   | Event fired when a dragged element leaves a valid drop target. |
| `onDrop`    | e: `DropEvent`   | Event fired when an element is dropped on a valid drop target. |

# License

MIT

repository: WKUCloudLab/BioCloud-Frontend

repo_name: WKUCloudLab/BioCloud-Frontend


text:
# JSON Event Sourcing Console Consumer and Producer

This command-line tool can consume JSON messages, serialized with the JES serializer, from a Kafka topic. It writes one message per line to the console. It can also produce messages on a Kafka topic using the JES serializer. The input from the console can be one JSON object or an array of JSON objects. The field ```_id``` is used for the message key.

You can build it with ```mvn clean package```.

Run it as follows:

```
> java -jar target/pincette-jes-prodcon-<version>-jar-with-dependencies.jar
  (consume | produce)
  (-c | --config-file) $HOME/.ccloud/config
  (-t | --topic) topic
```

It reads from stdin when producing and writes to stdout when consuming. The format of the configuration file is the same as for your ccloud configuration.

See also the [API documentation](https://www.javadoc.io/doc/net.pincette/pincette-jes-prodcon/latest/index.html).

gha_language: Java


text:
# MSTouchID

A library to verify TouchID or faceID to login your app

### CocoaPods

[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Coordinator into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby

platform:ios,"9.0"
use_frameworks!
target "#yourProjectName#"do
		pod 'MSTouchID'

end
```
And then please enter the command order as below
` pod install`
 And then close the .xcodeproj file and open workspace file.

 #Usage
 so simple
 import 'MSTouchID' in your class and then you can use it well

repository: MarcSteven/MSTouchID

repo_name: MarcSteven/MSTouchID


text:
### Docker container for vol2bird algorithm
Copyright 2016 Adriaan Dokter (University of Amsterdam)

If you are interested in using this software through collaboration, please contact me at<EMAIL_ADDRESS>
This repository contains code to generate vertical profiles of birds (VPBs), following the methods described in:

*Bird migration flight altitudes studied by a network of operational weather radars*
Dokter A.M., Liechti F., Stark H., Delobbe L., Tabary P., Holleman I.
J. R. Soc. Interface, **8**, 30–43, 2011.
DOI: [10.1098/rsif.2010.0116](https://doi.org/10.1098/rsif.2010.0116)

This folder contains scripts for building and running vol2bird in a [Docker](https://www.docker.com/) container:
* `Dockerfile`: Dockerfile to make a Docker image for vol2bird
* `make_docker_image.sh`: Bash script to build and compact Docker image
* `start_container.sh`: starts the Docker container
* `stop_container.sh`: stops the Docker container
* `run_vol2bird.sh`: runs vol2bird on a started Docker container

The vol2bird Docker image is stored on [Docker Hub](https://hub.docker.com/) in the `adokter/vol2bird` repository

To process a radar file `yourfile` in directory `your/data/directory` using Docker:
```
# automatically pull and start the vol2bird docker image from DockerHub:
./start_container.sh your/data/directory
# goto your data directory
cd your/data/directory
# process your file:
run_vol2bird.sh yourfile
# when done, stop the container:
stop_container.sh
```

gha_language: C


text:
# Interactive Example

This is a example of how to create a interactive style console output allowing to quickly test the camunda environment and the bpmn files being uploaded.

# How to Use:

Root into folder and run: `./mvnw clean test`

Test will run.

You can update the BPMN file in src/test/resources/bpmn/interactive/interactive.bpmn

# Console output:

```console
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running InteractiveSpec
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
May 29, 2018 9:41:33 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [camunda_config/camunda.cfg.xml]
Deployment ID: '1' has been created
Starting the process instance
Process is Active and waiting for user task completion
Process Variables are:
['someVar':'Some String Value', 'json':{"customer":"Kermit"}]
Deployment ID: '1' has been deleted
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.233 sec - in InteractiveSpec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.290 s
[INFO] Finished at: 2018-05-29T21:41:47-04:00
[INFO] Final Memory: 22M/179M
[INFO] ------------------------------------------------------------------------
```

repository: DigitalState/Camunda-Spock-Testing

repo_name: DigitalState/Camunda-Spock-Testing


text:
# arch-installer

![License-MIT](https://img.shields.io/badge/License-MIT-blue.svg)
![Docs-Passing](https://img.shields.io/badge/Docs-Passing-green.svg)

[中文](docs/README-CN.md) | English

Arch Linux quick install script.

## Install Arch

If you want to quickly install Arch Linux system, execute the following command.

```Shell
bash <(curl -sL https://git.io/fjgUi)
```

**Note:**
Before executing this command, please make sure your equipment meets the following conditions.

+ The equipment is in a ``high speed and stable`` network environment.
+ The ``important files`` in the device have been backed up.
+ +Read the prompts in the installation script carefully.

## Install software

If you are obsessed with not knowing what software to use,
you can consider installing a series of software that I am using.

Execute the following command.

```Shell
bash <(curl -sL https://git.io/Je4qA)
```

**Note:**
Before executing this command, please make sure your equipment meets the following conditions.

+ A ``non-Root user`` has been used to log into the Linux system.
+ The ``sudo`` command is already installed in the system.

## License

[MIT](LICENSE)

repository: AgentFabulous/arch-installer

repo_name: AgentFabulous/arch-installer


text:
---
layout: post
title: Packer Snap - My first snap
---

![](https://fossbytes.com/wp-content/uploads/2016/06/SNAPS-COMES-TO-LINUX-DISTRO.jpg)

As I was learning about snaps, I faced a issue that I was having in my current
job. I have been using some tools from Hashicorp and Hashicorp don't use the
"latest version" concept.

Bu if you want to keep yourself updated, it's a problem because they are
releasing new features every couple os days and sometimes can be hard to keep
up with it, so I created my first snap.

The same package that runs in Ubuntu and Fedora and it seems that will be the
standard packaging system for the years to come.

I introduce you ["packer-abacao"](https://uappexplorer.com/app/packer-abacao.abacao){:target="_blank"} snap.

It is a job that needs to be polished but remember that is my first snap.

You can install this snap from the Ubuntu Snap Store by using the command.

```sudo snap install packer-abacao```

With this you will get the latest packer version from the source. v1.1.0

Have fun!

gha_license_id: NOASSERTION