text:
# Execution of Experiment

## Prerequisites

- [ ] Environment Setup
  - [ ] Tool Installation
    - [ ] Node (version 8 or greater)
    - [ ] Android Studio
    - [ ] Java (installed with Android Studio)
    - [ ] React Native CLI
  - [ ] Install Android Platforms and Tools
  - [ ] Configure Environment Variables

- [ ] Create New React Native application
  - [ ] Use CLI: `react-native init rnApp`
  - [ ] Determine which AVD to run
  - [ ] Run Android Virtual Device
  - [ ] Verify React Native application runs

- [ ] Create Auth0 Account
  - [ ] Create Application
    - [ ] Need configuration information from application settings
  - [ ] Enable Social connection for Google authentication.

- [ ] Login Screen
  - [ ] create Login screen
  - [ ] setup routes and navigation for application (i.e., Login)
  - [ ] add global and local styles

## Create Application Screens

The application will require a _login_ screen to allow for the authentication with Auth0. Additionally,
we will require navigation functionality as well. Create the `Login` screen in a new folder `app/screens`.

* import items from `react` and `react-native`
* import the local and global styles
* `export` a class that extends `Component`
* implement the `render()` to provide the view with styles.

_src\auth0ExperimentOne\app\screens\login\LoginScreen.js_
```js
import React, { Component } from "react";
import { View, Text, Button, ActivityIndicator } from "react-native";
import { NavigationActions, StackActions } from "react-navigation";
import Auth0 from "react-native-auth0";

import {
  headerColorStyle,
  headerTextColorStyle,
  buttonStyle
} from "../../theme/Colors";
import styles from "./Login.styles";

const auth0Config = {
  domain: 'auth0-experiment.auth0.com',
  clientId: '985377187090-eov88ja9u3uf0r96i23jclg2r67l859l.apps.googleusercontent.com'
}

const auth0 = new Auth0({
  domain: auth0Config.domain,
  clientId: auth0Config.clientId
});

/**
 * Use to provide login/authentication using the Auth0 API.
 */
export default class LoginScreen extends Component {

  static navigationOptions = ({ navigation }) => {
    return {
      headerTitle: "Login",
      headerStyle: {
        backgroundColor: headerColorStyle
      },
      headerTitleStyle: {
        color: headerTextColorStyle
      }
    };
  };

  /**
   * Use to determine if the screen has initialized.
   */
  state = {
    hasInitialized: false
  };

  /**
   * Use to perform an early check to determine if the user's access token exists.
   */
  componentDidMount() {
    console.log(`Determine if an access token exists for the user.`);

    /**
     * Attempt to retrieve token for storage:
     * 1. if token exists,
     *    a. use token and Auth0 to authenticate user
     *    b. if authenticated, route user to the [default app screen] with [data].
     *    c. if error during authentication (e.g., expired token), refresh token and restart
     * 2. if token does NOT exist
     *    a. initialization is [true/complete]
     *    b. user must [Login] via button.
     */

    this.setState({
      hasInitialized: true
    });
  }

  render() {
    return (
      <View style={styles.container}>
        <ActivityIndicator
          size="large"
          color="#05a5d1"
          animating={!this.state.hasInitialized}
        />
        {this.state.hasInitialized && (
          <Button onPress={this.authorize} title="Login" color={buttonStyle} />
        )}
      </View>
    );
  }

  authorize() {
    console.log('Use Auth0 API to authorize user...');
    auth0.webAuth
      .authorize({
        scope: auth0Config.scope,
        audience: auth0Config.audience,
        // device: DeviceInfo.getUniqueID(),
        prompt: "login"
      })
      .then(authResponse => {
        auth0.auth
          .userInfo({ token: authResponse.accessToken })
          .then(data => {
            this.routeToHome(data);
          })
          .catch(error => {
            console.log("Error: ");
            console.log(JSON.stringify(error));
          });

        // persist the [accessToken] and the [refreshToken]
      })
      .catch(error => {
        console.log(error);
      });
  }

  routeToHome = userInformation => {
    this.setState({
      hasInitialized: true
    });

    const resetAction = StackActions.reset({
      index: 0,
      actions: [
        NavigationActions.navigate({
          routeName: "Home",
          params: {
            name: userInformation.name,
            picture: userInformation.picture
          }
        })
      ]
    });

    this.props.navigation.dispatch(resetAction);
  };
}
```

Styles for the Login screen are seperated into a `.styles.js` file for the specified screen.

> Note: Keeping the relative files together by convention. Each screen items will have all of its members in a distinct screen folder.

_src\auth0ExperimentOne\app\screens\login\Login.styles.js_
```js
import { StyleSheet } from "react-native";

const styles = StyleSheet.create({
	container: {
		flex: 1,
		justifyContent: "center",
		alignItems: "center"
	}
});

export default styles;
```

The application will also have some global styles.

_src\auth0ExperimentOne\app\theme\Colors.js_
```js
const headerColorStyle = "#333";
const headerTextColorStyle = "#FFF";
const buttonStyle = "#555";

export { headerColorStyle, headerTextColorStyle, buttonStyle };
```

## Navigation

To provide navigation, install the navigation package listed below.

```ts
npm install -S native-react-navigation
```

The routes will be setup in the `Root.js` file. The `StackNavigator` will provide the stack-based navigation for the application.

* import the LoginScreen
* create the `Stack` object with routes.
* export the `Stack` to allow access to the routes.

```js
import React from "react";
import { StackNavigator } from "react-navigation";

import LoginScreen from "./app/screens/login/LoginScreen";

const Stack = StackNavigator(
  {
    Login: {
      screen: LoginScreen
    }
  },
  {
    initialRouteName: "Login"
  }
);

export default Stack;
```

We should be able to refresh the application and view the resuls in the Android emulator.

![](./assets/working-app-with-no-features.png)

### Authentication State

The application is not currently doing anything. This is because there is not _state_ being tracked for the current user. When the application initializes, we will want to determine:

* is the user authenticated
  * no: route the user to the `LoginScreen`
  * yes: route the user to the default application page.

Therefore, the application requires some state management.

