text:
# WSO2 B2B Organization Samples

## ⚠ Read this first

1. The root of the sample-is repository  will be referred to as `<SAMPLE_IS_HOME>` throughout this document.
2. Required versions
 ```
 Node version >= v16.16.0
 ```
 ```
 NPM version >= 8.11.0
 ```

## 1. Story

## Guardio Insurance

**Guardio** is an auto insurance service company that has many employees who use different credentials to sign in to
different internal organizational applications.

**Guardio-Business-App** and **Guardio-Admin-App** are two such applicaitons.

### Guardio-Business-App

**Guardio-Business-App** is the application that provides insurance and claims settlement capabilities for other
businesses, so that those businesses can use the software for internal requirements.

Organization **Best Car Mart** business staff needs to allow corporate users of their organization to log
into the **Guardio-Business-App** application using their corporate SSO system, to get used to the above-mentioned
capabilities
To do that, they will configure the **Guardio-Business-App** application to leverage their corporate
IdP for authentication. This will be setup through the **Guardio-Admin-App**.

### Guardio-Admin-App

**Guardio-Admin-App** is the application that provides capabilities to manage users, create roles, assign roles and
setup an identity provider for the **Guardio-Business-App**.

## 2. Setting up

### Step 1: Create an organization
Create a sub-organization named **Best Car Mart**.

### Step 2: Create applications
Now we need **two** applications to communicate with the **Guardio-Business-App** and the ****Guardio-Admin-App****.

- Create two applications named **Guardio-Business-App** and **Guardio-Admin-App** [This should be a management application].
- Click **Share Application** button, select the suborganizations with which you want to share the application, and proceed. Select **Share with all sub-organizations**, if you want to share your application with all existing suborganizations and every sub-organization that will be created later.

#### Step 2.1: In the Guardio-Business-App

>| Property                    |                                    Value/s                                     |
>|--------------------------|:------------------------------------------------------------------------------:|
>| Allowed Grant types      |            `Code`             |
>| Authorized redirect URLs |  `http://localhost:3000/api/auth/callback/wso2is` and `http://localhost:3000`  |
>| Allowed origin           |            `http://localhost:3000 `             |

Also, On the User Attributes tab, click on + Add User Attributes.
Select `Email`, `First Name`, `Last Name`, and `Username` from the list of attributes.

#### Step 2.2: In the Guardio-Admin-App
>| Property                    |                                   Value/s                                    |
>|--------------------------|:----------------------------------------------------------------------------:|
>| Allowed Grant types      |                           `Organization Switch`, `Code`            |
>| Authorized redirect URLs | `http://localhost:3001/api/auth/callback/wso2isAdmin` and `http://localhost:3001` |
>| Allowed origin           |                           `http://localhost:3001`                            |

### Step 3: Create a user and assign roles
You need to create new users on the sub-organizations with the required permissions.

To create a user for Best Auto Mart with permissions to create an IdP for the **Guardio-Business-App**:

* Use the Organization Switcher to change the organization to Best Auto Mart.
* Create a user named Alex on the Best Auto Mart organization.
* Create an admin role with all permissions.
* Assign Alex to this newly created Role.

### Step 4: Setup the `config.json` file
```yaml
{
  "CommonConfig": {
    "AuthorizationConfig": {
      "BaseOrganizationUrl": "<PARENT ORGANIZATION URL> ex: https://dev.api.asgardeo.io/t/guardio"
    },
    "ApplicationConfig": {
      "SampleOrganization": [
        {
          "id": "<SUB ORGANIZATION ID>",
          "name": "<SUB ORGANIZATION NAME>"
        }
      ]
    }
  },
  "BusinessAppConfig": {
    "AuthorizationConfig": {
      "ClientId": "<CLIENT ID OF THE BUSINESS APP>",
      "ClientSecret": "<CLIENT SECRET OF THE BUSINESS APP>"
    },
    "ApplicationConfig": {
      "HostedUrl": "http://localhost:3000",
      "APIScopes": [
        "openid",
        "email",
        "profile",
        "internal_login",...
      ],
      "Branding": {
        "name": "Guardio Insurance",
        "tag": "Anytime . Anywhere"
      }
    },
    "ManagementAPIConfig": {
      "SharedApplicationName": "Guardio-Business-App",
      "UserStore" : "DEFAULT"
    }
  },
  "BusinessAdminAppConfig": {
    "AuthorizationConfig": {
      "ClientId": "<CLIENT ID OF THE BUSINESS ADMIN APP>",
      "ClientSecret": "<CLIENT SECRET OF THE BUSINESS ADMIN APP>"
    },
    "ApplicationConfig": {
      "HostedUrl": "http://localhost:3001",
      "APIScopes": [
        "openid",
        "email",
        "profile",
        "internal_login", ...
      ],
      "Branding": {
        "name": "Guardio Insurance - Administrator Application",
        "tag": "Administrator Application"
      }
    }
  }
}
```
setup the config json file as mentioned above.

### Step 5: Additional settings

* If the federated organization id is returned in the idToken (in user_organization variable) when a user is logging
* into an organization, remove the `CommonConfig.ApplicationConfig.SampleOrganization` section from the <i>config.json</i> file.

### Step 5: Run the Guardio-Admin-App

* First, run the development server for the **Guardio-Admin-App**

```bash
 # From `<SAMPE_IS_HOME>/b2b-sample`
 npm install
 nx serve business-admin-app
```
> **_NOTE:_** If `nx serve business-admin-app` produces an error, try using `npx nx serve business-admin-app`.