>Pro Tip: Use the [Lifecycle hooks of a React Native Component](https://www.geeksforgeeks.org/reactjs-lifecycle-components/) to implement discreet bits of functionality in a screen [Component](https://blog.usejournal.com/understanding-react-native-component-lifecycle-api-d78e06870c6d).

asdfasdf

![](./assets/login-with-activity-indicator.png)

Import `ActivityIndicator`

```js
import { View, Text, ActivityIndicator } from "react-native";
```

asdf

* added an `ActivityIndicator` to the screen if the application is not initialized
*

```js
  state = {
    hasInitialized: false
  };

  render() {
    return (
      <View
        style={{
          flexDirection: 'row',
          height: 100,
          padding: 20,
        }}>
        <ActivityIndicator
          size="large"
          color="#05a5d1"
          animating={!this.state.hasInitialized}
        />
        {this.state.hasInitialized && (
          <Button onPress={this.login} title="Login" color={buttonStyle} />
        )}
      </View>
    );
  }

  login() {
    console.log('Use Auth0 API to authorize user...')
  }
```

## Auth0 Account

Created a new Auth0 account and followed the prompts to create my React Native application. The Auth0 website provides a sample application that you can download as well.

Retrieved Callback URL from the Download Sample application window. The URL is specific to the my target application called **auth0-experiment**.

```ts
auth0.samples.Auth0Sample://auth0-experiment.auth0.com/ios/auth0.samples.Auth0Sample/callback, com.auth0sample://auth0-experiment.auth0.com/android/com.auth0sample/callback
```

![](./assets/download-sample.png)

## Setup Authentication Using Social Media

### Google

* Get Client ID and Secret (not required) - you can use the Auth0 dev keys.
* Configure which application that you want to allow Google authentication.

![](./assets/applications-for-google-auth.png)

## React Native

Install packages for the application.

```ts
npm install -S<EMAIL_ADDRESS>```

You will need to link the native modules to the application.

```ts
react-native link react-native-auth0
```

You should see successful linked messages for each of the `link` commands.

```ts
react-native link react-native-auth0
rnpm-install info Linking react-native-auth0 ios dependency
rnpm-install info Platform 'ios' module react-native-auth0 has been successfully linked
rnpm-install info Linking react-native-auth0 android dependency
rnpm-install info Platform 'android' module react-native-auth0 has been successfully linked
```

Use the following to unlink a native library from the application.

```ts
react-native unlink react-native-auth0
```

### Setup Auth0 Configuration

Create an environment file to contain the Auth0 configuration information.

>Note: You should ignore this file for your code repository.

_.env example:_
```ts
AUTH0_DOMAIN="YOUR_AUTH0_DOMAIN"
AUTH0_CLIENT_ID="YOUR_AUTH0_APP_CLIENT_ID"
AUTHO_SCOPE="openid offline_access profile email"
AUTH0_AUDIENCE="https://YOUR_AUTH0_DOMAIN/userinfo"
```

## Allow Application to Open a Browser Window

Add the following attribute to the `AndroidManifest.xml` `activity` section.

```ts
android:launchMode="singleTask"
```

_sample\rnApp\android\app\src\main\AndroidManifest.xml_
```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.rnapp">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>
```


text:
# The-Aquaponics-Project

This project aims to create an autonomous home made Aquaponics system.
In the long run we hope to be able to be able to run the system primarily from solar energy, with as many part of the project automated as possible.

# Design

The overall design document can be found in `Project.plantuml` and can be viewed with plantuml.

# Data collection

Currently the following sensors are to be implemented in the system (prioritized list):

1. Water flow sensor [YF-B6](https://www.seeedstudio.com/Water-Flow-Sensor-YF-B6-p-2883.html)
2. Water level sensor (TBD)
3. Water temperature sensor [PT100](https://www.ardu.dk/shop/pt100-temperaturfoeler-20-til-400-gr-c-vandtaet/)
4. Air temperature sensor (possible [DHT22](https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf))
5. Air humidity sensor (possible [DHT22](https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf))
6. Lux sensor (TBD)

The project is aim to be made with a BeagleBone Black Wireless for data collection and for providing a server on the home network, with an app to visualize the data.

# Code

## Building

### Building the container for cross compilation

A Dockerfile for cross compiling for `arm-unknown-linux-gnueabihf` can be found in `ContainerFiles/Dockerfile`.
It be build with docker/podman with a terminal in the root of this project: `podman build -t rust-arm-builder ContainerFiles`.

### Cross-compiling

You can either use cargo or what I would suggest to you instead; `cross`.

Cross is essentially cargo for cross-compiling in containers, and it is setup such that it works with the build command just described.
`cross` is installed by calling `cargo install cross`.

When cross is installed and the container is build, you can build the project with:

    cross build

this will compile it for `arm-unknown-linux-gnueabihf`, if you want to change target you can do that with:

    cross build --target arm-unknown-linux-gnueabihf

where `arm-unknown-linux-gnueabihf` must be replaced with the target you want to use.

If you want to use cargo instead, just replace cross with cargo.

## BeagleBone Black Wireless (BBBW)

As some of the sensors require ADC, the project will be targeting the BeagleBone Black, as it in opposition to the raspberry pi have build-in ADC.
It is a `arm-unknown-linux-gnueabihf` type device which is the default for this project.

## Pi related

It is still a goal to make raspberry pi work with this project, and at some point maybe mainline the library such that it doesn't matter.
Currently the focus will be on making the project work with the BeagleBone Black and first after it is stable will we look into supporting the pi.

Preliminary testing were done on raspberry pi 3 A (armv7) and raspberry pi zero w(armv6).
[The raspberry pi toolchain](https://github.com/raspberrypi/tools) will be used for linking.

## Water flow sensor (YF-B6)

The water flow sensor output the water flow rate (L/min) as per:

```
Q_flow [L/MIN]
F_out [Hz]
F_out = 6.6*Q_flow
Q_flow = F_out/6.6
```

## App related

The current idea is to implement in flutter, such that it is cross platform, but this have low priority in relation to the other parts.

license: MIT

repository: Quanalogy/The-Aquaponics-Project

branch_name: refs/heads/master

extension: md

gha_language: Rust

gha_license_id: MIT

license_type: permissive

repo_name: Quanalogy/The-Aquaponics-Project


text:
Ingest NG Phase 2 Test Deployment
=================================

This is a basic test version of the second iteration of our next-gen crawl engine.

This one routes all in-scope URIs via a Kafka queue, which can be used to reconstruct the frontier in the event of failure.

(see https://github.com/ukwa/ukwa-documentation/blob/master/Roadmap.md for more details)

To run it, it all you need is a

    $ docker-compose pull

(to make sure the containers are up to date) and a

    $ docker-compose up

To inject some test seeds into the crawl, you need to put them in the Kafka queue. This can be done from the `control` server.

   $ docker exec control sh
   # inject -k kafka:9092 -S uris-to-crawl http://acid.matkelly.com/
   # inject -k kafka:9092 -S uris-to-crawl http://crawl-test-site:4000/crawl-test-site/

Which means "send the URL of the Archival Acid Test site to the `uris-to-crawl` Kafka queue and mark it as a seed."

If you want to see what's going on, you can exit there and use the Kafka service to poke around:

   $ docker exec kafka sh
   # kafka-console-consumer --bootstrap-server kafka:9092 --topic uris-to-crawl --from-beginning

Which will emit all the requests in the `uris-to-crawl` stream. To see what happened, you can use:

   # kafka-console-consumer --bootstrap-server kafka:9092 --topic frequent-crawl-log --from-beginning

Which will emit the crawl log as a series of JSON messages. Alternatively, you can look at the output:

   $ ls testing/heritrix/output/logs/frequent/*
   $ ls testing/heritrix/output/warcs/frequent/*
   $ ls testing/heritrix/output/viral/frequent/*


text:
---
resources:
  - link: 'http://alistair.cockburn.us/Information+radiator'
    linkType: web
    description: Information Radiator by Alistair Cockburn
  - link: >-
      https://www.amazon.co.uk/gp/product/9188063011/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
    linkType: web
    description: 98 Visualisation Examples by Jimmy Janlén
  - link: 'https://openpracticelibrary.com/practice/impact-mapping/'
    linkType: web
    description: Impact Mapping
  - link: 'https://openpracticelibrary.com/practice/event-storming/'
    linkType: web
    description: Event Storming
  - link: 'https://openpracticelibrary.com/practice/vsm-and-mbpm/'
    linkType: web
    description: Vsm And Mbpm
  - link: 'https://openpracticelibrary.com/practice/social-contract/'
    linkType: web
    description: Social Contract
  - link: 'https://openpracticelibrary.com/practice/user-story-mapping/'
    linkType: web
    description: User Story Mapping
  - link: 'https://openpracticelibrary.com/practice/burndown/'
    linkType: web
    description: Burndown
  - link: 'https://openpracticelibrary.com/practice/realtime-retrospective/'
    linkType: web
    description: Realtime Retrospective
  - link: 'https://openpracticelibrary.com/practice/team-sentiment/'
    linkType: web
    description: Team Sentiment
templateKey: practice-page
title: Visualisation of Work
subtitle: Visually represent all aspects of your team's work
date: 2018-04-08T20:41:51.000Z
authors:
  - tdbeattie
  - mtakane
tags:
  - culture
whatIs: >-
  This practice involves radiating and visually representing all aspects of
  work. Information that is useful to team members, stakeholders and users is
  physically presented on walls, windows, doors and other flat surfaces and
  positioned in the line of sight of those people who will get value from
  consuming the information.

  The "Information Radiator" is an artifact that is used to physically provide
  information to one or more people.

  The activity of "Walking the Walls" is where someone interested in the work
  can walk around the physical space the associated team(s) are working from and
  get all the information they need from inspecting artefacts on the wall and
  from the resulting conversations.
howTo: >-
  ## Who do you need?

  - A facilitator (such as a Scrum Master) to drive transparent ways of working.

  - The full team who are responsible for delivering the work visualised.

  - Interested stakeholders to consume information and feed back on it.

  ## Suggested Time

  - 5-10 minutes to produce each information radiator and start it radiating.

  - Ad hoc updates performed on an ongoing basis with the facilitator driving
  the continuous consumption of and feedback from the information being
  presented.

  ## Difficulty

  - Facilitator - Medium

  - Participants - Easy

  ## How does it fit?

  - Tyipcally done in the Culture and Collaboration are of the Foundation of the
  Open Practice Library

  ## Facilitation Materials Needed

  - Flip chart paper

  - Magic Whiteboard charts

  - Writable walls

  - Flip chart and white board pens

  - Stickie notes (all shapes, sizes and colors)

  - Sharpie pens

  - Large monitor / TV screens

  - Small computers to radiate dashboards (e.g. CI/CD monitors)

  ## How To

  - Consider the positioning of all information radiators and who will have line
  of sight

  - Consider use of color coding across different information radiators (for
  example, same color stickies to represent features)

  - Allow sufficient time to produce high quality information radiators that
  will inspire and drive interest

  - Introduce the information radiator to all those who will use it (either in
  contributing to it and/or consuming information from it)

  - Encourage continuous inspection and update to the information presented

  Practices we use that result in information radiators which we use to
  visualise work include:

  - [Impact Mapping](/practice/impact-mapping/)

  - [Event Storming](/practice/event-storming/)

  - [Value Stream Mapping and Metric Based Process
  Mapping](/practice/vsm-and-mbpm/)

  - Target Outcomes

  - [Social Contact](/practice/social-contract/)

  - [User Story Mapping](/practice/user-story-mapping/)

  - Product Backlogs

  - Sprint Boards

  - [Burndown](/practice/burndown/) and Burnup Charts

  - Build Monitors

  - CI/CD monitors

  - Retrospectives

  - [Realtime Retrospective](/practice/realtime-retrospective/)

  - [Team Sentiment](/practice/team-sentiment/)
jumbotron: /images/visualisation-of-work.png
area: foundation-culture-and-collaboration
icon: /images/final_visualization-of-work.png
whyDo: >-
  Visualising work helps facilitate a transparent and open way of working. It
  helps avoid hiding information about status, progress, direction, challenges
  and opportunities related to a product. Traditionally such information is held
  in files on shared drives (for example, spreadsheets of project plans,
  powerpoint slides, word documents, etc.) which has the challenge of not being
  accessible or known about and, if found, not being up-to-date.

  Where important information is constantly accessible and visible to people,
  both speed and accuracy of their work can improve with reduced wastage from
  having to search for information. It is also more likely that the information
  is accurate because people are continuously being reminded of it.

  ![Visualisation of
  Work](https://openpracticelibrary.github.io/opl-media/images/visualisation-of-work2.png)
mediaGallery:
  - link: >-
      https://openpracticelibrary.github.io/opl-media/images/visualisation-of-work.png
  - link: >-
      https://openpracticelibrary.github.io/opl-media/images/visualisation-of-work2.png
mobiusTag: foundation
---
## What is Visualisation of Work?

This practice involves radiating and visually representing all aspects of work. Information that is useful to team members, stakeholders and users is physically presented on walls, windows, doors and other flat surfaces and positioned in the line of sight of those people who will get value from consuming the information.

The "Information Radiator" is an artefact that is used to physically provide information to one or more people.

The activity of "Walking the Walls" is where someone interested in the work can walk around the physical space the associated team(s) are working from and get all the information they need from inspecting artefacts on the wall and from the resulting conversations.

## Why Visualise work?

Visualising work helps facilitate a transparent and open way of working. It helps avoid hiding information about status, progress, direction, challenges and opportunities related to a product. Traditionally such information is held in files on shared drives (for example, spreadsheets of project plans, powerpoint slides, word documents, etc.) which has the challenge of not being accessible or known about and, if found, not being up-to-date.

Where important information is constantly accessible and visible to people, both speed and accuracy of their work can improve with reduced wastage from having to search for information. It is also more likely that the information is accurate because people are continuously being reminded of it.

![Visualisation of Work](/images/visualisation-of-work.png)

## Related Practices

Practices we use that result in information radiators which we use to visualise work include:

- [Impact Mapping](/practice/impact-mapping/)
- [Event Storming](/practice/event-storming/)
- [Value Stream Mapping and Metric Based Process Mapping](/practice/vsm-and-mbpm/)
- Target Outcomes
- [Social Contact](/practice/social-contract/)
- [User Story Mapping](/practice/user-story-mapping/)
- Product Backlogs
- Sprint Boards
- [Burndown](/practice/burndown/) and Burnup Charts
- Build Monitors
- CI/CD monitors
- Retrospectives
- [Realtime Retrospective](/practice/realtime-retrospective/)
- [Team Sentiment](/practice/team-sentiment/)

## Who do you need?

- A facilitator (such as a Scrum Master) to drive transparent ways of working.
- The full team who are responsible for delivering the work visualised.
- Interested stakeholders to consume information and feed back on it.

## Suggested Time

- 5-10 minutes to produce each information radiator and start it radiating.
- Ad hoc updates performed on an ongoing basis with the facilitator driving the continuous consumption of and feedback from the information being presented.

## Difficulty

- Facilitator - Medium
- Participants - Easy

## How does it fit?

- Tyipcally done in the Culture and Collaboration are of the Foundation of the Open Practice Library

## Facilitation Materials Needed

- Flip chart paper
- Magic Whiteboard charts
- Writable walls
- Flip chart and white board pens
- Stickie notes (all shapes, sizes and colors)
- Sharpie pens
- Large monitor / TV screens
- Small computers to radiate dashboards (e.g. CI/CD monitors)

## How To

- Consider the positioning of all information radiators and who will have line of sight
- Consider use of color coding across different information radiators (for example, same color stickies to represent features)
- Allow sufficient time to produce high quality information radiators that will inspire and drive interest
- Introduce the information radiator to all those who will use it (either in contributing to it and/or consuming information from it)
- Encourage continuous inspection and update to the information presented

![Visualisation of Work](/images/visualisation-of-work2.png)

## External References

1. [Information Radiator by Alistair Cockburn](http://alistair.cockburn.us/Information+radiator)
2. [98 Visualisation Examples by Jimmy Janlén](https://www.amazon.co.uk/gp/product/9188063011/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

repository: openpracticelibrary/openpracticelibrary

branch_name: refs/heads/main

gha_language: JavaScript

repo_name: openpracticelibrary/openpracticelibrary


text:
# Novation LaunchKeys 49 Mk2 (black) Bitwig Controller Script
* Does not support the Mk1 (gray); protocol is different
* Probably supports the 25 and 61 variants (25 at a loss of some functionality)
* Bitwig API 6 for the most up-to-date features
* Enhanced Pad bank (octaves, colors)

## Functionality at-a-glance
* Note Keys, Wheels, and Octave Transpose work as usual
* Strong support for Remote Controls on Devices (pads, knobs, faders; device/page navigation; indications)
* Soft-takeover for Faders/Knobs on Remote Control pages and User Controls
* Transposing the Pads!
* Visual notifications for most buttons/adjustments

### Faders
* InControl Mode
  * Track/Channel selectors navigate Tracks
  * Faders adjust current Device Remote Control Page values
  * Fader buttons toggle mapping of each Device Remote Control
  * Master Fader adjusts Current Track Volume
  * Master Fader button selects Master Track
* Basic Mode
  * Track/Channel selectors 'slide' the 8-Track Bank across Tracks
  * Faders adjust Track in Bank volumes
  * Fader buttons select Track in Bank
  * Master Fader adjusts Master Track volume
  * Master Fader button selects Master Track

### Knobs
  * InControl Mode
    * Knobs adjust current Device Remote Control Page values
  * Basic Mode
    * Knobs adjust User Control values (can be mapped)

### Pads
  * InControl Mode
    * Top row toggles mapping of Faders/Knobs to Remote Controls
    * Top row is colored by Remote Control color or nothing for unmapped/unavailable
    * Bottom row selects Pages of Remote Controls
    * Bottom row is colored by the Track and indicates selected/available Remote Control Pages
    * Top play Pad selects the next Device on the Track
    * Bottom play Pad selects the previous Device on the Track
    * When navigating Devices, the Remote Controls section visibility is shown/hidden for the current/previous Device
  * Basic Mode
    * Pads are used as Note Inputs (imagine a 4x4 grid, but cut it in half and show the bottom on the left and top on the right)
    * Pads are colored by the Track color and indicate played notes (live and playback)
    * Top play Pad shifts the Pad's starting note up by 16 (transposing)
    * Bottom play Pad shifts the Pad's starting note down by 16 (transposing)

### Transport Controls
Mapped to the appropriate Bitwig Transport Controls

## Changes from the Bitwig shipped version
* Enhanced Pad color support
* Most changes resulted from API deprecations
* Altered InControl Pad mappings
* Knobs/Faders use Remote Control pages, instead of direct Parameters and Macros
* Pads do not blink
* Unmapped parameters no longer change values
* Round Pad 'play' buttons navigate Devices instead of Presets


text:
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![LinkedIn][linkedin-shield]][linkedin-url]

K-Means Clustering

## About this Project
Developed Functions:
1. [K_Means(X, K, mu)](#k_means)
2. [K_Means_better(X, K)](#k_means_better)

There is also a test script called [test_script.py][test_script] which can be used to check the working of the functions

## K_MEANS

```python
C = K_Means(X, K, mu)
```

This function takes the feature vectors **X** and a **K** value as input and returns a numpy array of cluster centers **C**. The function will be able to handle any dimension of feature vectors and any **K > 0**. **mu** is an array of initial cluster centers, with either K or 0 rows. If mu is empty, then the function initializes the cluster centers ran-
domly. Otherwise, it starts with the given cluster centers.

## K_MEANS_BETTER

```python
C = K_Means_better(X, K)
```

This function takes the feature vectors **X** and a **K** value as input and returns a numpy array of cluster centers **C**. The function can handle any dimension of feature vectors and any **K > 0**. The function will run the above-implemented **K_Means(X,K,[])** function many times until the same set of cluster centers are returned a majority of the time. At this point, we will know that those cluster centers are likely the best ones. **K_Means_better(X,K)** will return those cluster centers.

## Contact

### Akshay Krishna

-  Website: [Akshay Krishna - Website](https://about.me/akrishna/)
-  LinkedIN: [akshay-krishna](https://www.linkedin.com/in/akshay-krishna-ak)
-  Email: [akshay.krishna154<EMAIL_ADDRESS>
[contributors-shield]: https://img.shields.io/github/contributors/saberzuko/MachineLearningAlgorithms.svg?style=flat-square
[contributors-url]: https://github.com/saberzuko/MachineLearningAlgorithms/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/saberzuko/MachineLearningAlgorithms.svg?style=flat-square
[forks-url]: https://github.com/saberzuko/MachineLearningAlgorithms/network/members
[stars-shield]: https://img.shields.io/github/stars/saberzuko/MachineLearningAlgorithms.svg?style=flat-square
[stars-url]: https://github.com/saberzuko/MachineLearningAlgorithms/stargazers
[issues-shield]: https://img.shields.io/github/issues/saberzuko/MachineLearningAlgorithms.svg?style=flat-square
[issues-url]: https://github.com/saberzuko/MachineLearningAlgorithms/issues
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/akshay-krishna-ak/
[test_script]: https://github.com/saberzuko/MachineLearningAlgorithms/blob/master/KMeansClustering/test_script.py

repository: saberzuko/MachineLearningAlgorithms

gha_language: Python

repo_name: saberzuko/MachineLearningAlgorithms


text:
# 1.  Example of parser and currency converter

## Installation

```bash
composer install
php artisan db:seed

```

## Usage

Demo is located on https::/qr.aleksei4er.dev

Token might be used either as Bearer token, or from get parameter for convinient.

Page of rates

```html
https://qr.aleksei4er.dev/api/v1/rates?token=123
```

From USD to BTC

```html
https://qr.aleksei4er.dev/api/v1/convert?token=123&currency_from=USD&currency_to=BTC&value=44

```

From BTC to USD
```html
https://qr.aleksei4er.dev/api/v1/convert?token=123&currency_from=BTC&currency_to=USD&value=0.2
```

Invalid token example
```html
https://qr.aleksei4er.dev/api/v1/rates
```

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# Display processes

In the introduction we mentioned briefly the ``ps`` command.

We said that it stands for **process state** and it displays some information of the processes running on the machine.
``ps`` command is used to list the currently running processes and their PIDs (process identification numbers) along with
some other information depends on different options. It reads the process information from the virtual files in ``/proc`` file-system.

``ps`` command provides numerous options for manipulating the output according to our need. The syntax:

```bash
ps [options]
```

**Options:**

Try to see the output of these different configurations of ``ps`` command.

1. Simple process selection: shows the processes for the current shell
      ```bash
       ps
      ```
      Result contains four columns of information.
      Where,
      * PID – the unique process ID
      * TTY – terminal type that the user is logged into
      * TIME – amount of CPU in minutes and seconds that the process has been running
      * CMD – name of the command that launched the process.

2. List all processes: to list all processes on a system use the -e option.
    ```bash
    ps -e
    ```
    This option can be combined with the -f and -F options to provide more information on processes.
    ```bash
    ps -ef
    ```
    If you execute it, you see that the first information displayed is the process owner (for example *root*). The second is the **process ID (PID)**.
    Keep in mind that the PID is in second position, it will be crucial to solve some exercises.

    Another commonly used syntax to achieve seeing every process on the system using BSD syntax is
    ```bash
    ps aux
   ```

3. View all the running processes:
    ```bash
    ps -r
    ```

4. View all processes owned by you: processes with the same EUID as the runner of `ps` command, *root* in this case
    ```bash
    ps -x
    ```

5. Select the process by the command name. This selects the processes whose executable name is given in cmdlist.
There may be a chance you won’t know the process ID and with this command it is easier to search.
    ```bash
    ps -C command_name
    ```

    Example:
    ```bash
    ps -C script1
    ```

6. View process by process ID.
    Syntax:
    ```bash
    ps p process_id
    ps -p process_id
    ps --pid process_id
    ```
    You can also view multiple processes by specifying multiple process IDs separated by blank space or comma.

7. Select by effective user ID or name.
    Some possible cases:
    ```bash
    ps U user_name/ID
    ps -U user_name/ID
    ps -u user_name/ID
    ps –User user_name/ID
    ps –user user_name/ID
    ```

Beside these simple usage of flags, you can also combine them to list processes according to some criteria you may want.
For instance, you can list processes using highest memory.
```bash
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem
```

There are many other flags, both to display different kind of information and to format this information on the shell in many ways.
Here’s a [link to the man page](http://man7.org/linux/man-pages/man1/ps.1.html), in which you can find the complete flag list.

# Grep command

When we list processes via `ps` command, usually we see many more lines than we want. So here's where ``grep`` command can come in handy.
The grep command is used to search text. It searches in the given text (that could be in a file or on the shell screen) all the lines containing a match to the given strings or words. It is one of the most useful commands on Linux and Unix-like system.

**Syntax**

The syntax is as follows:
```bash
grep [option] 'word-to-search' [filename]
```
Options can be:

| **Option** | **Description** |
| ------ | ----------- |
| -i | Ignore case distinctions on Linux and Unix |
| -w | Force PATTERN to match only whole words |
| -v | Select non-matching lines |
| -n | Print line number with output lines |
| -h | Suppress the Unix file name prefix on output |
| -r | Search directories recursivly on Linux |
| -R | Just like -r but follow all symlinks |
| -l | Print only names of FILEs with selected lines |
| -c | Print only a count of selected lines per FILE |
| --color | Display matched pattern in colors |

Grep can be useful in many situations:
* find a specific file after an `ls` command;
* search for a word (or more than one) in a document;
* in the case of process management, we can use it to display only the information about the processes that we are interested in.

**Some examples**

A common usage of ``grep`` is finding words inside files. Flag **-w** indicates to the command that it has to seek for a word.
```bash
grep -w word-to-search /path/to/file
```

Try to search a specific word ("stop", for instance) in *script1* file.

You can also search for more than one word, thanks to the variant `egrep` command:
```bash
egrep -w 'word1|word2' /path/to/file
```

You can also count lines in which the words you search for have been matched
The ``grep`` command can report the number of times that the pattern has been matched for each file using **-c** (count) option:
```bash
grep -c 'word-to-search' /path/to/file
```

Passing the **-n** option, you obtain each output line preceded with the *line number* in the text file from which it was obtained:
```bash
grep -n 'word-to-search' /path/to/file
```

We can force ``grep`` to display output in colors, enter:
```bash
grep --color word-to-search /path/to/file
```
We suggest to read the [grep man page](http://linuxcommand.org/lc3_man_pages/grep1.html) too.

### Concatenate commands

Finally, ``grep`` is often used in sequence with other operation. Let's see how. Linux uses the 'pipe' character (it -> ``|``) to concatenate commands in the terminal.
For instance,
```bash
ls -l | wc -l
```
counts the the file listed in the current directory. ``ls -l`` produces the list of files, then ``wc -l`` runs immediately after to count the elements of the list and print the counter on the screen.

Similarly, we can use grep to pick specific process informations provided py ``ps`` command. For instance:
```bash
ps -ef | grep script2
```

---
**Exercise 1**

Execute twice *script2* concatenating the two executions in a single command. Use the output redirecting on the same file (called *output_twice.txt*) in the append mode.

What do you see inside output_twice.txt?

1. Only the output of the second execution.
2. The outputs of the two executions mixed up.
3. The output of the first execution followed by the output of the second execution.

Can you also figure out why?

---

---
**Exercise 2**

1. Find number of lines in *text.txt* file. How many are them?
2. Find the total occurrences of the word **Jude** in *text.txt* file. Can you find the number?

---

repository: agdiiura/katacoda-scenarios

repo_name: agdiiura/katacoda-scenarios


text:
# MessageCorruptor
Simple percentage-based message scrambler.

## Features
- Scramble a certain percentage of letters in a string
- Biased against short words (longer words end up more readable)
- Returns an array of scrambled versions of the original message
- Supports numbers, A-Z and some special characters

## Usage
- See example.php

repository: knork-fork/MessageCorruptor

repo_name: knork-fork/MessageCorruptor


text:
# Demo to show NGINX Plus Dynamic Reconfiguration API with Consul

This demo shows NGINX Plus being used in conjuction with Consul, a service discovery platform. This demo is based on docker and spins up the following containers:

*   [Consul](http://www.consul.io) for service discovery
*   [Registrator](https://github.com/gliderlabs/registrator) to register services with Consul.  Registrator monitors for containers being started and stopped and updates Consul when a container changes state.
*   [nginxdemos/hello](https://hub.docker.com/r/nginxdemos/hello/) as a NGINX webserver that serves a simple page containing its hostname, IP address and port, request URI, local time of the webserver and the client IP address. This is to simulate backend servers NGINX Plus will be load balancing across.
*   [NGINX Plus](http://www.nginx.com/products) (R13 or higher)

The demo is based off the work described in this blog post: [Service Discovery with NGINX Plus and Consul](https://www.nginx.com/blog/service-discovery-with-nginx-plus-and-consul/)

## Setup Options:

### Fully automated Vagrant/Ansible setup:

Install Vagrant using the necessary package for your OS:

<https://www.vagrantup.com/downloads.html>

1.  Install provider for vagrant to use to start VM's.

    The default provider is VirtualBox (Note that only VirtualBox versions 4.0 and higher are supported), which can be downloaded from the following link:

    <https://www.virtualbox.org/wiki/Downloads>

    A full list of providers can be found at the following page, if you do not want to use VirtualBox:

    <https://docs.vagrantup.com/v2/providers/>

2.  Install Ansible:

    <https://docs.ansible.com/ansible/intro_installation.html>

3.  Clone demo repo

    `$ git clone https://github.com/nginxinc/NGINX-Demos.git`

4.  Copy `nginx-repo.key` and `nginx-repo.crt` files for your account to `~/NGINX-Demos/consul-api-demo/nginxplus`

5.  Move into the consul-api-demo directory and start the Vagrant vm:

    ```
    $ cd ~/NGINX-Demos/consul-api-demo
    $ vagrant up
    ```

    The `vagrant up` command will start the virtualbox VM and provision it using the ansible playbook file `~/NGINX-Demos/consul-api-demo/setup_consul_api_demo.yml`. The ansible playbook file also invokes another script `provision.sh` which sets the HOST_IP environment variable to the IP address of the `enp0s8` interface (<IP_ADDRESS> in this case - assigned in the Vagrantfile) and invokes the `docker-compose up -d` command

6.  SSH into the newly created virtual machine and move into the /vagrant directory which contains the demo files:

    ```
    $ vagrant ssh
    $ sudo su
    ```

The demo files will be in `/srv/NGINX-Demos/consul-api-demo`

7.  Now simply follow the steps listed under section 'Running the demo'.

### Ansible only deployment

1.  Create Ubuntu 18.04 LTS VM

2.  Install Ansible on Ubuntu VM

    `$ sudo apt-get install ansible`

3.  Clone demo repo into `/srv` on Ubuntu VM:

    ```
    $ cd /srv
    $ sudo git clone https://github.com/nginxinc/NGINX-Demos.git
    ```

4.  Copy `nginx-repo.key` and `nginx-repo.crt` files for your account to `/srv/NGINX-Demos/consul-api-demo/nginxplus`

5.  Move into the consul-api-demo directory which contains the demo files and make sure the IP address of your Ubuntu VM on which NGINX Plus will be listening is assigned to the `enp0s8` interface. If in case you need to use IP of another interface, replace `enp0s8` on line 6 of provision.sh with the corresponding interface name

    `$ cd /srv/NGINX-Demos/consul-api-demo`

6.  Run the ansible playbook against localhost on Ubuntu VM:

    `$ sudo ansible-playbook -i "localhost," -c local /srv/NGINX-Demos/consul-api-demo/setup_consul_api_demo.yml`

7.  Now simply follow the steps listed under section 'Running the demo'.

### Manual Install

#### Prerequisites and Required Software

The following software needs to be installed:

*   [Docker for Mac](https://www.docker.com/products/docker#/mac) if you are running this locally on your MAC **OR** [docker-compose](https://docs.docker.com/compose/install) if you are running this on a linux VM
*   [jq](https://stedolan.github.io/jq/), I used [brew](http://brew.sh) to install it: `brew install jq`

#### Setting up the demo

1.  Clone demo repo

    `$ git clone https://github.com/nginxinc/NGINX-Demos.git`

2.  Copy `nginx-repo.key` and `nginx-repo.crt` files for your account to `~/NGINX-Demos/consul-api-demo/nginxplus/`

3.  Move into the demo directory:

    `$ cd ~/NGINX-Demos/consul-api-demo`

4.  If you have run this demo previously or have any docker containers running, start with a clean slate by running

    `$ ./clean_containers.sh`

5.  NGINX Plus will be listening on port 80 on your docker host.

    1.  If you are using Docker Toolbox, you can get the IP address of your docker-machine (default here) by running

    ```
    $ docker-machine ip default
    <IP_ADDRESS>
    ```

    2.  If you are using Docker for Mac, the IP address you need to use is <IP_ADDRESS>

    Export this IP into an environment variable named HOST_IP by running the `$ export HOST_IP=x.x.x.x` command. This variable is used by the `docker-compose.yml` file.

6.  Spin up the Consul, Registrator and NGINX Plus containers first:

    `$ docker-compose up -d`

7.  Execute the following two `docker exec` commands to install [jq](https://stedolan.github.io/jq/) inside consul container

    ```
    docker exec -ti consul apk update
    docker exec -ti consul apk add jq
    ```

8.  Spin up the nginxdemos/hello container which is the backend http service

    `$ docker-compose -f create-http-service.yml up -d`

9.  Now follow the steps under section 'Running the demo'

## Running the demo

1.  You should have a bunch of containers up and running now:

    ```
    $ docker ps
    CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS                                                                                NAMES
    b663f7ac70be        nginxdemos/hello:latest         "nginx -g 'daemon off"   About an hour ago   Up About an hour    443/tcp, <IP_ADDRESS>:32800->80/tcp                                                                                consulapidemo_http_1
    7d6a66acff99        consulapidemo_nginxplus         "nginx -g 'daemon off"   About an hour ago   Up About an hour    <IP_ADDRESS>:80->80/tcp, <IP_ADDRESS>:8080->8080/tcp, 443/tcp                                                                                nginxplus
    2059ad9a7926        gliderlabs/registrator:latest   "/bin/registrator con"   About an hour ago   Up About an hour                                                                                registrator
    dd4b1101bb66        progrium/consul:latest          "/bin/start -server -"   About an hour ago   Up About an hour    53/tcp, <IP_ADDRESS>:8300->8300/tcp, <IP_ADDRESS>:8400->8400/tcp, 8301-8302/tcp, <IP_ADDRESS>:8500->8500/tcp, 8301-8302/udp, <IP_ADDRESS>:8600->53/udp   consul
    ```

2.  If you followed the Fully automated Vagrant/Ansible setup option above, HOST_IP referred below is the IP assigned to your Vagrant VM (i.e <IP_ADDRESS> in Vagrantfile) and is set already. And if you followed the Ansible only deployment option, HOST_IP will be the IP of your Ubuntu VM on which NGINX Plus is listening (IP of the interface set on line 6 of provision.sh, set to enp0s8 by default). For the manual install option, HOST_IP was already set above.

3.  Go to `http://<HOST-IP>` (Note: Docker for Mac runs on IP address <IP_ADDRESS>) in your favorite browser window and that will take you to the hello container printing its hostname, IP Address and port number, request URI, local time of the webserver and the client IP address. `http://<HOST-IP>:8080/` will bring up the NGINX Plus dashboard. The configuration file NGINX Plus is using here is /etc/nginx/conf.d/app.conf which is included from /etc/nginx/nginx.conf. If you would like to see all the services registered with consul go to `http://<HOST-IP>:8500`. **We are also using the persistent on-the-fly reconfiguration feature introduced in NGINX Plus R8. This means that NGINX Plus saves all the changes made by the Rest API across reloads by writing it to a file on disk specified using the [state](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#state) directive.**

4.  Now scale up and scale down the http service using the commands below. Go to the Upstreams tab on Nginx Plus dashboard and observe the change in the list of servers being added/removed from the backend group accordingly.

    ```
    $ docker-compose -f create-http-service.yml scale http=5
    $ docker-compose -f create-http-service.yml scale http=3
    ```

5.  The way this works is using [Consul Watches](https://www.consul.io/docs/agent/watches.html), eveytime there is a change in the number of containers running the http service, an external handler which is a simple bash script (`script.sh`) gets invoked. This script gets the list of all Nginx Plus upstreams using its status and upstream_conf APIs, loops through all the http service containers registered with consul and adds them to the upstream group using Rest API if not present already. It also removes the upstreams which are not present in Consul from Nginx upstream group.

All the changes should be automatically reflected in the NGINX config and show up on the NGINX Plus Dashboard.

repository: nginxinc/NGINX-Demos

gha_language: HTML

repo_name: nginxinc/NGINX-Demos


text:
---
title: "getTechIncubatorProgramInfo"
description: "This method will return a SoftLayer_Container_Account_Discount_Program object containing the Technology Incubator Progra... "
layout: "method"
tags:
    - "method"
    - "sldn"
    - "Account"
classes:
    - "SoftLayer_Account"
aliases:
    - "/reference/services/softlayer_account/getTechIncubatorProgramInfo"
---
# [SoftLayer_Account](/reference/services/SoftLayer_Account)::getTechIncubatorProgramInfo

This method retrieves the Technology Incubator Program information for your account.

## Overview
This method will return a SoftLayer_Container_Account_Discount_Program object containing the Technology Incubator Program information for this account. To be considered an active participant, the account must have an enrollment record with a monthly credit amount set and the current date must be within the range defined by the enrollment and graduation date. The forNextBillCycle parameter can be set to true to return a SoftLayer_Container_Account_Discount_Program object with information with relation to the next bill cycle. The forNextBillCycle parameter defaults to false.

-----

### Parameters
|Name | Type | Description |
| --- | --- | --- |
|forNextBillCycle| boolean| Boolean flag to indicate whether the information in the container should be in|

### Required Headers
* authenticate

### Return Values
* <a href='/reference/datatypes/SoftLayer_Container_Account_Discount_Program'>SoftLayer_Container_Account_Discount_Program </a>

### Associated Methods

*  [SoftLayer_Product_Order::verifyOrder](/reference/services/SoftLayer_Product_Order/verifyOrder )

gha_license_id: NOASSERTION


text:
# jQuery Progress

Progress is a jQuery plugin which displays and elegant progress bar at the top of the page to show scroll progress through targetted page content.

## Demo

An example can be found in the [examples folder](http://ryannielson.github.io/jquery-progress/demo/).

## Options

### height

The height of the progress bar element in pixels. (default="2px")

### color

The color hex value of the progress bar before you've reached the bottom of the targetted content. (default="#FF0000")

### completeColor

The color hex value of the progress bar once you've reached the bottom of the targetted content. (default="#00FF00")

## Setup

Within the HEAD tag or near the bottom of the page place:

	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
	<script type="text/javascript" src="jquery.progress.min.js"></script>

Choose an element to use Progress on:

	$("#element").progress();

## Changelog

### Version 0.1.0

* First release

## Questions or Problems?

If you have any questions or issues with Progress, please add an [issue on GitHub](https://github.com/RyanNielson/jquery-progress/issues), or send a pull request.

repository: RyanNielson/jquery-progress

repo_name: RyanNielson/jquery-progress


text:
---
title: parallel
type: processor
---

<!--
     THIS FILE IS AUTOGENERATED!

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

```yaml
parallel:
  cap: 0
  processors: []
```

A processor that applies a list of child processors to messages of a batch as
though they were each a batch of one message (similar to the
[`for_each`](/docs/components/processors/for_each) processor), but where each message is
processed in parallel.

The field `cap`, if greater than zero, caps the maximum number of
parallel processing threads.

repository: gabrielg/benthos

repo_name: gabrielg/benthos


text:
## Run

Copy and edit `config.py.dist`: `cp config.py.dist config.py`

Then launch the app with `sudo python3 main.py &`

## Installation

Get an rasbian image from [here](https://www.raspberrypi.org/downloads/raspbian/).

Connect to the pi then `sudo apt-get update && sudo apt-get upgrade && sudo reboot`.

Enlarge partition, set up time zone and enable the camera with `sudo raspi-config`.

To be continued.

To start the alarm at boot edit the DIR variable in `scripts/alarm.sh` then:

```
chmod +rx /home/pi/AlarmEngine/main.py
sudo su -
ln -s /path/to/scripts/alarm.sh /etc/init.d/alarm
chmod +rx /etc/init.d/alarm
echo "sudo service alarm start" >> /etc/rc.local
```

## Documentation

#### 06/09/15

* https://www.raspberrypi.org/documentation/usage/gpio/
* http://www.element14.com/community/docs/DOC-73950/l/raspberry-pi-2-model-b-gpio-40-pin-block-pinout
* https://www.jameco.com/Jameco/workshop/circuitnotes/raspberry_pi_circuit_note.html
* https://www.google.fr/imgres?imgurl=http%3A%2F%2Fraspi.tv%2Fwp-content%2Fuploads%2F2013%2F03%2FRasPi.TV-interrupt3_bb.jpg&imgrefurl=http%3A%2F%2Fraspi.tv%2F2013%2Fhow-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio-part-3&h=1047&w=1266&tbnid=_PkyDC_QtPJU1M%3A&docid=rCBqrqjXg7Hs6M&ei=MUDpVefcGoOAaYTfqZgF&tbm=isch&client=ubuntu&iact=rc&uact=3&dur=663&page=1&start=0&ndsp=47&ved=0CHoQrQMwHGoVChMIp7mJ_uXcxwIVA0AaCh2EbwpT
* https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
* https://www.raspberrypi.org/documentation/usage/camera/python/README.md
* https://picamera.readthedocs.org/en/release-1.10/recipes1.html#capturing-timelapse-sequences
* https://learn.adafruit.com/adafruits-raspberry-pi-lesson-12-sensing-movement/configure-and-test
* https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/
* https://learn.adafruit.com/adafruits-raspberry-pi-lesson-12-sensing-movement/hardware
* https://pip.pypa.io/en/latest/installing.html

#### 07/09/15

* https://www.google.fr/search?q=python+send+sms&oq=python+send+sms&aqs=chrome..69i57.4279j0j7&client=ubuntu&sourceid=chrome&es_sm=93&ie=UTF-8
* https://www.twilio.com/docs/quickstart/python/sms/sending-via-rest
* https://www.twilio.com/user/account/voice-sms-mms
* http://the-raspberry.com/connaitre-la-temperature-de-son-raspberry-pi

#### 08/09/15

* http://www.raspberrypi-spy.co.uk/2013/07/running-a-python-script-at-boot-using-cron/*
* https://www.raspberrypi.org/documentation/linux/usage/rc-local.md
* https://docs.python.org/2/library/logging.html#logging.Logger.debug
* https://docs.python.org/3.2/howto/logging.html
* http://www.webupd8.org/2014/09/gdrive-simple-google-drive-cli-client.html
* https://docs.python.org/3.2/library/subprocess.html

#### 09/09/15

* https://docs.python.org/3.2/library/threading.html#thread-objects

#### 12/09/15

* http://docs.python-requests.org/en/latest/user/quickstart/#more-complicated-post-requests
* http://blog.scphillips.com/posts/2013/07/getting-a-python-script-to-run-in-the-background-as-a-service-on-boot/

#### 24/09/15

* https://stackoverflow.com/questions/20478516/how-to-detect-when-networking-initialized-in-etc-init-d-script*

#### 28/09/15

* http://www.instructables.com/id/Raspberry-Pi-Bluetooth-InOut-Board-or-Whos-Hom/?ALLSTEPS
* https://github.com/karulis/pybluez
* https://stackoverflow.com/questions/21597536/pybluez-installation-in-linux

#### 29/09/15

* https://stackoverflow.com/questions/12229580/python-importing-a-sub-package-or-sub-module
* https://docs.python.org/3.2/reference/datamodel.html

#### 03/10/15

* https://www.pi-supply.com/bright-pi-v1-0-assembly-instructions/

#### 04/10/15

* https://www.pi-supply.com/bright-pi-v1-0-code-examples/
* http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/io-pins-raspbian/i2c-pins
* https://brightpi.codeplex.com/SourceControl/latest#test1.py

#### 05/10/15

* https://raspberrypi.stackexchange.com/questions/27073/firmware-3-18-x-breaks-i%C2%B2c-spi-audio-lirc-1-wire-e-g-dev-i2c-1-no-such-f
* http://pi.gadgetoid.com/pinout

#### Next Step

* https://learn.adafruit.com/shake-up-a-gift-box/circuit-diagram
* https://learn.adafruit.com/introducing-trinket
* https://learn.adafruit.com/trinket-bluetooth-alarm-system/overview

#### 22/03/16

* https://docs.python.org/3.2/library/logging.handlers.html
* https://docs.python.org/3.2/howto/logging.html

#### 31/03/16

* http://bohdan-danishevsky.blogspot.fr/2015/10/building-python-35-on-raspberry-pi-2.html
* https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=99980#p696458

#### 03/10/16

* https://raspberrypi.stackexchange.com/questions/27475/wifi-disconnects-after-period-of-time-on-raspberry-pi-doesnt-reconnect
* https://raspberrypi.stackexchange.com/questions/9257/whats-the-difference-between-wpa-roam-and-wpa-conf-in-the-etc-network-inte

#### 15/10/16

* http://www.developers.meethue.com/

## Documentation from door tag

#### 20/03/2016

* https://learn.adafruit.com/adafruits-raspberry-pi-lesson-12-sensing-movement/software
* http://pinout.xyz/pinout/pin16_gpio23
* https://docs.python.org/3.4/library/socket.html

#### 28/03/2016

* https://learn.adafruit.com/shake-up-a-gift-box/circuit-diagram
* http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/
* https://raspberrypi.stackexchange.com/questions/37241/vibration-sensor-what-i-am-doing-wrong
* https://sourceforge.net/p/raspberry-gpio-python/wiki/BasicUsage/
* https://sourceforge.net/p/raspberry-gpio-python/wiki/Inputs/

#### 31/03/16

* http://bohdan-danishevsky.blogspot.fr/2015/10/building-python-35-on-raspberry-pi-2.html

## Common documentation

#### 20/01/2017

* https://raspberrypi.stackexchange.com/questions/7341/raspberry-pi-and-scream-out-loud-110dba-fixed-tone-siren
* http://www.instructables.com/id/Controlling-Any-Device-Using-a-Raspberry-Pi-and-a-/?ALLSTEPS

#### 21/01/2017

* http://reactivex.io/documentation/operators.html
* https://github.com/ReactiveX/RxPY/tree/6beb2e2cbb108fdf924561f9431eb4aa610c6ad9/rx/linq/observable
* https://github.com/ReactiveX/RxPY/blob/develop/notebooks/Getting%20Started.ipynb

repository: rdubigny/home-alarm

repo_name: rdubigny/home-alarm


text:
# sawtooth-simplewallet
A simple sawtooth "simplewallet" transaction family example (processor + client)

# simplewallet

This is a minimal example of a sawtooth 1.0 application. This example demonstrates, a common usecase, where a customer deposits/withdraws money from an account, based on private key.

A customer can:
1. deposit money into his/her bank account.
2. withdraw money from his/her bank account.
3. check the balance in the account.

The customer is identified by a customer name and a corresponding public key. The value of the wallet, i.e. the balance, is stored at an address derived from hash of customer's public key and the transaction family namespace. To keep code simple, this example has been written for just one customer, one account.

# Components
The application is built in two parts:
1. The client application written in python, written in two parts: _client.py file representing the backend stuff and the _cli.py representing the frontend stuff. The example is built by using the setup.py file located in one directory level up.

2. The Transaction Processor is written in C++11 using c++-sawtooth-sdk. It comes with its CMake files for build.

# Usage

This example uses docker-compose and docker containers. If you do not have these installed please follow the instructions here: https://docs.docker.com/install/

NOTE
The preferred OS environment is Ubuntu 16.04.3 LTS x64.
If you have windows please install [Docker Toolbox for Windows](https://docs.docker.com/toolbox/toolbox_install_windows/) or [Docker for windows](https://docs.docker.com/docker-for-windows/), based on your OS version.

Start the pre-built docker containers in docker-compose.yaml file, located in sawtooth-simplewallet directory:
```bash
cd sawtooth-simplewallet
docker-compose up
```
At this point all the containers should be running.

To launch the client, you could do this:
```bash
docker exec -it simplewallet-client bash
```

You can locate the right docker client container name using `docker ps`.

Sample command usage:

```bash
sawtooth keygen jack #This creates the public/private keys, a pre-requisite for all commands following

simplewallet deposit 100 jack #This adds the 100 amount to Jack's state address

simplewallet withdraw 50 jack #Withdraws 50 units from Jack's state address

simplewallet balance jack #Displays the balance left in Jack's account
```

# Building containers
To build TP code of your preferred language and run the simplewallet example:

```bash
docker-compose -f simplewallet-build-tp-<your_prog_language>.yaml up --build
```
where,
 <your_prog_language> should be replaced with either `cxx` or `java`

# License
This example and Hyperledger Sawtooth software are licensed under the [Apache License Version 2.0](LICENSE) software license.

repository: lntdev/sawtooth-simplewallet

repo_name: lntdev/sawtooth-simplewallet


text:
---
title: Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
date: '2018-07-19T10:04:53+07:00'
description: API Reference Documentation
image: /img/nodejs.svg
---

About Docs

There are several types of documentation available on this website:

\    API reference documentation

\    ES6 features

\    Frequently asked questions

\    Guides

API Reference Documentation

The API reference documentation provides detailed information about a function or object in Node.js. This documentation indicates what arguments a method accepts, the return value of that method, and what errors may be related to that method. It also indicates which methods are available for different versions of Node.js.

This documentation describes the built-in modules provided by Node.js. It does not document modules provided by the community.

Looking for API docs of previous releases?

\    Node.js 9.x

\    Node.js 7.x

\    Node.js 6.x

\    Node.js 5.x

\    Node.js 4.x

\    Node.js 0.12.x

\    Node.js 0.10.x

\    all versions

ES6 Features

The ES6 section describes the three ES6 feature groups, and details which features are enabled by default in Node.js, alongside explanatory links. It also shows how to find which version of V8 shipped with a particular Node.js release.

Guides

Long-form, in-depth articles about Node.js technical features and capabilities.

repository: khanhney/one-click-hugo-cms

repo_name: khanhney/one-click-hugo-cms


text:
# AWS CloudWatch Logs Terraform Module #

This Terraform module deploys an AWS CloudWatch Log Stream and Group.

[![](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs/workflows/terraform/badge.svg)](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs/actions?query=workflow%3Aterraform)
[![](https://img.shields.io/github/license/cn-terraform/terraform-aws-cloudwatch-logs)](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs)
[![](https://img.shields.io/github/issues/cn-terraform/terraform-aws-cloudwatch-logs)](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs)
[![](https://img.shields.io/github/issues-closed/cn-terraform/terraform-aws-cloudwatch-logs)](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs)
[![](https://img.shields.io/github/languages/code-size/cn-terraform/terraform-aws-cloudwatch-logs)](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs)
[![](https://img.shields.io/github/repo-size/cn-terraform/terraform-aws-cloudwatch-logs)](https://github.com/cn-terraform/terraform-aws-cloudwatch-logs)

## Usage

Check valid versions on:
* Github Releases: <https://github.com/cn-terraform/terraform-aws-cloudwatch-logs/releases>
* Terraform Module Registry: <https://registry.terraform.io/modules/cn-terraform/cloudwatch-logs/aws>

## Install pre commit hooks.

Pleas run this command right after cloning the repository.

        pre-commit install

For that you may need to install the folowwing tools:
* [Pre-commit](https://pre-commit.com/)
* [Terraform Docs](https://terraform-docs.io/)
* [tfsec](https://tfsec.dev/)

In order to run all checks at any point run the following command:

        pre-commit run --all-files

## Requirements

| Name | Version |
|------|---------|
|  [terraform](#requirement\_terraform) | >= 0.13 |
|  [aws](#requirement\_aws) | >= 4 |

## Providers

| Name | Version |
|------|---------|
|  [aws](#provider\_aws) | 4.0.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_cloudwatch_log_group.log_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_cloudwatch_log_stream.log_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_stream) | resource |
| [aws_kms_key.encryption_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
|  [create\_kms\_key](#input\_create\_kms\_key) | If true a new KMS key will be created to encrypt the logs. Defaults true. If set to false a custom key can be used by setting the variable `log_group_kms_key_id` | `bool` | `false` | no |
|  [log\_group\_kms\_key\_id](#input\_log\_group\_kms\_key\_id) | The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested. | `string` | `null` | no |
|  [log\_group\_retention\_in\_days](#input\_log\_group\_retention\_in\_days) | (Optional) Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. Default to 30 days. | `number` | `30` | no |
|  [logs\_path](#input\_logs\_path) | Path of the logs in CloudWatch | `any` | n/a | yes |
|  [tags](#input\_tags) | Resource tags | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
|  [encryption\_key\_arn](#output\_encryption\_key\_arn) | The Amazon Resource Name (ARN) of the key. |
|  [encryption\_key\_id](#output\_encryption\_key\_id) | The globally unique identifier for the key. |
|  [log\_group\_arn](#output\_log\_group\_arn) | The Amazon Resource Name (ARN) specifying the log group. |
|  [log\_group\_name](#output\_log\_group\_name) | The name of the log group. |
|  [log\_group\_retention\_in\_days](#output\_log\_group\_retention\_in\_days) | Specifies the number of days log events are retained |
|  [log\_stream\_arn](#output\_log\_stream\_arn) | The Amazon Resource Name (ARN) specifying the log stream. |
|  [log\_stream\_log\_group\_name](#output\_log\_stream\_log\_group\_name) | The name of the log group under which the log stream was created |
|  [log\_stream\_name](#output\_log\_stream\_name) | The name of the log stream. |
|  [logs\_path](#output\_logs\_path) | Path of the logs in CloudWatch |

gha_language: HCL


text:
## Fig 1.
Strain test on knot to give stress-strain curve.

## Fig 2.
Cycling strain test and the structure and energy analysis before and after reversible drop - phase transition.

## Fig 3.
Atomic temperature and Heat flux  of loose and tight knot and same-length graphene in NEMD simulation.

## Fig 4.
Participation ratio and power spectra of structures in Fig 3.

## Fig 5.
Transmission spectra of the structures, the tranmission of knot is expected to be much small. Real space transmit path.

## Fig 6.
Melting curve which can be used to classify glass and crystal.  This is to clearify the knot is like bulk graphene or amorphous.


text:
# YouTube

## Basic Usage

```js
const youtube = require('play-dl');
// ES6: import youtube from 'play-dl';
const options = {
    limit : 1
}
const results = await youtube.search('post malone sunflower', options);
```

## Validate

### yt_validate(url : `string`)
*This will validate url and return type or boolean*

**Returns :** `video` | `playlist` | `false`
```js
let check = yt_validate(url)

if(!check) // Invalid URL

if(check === "video") //URL is video url

if(check === "playlist") //URL is a playlist url
```

## Extract ID

### extractID(url : `string`)
*This will return videoID or playlistID from a url*

**Note :** URL like [this](https://www.youtube.com/watch?v=E2gHczUOCGI&list=PLUt3leKZfbZqLzLwcQMYPBdbe7i7KRCOP&index=2) will return a playlist ID only.

```js
let id = extractID(url)
```

## Stream

### stream(url : `string`, cookie? : `string`)
*This is basic to create a youtube stream from a url or videoID.*

**[Cookies](https://github.com/play-dl/play-dl/discussions/34) are optional and are required for playing age restricted videos.**

```js
 let source = await stream("url") // This will create a stream Class which contains type and stream to be played.
 let resource = createAudioResource(source.stream, {
            inputType : source.type
        }) // This creates resource for playing
```

### stream_from_info(info : `infoData`, cookie? : `string`)
*This is basic to create a youtube stream from a info [ from [video_info](https://github.com/play-dl/play-dl#video_infourl--string) function ].*

**[Cookies](https://github.com/play-dl/play-dl/discussions/34) are optional and are required for playing age restricted videos.**

**Note :** Here, cookies are required only for retrying purposes.
```js
let info = await video_info("url")
 let source = await stream_from_info(info) // This will create a stream Class which contains type and stream to be played.
 /* OR
  let source = await stream_from_info(info, cookie) This will create a stream Class which contains type and stream to be played and also give cookies if retrying.
 */
 let resource = createAudioResource(source.stream, {
            inputType : source.type
        }) // This creates resource for playing
```

## Search

### search(url : `string`, options? : [SearchOptions](https://github.com/play-dl/play-dl/tree/main/play-dl/YouTube#searchoptions))

*This enables all searching mechanism (video, channel, playlist)*

```js
const options = {
    limit : 1
}
const results = await youtube.search('never gonna give you up', options);
console.log(results[0].url);
```

- #### SearchOptions
  - *type* : `video` | `channel` | `playlist`
  - *limit* : `integer`

## Video

### video_basic_info(url : `string`, cookie? : `string`)
*The basic video details `play-dl` fetches at first from url or videoID.*

**[Cookies](https://github.com/play-dl/play-dl/discussions/34) are optional and are required for playing age restricted videos.**

```js
const video = await video_basic_info(url)
```
### video_info(url : `string`, cookie? : `string`)
*This contains everything with deciphered formats along with `video_details`. It can fetech data from url or videoID.*

**[Cookies](https://github.com/play-dl/play-dl/discussions/34) are optional and are required for playing age restricted videos.**

```js
const video = await video_info(url)
```
- #### format `property`
  *This returns all the formats available for a video.*

  ```js
  const video = await video_info(url)
  console.log(video.format)
  ```

## Playlist

### playlist_info(url : `string`, parseIncomplete : `boolean`)
*This fetches all details about a playlist from a url or playlistID.*

**parseIncomplete** is optional parameter if you want to parse playlist with hidden videos.
```js
const playlist = await playlist_info(url)
//This only fetches first 100 videos from a playlist

const playlist = await playlist_info(url, true)
//This only fetches first 100 videos from a playlist and also parses playlist with hidden videos
```

- #### fetch() `method`
  *This fetches and returns all videos from the whole provided playlist .*

  ```js
  const playlist = await playlist_info(url)
  //This only fetches first 100 videos from a playlist

  await playlist.fetch()
  // This one fetches all videos from a playlist.
  ```

- #### page(page_number : `number`)

  *This returns no. of videos from a page.*

  > Every 100 videos have been divided into pages.
  > Example: There are 782 videos in a playlist, so there will be 8 pages.

  ```js
  const playlist = await playlist_info(url);
  // This only fetches first 100 videos from a playlist.

  await playlist.fetch();
  // This one fetches all videos from a playlist.

  console.log(playlist.page(1));
  // This displays first 100 videos of a playlist

- #### total_pages `property`
  *This returns total no. of pages that have been fetched so far.*

  ```js
  const playlist = await playlist_info(url)
  //This only fetches first 100 videos from a playlist.

  await playlist.fetch()
  // This one fetches all videos from a playlist.

  console.log(playlist.total_pages)
  // This displays total no. of pages fetched so far.

  for(let i = 1; i <= playlist.total_pages; i++){
      queue.push(...playlist.page(i))
  } // This will push every video in that playlist to your queue
  ```

- #### total_videos `property`
  *This returns total no. of videos that have been fetched so far.*

  ```js
  const playlist = await playlist_info(url)
  //This only fetches first 100 videos from a playlist.

  await playlist.fetch()
  // This one fetches all videos from a playlist.

  console.log(playlist.total_videos)
  // This displays total no. of videos fetched so far.
  ```

- #### videoCount `property`

  *This returns total no. of videos in the provided playlist.*

  ```js
  const playlist = await playlist_info(url)
  //This only fetches first 100 videos from a playlist.

  await playlist.fetch()
  // This one fetches all videos from a playlist.

  console.log(playlist.videoCount)
  // This displays total no. of videos in a playlist.
  ```

repository: KagChi/play-dl

repo_name: KagChi/play-dl


text:
# Contributing

Contributions are always welcome! Be sure to follow the [github workflow](https://guides.github.com/introduction/flow/) when contributing to this project:

* Create an issue, or comment on an issue to indicate what you are working on. This avoids work duplication.
* Fork the repository and clone to your local machine
* You should already be on the default branch `master` - if not, check it out (`git checkout master`)
* Create a new branch for your feature/fix `git checkout -b my-new-feature`)
* Write your feature/fix
* Stage the changed files for a commit (`git add .`)
* Commit your files with a *useful* commit message ([example](https://github.com/Azure/azure-quickstart-templates/commit/53699fed9983d4adead63d9182566dec4b8430d4)) (`git commit`)
* Push your new branch to your GitHub Fork (`git push origin my-new-feature`)
* Visit this repository in GitHub and create a Pull Request.

# Running the Tests

You'll want to make sure you add new tests for any new features you contribute and that you don't break any existing tests.

Tests are written in the [`./test`](./test) folder. You'll need to be working on a modern Windows operating system for developing
code in this module.

After you've forked and clone the repo execute the following to start the tests:

```
npm install
npm install grunt-cli -g
grunt ci
```

repository: sedouard/azure-functions-node

repo_name: sedouard/azure-functions-node


text:
# mvc-application-net-core-2.0-final-project
Final project for the Microsoft course "MVC Application Design using .NET Core 2.0"

### Requirements

- This web application is for product management
- A product must have an ID, name, type and price
- Users can add, remove, list, and update products
- Users can filter products by type and price range
- Users can add, remove, list, and update product types
- Users can't remove product types if this type has any product


text:
---
uid: ReadCharacteristics
---

# Read characteristics

When data is requested at an index for which no stored event exists, the read characteristics determine whether the result is an error, no event, interpolated event, or extrapolated event. The combination of the type of the index and the interpolation and extrapolation modes of the SdsType and the SdsStream determine the read characteristics.

## Interpolation

Interpolation determines how a stream behaves when asked to return an event at an index between two existing events. `InterpolationMode` determines how the returned event is constructed. The following table lists interpolation modes.

|Interpolation Mode                       |Enumeration value |Operation |
|---------------------------|------------------|----------|
|Default                    |0                 |The default InterpolationMode is Continuous. |
|Continuous                 |0                 |Interpolates the data using previous and next index values. |
|StepwiseContinuousLeading  |1                 |Returns the data from the previous index.  |
|StepwiseContinuousTrailing |2                 |Returns the data from the next index. |
|Discrete                   |3                 |Returns `null`. |
|ContinuousNullableLeading  |4                 |Returns interpolated data or data from the previous index if either of the surrounding indexes has a null value|
|ContinuousNullableTrailing |5                 |Returns interpolated data or data from the trailing index if either of the surrounding indexes has a null value|

**Note:** `Continuous` mode cannot return events for values that cannot be interpolated, such as when the type is not numeric.

The following table describes how the `Continuous` interpolation mode affects indexes that occur between data in a stream.

### InterpolationMode = Continuous or Default

| Type                      | Result for an index between data in a stream  | Comment |
|---------------------------|-----------------------------------------------|---------|
| Numeric Types             | Interpolated1                   | Rounding is done as needed for integer types. |
| Time related Types        | Interpolated                    | DateTime, DateTimeOffset, TimeSpan |
| Nullable Types            | Interpolated2                   | Limited support for nullable numeric types. |
| Array and List Types      | No event is returned            |         |
| String Type               | No event is returned            |         |
| Boolean Type              | Returns value of nearest index  |         |
| Enumeration Types         | Returns Enum value at 0         | This may have a value for the enumeration. |
| GUID                      | No event is returned            |         |
| Version                   | No event is returned            |         |
| IDictionary or IEnumerable | No event is returned            | Dictionary, Array, List, and so on. |
| Empty Type		         | Not supported                   | |
| Object Type 	             | Not supported                   	| |

1 When extreme values are involved in an interpolation (for example, `Decimal.MaxValue`) the call might result in a `BadRequest` exception.

2 For the Continuous interpolation mode, nullable types are interpolated in the same manner as their non-nullable equivalents as long as the values surrounding the requested interpolation index are non-null. If either of the values are null, the interpolated value will be null.

If the `InterpolationMode` is not assigned, the events are interpolated in the default manner, unless the interpolation mode is overridden in the `SdsTypeProperty` or the `SdsStream`. For more information on overriding the interpolation mode on a specific type property, see [SdsTypeProperty](xref:sdsTypes#sdstypeproperty). For more information on overriding the interpolation mode for a specific stream, see [Streams](xref:sdsStreams).

## Extrapolation

Extrapolation defines how a stream responds to requests with indexes that precede or follow all data in the steam. `ExtrapolationMode` acts as a master switch to determine whether extrapolation occurs and at which end of the data.

`ExtrapolationMode` works with the `InterpolationMode` to determine how a stream responds. The following tables show how `ExtrapolationMode` affects returned values for each `InterpolationMode` value.

If the `ExtrapolationMode` is not assigned, the events are extrapolated in the default manner, unless the extrapolation mode is overridden on the `SdsStream`. For more information on overriding the extrapolation mode on a specific stream, see [Streams](xref:sdsStreams).

### ExtrapolationMode with InterpolationMode = Default (or Continuous), StepwiseContinuousLeading and StepwiseContinuousTrailing

| ExtrapolationMode   | Enumeration value   | Index before data          | Index after data          |
|---------------------|---------------------|----------------------------|---------------------------|
| All                 | 0                   | Returns first data value   | Returns last data value.  |
| None                | 1                   | No event is returned       | No event is returned.     |
| Forward             | 2                   | No event is returned       | Returns last data value.  |
| Backward            | 3                   | Returns first data value   | No event is returned.     |

### ExtrapolationMode with InterpolationMode = Discrete

| ExtrapolationMode   | Enumeration value   | Index before data    | Index after data     |
|---------------------|---------------------|----------------------|----------------------|
| All                 | 0                   | No event is returned.| No event is returned.|
| None                | 1                   | No event is returned.| No event is returned.|
| Forward             | 2                   | No event is returned.| No event is returned.|
| Backward            | 3                   | No event is returned.| No event is returned.|

For additional information about the effect of read characteristics for the available read methods, see [Read data API](xref:sdsReadingDataApi).

repository: osisoft/Edge-Data-Store-Docs

repo_name: osisoft/Edge-Data-Store-Docs


text:
Artifact

Artifact is a single page website with Java + Spring Boot on backend, Node.js + Vue.js on frontend and PostgreSQL as a DB. Both sides of project connected via Websocket + SockJs with hot reload. Authentication is possible with OAuth2 via Google and manual with JWT token with CORS and CSRF security.

## Technology stack
Component         | Technology
---               | ---
Frontend          | [Vue.js 2](https://github.com/vuejs/vue)
Backend (REST)    | [SpringBoot](https://projects.spring.io/spring-boot) (Java)
Security          | Token Based (Spring Security, [JJWT](https://github.com/auth0/java-jwt), CSRF)
Client Build Tools| [vue-cli](https://github.com/vuejs/vue-cli), [yarn](https://github.com/yarnpkg/yarn)
Server Build Tools| Gradle

## Installation
#### Import project (_Intellij IDEA_)

1. `File` -> `New` -> `Project From Existing Source` -> select directory 'backend' in the project;
2. `CTRL + SHIFT + ALT + S` -> ` Modules` -> `+` -> ` Import Module` -> `Choose frontend directory and 'Create module from existing sources'`;

### Backend start

First you need to create db with name "artifact" in postgreSQL. Login, password and path to db are in properties file.

`gradle Build` : go to root dir with  `build.gradle` and run:

```sbtshell
gradle bootRun
```
or just run `ArtifactApplication.java`.

_Application will start on [http://localhost:8091](http://localhost:8091)._

### Frontend start

Go to root dir of `frontend` (must include `package.json`)

In terminal run:

```npm
yarn install

yarn serve
```
_Application will start on  [http://localhost:8080](http://localhost:8080)._

#### User accounts:
```
Admin - admin:password
User - user:password
```

repository: adultyoung/Artifact

repo_name: adultyoung/Artifact


text:
pyift
=====

The barebone of Image Foresting Transform

## TODO
- Create a demo folder and make the relative import work.
- Work to remove the maxium element of the heap.
- Read and write PGM and PPM images.
- Advanced Adjacency Relations.

## Requirements

Python 2.*

## Usage

For now, just run as an example:
``
python edt.py
``

repository: josemvaldivia/PyIFT

repo_name: josemvaldivia/PyIFT


text:
---
layout: post
title: "Fade"
excerpt: "This was my first project on the General Assembly Web Development Immersive Course. The assignment for this project was to create a game."
categories: articles
author: Josceline O'Sullivan
comments: true
share: true
modified: 2017-06-01T14:18:57-04:00
image:
  feature: Fade.png
site: "https://fade-game.herokuapp.com/"
---

HTML - CSS - JavaScript - JQuery

For a long time I have been interested in how people's emotions can be influenced by the things they interact with. With this in mind I wanted to create a game which was absorbing whilst also being visually calming.

Fade was a game which tested peoples ability to temporarily store information and adapt it dependent on new information given to them. Visually a colour faded onto the full screen and faded out leaving spots in that colour and others. The aim was for the user to click only on the colour they had just been shown. As a first project it was exciting to be able to explore what I could achieve with the early knowledge I had gained.


text:
# YAML format documentation

## Sections of "Jenkinsfile.yaml"

0. agent
0. configuration
0. environment
0. steps
0. stages
0. post

## agent
Agent in "Jenkinsfile.yaml" will be defined differently. We have below properties in agent

0. label
0. customWorkspace
0. dockerImage
0. alwaysPull
0. args
0. dockerfile
0. dir
0. reuseNode
0. tools

All parameters are same as
[Declarative pipeline agent](https://jenkins.io/doc/book/pipeline/syntax/#agent) and here we have
one new parameters "dockerImage" and one parameter with different meaning "dockerfile". Also
the function of "additionalBuildArgs" dockerfile agent type is served by "args" parameter only.

[See agent examples](AgentExamples.md)

Note:
1. dockerImage and dockerfile cannot be used simultaneously (obviously).
2. If you provide any extra parameter which will is not required like "reuseNode" without
"dockerImage" or "dockerfile" parameter then it will have no effect.

## configuration
This section has only two properties for now. They are:
0. **pushPrOnSuccess**:
    * **Type**: Boolean
    * **Description**: This is a boolean property with default value false. On true the plugin
will push the changes to the target branch if the build is success and all tests
passes else not. On the other hand on a false value no changes will not be pushed no matter what
is the build result or all tests passes or not.

0. **prApprovers**:
    * **Type**: list of string
    * **Description**: This is a list of username of trusted approvers. If a user from this list approves
a PR then only a build will be started else not. This function is not implemented yet.

0. **reports**:
    * **Type**: list of string
    * **Description**: List of location path can be specified here in the [Ant glob syntax](http://ant.apache.org/manual/Types/fileset.html).
                       All these reports will be published at the end of build.
    * **Example** : "\*\*/build/test-reports/\*.xml"

0. **findbugs**:
    * **Type**: String
    * **Description**: Location of findbugs reports can be specified here in the
                       [Ant glob syntax](http://ant.apache.org/manual/Types/fileset.html).
                       These report(s) will be published at the end of build.

0. **artifactPublishingConfig**:
    * **Description**: This is a configuration section to publish / upload artifacts to a server. Following properties can
                       be configured:

                       0. **host :** Host address to which artifacts needs to be uploaded.
                       0. **user :** username of the host machine.
                       0. **credentialId :** Credential Id of the credential having a secrete file or text that is needed
                       to communicate with remote server.
    * **Example** :

        ```yaml
        artifactPublishingConfig:
            host: <IP_ADDRESS>
            user: user53
            credentialId: SecretFileCredentialId
        ```

    * **Note** : To indicate artifacts to be uploaded [publishArtifacts](#publishartifacts) is used.

0. **publishArtifacts**:
    * **Type**: List of HashMap with keys "*form*" and "*to*"
    * **Description**: This section enables us to specify which artifact needs to be uploaded where.
    * **Example** :

        ```yaml
        publishArtifacts:
            - from: location_artifact
              to: ~/upload_path_on_server

            - from: Jenkinsfile.yaml
              to: ~/archives
        ```

0. **archiveArtifacts**:
    * **Type**: List of string
    * **Description**: This section enables us to provide a list of location of path in
                       [Ant glob syntax](http://ant.apache.org/manual/Types/fileset.html) to archive them.
    * **Example** :

        ```yaml
        archiveArtifacts:
            - path_of_artifact_1
            - path_of_artifact_2
        ```

0. **sections**:
    * **Type**: List of new sections implemented by different plugins.
    * **Description**: This plugin gives options to implement new sections for configuration to other
                        developers as extensions. All the new sections which will be implemented
                        by other plugins can be defined here.
    * **Example** :

        ```yaml
        configuration:
          sections:
            - name: foo
              data:
                field1: hello
                field2: world
        ```

        Let's say foo is a new section implemented by some plugin having data as a hashmap.

[See configuration examples](ConfigurationExample.md)

## environment
This section has two properties:
1. **variables :** Any environment variable that user wants to use in his/her scripts can be
defined here and it will be available to all the scripts at the time of build.

2. **credentials :** Any credentials (already configured in Jenkins instance) can be used in
all user scripts by **credentials** property.

[See environment example for more details](EnvironmentExample.md)

## stages
This section is used to declare multiple stages for the pipeline. For now this section
supports below properties.

0. **name :** This will be shown in pipeline dashboard as the name of stage.
0. **agent :** Separate agent can be defined for a stage. Rules to define stage level agent
are same as [Declarative pipeline stage level agent](https://jenkins.io/doc/book/pipeline/syntax/#stage-level-agent-section).
0. **steps :** This enables us to write Jenkins supported steps. [See SimpleStageExample example for more details](SimpleStageExample.md)
for information to how to define steps in "Jenkinsfile.yaml"
0. **post :** [Same as post](#post)

## steps
If only a single stage is needs to be defined for a build the **steps** property can be used.
A list of Jenkins supported steps needs to be defined in this section.

'Build' will be displayed as the name of this stage in the pipeline UI.

[See SimpleStageExample example for more details](SimpleStageExample.md)

## post
This section enables us to run some steps according to the result the whole build or a stage depending
upon the location of the post section. This section supports all the conditions with same meaning
like [here](https://jenkins.io/doc/book/pipeline/syntax/#post-conditions).

#### Syntax
post:
  <condition1>:
    - list of steps
  <condition1>:
    - list of steps

#### Example of post
```yaml
post:
  failure:
    - echo: "Build or stage is failed."
  success:
    - echo: "Build or stage was success."
  always:
    - echo: "I will run always."
```