* Open [http://localhost:3001](http://localhost:3001) with your browser to see the result.
* Login from the created user `Alex` to the application.
    * Type `Best Car Mart` when pop up to type the organization.

### Step 6: Setup the identity provider for the Guardio-Business-App

* For this we will create an external identity provider in Asgardeo. After creating an identity provider in Asgardeo.

* Also, On the User Attributes tab, click on + Add User Attributes.
    * Select `Email`, `First Name`, `Last Name`, and `Username` from the list of attributes.

* Go to the identity providers section in the **Guardio-Admin-App** and fill in the form to create an identity provider for the
  **Guardio-Business-App**.

* After creating the Idp add it to the login flow by clicking on `Add to Login Flow`.

### Step 7: Create a corporate user
* You need to create a new corporate user to access the **Guardio-Business-App**.

* To create a corporate user for Best Auto Mart organization go to the Asgardeo console where you set up the corporate IDP
  and create a user named `John`.

### Step 8: Run the Guardio-Business-App

* First, run the development server for the **Guardio-Business-App**.

* Open a separate terminal and run
```bash
 # From `<SAMPE_IS_HOME>/b2b-sample`
 nx serve business-app
```
> **_NOTE:_** If `nx serve business-admin-app` produces an error, try using `npx nx serve business-admin-app`.

* Open a **private browser** and type [http://localhost:3000](http://localhost:3000) with your browser to see the result.
* Login from the created user `John` to the application.
    * Type `Best Car Mart` when pop up to type the organization.

---

#### Documentations

* [Documentation for setting this sample application in a PCC environment](https://ciamcloud.docs.wso2.com/en/latest/guides/organization-login/try-organization-login/)
* [Documentation for setting this sample application in an Asgardeo environment](https://ciamcloud.docs.wso2.com/en/latest/guides/organization-login/try-organization-login/)

---
## When creating a new library

> After creating a new library in the project (using nx). Please make sure to append `@b2bsample/` before the relevant
> path key in the `tsconfig.base.json`.


text:
# Local Development Cheat Sheet

Quick and simple instructions without all the extra details.

## Create, Build, and Run a New Project

01. Create a [BodilessJS](https://github.com/johnsonandjohnson/Bodiless-JS ':target=_blank')
    [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo ':target=_blank') on
    GitHub.
01. Clone the fork on a local sandbox.
    ```shell
    git clone [fork-url]
    ```
01. Run npm install.
    ```shell
    npm install
    ```
    - This will run the dependency installation and build the packages.
01. Run your site build.
    - This will depend on which site you plan to develop with.
      - For example, if you want to work on `sites/vital-demo`, run:
        ```shell
        npm run build -- --filter=@sites/vital-demo
        ```

## Start Edit Environment

01. Start your site's npm dev script.
    - Open a terminal and execute:
      ```shell
      cd sites/vital-demo && npm run dev
      ```
01. Start the build watch for specific packages.
    - Open another terminal and, from the project root, run:
      ```shell
      npm run build:watch -- --filter='@bodiless/vital-templates' --filter='@bodiless/vital-[foo]' --filter='@bodiless/vital-[bar]'
      ```
01. Open your edit/dev site in a browser:
    - <http://localhost:8000/>

## Start Static/Product Environment

01. Run your site's npm start script.
    ```shell
    cd sites/your-site && npm run start
    ```
01. Open your static site in a browser:
    - <http://localhost:9000/>

repository: johnsonandjohnson/Bodiless-JS

branch_name: refs/heads/main

extension: md

gha_language: TypeScript

license_type: permissive

repo_name: johnsonandjohnson/Bodiless-JS


text:
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![NSF-1928366](https://img.shields.io/badge/NSF-1928366-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1928366)

# Neotoma Recommender

Project to create a pipeline that uses Graph Recommendation Systems to recommend whether Throughput Article is of interest to the Neotoma Database.

Using Graph Databases and a Data Science approach, identify whether a paper is suitable for Neotoma and detect interesting features such as 'number of commits', 'last updates', 'number of linked repos' and 'linked databases'.

Baseline Model will be a Recommender System in unstructured Graph Databases and data will also tried to be structured to create a Recommendre System using Python.

## Contributors

This project is an open project, and contributions are welcome from any individual.  All contributors to this project are bound by a [code of conduct](CODE_OF_CONDUCT.md).  Please review and follow this code of conduct as part of your contribution.

  * [Simon Goring](http://www.goring.org/) [![orcid](https://img.shields.io/badge/orcid-0000--0002--2700--4605-brightgreen.svg)](https://orcid.org/0000-0002-2700-4605)
  * [Socorro Dominguez Vidana](https://sedv8808.github.io/) [![orcid](https://img.shields.io/badge/orcid-0000--0002--7926--4935-brightgreen.svg)](https://orcid.org/0000-0002-7926-4935)

### Tips for Contributing

Issues and bug reports are always welcome.  Code clean-up, and feature additions can be done either through branches.

All products of the Throughput Annotation Project are licensed under an [MIT License](LICENSE) unless otherwise noted.

## How to use this repository

Files and directory structure in the repository are as follows:
This structure might be modified as the project progresses.

```bash
throughput-ec/neotoma_recommender/
├── data
│   ├── input                       # input data
│   │     ├── throughput neo4j db   # data: paleoecology db - dummy file for reproducibility
│   │     └── neotoma_db            # data: bibliography json dummy file for reproducibility
│   ├── output                      # output file
│   │     └── predictions.csv   # file to describe whether an article belongs to neotoma or not
├── img                        # all images or docs for explaining processes
├── reports
│   ├── milestones
│   └── supporting documents
├── src
│   ├── preprocessing
│   │     └── data_preprocessing.py    # script to clean data
│   ├── train                          # scripts for helping functions and training model
│   │     ├── utils.py
│   │     └── train.py
│   └──  predict                 # prediction scripts to validate test data and to try in new data
│   │     └── predict.py
├── .gitignore
├── config_sample.py             # file for credentials
├── CODE_OF_CONDUCT.md
├── LICENSE
└── README.md
```

### Workflow Overview

This project uses the Throughput Graph Database as an input from neo4j:
* `neotoma:` tsv file

These files are used as input that will help create a Recommender System.
* Predict whether an article is suitable for Neotoma.
* Create nodes in Throughput graph / Create a Graph for Neotoma Files
* Benefit from operations using Graph Databases.

### System Requirements

This project is developed using Python and Neo4j.
This project will need Neo4j installed.
It runs on a MacOS system.
Continuous integration uses TravisCI.

### Data Requirements

The project pulls data from the Throughput database.

### Key Outputs

This project will generate a structured dataset that provides the following information:
* Whether the paper is useful for Neotoma based on its characteristics or not.

## Pipeline
TODO:
\n
\n

[include workflow chart]

### Instructions

For now, only the notebook is available.
There will be scripts shortly.

license: MIT

repository: throughput-ec/NeotomaRecommender

repo_name: throughput-ec/NeotomaRecommender


text:
# Manilkara kauki (L.) Dubard SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Ann. Mus. Colon. Marseille sér. 3, 3:9. 1915

#### Original name
Mimusops kauki L.

### Remarks
null

repository: mdoering/backbone

branch_name: refs/heads/master

repo_name: mdoering/backbone


text:
# _Food Delivery Service Manager_
-------------------

![alt text](/img/homepage.png)

#### _Using Ruby on Rails basic framework and seeds to build a food production web application, 11.17.2017_

#### By _Michael A. Brooks_

## Description

_A Website for Mario's Food Production company for products to be posted, edited and updated with user reviews._

## Specs

#### Products

* Site needs to include a products section with a list of the tasty products that Mario sells. Each product should be clickable with a detail view.

* Site admins should be able to add, update and delete new products. (Don't worry about user authentication; assume everyone who visits the site is an admin for now).
Users should be able to click an individual product to see its detail page. (You will not be expected to show the product's average rating; that's included in the further exploration section.)
Users should be able to add a review to a product.

#### Scopes

* Site should use scopes to display the following information on the site:

* The product with the most reviews.
The three most recently added products.
All products made in the USA for buyers that want to buy local products.

#### Validations

* Site should include validations for the following:

* All fields should be filled out, including rating.
Rating can only be an integer between 1 and 5.
The review's content_body must be between 50 and 250 characters.

#### Seeding

* Project should include seed data for 50 products and 250 reviews. Use Faker with a loop to seed the database.

## Setup/Installation Requirements

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Open terminal on your computer,
Navigate to the folder you would like to clone the project into and run:

`git clone https://github.com/MikeAlphaBravo/Speciality_Foods`

`cd Speciality_Foods`

`bundle install`

`rails db:create db:test:prepare`

`rails server`

Open a tab in your browser and navigate to `localhost:3000` You should be taken to the Home Page of Mario's Product web application and can log in at the top right.

## User experience screenshots:

![alt text](/img/productlist.png)

![alt text](/img/productdescription.png)

![alt text](/img/newproduct.png)

![alt text](/img/signin.png)

## Known Bugs

_Currently testing for bugs and running different user scenarios, please submit or contact us if you find any._

## Support and contact details

_Updates or suggestions please contact any of our contributors or make a contribution yourself._

## Built With

* [Ruby](https://www.ruby-lang.org/en/)
* [Rails](http://rubyonrails.org/)
* [JavaScript ES6](https://www.javascript.com/) - Script language
* [Atom](https://atom.io/) - Text editor
* HTML6 & CSS - Browser implementation and styling

### License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
Copyright (c) 2017 Michael A. Brooks


text:
### Navigation

-   [GetErDone](index.html#document-index) »

GetErDone¶
=========================================================================================

**GetErDone** is a technical exercise designed to demonstrate use cases for authorization and authentication workflows of network based applications using OAuth2 and OpenID_Connect.

This free demo site is hosted on AWS and uses third party authentication services provided by Auth0.

The project is broken into three main applications, each making use of a specific implementation method to demonstrate the different authentication and authorization key flows. Together these applications form a suite of tools that allow managers to create tasks, assigning them to users, and also allowing users to view their own assigned tasks, create their own tasks, and mark their tasks completed.

For the purposes of this demonstration site, access to the applications and API is based on a users ‘title’, which is set based on the email address that the user registers with. To create a user with the ‘manager’ title, use an email address where the username is split with the plus (‘+’) sign, and the word to the right of the ‘+’ includes the word ‘manager’. So the user<EMAIL_ADDRESS>would have the title ‘user’, and the user<EMAIL_ADDRESS>would have the title ‘manager’.

In either case, you should get an email from a user techex-epoxyloaf-com including instructions (click one link) on how to complete the registration process, before the free account can be accessed.

GetErDone SPA¶
-------------------------------------------------------------------------------------------------

**GetErDone-SPA** is a JavaScript based single page application that allows authenticated users to interact with a list of assigned tasks. These tasks may be assigned by the GetErDone-WebApp or created on their own. Once a user has completed a task, they may mark it done in the application.

In order to use this application for the first time, you will need to create a user. To create a new user, use the ‘Sign Up’ tab on the login screen, and enter an email address. To create multiple accounts, enter an email address where the username is split with the plus (‘+’) sign.

Modern email services like google will deliver the email for the user ‘jeff+test\_one’ to the inbox for ‘jeff’, and you can use as many aliases as you like this way.

Once the new user is created, before the application will work correctly, you will need to **finish the registration process** in the account confirmation email from techex-epoxyloaf-com.

Click here to launch.

### GetErDone SPA Authentication and Authorization¶

**GetErDone-SPA** uses the Implicit Grant type from the OAuth 2.0 authorization framework, and authentication with OpenID Connect, using services provided by Auth0.

The Implicit Grant flow is initiated by the JavaScript application which is designed to load once and run in the user’s browser. Here the user may choose to log in to the application, where a dialog is loaded allowing the user to provide credentials to Auth0, or alternatively choose any other configured identity provider. Once authenticated, Auth0 will then issue the application an Access Token which will be stored and used as credentials for calls to the GetErDone-API.

The GetErDone suite uses OIDC scope claims to authorize users access to the various services provided by the GetErDone-API. These scopes are encoded into the Access Token which is used by the SPA to make calls to the API on behalf of the user.

The GetErDone-SPA will request the following GetErDone-API scopes:
-   read:tasks
-   write:tasks

### GetErDone SPA Stack¶

**GetErDone-SPA** is a JavaScript based single page application

### GetErDone SPA Acknowledgements¶

**GetErDone-SPA** is based on the Backbone.js demo app “ToDo List”

GetErDone WebApp¶
-------------------------------------------------------------------------------------------------------

**GetErDone-WebApp** is an html based tool allowing managers to interact with lists of tasks to be done by others.

In order to use this application, you will need to create a user with the role of ‘manager’. To create a user with the ‘manager’ title, use the ‘Sign Up’ tab on the login screen, and enter an email address where the username is split with the plus (‘+’) sign, and the letters to the right of the ‘+’ includes the word ‘manager’. So the user<EMAIL_ADDRESS>would have the title ‘user’, and the user<EMAIL_ADDRESS>would have the title ‘manager’.

Modern email services like google will deliver the email for the user ‘jeff+test\_manager’ to the inbox for ‘jeff’, and you can use as many aliases as you like this way.

Once the new user is created, before the application will work correctly, you will need to **finish the registration process** in the account confirmation email from techex-epoxyloaf-com.

Click here to launch the webapp.

### GetErDone WebApp Authentication and Authorization¶

**GetErDone-WebApp** uses the Authorization Code grant type from the OAuth 2.0 authorization framework, and authentication with OpenID Connect, using Auth0 as an identity provider.

The Authorization Code flow is initiated by redirecting the user to the Auth0 /authorize endpoint corresponding to the GetErDone-WebApp. Parameters to the call include a callback URL, and the “scopes” the application requests access to. At this point control is passed to Auth0 where they will display a dialog the user can login, or create a new account with. Here the user enters credentials to Auth0, or alternatively chooses any other configured identity provider. Once authenticated, Auth0 will then redirect the user back GetErDone-WebApp at the callback address specified, where session information can be verified and recorded, before sending the user on to the application itself.

The GetErDone suite uses OIDC scope claims to authorize users access to the various services provided by the GetErDone-API. These scopes are encoded into the Authorization header which is used by the webapp to make calls to the API on behalf of the user.

The GetErDone-WebApp will request the following GetErDone-API scopes:
-   read:tasks
-   write:tasks
-   delete:tasks
-   assign:tasks

### GetErDone WebApp Stack¶

**GetErDone-WebApp** is hosted on an Apache2 web server running as a WSGI process implemented in Python with Flask.

GetErDone API¶
-------------------------------------------------------------------------------------------------

The GetErDone-API is a ReST API service allowing network applications to interact with lists of tasks assigned to users. Any authenticated user is allowed to create and complete tasks for themselves, but only users with a manager role may assign tasks to others.

### GetErDone API Authentication and Authorization¶

The **GetErDone-API** provides REST access to the To-Do lists owned by the the users of various applications.

A primary goal of the API is to make sure that To-Do list tasks are only accessed by the users that own them. This goal can be met using concepts of Authentication - the user has provided valid credentials, and Authorization - the user is provisioned for a valid set of activities. To meet this end, the API uses services provided by Auth0.

Following OAuth2 and OIDC, in terms of Authentication and Authorization, we can think of these users as “resource owners”, the To-Do lists themselves as the “resources”, and the API server as the “resource server”.

#### Authentication¶

In the GetErDone-API, the resource owner’s identity is authenticated by examining and validating the OAuth2 Access Token provided in the HTTP Authorization header.

The Access Token is an encoded JSON Web Token (JWT). The GetErDone API decodes the JWT using the ‘python-jose’ toolkit. In the decoding process the toolkit will download public cryptographic keys from Auth0, using them to verify an RS256 signature embedded in the JWT. Once the signature is verified, the payload of the JWT can be trusted as authentic.

#### Authorization¶

The GetErDone-API, as the resource server, will grant the resource owner access to operations on their resources based on Authorization information contained within the set of “claims” made in the verified Access Token. These claims include information about the user, including the operations they are allowed to perform. The claim used by the resource server to determine a resource owner is authorized to access an operation is called “scope”.

The GetErDone-API provides access using the following scopes:

> -   read:tasks
> -   write:tasks
> -   assign:tasks
> -   delete:tasks
>
The GetErDone SPA makes use of the ‘read:tasks’ and ‘write:tasks’ scopes to allow a user to view, update, and create new tasks for themselves. The GetErDone WebApp uses the additional ‘assign:tasks’, and ‘delete:tasks’ to allow users with these scopes to assign tasks to others, or delete them once they are completed.

The GetErDone suite makes use of Auth0 Rules to filter the scopes available to individual users.

### GetErDone API Stack¶

**GetErDone-API** is a REST API served on Apache2 with WSGI to a Python Flask application using authentication and authorization services provided by Auth0 ...

### GetErDone API Storage¶

**GetErDone-API Storage**

### [Table Of Contents](index.html#document-index)

-   GetErDone SPA
-   GetErDone WebApp
-   GetErDone API

### Navigation

-   [GetErDone](index.html#document-index) »

© Copyright 2018, Jeff Marckel.

repository: jmarckel/get-er-done

repo_name: jmarckel/get-er-done


text:
# Twilio Verify Push Sample Backend for the Authy app (Pilot)

This project can be used as a sample backend for [Verify Push](https://www.twilio.com/docs/verify/push) and to issue push authentication challenges in combination with the Authy Android App, Authy iOS App or Authy Desktop app.

For businesses who don't have their own client app, the Verify Push integration with Authy app turns the Authy apps into a secure key for Verify Push, so that they can verify their end-users by telling them to install Authy apps and without requiring PII from those users.

---
**NOTE**

This pilot showcases the new integration between the Verify Push SDK and the Authy app. The pilot will be supplied to you in the form of a private Android app assigned to the specific email addresses you provide to Twilio. Please contact your Twilio account executive for participation or [email<EMAIL_ADDRESS>

---

## How to use the template

The best way to use the Function templates is through the Twilio CLI as described below. If you'd like to use the template without the Twilio CLI, [check out our usage docs](../docs/USING_FUNCTIONS.md).

## Pre-requisites

- [Create a Verify Service](https://www.twilio.com/console/verify/services)
- Install the private Android app

### Environment variables

This project requires some environment variables to be set. To keep your tokens and secrets secure, make sure to not commit the `.env` file in git. When setting up the project with `twilio serverless:init ...` the Twilio CLI will create a `.gitignore` file that excludes `.env` from the version history.

In your `.env` file, set the following values:

| Variable             | Description                                                           | Required |
| :------------------- | :---------------------------------------------------------------- | :------- |
| `ACCOUNT_SID`        | Find in the [console](https://www.twilio.com/console)             | Yes      |
| `AUTH_TOKEN`         | Find in the [console](https://www.twilio.com/console)             | Yes      |
| `VERIFY_SERVICE_SID` | Create one [here](https://www.twilio.com/console/verify/services) | Yes      |

### Function Parameters

`generate-qr-code.js` expects the following parameters:

| Parameter                  | Description                                   | Required |
| :------------------------- | :-------------------------------------------- | :------- |
| `identity`                 | Unique user ID, avoid PII         | Yes |
| `factor friendly name`     | Factor friendly name              | No |

`list-factors.js` expects the following parameters:

| Parameter      | Description                                 | Required |
| :------------- | :------------------------------------------ | :------- |
| `identity`     | Unique user ID, avoid PII                   | Yes |

`create-challenge.js` expects the following parameters:

| Parameter           | Description                | Required |
| :------------------ | :------------------------- | :------- |
| `identity`          | Unique user ID, avoid PII  | Yes |
| `factor`            | Factor SID                 | Yes |
| `message`           | Verification message       | Yes |
| details             | Arbitrary key value pairs to demo additional verification context | Yes |

`challenge-status.js` expects the following parameters:

| Parameter           | Description                | Required |
| :------------------ | :------------------------- | :------- |
| `identity`          | Unique user ID, avoid PII  | Yes |
| `sid`               | Challenge SID              | Yes |

## Create a new project with the template

1. Install the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart#install-twilio-cli)
2. Install the [serverless toolkit](https://www.twilio.com/docs/labs/serverless-toolkit/getting-started)

```shell
twilio plugins:install @twilio-labs/plugin-serverless
```

3. Initiate a new project

```
twilio serverless:init verify-push-authy-backend --template=verify-push-authy-backend && cd verify-push-authy-backend
```

4. Add your environment variables to `.env`:

Make sure variables are populated in your `.env` file. See [Environment variables](#environment-variables).

5. Start the server :

```
twilio serverless:start
```

5. Open the web page at https://localhost:3000/index.html and enter the required fields to send a challenge

ℹ Check the developer console and terminal for any errors, make sure you've set your environment variables.

## Deploying

Deploy your functions and assets with either of the following commands. Note: you must run these commands from inside your project folder. [More details in the docs.](https://www.twilio.com/docs/labs/serverless-toolkit)

With the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart):

```
twilio serverless:deploy
```

repository: twilio-labs/function-templates

gha_language: JavaScript

gha_license_id: MIT

repo_name: twilio-labs/function-templates


text:
# Solving OpenAI Gym - MountainCarContinuous-v0

Solve MountainCarContinuous-v0 challenge with genetic style evolution.

![MountainCarContinuous-v0 Challenge](https://raw.githubusercontent.com/mediasia-labs/openai-gym-mountaincarcontinuous-v0/master/screenshot.png)

### Install

This project uses numpy and gym. Install depedencies with `pip`

	$ pip install -r requirements.txt

### Run

Run

	$ python train.py

Result

	$ python train.py
	Generation 1 Best score -200.001011045 Finished 0.0
	Generation 2 Best score 40.6576518519 Finished 1.08
	Generation 3 Best score 52.0173731036 Finished 1.7
	...
	Generation 26 Best score 87.6259341522 Finished 14.74
	Generation 27 Best score 87.4580638971 Finished 14.7
	Generation 28 Best score 88.1793944848 Finished 15.16

Challenge is considered solved when a network reaches an average score of 90 over 100 games


text:
[![Build Status](https://badge.buildkite.com/9e0e6c88972a3248a0908506d6946624da84e4e18c0870c4d0.svg)](https://buildkite.com/rust-vmm/vm-virtio-ci)

# vm-virtio

The vm-virtio crate provides a [virtio](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio)
device implementation for the following:

* A virtio virtqueue and Descriptor chain API,
* A virtio device trait (`VirtioDevice`),
* Virtio block device abstractions.

### Note
We offer support only for virtio v1.0+
([the legacy interface](https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-60001)
is not supported).

## Virtio `Device` trait

Virtio device implementations will implement the `VirtioDevice` trait.
Typically the VMM will implement virtio devices and provide the paravirtualized
IO emulation for all supported virtio devices. For example a VMM willing to emulate
a virtio networking device will implement the `VirtioDevice` trait.

The `VirtioDevice` implementation will be discovered by the guest through a virtio
transport layer (MMIO, PCI or channel IO). The transport layer implementation will
then call into the `VirtioDevice` `activate` method to notify the device that the
guest driver is done configuring it and that it should be ready to handle IO from
the guest.
On the other hand, the `VirtioDevice` `reset` method will be called by the transport
layer when the guest driver needs to reset and release all the emulated device resources.

## Virtio queue API

The `vm-virtio` queue API is to be consumed by virtio device implementations.
The virtio device (net, block, rng, etc) implementation will call into the
queue API to allocate and manage its specific virtio queues:

* `new()` to allocate its queues.

* `iter()` to iterate over the queue descriptors and consume virtio queue
  buffers made available by the guest driver.

* `add_used()` to place a virtio queue buffer into the queue and have the
  guest driver consume it.

## Tests

Our Continuous Integration (CI) pipeline is implemented on top of
[Buildkite](https://buildkite.com/).
For the complete list of tests, check our
[CI pipeline](https://buildkite.com/rust-vmm/rust-vmm-ci).

Each individual test runs in a container. To reproduce a test locally, you can
use the dev-container on both x86 and arm64.

```bash
container_version=5
docker run -it \
           --security-opt seccomp=unconfined \
           --volume $(pwd):/vm-virtio \
           rustvmm/dev:v${container_version}
cd vm-virtio/
cargo test
```

repository: alexandruag/vm-virtio

gha_language: Rust

repo_name: alexandruag/vm-virtio


text:
This project has been converted to a Flask Application https://github.com/smccaffrey/plex-etl

# Plex ETL Command Line Tool
This tool was originally designed for personal use, but after some refactoring efforts it will hopefully
make your media loading process into PLEX a lot easier.
## Installation
Change current directory to where you want to process media files.
```sh
$ cd /path/to/plex/libraries
```
Install plex_etl_cli
```sh
~/path/to/plex/libraries$ git clone https://github.com/smccaffrey/plex_etl_cli.git
```
## Usage - Movies
Intitialize the pipeline. You will be prompted to specify where your plex library lives.
```sh
$ python plex_etl.py --pipe movies --initialize
```
A directory called movies will be created in the cwd, with sub directories ```1_dump```, ```2_extracted```, ```3_transformed```, ```4_error```, ```5_encoding_queue```. Place all raw movie rips/torrents in ```1_dump```.

Extract all movie files.
```sh
$ python plex_etl.py --pipe movies --extract
```
Test if movies can be processed by the pipeline.
```sh
$ python plex_etl.py --pipe movies --test_parse
```
Transform all movie files
```sh
$ python plex_etl.py --pipe movies --transform
```
Load all transformed movies in ```PLEX_MEDIA_LIBRARY```
```sh
$ python plex_etl.py --pipe movies --load
```
Cleanup all ETL directories in the movies pipeline
```sh
$ python plex_etl.py --pipe movies --cleanup
```

## Versions

### v1.0.1
* added ```cleanup()``` function remove old directories and file from ```1_dump``` and ```2_extracted``` from the ```movies``` pipe

### v1.0.0
* Created initial functionality
* Fully supports processing movie files


text:
# Laravel CKEditor4

[![Latest Version on Packagist](https://img.shields.io/packagist/v/juliomotol/laravel-ckeditor4.svg?style=flat-square)](https://packagist.org/packages/juliomotol/laravel-ckeditor4)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/juliomotol/laravel-ckeditor4/Tests?label=tests)](https://github.com/juliomotol/laravel-ckeditor4/actions?query=workflow%3Arun-tests+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/juliomotol/laravel-ckeditor4.svg?style=flat-square)](https://packagist.org/packages/juliomotol/laravel-ckeditor4)

CKEditor4 Publisher for Laravel >= 5.5.

## Installation

You can install the package via composer:

```bash
composer require juliomotol/laravel-ckeditor4
```

## Config

| Key            | Default Value                         | Description                                                             |
| -------------- | ------------------------------------- | ----------------------------------------------------------------------- |
| `publish_path` | `public_path('js/plugins/ckeditor4')` | Use this option control where you want to publish the CKEditor4 assets. |

If you want to make changes in the configuration you can publish the config file using:

```bash
php artisan vendor:publish --provider="JulioMotol\CKEditor4\CKEdtor4ServiceProvider" --tag="config"
```

## Usage

To publish the CKEditor4 assets, simply run the command:

```bash
# Install ckeditor in default path
php artisan ckeditor4:install

# Install ckeditor to a certain path
php artisan ckeditor4:install --path=public/foo/bar
```

> CKEditor4 assets will be published in `./public/js/plugins/ckeditor4` by default.

## Testing

```bash
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

-   [Julio Motol](https://github.com/juliomotol)
-   [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

## Bootstrapped with Package Skeleton Laravel

This package as generated using [Spatie's Package Skeleton Laravel Template](https://github.com/spatie/package-skeleton-laravel)


text:
* Export a Production certificate that enables you to access your organization’s information in SWS (https://api.monitoredsecurity.com/SWS/) in .p12 format

* Encode the .p12 certificate file using any File to Base64 Encoder and paste the encoded string in the "Certificate" field

repository: demisto/content

gha_language: Python

repo_name: demisto/content


text:
# Gracenote::OnConnect
A wrapper for Gracenote's OnConnect REST API

## Installation

Add this line to your application's Gemfile:

    gem 'gracenote-on_connect'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install gracenote-on_connect

## Usage

Note: This gem is in its very initial stages and should not be considered stable or full featured. Hopefully, I will be able to flesh things out soon. In the mean time, updates are welcome.

## Contributing

1. Fork it ( https://github.com/matt-morris/gracenote-on_connect/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
---
title: "Using Anchore Engine"
linkTitle: "Usage"
weight: 3
---

## Introduction
There are a few different ways to interact with Anchore Engine: Through the Anchore CLI or via a RESTful API.

Jump to the guide for your preferred method of access:

- [Anchore CLI]({{< ref "/docs/usage/cli_usage" >}})
- [Anchore API]({{< ref "/docs/usage/api_usage" >}})

repository: Be-Secure/anchore-engine

repo_name: Be-Secure/anchore-engine


text:
# Workday Scheduler

## Description

This workday scheduler gives the user a 9-hour scheduling organizer. It starts at 9AM and ends at 5PM. This scheduler allows the user to input a description, for each time block, of the task needed to be executed that day. The user can also save the task (clicking the blue button) in the local storage therefore if that page is closed or refreshed, the task will be stored and displayed for the user.

This work day scheduler is color coded to make it more appealing and helpful to the eye. The time blocks in grey represent the past time hours of the current day. The pastel red time 'block' represents the current hour of the day. And the green time blocks represent the future/upcoming hours for that currenty day.

## Contributors
Janneth Alvarado Verduzco -<EMAIL_ADDRESS>
## Language/Technologies Used
* HTML5
* CSS
* JavaScript
* Bootstrap
* Font Awesome
* jQuery

## Mock-Up

Below is a screenshot of this Work Day Scheduler

![GitHub Logo](/Assets/scheduler.JPG)
![GitHub Logo](/Assets/Responsive.PNG)

## Live Link
https://jannverduzco.github.io/05-work-day-scheduler/

## Repository Link
https://github.com/jannverduzco/05-work-day-scheduler


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.6.1] - 2020-04-29

## Changed

* Event dispatch of `once` is asynchronous, to avoid problems with
  misbehaving event emitters.
  https://github.com/thefrontside/effection.js/pull/107

## Added

* EventSource type is exported.
  https://github.com/thefrontside/effection/pull/102

repository: JustinTArthur/effection

repo_name: JustinTArthur/effection


text:
# Configuration API demo with Etcd

This example shows how to add, delete, modify, and watch the etcd configuration center through Layotto.

Please install [Docker](https://www.docker.com/get-started) software on your machine in advance.

[Config file](https://github.com/mosn/layotto/blob/main/configs/runtime_config.json) defines using etcd in config_stores section, and users can change the configuration file to the configuration center they want (currently supports etcd and apollo).

### Build docker image

At first, please make sure your layotto PATH is same as below:

```
$GOPATH/src/github/layotto/layotto
```

then execute `CMD` below:

```bash
cd $GOPATH/src/github/layotto/layotto
make image
```

After make success, you can see two images with docker images command：

```bash

xxx@B-P59QMD6R-2102 img % docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
layotto/layotto     0.1.0-662eab0       0370527a51a1        10 minutes ago      431MB
```

### Start Layotto

```bash
docker run -p 34904:34904 layotto/layotto:0.1.0-662eab0
```

Mac and Windows do not support --net=host, if it is on linux, you can directly replace -p 34904:34904 with --net=host.

### Start client

```bash
cd layotto/demo/configuration/etcd
go build
./etcd
```

If the following information is printed out, it means the startup is complete and Layotto is running now：

```bash
runtime client initializing for: <IP_ADDRESS>:34904
receive hello response: greeting
get configuration after save, &{Key:hello1 Content:world1 Group:default Label:default Tags:map[] Metadata:map[]}
get configuration after save, &{Key:hello2 Content:world2 Group:default Label:default Tags:map[] Metadata:map[]}
receive watch event, &{Key:hello1 Content:world1 Group:default Label:default Tags:map[] Metadata:map[]}
receive watch event, &{Key:hello1 Content: Group:default Label:default Tags:map[] Metadata:map[]}
```

### Next step

Layotto provides the golang version of the SDK, which is located in the runtime/sdk directory. Users can directly call the services provided by Layotto through the corresponding SDK.

repository: emeory/layotto

repo_name: emeory/layotto


text:
## Wemos Light Controller

Updates neopixels synced to the note playback system, so they flash in time to the music. Or at least, they update on each note played. Almost all of the code is pulled from the earlier Wemos-based servo players. Many defunct functions have been dropped, and the servo-handling code ripped out in favour of NeoPixel access. Roughly half the development time for this component was spent in trying to debug a neopixel string which turned out to be mis-wired.

Two versions:

### player-lights

Sets entire light string to random brightness of red, green, white, or just plain random colours. The random colours look nice, but overall it's not very festive.

### player-lights2

Sets each pixel to a random brightness and a random choice of red, green or white. Which overall looks prettier, we think.


text:
# Stenocladiella Marvanová & Descals GENUS

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Trans. Br. mycol. Soc. 89(507): 507 (1987)

#### Original name
Stenocladiella Marvanová & Descals

### Remarks
null


text:
# Simple Google Image Search

This simple iOS application lets you do a Google Image search where the results are displayed in a grid layout. Scrolling down through the view will continue to load more images.

Search history is retained so you can go back view previous searches.

![image](http://dev.blakerdesign.com/misc/img/image-search.png)

## Tests
Unit tests can be run by hitting ⌘+U or by using the **Test** menu item under **Products**. The tests must be run in XCode 5 with a simulator running iOS 7.

## Dependencies
* [AFNetworking](https://github.com/AFNetworking/AFNetworking) - Used for API requests
* [MBProgressHUD](https://github.com/jdg/MBProgressHUD) - Used for indicating loading
* [SDWebImage](https://github.com/rs/SDWebImage) - Used for image caching
* [PSTCollectionView](https://github.com/steipete/PSTCollectionView) - Used for iOS 5 UICollectionView compatability
* [OCMock](https://github.com/erikdoe/ocmock) - Used for mocking objects in unit tests

### Dependency Management
All dependencies are managed by [CocoaPods](http://cocoapods.org). If you already have CocoaPods installed simply run:

	pod install

Then you should be able to open the **Google Image Search.xcworkspace** file and run the project.

repository: jblaker/SimpleGoogleImageSearch

repo_name: jblaker/SimpleGoogleImageSearch


text:
# react-native-stellar-sdk

This package polyfills the [stellar-sdk](https://github.com/stellar/js-stellar-sdk) for React Native.

It includes native randomBytes for iOS and Android via [react-native-randombytes](https://github.com/mvayngrib/react-native-randombytes).

Due to the asynchronous nature of React Native's native bridge, this package adds a new asynchronous method to the Stellar Keypair utility `randomAsync` which returns a promise that resolves to the new randomly generated Keypair.

## Installation

```shell
yarn add @pigzbe/react-native-stellar-sdk
```

Link native randomBytes module:

```shell
react-native link react-native-randombytes
```

## Usage

```javascript
import {Keypair} from '@pigzbe/react-native-stellar-sdk';

const keypair = Keypair.randomAsync().then(keypair => {
    const publicKey = keypair.publicKey();
    const secretKey = keypair.secret();
});
```

repository: sohanlaxmicoin/react-native-stellar-sdk

repo_name: sohanlaxmicoin/react-native-stellar-sdk


text:
## Safe Token Sale

- idea according to [Vlad Zamfir's Safe Token Sale](https://medium.com/@Vlad_Zamfir/a-safe-token-sale-mechanism-8d73c430ddd1).
- extended with Power concept: [Acebusters Economy Paper](http://www.acebusters.com/files/The%20Acebusters%20Economy.pdf)
- [javascript simulator](http://acebusters.com/economy.html)

### run

```
npm install
testrpc
truffle test
```

## License
Code released under the [MIT License](https://github.com/acebusters/safe-token-sale/blob/master/LICENSE).

repository: troggy/economy

repo_name: troggy/economy


text:
---
title: "April to treat stargazers to 1st meteor shower in months and these other celestial events"
date: "2020-03-31T1832"
hero: "http://l1.yimg.com/uu/api/res/1.2/8C0l0c8dRoyJZLqz7FQs.w--/YXBwaWQ9eXRhY2h5b247aD04Njt3PTEzMDs-/https://media.zenfs.com/en-us/accuweather_297/a9e1ae3ceda1b902a1ee7eaa0f232ea9"
---
Springtime stargazers will have plenty to look for throughout April,
ranging from a meteor shower to the rare opportunity to see a comet.

The wide variety of astronomy events this month will be great for people
looking to spend some time outside under the night sky, including
families with young children, as they will not require any special
equipment apart from a blanket, warm clothes and a clear sky.

Here are the top three astronomy events to look for in April:

 **1\. Super Pink Moon
When:** April 7-8

The moon will be the main feature in the night sky during the first full
week of April as it will be the biggest and brightest supermoon of 2020.

The supermoon will rise on the night of April 7, glowing all night long,
and will be bright enough to cast shadows on the ground. Although it
will appear slightly bigger and brighter than normal, [the difference
will be subtle and may be difficult for the average observer to
notice][1].

April's full moon is also known as the Pink Moon, but contrary to its
name, the moon will not appear pink. Instead, it has been given this
nickname due to the phlox, a perennial plant that blooms in April with
pink flowers.

![][2]
---
A view of the full pink moon, in Lakatamia, a suburb of capital Nicosia,
Cyprus, Friday, April 19, 2019. (AP Photo/Petros Karadjias)

**2\. Lyrid meteor shower
When:** April 21-22

April 22 is known around the world as Earth Day, and the global event
will kick off with a light show from Mother Nature as the Lyrid meteor
shower reaches its peak.

This is the first major meteor shower since January and will bring 15 to
20 shooting stars per hour on the night of April 21 into the early hours
of April 22. This year will be a particularly good year for the "Earth
Day meteor shower" as it occurs on a moonless night, meaning darker
skies for onlookers.

[CLICK HERE FOR THE FREE ACCUWEATHER APP][3]

"These meteors are best seen from the Northern Hemisphere where the
radiant is high in the sky at dawn," the [American Meteor Society
explained on their website][4]. "Activity from this shower can be seen
from the Southern Hemisphere, but at a lower rate."

Folks that miss the Lyrids will only have to wait about two weeks for
the next chance to see a meteor shower, with the Eta Aquarids set to
peak during the first full week of May.

 **3\. Comet ATLAS
When:** Late April

A newly discovered comet will soon make a splash in the night sky as it
grows brighter throughout April, potentially becoming bright enough to
see with the naked eye by the end of the month.

Comet ATLAS, also known as [Comet C/2019 Y4][5], was discovered on Dec.
28, 2019, by astronomers using the Asteroid Terrestrial-Impact Last
Alert System (ATLAS) in Hawaii. It is still too dim to see without a
telescope, but it is expected to get much brighter in the coming weeks.

![][6]
---
Animation of a comet. (NASA/JPL-Caltech)

"If predictions are correct, Comet ATLAS might reach a [visual
magnitude][7] of +5 around May 1, 2020.

"To spot the comet, look in the northern sky. It is not far from the Big
and Little Dippers," [AccuWeather Astronomy Blogger Dave Samuhel
said][9].

Comet ATLAS is projected to make its closest approach to Earth on May
23, followed by its closest approach to the sun on May 31.

On March 19 at 11:50 p.m., winter transitioned to spring across the
Northern Hemisphere during the [earliest March equinox since 1896][10].

Hours later, just before sunrise, early risers were treated to a
celestial alignment as the crescent moon fell in line with Jupiter,
Mars, Saturn and Mercury in the morning sky.

Around the same time, a [newly released photo revealed a stunning view
of Jupiter like we've never seen it before][11]. The image was captured
by the Juno spacecraft which is orbiting the solar system's largest
planet.

At the beginning of March, NASA announced that it was[ accepting
applications for the astronaut program][12] that would fly on future
trips to space. This includes the possibility of being on one of the
upcoming trips to the moon in the 2020s.

A few days later, the space agency announced the name of the next
visitor being sent to the Red Planet. [The Mars 2020 rover was
officially given the name Perseverance][13], chosen from a nationwide
student competition. Perseverance was once of 28,000 name entries and
was proposed by an elementary school student from Virginia.

   [1]: https://www.accuweather.com/en/weather-news/what-is-a-supermoon-2/433604
   [2]: https://media.zenfs.com/en-us/accuweather_297/aeee2294d244352e83ae1e5feacc1fc6
   [3]: https://downloads.accuweather.com/
   [4]: https://www.amsmeteors.org/meteor-showers/meteor-shower-calendar/
   [5]: http://www.aerith.net/comet/catalog/2019Y4/2019Y4.html
   [6]: https://media.zenfs.com/en-us/accuweather_297/83b61e9e872b0e39713224d98c4d88b7
   [7]: https://earthsky.org/astronomy-essentials/what-is-stellar-magnitude
   [8]: https://earthsky.org/space/how-to-see-bright-comet-c-2019-y4-atlas
   [9]: https://www.accuweather.com/en/weather-blogs/astronomy/a-new-comet-is-brightening-quickly/705953
   [10]: https://www.accuweather.com/en/space-news/spring-is-coming-earlier-in-u-s-this-year-than-it-has-since-1896/684213
   [11]: https://www.accuweather.com/en/space-news/this-gorgeous-picture-of-jupiter-from-nasa-is-just-what-we-need-right-now/704232
   [12]: https://www.accuweather.com/en/space-news/want-to-go-to-the-moon-nasa-is-now-taking-new-astronaut-applications/695351
   [13]: https://www.accuweather.com/en/space-news/meet-perseverance-nasas-mars-2020-rover-has-a-new-name/696552


text:
# ImageMetadata

[![Build Status](https://secure.travis-ci.org/mrkamel/image_metadata.png?branch=master)](http://travis-ci.org/mrkamel/image_metadata)

Read and write iptc, exif and xmp with predefined mappings.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'image_metadata'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install image_metadata

## Usage

Read metadata:

```ruby
image_metadata = ImageMetadata.new("/path/to/image")
image_metadata[:caption] # => ...
image_metadata[:headline] # => ...
# ...
```

Write metadata:

```ruby
image_metadata = ImageMetadata.new("/path/to/image")
image_metadata[:caption] = "Caption"
image_metadata[:headline] = "Headline"
# ...
image_metadata.save!
```

Strip metadata:

```ruby
ImageMetadata.strip("/path/to/image")
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mrkamel/image_metadata.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).


text:
Repo for "Retrospective Graphical User Interface for Neuroergonomic Wheelchair Control Experiment"

Final Code folder contains all the final, individual functions for the entire project which includes
ECGplot.py, fnirplot.py, mainwindow.py, test.py, utilities.py, videowidget.py
- ECGplot.py reads the ECG data, and displays it on the GUI
- Fnirsplot.py reads the fnirs data, and displays It on the GUI
- Mainwindow.py creates the structure of the GUI, the buttons, and can save the data into the Code logfile. It also holds and displays the fNIRS and ECG data.
- Test.py puts the entire program together, playing the video simultaneously with the gui.
- Utilities.py creates the database, and shows the database.
- Videowidget.py plays the video which is stored remotely.

Working Code folder contains all the individual functions that were being changed for the entire project which includes
ECGplot.py, fnirplot.py, mainwindow.py, test.py, utilities.py, videowidget.py
- ECGplot.py reads the ECG data, and displays it on the GUI
- Fnirsplot.py reads the fnirs data, and displays It on the GUI
- Mainwindow.py creates the structure of the GUI, the buttons, and can save the data into the Code logfile. It also holds and displays the fNIRS and ECG data.
- Test.py puts the entire program together, playing the video simultaneously with the gui.
- Utilities.py creates the database, and shows the database.
- Videowidget.py plays the video which is stored remotely.

PWC44 folder contains movisens data which includes acc.csv, ecg.csv PWC44_Oxy.txt
- acc.csv contains the accerlerometry data (64Hz) (3 planes)
- ecg.csv contains the heart rate data (1024Hz)
- PWC44_Oxy.txt contains the fNIRS data oxygenated Hb at 7.81Hz (each column is each
channel)

Code logfile contains the information produced by the overall gui/inputs

Design.pptx contains the flowchart/ project design showing the user interaction.
Design.xlsx contains the listed functions, purposes, main authors, inputs, outputs, etc.
Example Data.xlsx has the biometric information, the sync start times, The current timings of
each circuit/movisens, and current errors.
GUI Sketch.pptx contains the original sketch of the GUI, before it was converted to Sketch.jpg
Presentation.pptx contains the presentation for class
Report.docx contains the written report of the project
Sketch.jpg contains the original sketch
Thumb.png contains the thumbnail
index.yml contains the abstract of the gui/project

Python Packages necessary to run the GUI:

-numpy \n
-pandas \n
-PyQt5 \n
-PyQtGui \n
-PyQtGraph \n
-cv2 \n
-os \n
-sys \n\n

Our program has been tested on MacOS (Mojave) running on a 2.7 GHz Intel Core i5 processor.

repository: benstear/bmesGUI

repo_name: benstear/bmesGUI


text:
# Module 10-1 — Replacement of files provisioned via Modules in Full Trust Solutions #

## Lab Environment ##
During this lab, you will work in the provided virtual machine. The following prerequisites have been completed and are provided should you wish to undertake this lab in your own environment.

### Before You Begin ###
To complete the labs in this course you need to install or configure the following items.
  - Access to a SharePoint 2013 server with the Contoso.Intranet solution deployed and a site collection provisioned using the **WTContosoPublishing Web Template**. (The PowerShell for site creation is available in the [Patterns & Practice reference materials](https://github.com/OfficeDev/PnP/tree/master/Reference%20Material/Contoso.Intranet) .)
    + You should be logged in as an administrator of the site collection to ensure that you have all the necessary permissions for this lab

  - Visual Studio 2013 Ultimate Update 3 with Azure SDK v2.5, available via the web platform installer.

  - Ensure you have configured a local NuGet package repository: http://www.mbgreen.com/blog/2014/8/8/sharepoint-2013-apps-fail-on-nuget-package-restore
  - Download and unzip the Student folder. Note the unzipped location of these files. You will need these files to complete the labs.  The following graphic shows the unzipped file structure.
    ![Student folder](Images/StudentCodeSourceTree.png)

## Lab Overview ##

### Abstract ###
In this lab you will learn how to replace existing master pages and page layouts which have been deployed to an On-Premises SharePoint Server via Modules in a Full Trust Solution. This will involve deploying new files to replace those deployed via Modules and updating the existing usages of these files to remove the dependency on the files which were deployed via declarative means.

### Learning Objectives ###
After completing the exercises in this lab, you will be able to:
  - Upload new master pages to a SharePoint site via CSOM
    + Update the master pages for a given SharePoint site
  - Upload new page layouts to a SharePoint site via CSOM
    + Update existing page instances to use the new page layouts
    + Set the available and default page layouts for a SharePoint WCM site

**Estimated time to complete this lab: *40 minutes*.**

## Exercise 1: Deploy new master pages via CSOM ##

### Examine the initial state of the site and modules for replacement. ###

1. Start **Visual Studio 2013.**

2. Click **File | Open Project.**

  ![Open Project](Images/FileMenu.png)

3. Move to the **Contoso.Intranet** folder and open the existing solution named  **Contoso.Intranet.sln**.

4. In the **Solution Explorer** expand the **SP** folder then the **Modules** folder.

  ![Modules](Images/ModuleReplacementContosoSpModulesFolder.png)

5. Examine the **Elements.xml** file and the **contoso.master** file in the **MOMasterPage** Module.
  * Note that the contoso.master master page makes use of a custom user control which is not supported in Office 365. Our replacement master page will not contain this control.

6. Examine the **Elements.xml** file and the **ContosoWelcomeLinks.aspx** file in the **MOPageLayouts** Module.
  * Note that the ContosoWelcomeLinks.aspx master page layout makes use of a custom user control which is not supported in Office 365. Our replacement page layout will not contain this control.

7. It should also be noted that both of these files set the Content Type of the deployed file declaratively.

8. Open **Internet Explorer** and navigate to **http://w15-sp/sites/ftclab**
  * You should see a home page which uses the custom master page and page layouts shown above:

  ![Home Page with Full Trust Master Page and Page Layout](Images/ModuleReplacementHomePageOriginal.png)

9. Switch back to **Visual Studio 2013**

10. Click **File | Close Solution** to close the current solution.

  ![Close Solution](Images/FileMenuClose.png)

### Upload the new Master Page. ###

1. Click **File | Open Project.**

2. Move to the **Module9/ModuleReplacement** folder and open the existing solution named  **ModuleReplacement.sln**.
  * Note: The actual folder location is dependent on where you copied the files to in your local computer.

  ![Open Solution Explorer](Images/ModuleReplacementOpenSolution.png)

3. Open the **settings.xml** file **ModifyUserExperience** project.
  * Here you can see a xml file defining which files we will upload, the files they are to replace and additional information that is needed to upload the page layouts successfully.

  ![ModifyUserExperience Project](Images/ModuleReplacementSettings.png)

4. Open the **MasterPageGalleryFiles.cs** file
  * Here you can see two business objects we will use to hold data about the files to be uploaded.

  ![Project Properties](Images/ModuleReplacementMasterPageGalleryFile.png)

5. Open **Program.cs**.

  ![AppManifest](Images/ModuleReplacementProgram.png)

  * Paste the following code into the **Main** method:

  ```csharp
  static void Main(string[] args)
  {
      using (var clientContext = new ClientContext("http://w15-sp/sites/ftclab"))
      {
          XDocument settings = XDocument.Load("settings.xml");

          //Grab the master page gallery folder for uploading and the content types for the masterpage gallery
          Web web = clientContext.Web;
          List gallery = web.GetCatalog(116);
          Folder folder = gallery.RootFolder;
          //Load info about the master page gallery
          clientContext.Load(folder);
          clientContext.Load(gallery,
                              g => g.ContentTypes,
                              g => g.RootFolder.ServerRelativeUrl);
          //Load the content types and master page info for the web
          clientContext.Load(web,
                              w => w.ContentTypes,
                              w => w.MasterUrl,
                              w => w.CustomMasterUrl);
          clientContext.ExecuteQuery();
          //Get the list contentTypeId for the masterpage upload the master pages we know about
          const string parentMasterPageContentTypeId = "0x010105"; // Master Page
          ContentType masterPageContentType = gallery.ContentTypes.FirstOrDefault(ct => ct.StringId.StartsWith(parentMasterPageContentTypeId));
          UploadAndSetMasterPages(web, folder, clientContext, settings, masterPageContentType.StringId);
      }
  }
  ```
  * As you can see, we load the master page gallery and its root folder and Content Types, we then query the content types to find the master page content type so that we can set this correctly for the master pages that will be uploaded.

  * We also gather some additional information about the web in which we are working, then a call is made to the **UploadAndSetMasterPages** method, so let's add that now:

  ```csharp
  private static void UploadAndSetMasterPages(Web web, Folder folder, ClientContext clientContext, XDocument settings, string contentTypeId)
  {
      IList<MasterPageGalleryFile> masterPages = (from m in settings.Descendants("masterPage")
                                                  select new MasterPageGalleryFile
                                                  {
                                                      File = (string)m.Attribute("file"),
                                                      Replaces = (string)m.Attribute("replaces"),
                                                      ContentTypeId = contentTypeId
                                                  }).ToList();
      foreach (MasterPageGalleryFile masterPage in masterPages)
      {
          UploadAndSetMasterPage(web, folder, clientContext, masterPage);
      }
  }
```
  * This reads all of the masterPage elements out of the settings.xml file into business objects and then calls the **UploadAndSetMasterPage** for each master page to be added to the site.

6. Paste in the implementation for the **UploadAndSetMasterPage** method:

  ```csharp
  private static void UploadAndSetMasterPage(Web web, Folder folder, ClientContext clientContext, MasterPageGalleryFile masterPage)
  {
      using (var fileReadingStream = System.IO.File.OpenRead(masterPage.File))
      {
          //Ensure that the masterpage is checked out if this is needed
          PublishingHelper.CheckOutFile(web, masterPage.File, folder.ServerRelativeUrl);

          //Use the FileCreationInformation to upload the new file
          var fileInfo = new FileCreationInformation();
          fileInfo.ContentStream = fileReadingStream;
          fileInfo.Overwrite = true;
          fileInfo.Url = masterPage.File;
          File file = folder.Files.Add(fileInfo);

          //Get the list item associated with the newly uploaded file
          ListItem item = file.ListItemAllFields;
          clientContext.Load(file.ListItemAllFields);
          clientContext.Load(file,
                              f => f.CheckOutType,
                              f => f.Level,
                              f => f.ServerRelativeUrl);
          clientContext.ExecuteQuery();

          item["ContentTypeId"] = masterPage.ContentTypeId;
          item["UIVersion"] = Convert.ToString(15);
          item["MasterPageDescription"] = "Master Page Uploaded using CSOM";
          item.Update();
          clientContext.ExecuteQuery();

          //Check-in, publish and approve and the new masterpage file if needed
          PublishingHelper.CheckInPublishAndApproveFile(file);

          //Update the references to the replaced masterpage if needed
          if (web.MasterUrl.EndsWith("/" + masterPage.Replaces))
          {
              web.MasterUrl = file.ServerRelativeUrl;
          }
          if (web.CustomMasterUrl.EndsWith("/" + masterPage.Replaces))
          {
              web.CustomMasterUrl = file.ServerRelativeUrl;
          }
          web.Update();
          clientContext.ExecuteQuery();
      }
  }
```
7. Press **F5** or choose **Debug – Start Debugging** to run the console application and deploy the new master page.

8. Once the console application has completed execution switch back to **Internet Explorer** and refresh the page.
  * You should now see that the page renders using the Contoso App Master Page and that the custom user control which was visible in the upper right of the page is no longer in use.

  ![Home Page with App Master Page](Images/ModuleReplacementHomePageAppMaster.png)

## Exercise 2: Deploy new page layouts via CSOM ##

### Upload new page layouts. ###

1. Return to **Visual Studio 2013**

2. Move to **Solution View** and open the **Program.cs** file as we need to add more functionality to the console application.

3. Edit the **Main** method and add the following lines at the end of the method inside the **using** statement:

  ```csharp
  //Get the list contentTypeId for the PageLayouts upload the layout pages we know about
  const string parentPageLayoutContentTypeId = "0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811"; //Page Layout
  ContentType pageLayoutContentType = gallery.ContentTypes.FirstOrDefault(ct => ct.StringId.StartsWith(parentPageLayoutContentTypeId));
  UploadPageLayoutsAndUpdateReferences(web, folder, clientContext, settings, pageLayoutContentType.StringId);
```
  * This follows the pattern established for adding the master pages where we determine the Content Type for Page Layouts and call into the method **UploadPageLayoutsAndUpdateReferences** which we will now add.

4. Add the **UploadPageLayoutsAndUpdateReferences** method:

  ```csharp
  private static void UploadPageLayoutsAndUpdateReferences(Web web, Folder folder, ClientContext clientContext, XDocument settings, string contentTypeId)
  {
      //Load all the pageLayout replacements from the settings
      IList<LayoutFile> pageLayouts = (from m in settings.Descendants("pageLayout")
                                   select new LayoutFile
                                   {
                                       File = (string)m.Attribute("file"),
                                       Replaces = (string)m.Attribute("replaces"),
                                       Title = (string)m.Attribute("title"),
                                       ContentTypeId = contentTypeId,
                                       AssociatedContentTypeName = (string)m.Attribute("associatedContentTypeName"),
                                       DefaultLayout = m.Attribute("defaultLayout") != null && (bool)m.Attribute("defaultLayout")
                                   }).ToList();

      // Update the content type association
      foreach (LayoutFile pageLayout in pageLayouts)
      {
          ContentType associatedContentType =
              web.ContentTypes.FirstOrDefault(ct => ct.Name == pageLayout.AssociatedContentTypeName);
          pageLayout.AssociatedContentTypeId = associatedContentType.StringId;
          UploadPageLayout(web, folder, clientContext, pageLayout);
      }
  }
```

  * Again this follows the pattern established for adding Master Pages with some additional functionality. Page Layouts have an associated Content Type, we load the name for this Content Type from the settings file. This is then used to query the Content Types from the site in which we are operating.
  * *Note: Here we derive the Content Type Id from the Web and not the target list*
  * The **UploadPageLayout** method is then invoked for each Page Layout to be uploaded.

5. Add the **UploadPageLayout** method

  ```csharp
  private static void UploadPageLayout(Web web, Folder folder, ClientContext clientContext, LayoutFile pageLayout)
  {
      using (var fileReadingStream = System.IO.File.OpenRead(pageLayout.File))
      {
          PublishingHelper.CheckOutFile(web, pageLayout.File, folder.ServerRelativeUrl);
          //Use the FileCreationInformation to upload the new file
          var fileInfo = new FileCreationInformation();
          fileInfo.ContentStream = fileReadingStream;
          fileInfo.Overwrite = true;
          fileInfo.Url = pageLayout.File;
          File file = folder.Files.Add(fileInfo);
          //Get the list item associated with the newly uploaded file
          ListItem item = file.ListItemAllFields;
          clientContext.Load(file.ListItemAllFields);
          clientContext.Load(file,
                              f => f.CheckOutType,
                              f => f.Level,
                              f => f.ServerRelativeUrl);
          clientContext.ExecuteQuery();

          item["ContentTypeId"] = pageLayout.ContentTypeId;
          item["Title"] = pageLayout.Title;
          item["PublishingAssociatedContentType"] = string.Format(";#{0};#{1};#", pageLayout.AssociatedContentTypeName, pageLayout.AssociatedContentTypeId);
          item.Update();
          clientContext.ExecuteQuery();

          PublishingHelper.CheckInPublishAndApproveFile(file);

          PublishingHelper.UpdateAvailablePageLayouts(web, clientContext, pageLayout, file);

          if (pageLayout.DefaultLayout)
          {
              PublishingHelper.SetDefaultPageLayout(web, clientContext, file);
          }
      }
  }
```
  * This method uses the same approach as was used to upload the master pages, the key differences being that the **PublishingAssociatedContentType** property is set and that it makes use of the **PublishingHelper.UpdateAvailablePageLayouts** and **PublishingHelper.SetDefaultPageLayout** methods.

6. Open the **PublishingHelper.cs** file and examine the **UpdateAvailablePageLayouts** and **SetDefaultPageLayout** methods.

  ![PublishingHelper.cs](Images/ModuleReplacementPublishingHelper.png)
  * As you can see these methods change the XML stored in the **__PageLayouts** and **__DefaultPageLayout** Properties for the Web.

7. Press **F5** or choose **Debug – Start Debugging** to run the console application and deploy the new page layouts.

8. Once the console application has completed execution switch back to **Internet Explorer** and click on **Site Settings** under the gear in the upper right.

  ![Site Settings](Images/ModuleReplacementSiteSettingsLink.png)

9. Under **Web Designer Galleries** click **Master pages and page layouts**

  ![Master pages and page layouts](Images/ModuleReplacementMasterPagesAndPageLayoutsLink.png)

  * You should now see the **ContosoWelcomeLinksApp.aspx** page in the Master Page Gallery.

  ![Site Settings](Images/ModuleReplacementContosoWelcomeLinksAppMaster.png)

10. Navigate **Back** in the browser

11. Under **Look and Feel** click **Page layouts and site templates**

  ![Page layouts and site templates](Images/ModuleReplacementPageLayoutsAndSiteTemplatesLink.png)

  * In the Page Layouts section you will see that the Contoso Welcome Links App page layout is available for use within this site.

  ![Page Layouts](Images/ModuleReplacementPageLayoutsSettings.png)

12. Click on the **FTC Lab** link in the upper left of the screen

  * Note that the home page is not yet using the newly uploaded page layout.

### Update existing pages to use the new layouts. ###

1. Switch back to **Visual Studio 2013**

2. Open the **Program.cs** file.

3. Locate the **UploadPageLayoutsAndUpdateReferences** method, add the following method call as the last line of this method:

  ```csharp
  UpdatePages(web, clientContext, pageLayouts);
```
4. Add the **UpdatePages** method by pasting in the method listed below:

  ```csharp
  private static void UpdatePages(Web web, ClientContext clientContext, IList<LayoutFile> pageLayouts)
  {
      //Get the Pages Library and all the list items it contains
      List pagesList = web.Lists.GetByTitle("Pages");
      var allItemsQuery = CamlQuery.CreateAllItemsQuery();
      ListItemCollection items = pagesList.GetItems(allItemsQuery);
      clientContext.Load(items);
      clientContext.ExecuteQuery();
      foreach (ListItem item in items)
      {
          //Only update those pages that are using a page layout which is being replaced
          var pageLayout = item["PublishingPageLayout"] as FieldUrlValue;
          if (pageLayout != null)
          {
              LayoutFile matchingLayout = pageLayouts.FirstOrDefault(p => pageLayout.Url.EndsWith("/" + p.Replaces));
              if (matchingLayout != null)
              {
                  //Check out the page so we can update the page layout being used
                  PublishingHelper.CheckOutFile(web, item);

                  //Update the pageLayout reference
                  pageLayout.Url = pageLayout.Url.Replace(matchingLayout.Replaces, matchingLayout.File);
                  item["PublishingPageLayout"] = pageLayout;
                  item.Update();
                  File file = item.File;

                  //Grab the file and other attributes so that we can check in etc.
                  clientContext.Load(file,
                      f => f.Level,
                      f => f.CheckOutType);
                  clientContext.ExecuteQuery();

                  //Check-in
                  PublishingHelper.CheckInPublishAndApproveFile(file);
              }
          }
      }
  }
```
  * This method iterates over all the items in the Pages library and updates the Url property of the PublishingPageLayout field to point at the new page layout where appropriate.

5. Press **F5** or choose **Debug – Start Debugging** to run the console application and update the page layouts being used by existing page instances.

6. Once the console application has completed execution switch back to **Internet Explorer** and refresh the page.

  * You should now see the home page using the new page layout

  ![Home page using new master page and page layout](Images/ModuleReplacementHomePageComplete.png)

url: https://raw.githubusercontent.com/DJGHOSTMACHINE/TrainingContent/aee85fd690f70a248d5c5cc5e0f31e543f9338a9/O3658/10 Transformation guidance from farm solutions to add-in model/10-1 Replacement of files deployed via Modules/Lab.md

repository: DJGHOSTMACHINE/TrainingContent

repo_name: DJGHOSTMACHINE/TrainingContent


text:
# Access Token Authenticatable

A devise module that provides something a little more full featured than token
authenticatable.

## Installation

Add this line to your application's Gemfile:

    gem 'devise-access_token_authenticatable'

## Assumptions

You have an `AccessToken` model that responds to the following methods:

* `invalidate!`: Invalidates the token, making it unusable for authentication.
* `fresh?`: Whether or not the token can be used to authenticate the user.
* `used!`: Called whenever the token is used.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
# metis-radar

Quality control check of dual-polarisation radars (Μῆτις is the greek godess of quality!). For ODIM H5 radar files.

## Bibliography

Marks, D. A. et al. Quality control and calibration of the dual-polarization radar at Kwajalein, RMI. J. Atmos. Ocean. Technol. 28, 181–196 (2011).


text:
# Angular 2 JSON API

A lightweight Angular 2 adapter for [JSON API](http://jsonapi.org/)

[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://angular.io/styleguide) [![Dependency Status](https://david-dm.org/ghidoz/angular2-jsonapi.svg)](https://david-dm.org/ghidoz/angular2-jsonapi) [![devDependency Status](https://david-dm.org/ghidoz/angular2-jsonapi/dev-status.svg)](https://david-dm.org/ghidoz/angular2-jsonapi#info=devDependencies) [![npm version](https://badge.fury.io/js/angular2-jsonapi.svg)](https://badge.fury.io/js/angular2-jsonapi)

## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
    - [Configuration](#configuration)
    - [Finding Records](#finding-records)
        - [Querying for Multiple Records](#querying-for-multiple-records)
        - [Retrieving a Single Record](#retrieving-a-single-record)
    - [Creating Records](#creating-records)
    - [Custom Headers](#custom-headers)
- [TODO](#todo)
- [Development](#development)
- [License](#licence)

## Installation

To install this library, run:
```bash
$ npm install angular2-jsonapi --save
```

If you use [Angular-CLI](https://github.com/angular/angular-cli), add the package (and its dependencies) to `system-config.ts`:
```typescript
const map: any = {
  'underscore': 'vendor/underscore',
  'angular2-jsonapi': 'vendor/angular2-jsonapi/dist',
  'reflect-metadata': 'vendor/reflect-metadata/Reflect.js',
  'crypto': '@empty'
};

const packages: any = {
  'underscore': {format: 'cjs', defaultExtension: 'js', main: 'underscore.js'},
  'angular2-jsonapi': {defaultExtension: 'js', main: 'index.js'}
};
```

and to `angular-cli-build.js`:
```javascript
vendorNpmFiles: [
    // ...
    'underscore/underscore.js',
    'angular2-jsonapi/dist/**/*.+(ts|js|js.map)'
]
```

Add the library's `PROVIDERS` to your bootstrap dependences:
```typescript
import { PROVIDERS } from 'angular2-jsonapi';

bootstrap(AppComponent, [
  PROVIDERS
]);
```

## Usage

### Configuration

Firstly, create your `Datastore` service:
- Extend the `JsonApiDatastore` class
- Decorate it with `@JsonApiDatastoreConfig`, set the `baseUrl` for your APIs and map your models

```typescript
import { JsonApiDatastoreConfig, JsonApiDatastore } from 'angular2-jsonapi';

@Injectable()
@JsonApiDatastoreConfig({
  baseUrl: 'http://localhost:8000/v1/',
  models: {
    posts: Post,
    comments: Comment
  }
})
export class Datastore extends JsonApiDatastore { }
```

Then set up your models:
- Extend the `JsonApiModel` class
- Decorate it with `@JsonApiModelConfig`, passing the `type`
- Decorate the relationships attributes with `@HasMany`

```typescript
import { JsonApiModelConfig, JsonApiModel, HasMany } from 'angular2-jsonapi';

@JsonApiModelConfig({
    type: 'posts'
})
export class Post extends JsonApiModel {

    title: string;
    content: string;

    @HasMany()
    comments: Comment[];
}

@JsonApiModelConfig({
    type: 'comments'
})
export class Comment extends JsonApiModel {

    title: string;

    post: Post;
}
```

### Finding Records

#### Querying for Multiple Records

Now, you can use your `Datastore` in order to query your API with the `query()` method:
- The first argument is the type of object you want to query.
- The second argument is the list of params: write them in JSON format and they will be serialized.
- When you want to get also the relationships, pass the `include` param with the type of object to be included as relationship.

```typescript
// ...
constructor(private datastore: Datastore) { }

getPosts(){
    this.datastore.query(Post, {
        page: { size: 10, number: 1},
        include: Comment
    }).subscribe(
        (posts: Post[]) => console.log(posts)
    );
}
```

You will get an array of objects where every mapped relationship will be automatically resolved:
```javascript
[
    Post{
        id: 1,
        title: 'My post',
        content: 'My content',
        comments: [
            Comment{
                id: 1,
                // ...
            },
            Comment{
                id: 2,
                // ...
            }
        ]
    },
    // ...
]
```

#### Retrieving a Single Record

Use `findRecord()` to retrieve a record by its type and ID:

```typescript
this.datastore.findRecord(Post, 1).subscribe(
    (post: Post) => console.log(post)
);
```

You can also pass the options:

```typescript
this.datastore.findRecord(Post, 1, {
    include: Comment
}).subscribe(
    (post: Post) => console.log(post)
);
```

### Creating Records

You can create records by calling the `createRecord()` method on the datastore:
- The first argument is the type of object you want to create.
- The second is a JSON with the object attributes.

```typescript
this.datastore.createRecord(Post, {
    title: 'My post',
    content: 'My content'
}).subscribe(
    (post: Post) => console.log(post)
);
```

If the object you want to create has a one-to-many relationship, you can do this:

```typescript
this.datastore.createRecord(Comment, {
    title: 'My comment',
    post: Post
}).subscribe(
    (comment: Comment) => console.log(comment)
);
```

### Custom Headers

By default, the library adds these headers, according to the [JSON API MIME Types](http://jsonapi.org/#mime-types):

```
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
```

You can also add your custom headers to be appended to each http call:

```typescript
this.datastore.headers = new Headers({'Authorization': 'Bearer ' + accessToken});
```

Or you can pass the headers as last argument of any datastore call method:

```typescript
this.datastore.createRecord(Post, {
    title: 'My post',
    content: 'My content'
}, new Headers({'Authorization': 'Bearer ' + accessToken}));
```

## TODO
- Implement everything from the [JSON API](http://jsonapi.org/) specific.
- Add unit testing and E2E testing

## Development

To generate all `*.js`, `*.js.map` and `*.d.ts` files:

```bash
$ npm run tsc
```

To lint all `*.ts` files:

```bash
$ npm run lint
```

## Thanks

This library is inspired by the draft of [this never implemented library](https://github.com/beauby/angular2-jsonapi).

## License

MIT © [Daniele Ghidoli](http://danieleghidoli.it)


text:
# Changelog

## [7.8.3](https://github.com/Financial-Times/origami/compare/o-buttons-v7.8.2...o-buttons-v7.8.3) (2023-08-25)

### Bug Fixes

* update o-typography dependency  ([fb45b47](https://github.com/Financial-Times/origami/commit/fb45b47274241ea828f7dd50233441a76a215a51))

### [7.8.2](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.8.1...o-buttons-v7.8.2) (2023-07-13)

### Bug Fixes

* introduce designer guidelines to o-buttons readme ([276dc0d](https://www.github.com/Financial-Times/origami/commit/276dc0d41b2774ed3a4e1dd071d6d6b1fac042bc))

### [7.8.1](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.8.0...o-buttons-v7.8.1) (2023-04-28)

### Bug Fixes

* Require latest minor version of o-colors, o-buttons, and o-forms ([#1098](https://www.github.com/Financial-Times/origami/issues/1098)) ([b856ca6](https://www.github.com/Financial-Times/origami/commit/b856ca66c9ec555f3c70833ffa35cb05cd19841f))

## [7.8.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.7.5...o-buttons-v7.8.0) (2023-04-28)

### Features

* o-buttons, add themes for the FT Professional sub-brand ([ca5432a](https://www.github.com/Financial-Times/origami/commit/ca5432aafa70dd9bdb47d4412d9b2225336585ef))

### [7.7.5](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.7.4...o-buttons-v7.7.5) (2023-02-24)

### Bug Fixes

* o-buttons, update the TSX template to support any o-icons button icon  ([#1024](https://www.github.com/Financial-Times/origami/issues/1024)) ([a2be9f0](https://www.github.com/Financial-Times/origami/commit/a2be9f057ab8991a1298b7d7df8268ba351409b5))

### [7.7.4](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.7.3...o-buttons-v7.7.4) (2023-01-20)

### Bug Fixes

* ensure components depend on the latest o-normalise version ([e910236](https://www.github.com/Financial-Times/origami/commit/e910236454318ce1bf198a06da7e76c0893c9142))

### [7.7.3](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.7.2...o-buttons-v7.7.3) (2022-12-21)

### Bug Fixes

* require 3.3.0 or higher ([fc180c6](https://www.github.com/Financial-Times/origami/commit/fc180c619755daa1b7bfe65509f354cf0de113bf))

### [7.7.2](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.7.1...o-buttons-v7.7.2) (2022-12-15)

### Bug Fixes

* o-buttons, update focus style with double ring ([e2c7e02](https://www.github.com/Financial-Times/origami/commit/e2c7e02e2ca0b50420c942627814edba5ed41e14))

### [7.7.1](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.7.0...o-buttons-v7.7.1) (2022-08-17)

### Bug Fixes

* Update onClick handler to support React's MouseEventHandler ([a5ea55f](https://www.github.com/Financial-Times/origami/commit/a5ea55f49a47fd535253050676d5d1678e9363ab))
* Fix issue with link / button type ([95ed2b3](https://www.github.com/Financial-Times/origami/commit/95ed2b31a1a778ca13df527bbf1d8fc663fad41f))

## [7.7.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.6.0...o-buttons-v7.7.0) (2022-07-26)

### Features

* publish o-buttons tsx ([#779](https://www.github.com/Financial-Times/origami/issues/779)) ([d7c8eec](https://www.github.com/Financial-Times/origami/commit/d7c8eec8b0f0bf1eccc1dcc64cb846f518593598))
* publish o-buttons tsx with added support for `onClick` event listener ([d7c8eec](https://www.github.com/Financial-Times/origami/commit/d7c8eec8b0f0bf1eccc1dcc64cb846f518593598))

## [7.6.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.5.0...o-buttons-v7.6.0) (2022-05-17)

### Features

* o-buttons add ghost mono / inverse themes ([#725](https://www.github.com/Financial-Times/origami/issues/725)) ([832f400](https://www.github.com/Financial-Times/origami/commit/832f400e6200b015772025f3b91a0e02080e7a75))

## [7.5.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.4.0...o-buttons-v7.5.0) (2022-02-16)

### Features

* add ghost button type ([b5a87c1](https://www.github.com/Financial-Times/origami/commit/b5a87c1a726e26a376ba64608c4fde9d359932c1))
* add ghost to tsx theme ([2d6e576](https://www.github.com/Financial-Times/origami/commit/2d6e5764cf6d59ab1b8b78de0fbd635a4c689eb3))

## [7.4.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.3.0...o-buttons-v7.4.0) (2022-02-10)

### Features

* add o-buttons pagination and group stories ([417f1e6](https://www.github.com/Financial-Times/origami/commit/417f1e681af8a2a84c09b34910e13d1d8d295d75))

## [7.3.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.2.2...o-buttons-v7.3.0) (2022-02-03)

### Features

* add Storybook addon, Origami background selector  ([#595](https://www.github.com/Financial-Times/origami/issues/595)) ([f58329c](https://www.github.com/Financial-Times/origami/commit/f58329c17a8f8aa8dfa9aa2319f9aba07c0add69))

### [7.2.2](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.2.1...o-buttons-v7.2.2) (2022-01-13)

### Bug Fixes

* expand all uses of docs to documentation ([26f8d9d](https://www.github.com/Financial-Times/origami/commit/26f8d9d8cbbe3e78902d8c3951b37e08150a77bd))

### [7.2.1](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.2.0...o-buttons-v7.2.1) (2021-12-24)

### Bug Fixes

* remove disabled anchor buttons from the demos as anchors can not be disabled ([4d3a2a6](https://www.github.com/Financial-Times/origami/commit/4d3a2a634d3c690111fff4f280d3909b3ffd9a1e))
* update demo to use aria-pressed instead of aria-selected as by default a button can not have a selected state ([af2b05a](https://www.github.com/Financial-Times/origami/commit/af2b05a0e524dde130198dbd5b88b0a964522b0c))

## [7.2.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.1.1...o-buttons-v7.2.0) (2021-11-24)

### Features

* allow npm 8 in engines config ([eeb1cae](https://www.github.com/Financial-Times/origami/commit/eeb1cae6e7f0379e647f2b41240b1f294997d528))

### [7.1.1](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.1.0...o-buttons-v7.1.1) (2021-11-08)

### Bug Fixes

* pin components to latest o-brand, or greater ([3a6ccea](https://www.github.com/Financial-Times/origami/commit/3a6ccea1e838e4a2003322ca1f855d0b87b26b60))

## [7.1.0](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.0.2...o-buttons-v7.1.0) (2021-11-08)

### Features

* Rename master brand in component origami.json ([f642faf](https://www.github.com/Financial-Times/origami/commit/f642faf0574d84ea8185b56e6090c8015def27e6))

### [7.0.2](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.0.1...o-buttons-v7.0.2) (2021-11-02)

### Bug Fixes

* Update `o-brand` in components, replace "master" with "core" ([322617e](https://www.github.com/Financial-Times/origami/commit/322617ea80f30a6825d9c36872e05574b871ea82))

### [7.0.1](https://www.github.com/Financial-Times/origami/compare/o-buttons-v7.0.0...o-buttons-v7.0.1) (2021-09-21)

### Bug Fixes

* Add homepage, bugs and support email to the package.json ([6c0de60](https://www.github.com/Financial-Times/origami/commit/6c0de60ebd6e64c4dd16d000fcc6b79412ce30f4))
* update bugs urls ([3ea0ca0](https://www.github.com/Financial-Times/origami/commit/3ea0ca03bcb6e55142a77387ad0fff5ddf056d44))
* update origami json urls ([c757653](https://www.github.com/Financial-Times/origami/commit/c7576532b5a14f0462d5346dfb63238be025602e))

repository: Financial-Times/origami

repo_name: Financial-Times/origami


text:
## 0.3.1
 - Bugfix from @michaelrkn. Failed to display the info message when running `git pair init` with existing pairs file.

## 0.3.0
 - Added support ruby-2.0.0 support
 - Added support ruby-2.1.0 support
 - Locked runtime dependencies
 - Thanks to @michaelrkn. Switched to preferred rainbow syntax to fix exceptions and failing specs

## 0.2.0
 - New command: git pair delete
 - New command: git pair list
 - Added support ruby-1.9.2 support
 - Bugfix: `git pair add` doesn't add a same pair

## 0.1.0
 - New command: git pair add
 - Added post install message
 - Fixed noisy error message on failed validation
 - Added some color to output

## 0.0.4
 - Interactive creation of a sample config

## 0.0.3
 - Added integration test suite
 - git pair init command
 - Improved documentation

## 0.0.2
 - Added rspec suite
 - Fixed ugly output if unknown pair is specified

## 0.0.1
 - Initial release


text:
---
app_id: com.github.rkoesters.xkcd-gtk
title: "Comic Sticks"
summary: "Read xkcd: a webcomic of romance, sarcasm, math, and language"
developer: "Ryan Koesters"
homepage: https://github.com/rkoesters/xkcd-gtk
help_page: false
bugtracker: false
dist: hera
screenshots:
  - https://appstream.elementary.io/appcenter/media/bionic/com/github/rkoesters.xkcd-gtk/C3A095D135DB83EE2D2AFD0CFC054EDC/screenshots/image-1_orig.png
  - https://appstream.elementary.io/appcenter/media/bionic/com/github/rkoesters.xkcd-gtk/C3A095D135DB83EE2D2AFD0CFC054EDC/screenshots/image-2_orig.png
  - https://appstream.elementary.io/appcenter/media/bionic/com/github/rkoesters.xkcd-gtk/C3A095D135DB83EE2D2AFD0CFC054EDC/screenshots/image-3_orig.png
icons:
  "64": https://appstream.elementary.io/appcenter/media/bionic/com/github/rkoesters.xkcd-gtk/C3A095D135DB83EE2D2AFD0CFC054EDC/icons/64x64/com.github.rkoesters.xkcd-gtk_com.github.rkoesters.xkcd-gtk.png
  "128": https://appstream.elementary.io/appcenter/media/bionic/com/github/rkoesters.xkcd-gtk/C3A095D135DB83EE2D2AFD0CFC054EDC/icons/128x128/com.github.rkoesters.xkcd-gtk_com.github.rkoesters.xkcd-gtk.png
  "64@2": <EMAIL_ADDRESS>color:
  primary: "#96a8c8"
  primary-text: "#1a1a1a"
price: false
releases:
- version: 1.3.2
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Add Italian translations (Thanks to albanobattistella)

Minor performance improvement to bookmarks menu

Fix a bug (race condition)

- version: 1.3.1
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Add loading icon while fetching comic

Add Dutch translations (Thanks to Vistaus)

- version: 1.3.0
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Add bookmarks for keeping track of comics

Update search menu to not waste space

- version: 1.2.0
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Add support for translations (user interface only, comics will remain in their original language)

Add French translations (Thanks to NathanBnm)

- version: 1.1.3
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Fix for changes to xkcd API encoding.

- version: 1.1.2
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Fix restoring of window state when maximized

- version: 1.1.1
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Add keyboard shortcut for dark mode

Fix saving of properties window state

- version: 1.1.0
  unix-timestamp:<PHONE_NUMBER>
  description: |-

The dark mode update!

Add dark mode that inverts the comic image to improve readability in the dark

Add buttons to titlebar for jumping to the first comic and the newest comic

Fix issue with encoding of comic metadata (fixes display of special characters and emojis)

Fix memory leak when closing additional comic windows

- version: 1.0.4
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Update app metadata to pass appstream-util validate-relax

- version: 1.0.3
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Revert fuzzy searching due to regressions

- version: 1.0.2
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Minor fixes

Use fuzzy searching

Only show alt text when hovering directly over the comic image

- version: 1.0.1
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Update OARS metadata.

- version: 1.0.0
  unix-timestamp:<PHONE_NUMBER>
  description: |-

First stable release

Improve startup time

Add keyboard shortcuts for faster navigation

redirect_from:
  - /com.github.rkoesters.xkcd-gtk.desktop/
---

Comic Sticks brings xkcd comics to your desktop with quick comic searching, offline browsing, and intuitive keyboard shortcuts.

Features:

Search for comics

Keep track of comics with bookmarks

Cache comics for later offline viewing

Dark mode for late night reading

View comic metadata

Quickly access comic explainations via the explain xkcd wiki

license: Unlicense

gha_license_id: Unlicense


text:
- [Menus Plugin](#menus-plugin)
    - [Install Menus Plugin](#install-menus-plugin)
    - [Use Database Base Menu](#use-database-base-menu)

# Menus Plugin

we are building a plugin to manage menus with database, like sorting rename and delete menus.

## [Install Menus Plugin](#install-menus-plugin)

to install menus plugin by run this command

```bash
php artisan menu:install
```

it will generate roles and permissions for menus

## [Use Database Base Menu](#use-database-base-menu)

to switch between database base menu and file base menu

first go to `admin/menus` route and click on `Generate` action to generate the current menus with groups to database and after that

you can set `MENU_DATABASE` to `true` on `.env` file