text:
yii2-date-range-picker
=====================

[![Latest Stable Version](https://poser.pugx.org/bupy7/yii2-date-range-picker/v/stable)](https://packagist.org/packages/bupy7/yii2-date-range-picker)
[![Total Downloads](https://poser.pugx.org/bupy7/yii2-date-range-picker/downloads)](https://packagist.org/packages/bupy7/yii2-date-range-picker)
[![Latest Unstable Version](https://poser.pugx.org/bupy7/yii2-date-range-picker/v/unstable)](https://packagist.org/packages/bupy7/yii2-date-range-picker)
[![License](https://poser.pugx.org/bupy7/yii2-date-range-picker/license)](https://packagist.org/packages/bupy7/yii2-date-range-picker)

Wrapper of bootstrap date range picker for Yii2.

More information about plugin: https://github.com/dangrossman/bootstrap-daterangepicker

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist bupy7/yii2-date-range "*"
```

or add

```
"bupy7/yii2-date-range": "*"
```

to the require section of your `composer.json` file.

Usage
-----

As field of form:

```php
echo $form->field($model, 'date_range')->widget(DateRangePicker::className(), [
    'pluginOptions' => [
        // see http://www.daterangepicker.com/#options
    ],

    'pluginEvents' => [
        // see http://www.daterangepicker.com/#events
    ],

    // Language of plugin. If `null` then `\yii\base\Application::language` will be used.
    'language' => 'ru',

    // Converting date format from PHP DateTime to Moment.js DateTime.
    'convertDateFormat' => true,

    // Options of field input.
    'options' => [

    ],
]);
```

As an independent widget:

```php
DateRangePicker::widget([
    'name' => 'date_time',

    'pluginOptions' => [
        // see http://www.daterangepicker.com/#options
    ],

    'pluginEvents' => [
        // see http://www.daterangepicker.com/#events
    ],

    // Language of plugin. If `null` then `\yii\base\Application::language` will be used.
    'language' => 'ru',

    // Converting date format from PHP DateTime to Moment.js DateTime.
    'convertDateFormat' => true,

    // Options of field input.
    'options' => [

    ],
]);
```

##License

yii2-date-range-picker is released under the BSD 3-Clause License.


text:
## j-Selected

The component can set a specific class to a specific element according to the simple condition.

__Configuration__:

Example: `data-jc-config="class:selected;selector:a"`

- `class` {String} (optional) is a class name for selected element
- `selector` {String} (optional) is a jQuery selector

__Usage__:

Each nested element according to the `selector` must have defined `data-if` attribute. It works only with `strings` values.

### Author

- Peter Širka<EMAIL_ADDRESS>- License: MIT

license: MIT

repository: pnmcosta/components

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: pnmcosta/components


text:
# USMPep: Universal Sequence Models for Major Histocompatibility Complex Binding Afﬁnity Prediction
**USMPep** is a simple recurrent neural network for MHC binding afﬁnity prediction. It is competitive with state-of-the-art tools for a single model trained from scratch, while ensembling multiple regressors and language model pretraining can slightly improve its performance.
In our paper we report the excellent predictive performance of **USMPep** on several benchmark datasets.

For a detailed description of technical details and experimental results, please refer to our paper:

[USMPep: Universal Sequence Models for Major Histocompatibility Complex Binding Afﬁnity Prediction](https://doi.org/10.1186/s12859-020-03631-1)

Johanna Vielhaben, Markus Wenzel, Wojciech Samek, and Nils Strodthoff

 	@article{Vielhaben:2020USMPep,
	author = {Vielhaben, Johanna and Wenzel, Markus and Samek, Wojciech and Strodthoff, Nils},
	title = {{USMPep: Universal Sequence Models for Major Histocompatibility Complex Binding Affinity Prediction}},
	journal = {BMC Bioinformatics},
	year = {2020},
	month={Jul},
	volume = {21},
	number = {1},
	pages={279},
	issn={1471-2105},
	doi = {10.1186/s12859-020-03631-1},
	url= {https://doi.org/10.1186/s12859-020-03631-1}
	}

This is the accompanying code repository where we also provide a pretrained language model and predictions of our models on the test datasets discussed in our paper.

We present an extended version of **USMPep**, that we evaluated on a recent SARS-CoV-2 dataset, in our paper:

[Predicting the Binding of SARS-CoV-2 Peptides to the Major Histocompatibility Complex with Recurrent Neural Networks](https://arxiv.org/abs/2104.08237)

Johanna Vielhaben, Markus Wenzel, Eva Weicken, Nils Strodthoff

	@misc{Vielhaben:2021USMPep,
	      title={Predicting the Binding of SARS-CoV-2 Peptides to the Major Histocompatibility Complex with Recurrent Neural Networks},
	      author={Johanna Vielhaben and Markus Wenzel and Eva Weicken and Nils Strodthoff},
	      year={2021},
	      eprint={2104.08237},
	      archivePrefix={arXiv},
	      primaryClass={q-bio.QM}
	}

**USMPep** builds on the [UDSMProt](https://github.com/nstrodt/UDSMProt)-framework: [Universal Deep Sequence Models for Protein Classification](https://doi.org/10.1101/704874)
## Dependencies
for training/evaluation: `pytorch` `fastai` `fire`

for dataset creation: `numpy` `pandas` `scikit-learn` `biopython` `sentencepiece` `lxml`

## Installation
We recommend using conda as Python package and environment manager.
Either install the environment using the provided `proteomics.yml` by running `conda env create -f proteomics.yml` or follow the steps below:
1. Create conda environment: `conda create -n proteomics` and `conda activate proteomics`
2. Install pytorch: `conda install pytorch -c pytorch`
3. Install fastai: `conda install -c fastai fastai=1.0.52`
4. Install fire: `conda install fire -c conda-forge`
5. Install scikit-learn: `conda install scikit-learn`
6. Install Biopython: `conda install biopython -c conda-forge`
7. Install sentencepiece: `pip install sentencepiece`
8. Install lxml: `conda install lxml`

Optionally (for support of threshold 0.4 clusters) install [cd-hit](`https://github.com/weizhongli/cdhit`) and add `cd-hit` to the default searchpath.

## Usage
See the [USMPep User Guide](./code/USMPep_UserGuide.ipynb) for extensive usage information.

A second [User Guide](./code/USMPep_SARS-CoV-2.ipynb) provides usage information for the extended version of **USMPep**.

## Binding Affinity Predictions
We provide peptide binding affinity predictions for our tools, see `git-data`-folder and the corresponding [readme file](./git_data/README.md) for details.

repository: nstrodt/USMPep

repo_name: nstrodt/USMPep


text:
# CVS Localstack

## Localstack Setup
The following steps have been tested on macOS Catalina 10.15.7 only

#### Hardware Prerequisites
* 10GB of RAM
* 6 CPUs

### Architecture
![alt text](https://github.com/dvsa/cvs-devkit/blob/feature/CVSB-19359/localstack/architecture/localstack.png?raw=true)

#### Prerequisites
1. Make sure the latest docker engine is installed and up to date. [Download the latest version here](https://www.docker.com/products/docker-desktop)
2. Make sure you have brew installed. [Download the latest version here](https://brew.sh/)
3. Make sure you have serverless installed [Download the latest version here](https://www.serverless.com/framework/docs/getting-started/)
4. Make sure terraform 13 or higher  [Download the latest version here](https://learn.hashicorp.com/tutorials/terraform/install-cli)
5. Make sure you have the awscli v2 installed [Download the latest version here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html)
6. Make sure you have awslogs installed [Download the latest version here](https://github.com/jorgebastida/awslogs)
7. Open docker preferences and under resources, file sharing make sure you have `/private` in the resources list.
8. This version of localstack requires an API key. You will need to create a subscription on https://app.localstack.cloud/  to be able to test use these script. The subscription needs to be exported prior to running the docker-compose up script. `export LOCALSTACK_API_KEY=xxxxxxxxx`

#### Create Localstack virtual environment for the impatient
0. The recommendation is to close as many applications as possible as this process requires quite a bit of computational power
1. Open a new terminal window and navigate into the `scripts` directory
2. Export the localstack PRO api key by running `export LOCALSTACK_API_KEY=xxxxxxxxx`
3. Run the following command `docker-compose up` and wait until the container is up and running

4. In a different terminal navigate into the scrip folder and run the `./prepare_localstack.sh` script

#### Create Localstack virtual environment for the geeks
0. The recommendation is to close as many applications as possible as this process requires quite a bit of computational power
1. Open a new terminal window and navigate into the `scripts` directory
2. Export the localstack PRO api key by running `export LOCALSTACK_API_KEY=xxxxxxxxx`
3. Run the following command `docker-compose up` and wait until the container is up and running
4. Upload the latest zip files into localstack by running `./upload_all.sh -b` in the same directory. Wait until this process finish
5. Now change directory and go to the terraform folder and run `terraform init`
6. If the step was successful run `terraform apply` and confirm the creation of the localstack infrastructure.
7. Once the script finish you can go back into the scripts folder and run `npm install` in the seed folder. Go up a folder and seed all services by running `./seed_all.sh`
8. Upload a sample signature document into the signature bucket by running the `./upload-signature.sh`
9. You can now import the postman collection from the postman folder which will provide all necessary scripts required to run the services.
10. Using the test results payloads you can generate a certificate. The certificate will be generated in the cvs-cert-localstack bucket
11. Use the download-certificate.sh script to download the pdf file from the bucket. The s3 key required can be found under https://app.localstack.cloud/resources/s3 in the `cvs-cert-localstack/localstack` bucket folder

## Dashboard
It is possible to navigate localstack portal by browsing the following url. You will need a subscription to be able to do so https://app.localstack.cloud/dashboard

## License
This tool kit is available as open source under the terms of the [MIT](https://opensource.org/licenses/MIT).

repository: dvsa/cvs-devkit

branch_name: refs/heads/develop

gha_language: Ruby

gha_license_id: MIT

repo_name: dvsa/cvs-devkit


text:
# lodash-pickDeep
[![GitHub Latest Release](https://badge.fury.io/gh/JamesMGreene%2Flodash-pickDeep.svg)](https://github.com/JamesMGreene/lodash-pickDeep) [![Build Status](https://secure.travis-ci.org/JamesMGreene/lodash-pickDeep.svg?branch=master)](https://travis-ci.org/JamesMGreene/lodash-pickDeep) [![Coverage Status](https://coveralls.io/repos/JamesMGreene/lodash-pickDeep/badge.svg?branch=master&service=github)](https://coveralls.io/github/JamesMGreene/lodash-pickDeep?branch=master) [![Dependency Status](https://david-dm.org/JamesMGreene/lodash-pickDeep.svg?theme=shields.io)](https://david-dm.org/JamesMGreene/lodash-pickDeep) [![Dev Dependency Status](https://david-dm.org/JamesMGreene/lodash-pickDeep/dev-status.svg?theme=shields.io)](https://david-dm.org/JamesMGreene/lodash-pickDeep#info=devDependencies)

A [lodash](https://lodash.com/) mixin to add a `pickDeep` function.

## Install

```shell
$ npm install --save lodash-pickdeep
```

## Usage

#### Using it as a lodash mixin

```js
var _ = require('lodash');
var pickDeep = require('lodash-pickdeep');

_.mixin( { pickDeep: pickDeep }, { chain: true } );

_.pickDeep( { a: { b: { c: 'foo', d: 'bar', e: { f: 'baz' } } } }, [ 'a.b.c', 'a.b.e' ] );
// =>  { a: { b: { c: 'foo', e: { f: 'baz' } } } }
```

#### Using it on its own

```js
var pickDeep = require('lodash-pickdeep');

pickDeep( { a: { b: { c: 'foo', d: 'bar', e: { f: 'baz' } } } }, [ 'a.b.c', 'a.b.e' ] );
// =>  { a: { b: { c: 'foo', e: { f: 'baz' } } } }
```

## API Documentation

### `_.pickDeep(object, [props])`

Creates an object composed of the picked object properties, which may contain deep property identifiers.

#### Arguments
1. `object` *(Object)*: The source object.
2. `[props]` *(...(string|string[])*: The property identifiers to pick, specified individually or in arrays.

#### Returns
*(Object)*:  Returns the new object.

## License

Copyright (c) 2016, James M. Greene (MIT License)

repository: JamesMGreene/lodash-pickDeep

repo_name: JamesMGreene/lodash-pickDeep


text:
behaviors.dart
==============

Behaviors are a way to attach new functionality to DOM elements which match
certain CSS selectors.

Behaviors are encapsulated, reusable bits of functionality. They interact with
elements via public APIs - listening to events and reading and writing
properties. Examples of behaviors include selectability, drag and drop,
or input validation.

`Behavior` is the interface or base class for Behaviors. It has a named
constructor `Behavior.attach` that takes the element the behavior is attached
to. It then has a single method `detach` that's called when the behavior should
clean up.

`registerBehavior` registers a CSS selector with a `BehaviorFactory` function
for a specific node. Using the active_query package, the node is monitored for
changes, and when an element matches the selector a new behavior instance is
created with the factory. When an element is removed or changed so that it no
longer matches the selector, the behavior is detached.

`getBehaviors` returns all the behaviors currently attached to a node.

See the example folder for more.

gha_language: Dart


text:
# Contributing

## Brief overview of the code ...

The key things to note are:

- All the modbus information about devices/fields/etc. is auto-generated from `./sunspec/doc/OutBack.Power.SunSpec.Map.xlsx`.
- All the other code for reading/interacting then utilises these definitions.
- If it seems weird that e.g. we have `Field`s and `FieldValue`s, this is why. The `Field` is the pure things parsed from the specification provided by Outback, which we want to keep clean and separate. The `FieldValue` is then the thing you actually interact with (and references an underlying `Field`). Maybe there's a nicer way of doing it, but for now this works.
- Typing is handy.
- General focus is on simple usage for the majority of use cases.
- There are some basic tests - it'd be nice to have more!
- Using the caching options in `Mate3Client` or the CLI are best for developing, as it avoids bricking your device.

## Code contributions

If you wish to edit the mate3 source (contributions are gladly received!),
then you can get the project directly from GitHub:

```sh
# Install poetry if you don't have it already (if you're unsure, you don't have it)
pip install poetry

# Get the source
git clone https://github.com/adamcharnock/mate3.git
cd mate3

# Install mate3 and its dependencies. This also makes the mate3 command available.
poetry install

# Run the tests - there aren't many, so feel free to add more!
pytest .
```

After this you should be able to run the `mate3` command and edit the project's source code.

## Release process

```sh
# Check everything has been comitted
git diff

# Up the version
poetry version {major|minor|bug}

# Update setup.py et al
dephell deps convert

# Review the resulting changes
git diff

# Build
poetry publish --build

# Docker: build & push
docker build -t adamcharnock/mate3:{VERSION_HERE} .
docker push adamcharnock/mate3:{VERSION_HERE}

# Commit
git ci  -m "Version bump"
git push
git push --tags
```

gha_language: Python


text:
# grep-folder
Emacs small package to help you grep your folders and correct configure it.

I am using `grep` during all day long. I had written a function that was just perfect for me to grep my files. However, I started to need to extend that function to be work for other directories as well. I tried `counsel-git-grep`, but for some reason it is really tooo slow in my machine (MacBook Air (13-inch, 2017)) and I could not make the "exclude directories" and "exclude files" to work and get out a lot of unwanted results from my search. Therefore, I decided to improve a little bit of my functions and transform it in a small packages. Hope this could be useful to someone else.

# Instillation

``` emacs-lisp
(add-to-list 'load-path "~/.emacs.d/site-packages/grep-folder")
(require 'grep-folder)
(global-set-key (kbd "C-c g") 'grep-folder)

```

**IMPORTANT**: The version of your `grep` command should be `>=2.5.2`.

# Usage

After the installation you only need to fire `M-x grep-folder` and select the folder you want to grep.

![Example](ivy-interface.png)

By default there is only the `emacs.d` folder setup. Check how to add and customize the folder you desire below.

# Customization

The settings below remove the `var/`, `etc/`, `.cask/`, `.git/` and `site-packages` from the grep command inside my `emacs.d` directory.
It also adds the `myScript` folder to the initial menu.
``` emacs-lisp
(setq grep-folder-setup-dirs '(("~/.emacs.d" . ("var/" "etc/" ".cask/" ".git/" "site-packages"))
                               ("~/myScripts")))
(setq grep-folder-setup-files '(("~/.emacs.d" . (".gitmodules"))))
```

repository: wandersoncferreira/grep-folder

repo_name: wandersoncferreira/grep-folder


text:
---
id: 748
title: Chancellor's Associates
date: 2017-08-21T15:45:46+00:00
author: Jason
layout: page
guid: https://live-ucsc-giving.pantheonsite.io/?page_id=748
hero:
  use: true
  image: chancellors-associates-banner.png #best at 1000px by 450px
  alt_text: chancellors-associates-banner
  vertical: top #options: top, bottom
  horizontal: right #options: left, right
see_also:
  - title: Ways funds are used
    link: /ways-to-give/chancellors-associates/ways-funds-used/
sidebar1: chancellors-associates-contact-sidebar.html
---
{% include sidebars/{{page.sidebar1}} classes="right" %}
Chancellor’s Associates are UC Santa Cruz’s leadership annual giving community. Chancellor’s Associates provide consistent support that is critical to our success as a world-class higher learning institution. Chancellor’s Associates welcomes alumni, parents, faculty, staff, and friends as generous campus partners. Year after year, donors who make leadership gifts as a Chancellor’s Associate bridge the gap between endowed scholarships and other sources of financial aid. This annual commitment enables transformative change and inspires others to give back.

**Chancellor’s Associates begins with an annual gift to any school, department, or program in the amount of $2,500 or more.** We recognize that young alumni are at the start of a dynamic and exciting time of their lives; we welcome graduates of the last decade (GOLD) to Chancellor’s Associates with an annual gift of $500 or more.

Being a Chancellor’s Associate means engaging in meaningful ways across campus in the areas  donors are most passionate about.  Our students, faculty, research, programs, facilities, and community as a whole benefit greatly from this special and loyal group of supporters. **As a member of the giving community, benefits include:**

* Annual appreciation gift
* Chancellor’s Associates Newsletter
* Personal campus liaison
* Access to exclusive Chancellor’s Associates events
* Exclusive updates with university leadership

repository: ucsc/site-giving

gha_language: HTML

repo_name: ucsc/site-giving


text:
# Contributing to heat2arm:

## Raising issues:

* When reporting an issue with the converter, please include a paste/link to
  the logs of the translation run with `--loglevel=debug` set.


text:
# Acme Explosives

## Setup

These commands are a helpful quick start. You may choose to ignore them completely and create your own directory structure. If you choose to use this recommendation, just copy the commands below and paste. It doesn't matter what directory you are currently in.

```bash
mkdir -p ~/workspace/exercises/mjd/acme-explosives && cd $_
```

## Instructions

You are going to be creating several JSON files that will be describing all of the explosive products that you sell. You need to use Promises to handle the order of the asynchronous operations needed to load the data.

### Product Categories

Choose at least two, but as many of you like, categories for your products. Give each one an integer unique id.

Here's an example.

##### categories.json

```js
{
    "categories": [
        {
            "id": 0,
            "name": "Fireworks"
        },
        {
            "id": 1,
            "name": "Demolition"
        }
    ]
}
```

### Product Types

Create a JSON file describing types **for each** category of your products. For each type, add a key/value pair that creates a relationship to the corresponding category. Create at least 3 types for each category.

##### types.json

```js
{
    "types": [
        {
            "id": 0,
            "category": 0,
            "name": "personal",
            "description": "Fireworks intended for recreational use during holiday celebrations"
        }
    ]
}
```

### Product Details

Create a JSON file describing each product you offer. Add a key/value pair that creates a relationship to the appropriate product type. Add at least 3 products for each type.

##### products.json

```js
{
    "products": [{
        "fairy_sparklers": {
            "id": 0,
            "type": 0,
            "name": "Fairy Sparklers",
            "description": "Multi-colored sparklers that are safe for any age."
        }
    }]
}
```

### User interface

Create a simple user interface for your product catalog where a user can select a category from a dropdown. When a category is selected, you must use Promises to read, first, from the `categories.json` to load that array of objects, then load `types.json`, then `products.json`.

Once all data is loaded, you need to display the products in a Bootstrap grid. Each product must display the string name of its product type, and product category. Not the integer id value.

repository: anothersusan/ux-developer-milestones

repo_name: anothersusan/ux-developer-milestones


text:
# Amazon Web Services

To use the Amazon Web Services provider to import your EKS cluster you have to provide the following AWS credentials:

| Value | Description |
| ----- | ----------- |
| Access Key ID | Access key for AWS. |
| Secret Key | A secret key which corresponds to your **Access Key ID**. |
| Region | Your AWS region. |

These credentials are also used to mange the authentication against the Kubernetes API server of your EKS cluster. So make sure that the **Access Key ID** has the rights to get a list of your EKS clusters and to access your cluster.

## AWS Single Sign-On

You can also use AWS Single Sign-On within kubenav, for that you have to provide the following settings:

| Value | Description |
| ----- | ----------- |
| Start URL | The start URL for AWS Single Sign-On process. |
| Account ID | Is the ID of your AWS account. |
| Role Name | Is the name of a role, which is connected with your AWS SSO account. |
| SSO Region | The AWS region, where you configured SSO. |
| Region | The region for your Kubernetes cluster. |


text:
# Optimization of the Intel Compiler

## Introduction

I've found that some codes compiled by the Intel compiler are significantly slower than those by GCC.

[https://github.com/kaityo256/compiler_test](https://github.com/kaityo256/compiler_test)

This is a Monte Carlo simulation code of the Potts model, which is one of the fundamental models in statistical physics.

While investigating the cause of this problem, I arrived at the simple code.

```cpp
#include <iostream>
#include <random>

double run(void) {
  std::mt19937 mt(1);
  double r = 0.0;
  std::uniform_real_distribution<> ud(-1.0, 1.0);
  for (int j = 0; j < 10000; j++) {
    for (int i = 0; i < 10000; i++) {
      if (i % 2) r += ud(mt);
    }
  }
  return r;
}

int main() {
  std::cout << run() << std::endl;
}
```

The benchmark results are as follows.

* Environment
  * CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
  * OS: CentOS Linux release 7.6.1810 (Core)
  * GCC: g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  * icpc: icpc (ICC) <IP_ADDRESS> 20190416

```sh
$ g++ -O3 -march=native -Wall -Wextra -std=c++11 test.cpp -o gcc.out
$ icpc -O3 -xHOST -Wall -Wextra -std=c++11  test.cpp -o icpc.out
$ time ./gcc.out
-6698.66
./gcc.out  0.33s user 0.00s system 99% cpu 0.335 total

$ time ./icpc.out
-6698.66
./icpc.out  2.93s user 0.00s system 99% cpu 2.939 total
```

The two executables give identical results, but the executable produced by the Intel compiler is significantly slower than that by GCC.

From the detailed investigation described later, I found that the weird behavior will happen under the following conditions.

* A loop contains if-statement.
* The if-statements contains a function call of `std::uniform_real_distribution`.
* This behavior does not depend on the type of the pseudo-random generator.

## Detailed investigation

### Pseudo-random Generator

First, I suspect that this is caused by the pseudo-random generator (PRG). So I changed the Mersenne Twister to other PRG.

We can adopt several PNGs, such as the linear congruential method (`std::minstd_rand0`) and the RANLUX method (`std::ranlux24_base`). I also checked the Xorshift method. But the situation does not change even if we changed the PNG.

Additionally, I defined the PNG, which always returns zero.

```cpp
class always_zero {
public:
  uint32_t operator()() {
    return 0;
  }
  static constexpr uint32_t max() {
    return std::mt19937::max();
  }
  static constexpr uint32_t min() {
    return 0;
  }
};

double run_always_zero(void) {
  always_zero mt;
  double r = 0.0;
  std::uniform_real_distribution<> ud(-1.0, 1.0);
  for (int j = 0; j < 10000; j++) {
    for (int i = 0; i < 10000; i++) {
      if (i % 2) r += ud(mt);
    }
  }
  return r;
}
```

But the Intel compiler still generates a significantly slower executable than that by GCC.

### If-statement

If the loop does not contain the if-statement, then this weird behavior does not occur.

```cpp
double run_without_if(void) {
  std::mt19937 mt(1);
  double r = 0.0;
  std::uniform_real_distribution<> ud(-1.0, 1.0);
  for (int j = 0; j < 10000; j++) {
    for (int i = 0; i < 10000; i++) {
      r += ud(mt);
    }
  }
  return r;
}
```

### Distribution

If we replace `std::uniform_real_distribution` by other functions, then the weird behavior disappears.

* Use `std::uniform_int_distribution`.

```cpp
double run_int(void) {
  std::mt19937 mt(1);
  int r;
  std::uniform_int_distribution<> ud(-100, 100);
  for (int j = 0; j < 10000; j++) {
    for (int i = 0; i < 10000; i++) {
      if (i % 2) r += ud(mt);
    }
  }
  return static_cast<double>(r);
}
```

* Use user-defined distribution

[Taken from boost](https://github.com/boostorg/random/blob/develop/include/boost/random/uniform_real_distribution.hpp
)

```cpp
double my_uniform_real(std::mt19937 &mt, double min_value, double max_value) {
  for (;;) {
    double numerator = static_cast<double>(mt() - mt.min());
    double divisor = static_cast<double>(mt.max() - mt.min());
    double result = numerator / divisor * (max_value - min_value) + min_value;
    if (result < max_value) return result;
  }
}

double run_my_distribution(void) {
  std::mt19937 mt(1);
  double r = 0.0;
  for (int j = 0; j < 10000; j++) {
    for (int i = 0; i < 10000; i++) {
      r += my_uniform_real(mt, -1.0, 1.0);
    }
  }
  return r;
}
```

In the bose cases, the Intel compiler generates faster (or acceptable) executables than that by GCC.

## Summary

Here is the table of the summary.

* Environment
  * CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
  * OS: CentOS Linux release 7.6.1810 (Core)
  * GCC: g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  * icpc: icpc (ICC) <IP_ADDRESS> 20190416

| PNG | Distribution| if-statement| gcc [ms]| icpc [ms] |
|--- | --- | --- | --- | --- |
| `std::mt19937` | `std::uniform_real_distribution`| Included | 523 | 2933 |
| `std::minstd_rand0` | `std::uniform_real_distribution` | Included | 410 | 2770 |
| `std::ranlux24_base` | `std::uniform_real_distribution` | Included | 782 | 2997 |
| Xorshift | `std::uniform_real_distribution` | Included | 188 | 2757 |
| Always Zero | `std::uniform_real_distribution` | Included | 52 | 2707 |
| `std::mt19937` | `std::uniform_int_distribution` | Included | 819 | 948 |
| `std::mt19937` | `std::uniform_real_distribution` | Not included | 1043 | 612 |
| `std::mt19937` | user defined | Included | 529 | 273 |

From the above results, we found that the optimizer of the Intel compiler exhibits weird behavior when the loop contains an if-statement and the if-statements contains `std::uniform_real_distribution`.

## How to build

```sh
make
make run
```

Here is the raw output.

```sh
./gcc.out
mt          + real   + if Result = -6698.66 Elapsed = 523 [ms]
linear      + real   + if Result = -1084.15 Elapsed = 410 [ms]
subtract    + real   + if Result = -2890.53 Elapsed = 782 [ms]
xorshift    + real   + if Result = -5872.91 Elapsed = 188 [ms]
always_zero + real   + if Result = -5e+07 Elapsed = 52 [ms]
mt          + int    + if Result = 508885 Elapsed = 819 [ms]
mt          + real   - if Result = -8741.89 Elapsed = 1043 [ms]
mt          + myreal + if Result = -4523.55 Elapsed = 529 [ms]
./icpc.out
mt          + real   + if Result = -6698.66 Elapsed = 2933 [ms]
linear      + real   + if Result = -1084.15 Elapsed = 2770 [ms]
subtract    + real   + if Result = -2890.53 Elapsed = 2997 [ms]
xorshift    + real   + if Result = -5872.91 Elapsed = 2757 [ms]
always_zero + real   + if Result = -5e+07 Elapsed = 2707 [ms]
mt          + int    + if Result = 508885 Elapsed = 948 [ms]
mt          + real   - if Result = -8741.89 Elapsed = 612 [ms]
mt          + myreal + if Result = -4523.55 Elapsed = 273 [ms]
```


text:
Android-FusedLocation
=====================

This project aims to bring the Fused location provider to android apps without requiring the Play Services library.

## Summary

The Fused location provider is integrated in the OS (needs to be enabled on the device)
and can be used directly. This library uses it when it's available (Android 4.2+) using
the same API as the Android LocationManager.

## Usage

Just replace `android.location.LocationManager` with `com.levelup.LocationManager` in your code.
The rest of the LocationManager rules and permissions apply.

## Issues

 * the Fused provider is used even when it's marked as not available
 * the Fused provider is used even if it doesn't match the required Criteria
 * LocationProvider mocking is not supported yet
 * the GeoFencing API is not yet un-hidden

## Sample App

The sample app shows the value for each source, so you know the Fused provider works and where
its data are coming from. In real life you don't target a specific provider but uses a Criteria,
in which case the Fused provider will be favored, for better & faster results.

## License

    Copyright 2014 LevelUp Studios
    Copyright 2007 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


text:
# Ruby::Gmail

A rubyesque interface to Gmail, with all the tools you'll need. Search, read and send multipart emails. Archive, mark as read/unread, and delete emails. Manage labels!

## Installation

Add this line to your application's Gemfile:

    gem 'ruby-gmail'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ruby-gmail

## Usage

### Some quick notes

* It's entirely possible this will only support ruby 2.1 and above
* One goal is to clean up the rough edges of the dsl. The original is
  really good, but it needs to be super consistent.
* Another goal is to have really really good tests
* And the most important goal is to do as little as possible to
  accomplish the other goals. That means using the mail gem for almost
  everything, not trying to be too clever, probably other things I
  haven't thought of.

### Basics

```ruby
require 'gmail'

gmail = Gmail.new(user, pass)

# ... do things

gmail.logout

Gmail.new(user, pass) do |gmail|
  # ... do things
end
```

# Search your messages

```ruby
# Get counts for messages in the inbox
gmail.inbox.count
gmail.inbox.where(read: false).count
gmail.inbox.where(read: true).count

# Count with some criteria
gmail.inbox.where(after: "2010-02-20", before: "2010-03-20").count
gmail.inbox.where(on: "2010-04-15").count
gmail.inbox.where(from: "myfriend@gmail.com").count
gmail.inbox.where(to: "directlytome@gmail.com").count

# Combine flags and options
gmail.inbox.where(read: false, from: "myboss@gmail.com").count

# Labels work the same way as inbox
gmail.labels[:Urgent].count

# Getting messages
gmail.inbox.where(read: false, before: "2010-04-20", from: "myboss@gmail.com").to_a
# or
gmail.inbox.where(read: false, before: "2010-04-20", from: "myboss@gmail.com").messages

# Get messages without marking them as read on the server
gmail.peek = true
gmail.inbox.where(read: false, before: "2010-04-20", from: "myboss@gmail.com").to_a
# or
gmail.peek do
  gmail.inbox.where(read: false, before: "2010-04-20", from: "myboss@gmail.com").first
end
```

# Work with messages

```ruby
# any news older than 4-20, mark as read and archive it...
gmail.inbox.where(before: Date.parse("2010-04-20"), from: "news@nbcnews.com").each do |message|
  message.mark(:read) # can also mark :unread or :spam
  message.archive!
end

# delete emails from X...
gmail.inbox.emails(from: "x-fiancé@gmail.com").each do |message|
  message.delete!
end

# Save all attachments in the "Faxes" label to a folder
folder = "/where/ever"
gmail.labels[:Faxes].each do |message|
  message.attachments.each do |attachment|
    filename = File.join(folder, attachment.filename)
    begin
      File.open(filename, "w+b", 0644) do |f|
        f.write attachment.body.decoded
      end
    rescue => e
      puts "Unable to save data for #{filename} because #{e.message}"
    end
  end
end

# Add a label to a message
email.labels << "Faxes"
```

### Create new emails

```ruby
gmail.deliver do
  to<EMAIL_ADDRESS>  subject "Having fun in Puerto Rico!"
  text_part do
    body "Text of plaintext message."
  end
  html_part do
    body "<p>Text of <em>html</em> message.</p>"
  end
  add_file "/path/to/some_image.jpg"
end

# Or, generate the message first and send it later

message = gmail.new do
  to<EMAIL_ADDRESS>  subject "Having fun in Puerto Rico!"
  body "Spent the day on the road..."
end

# ... add some parts

message.deliver!
# Or...
gmail.deliver(message)
```

## Contributing

1. Fork it ( http://github.com/myobie/ruby-gmail/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 new Pull Request


text:
# Implement a 'netstat -nap'-like program
In this homework, you have to implement a 'netstat -nap' tool by yourself. You have to list all the existing TCP and UDP connections. For each identified connection (socket descriptor), find the corresponding process name and its command lines that creates the connection (socket descriptor). **You have to implement all the features by yourself and cannot make calls to the system built-in netstat program nor parse output from 'netstat -nap'.** Your codes must be implemented in C and/or C++.

To provide more flexibilities, your program have to accept several predefined options, including

- -t or --tcp: list only TCP connections.
- -u or --udp: list only UDP connections.
- An optional string to list only command lines that containing the string.

You have to handle the additional options using getopt_long function. In short, the synopsis of homework #1 would be:

```$ ./hw1 [-t|--tcp] [-u|--udp] [filter-string]```

When no argument is passed, your program should output all identified connections. You may test your program with a root account so that your program would be able to access /proc files owned by other users.


text:
# liquidfun-prizz
Provides Google's liquidfun library as an npm package

The release is obtained from `http://google.github.io/liquidfun/testbed/liquidfun.js`

# Usage

At the moment, this package must be used the old-school way in a web environment:

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

## TODO

Refactor the liquidfun library to expose all necessary properties, such as `b2Vec2`, etc.

repository: pRizz/liquidfun-prizz

repo_name: pRizz/liquidfun-prizz


text:
# Jisho Lookup
This is a Firefox extension that uses context menus to simplify looking things up in a Japanese-English dictionary called Jisho.

Functionality:
Whenever you select a piece of text and open up a context menu, an option will be listed with the title: Search Jisho for "[selected text]"

If clicked, it will open up a new tab that searches for the selected text as a keyword on Jisho.org.

__Example usage__

Upon right clicking selection:

After clicking to search:

repository: dotJPD/jisho-lookup

repo_name: dotJPD/jisho-lookup


text:
# Install Fuchsia on a NUC

This guide provides instructions on how to install Fuchsia on an
Intel [NUC][nuc-wiki]{:.external} (Next Unit of Computing) device.

The steps are:

1. [Prerequisites](#prerequisites).
1. [Build Fuchsia](#build-fuchsia).
1. [Prepare a USB drive](#prepare-usb).
1. [Enable EFI booting on the NUC](#enable-efi-booting).
1. [Install Fuchsia on the NUC](#install-fuchsia).
1. [(Optional) Upload Fuchsia SSH keys to the NUC](#upload-fuchsia-ssh-keys).

## Prerequisites {:#prerequisites .numbered}

Before you start installing Fuchsia on a NUC device, make sure that
you've completed the following tasks:

* [Set up the Fuchsia development environment](#set-up-fuchsia-env)
* [Get parts](#get-parts)

### Set up the Fuchsia development environment {#set-up-fuchsia-env}

To set up the Fuchsia development environment on your workstation,
complete the [Get started with Fuchsia][get-started-with-fuchsia] guide.

### Get parts {#get-parts}

Note: Fuchsia only supports the NUC configurations listed in
[Supported system configurations][supported-sys-config]. However,
unsupported NUC configurations may also work with Fuchsia. For more information
on experimental setups, see [Experimental hardware][experimental-hardware].

The following parts are required for this guide:

*  A NUC device (see [example models](#supported-nuc-models))
*  A USB 3.0 flash drive
*  A keyboard
*  A mouse (Optional)
*  A monitor with an HDMI port
*  An HDMI cable
*  An Ethernet cable
*  A Phillips-head screwdriver (with a magnetic tip)

Note: The [_2. Build Fuchsia_](#build-fuchsia) and
[_3. Prepare a USB drive_](#prepare-usb) sections do not require a NUC
device, so you can complete these sections prior to obtaining a NUC device.
However, you will need a USB flash drive for the _3. Prepare a USB drive_
section.

## Build Fuchsia {:#build-fuchsia .numbered}

Installing Fuchsia on a NUC device requires that you build a Workstation
image (`workstation_eng.x64`) and generate build artifacts (which include
the Fuchsia installer) on your workstation.

To build Fuchsia for NUC installation, do the following:

1. Set your build configuration to `workstation_eng.x64` and include the
   recovery package (`recovery-installer`):

   ```posix-terminal
   fx set workstation_eng.x64 --with //build/images/recovery:recovery-installer
   ```

1.  Build Fuchsia:

    ```posix-terminal
    fx build
    ```

    Building Fuchsia can take up to 90 minutes.

Later in the [Install Fuchsia on the NUC](#install-fuchsia) section,
you will use this USB drive to boot your NUC into the Fuchsia installer.

Important: The instructions below require that you've completed the
build in the previous [Build Fuchsia](#build-fuchsia) section.

To prepare a bootable USB drive, do the following:

1. Plug the USB drive into **your workstation**.

1. Identify the path to the USB drive:

   ```posix-terminal
   fx list-usb-disks
   ```

   This command prints output similar to the following:

   ```none {:.devsite-disable-click-to-copy}
   $ fx list-usb-disks
   /dev/sda - My Example USB Disk
   ```

1. Create a bootable USB drive:

   ```posix-terminal
   fx mkinstaller -v {{ "<var>" }}PATH_TO_USB_DRIVE{{ "</var>" }}
   ```

   Replace `PATH_TO_USB_DRIVE` with the path to the USB drive from the step
   above.

   The example command below selects the `/dev/sda` path:

   ```none {:.devsite-disable-click-to-copy}
   $ fx mkinstaller -v /dev/sda
   ```

   When finished, the command prints output similar to the following
   in the end:

   ```none {:.devsite-disable-click-to-copy}
   $ fx mkinstaller -v /dev/sda
   mkinstaller: WARNING: Changing ownership of /dev/sda to alice
   [sudo] password for alice:
   ...
   mkinstaller: INFO:    Writing image fvm.sparse.blk to partition storage-sparse...
   mkinstaller: INFO:      Wrote 835.6M in 35.55s, 23.5M/s
   mkinstaller: INFO: Done.
   mkinstaller: INFO: Ejected USB disk
   ```

1. Unplug the USB drive from the workstation.

## Enable EFI booting on the NUC {:#enable-efi-booting .numbered}

Update your NUC's BIOS setup so that it can boot from
a USB drive.

The steps are slightly different depending on which BIOS is included in your system:

* Visual BIOS:

* Aptio V BIOS:

* {Visual BIOS}

   To enable EFI (Extensible Firmware Interface) booting on your NUC,
   do the following:

   1. Reboot your NUC.
   1. To enter the BIOS setup, press `F2` while booting.
   1. Click the **Advanced** button.
   1. Click the **Boot** tab.
   1. Confirm the following boot configuration:
      * Under the **Boot Priority** tab:
         * **UEFI Boot** is checked.
         * **Legacy Boot** is unchecked.

      * Under the **Boot Configuration** tab:
         * In the **UEFI Boot** window:
            * **Boot USB Devices First** is checked.
            * **Boot Network Devices Last** is checked.
            * **Unlimited Network Boot Attempts** is checked.
         * In the **Boot Devices** window:
            * **USB** is checked.
            * **Network Boot** is set to **UEFI PXE & iSCSI**.

      * Under the **Secure Boot** tab:
         * **Secure Boot** is unchecked.

   1. To save and exit BIOS, press `F10` and click **Yes**.

* {Aptio V BIOS}

   To enable EFI (Extensible Firmware Interface) booting on your NUC,
   do the following:

   1. Reboot your NUC.
   1. To enter the BIOS setup, press `F2` while booting.
   1. Click the **Boot** tab.
   1. Confirm the following boot configuration:
      * In the **Secure Boot** section:
         * **Secure Boot** is set to **Disabled**.

      * In the **Boot Priority** section:
         * **UEFI Boot** is checked.
         * **Legacy Boot** is unchecked.

         Note: If the above options don't appear, your system doesn't support legacy boot and those
         steps can be skipped.

         * **Boot USB Devices First** is checked.
         * **Boot Network Devices Last** is checked.
         * **Unlimited Boot to Network Attempts** is checked.
         * **USB** is checked.
         * **Network Boot** is set to **UEFI PXE & iSCSI**.

   1. To save and exit BIOS, press `F10` and click **Ok**.

## Install Fuchsia on the NUC {:#install-fuchsia .numbered}

Use the [bootable USB drive](#prepare-usb) to boot your NUC into
the Fuchsia installer. It then installs the Workstation image (which was built in the [Build Fuchsia](#build-fuchsia) section) to the NUC.

To install Fuchsia on your NUC, do the following:

1. Plug the bootable USB drive into the NUC.

1. Reboot your NUC.

   The NUC boots into the Fuchsia Workstation Installer (with a pink background).

1. Press **Enter** to select the `Install from USB` option.

1. Press **Enter** on other prompts to continue.

1. Once the installation completes, unplug the USB drive from the NUC device.

1. Reboot the NUC device.

   The NUC is now booted into Fuchsia’s Workstation.

Note: Later, if you need to install a new version of Fuchsia (for instance, after
re-building a new Workstation image using `fx build`), see
[Flash a new Fuchsia image to the NUC](#flash-fuchsia) in Appendices.

## (Optional) Upload Fuchsia SSH keys to the NUC {:#upload-fuchsia-ssh-keys .numbered}

If you plan on using this NUC device **for Fuchsia development**, you need
to flash a Fuchsia image to the NUC device from your host machine, which
in turn uploads the [Fuchsia-specific SSH keys][fuchsia-ssh-keys] to the NUC.
Once those Fuchsia-specific SSH keys are uploaded to the NUC, you can perform
[`ffx`-based  workflows][ffx-workflows] on the NUC from your host machine.

To upload Fuchsia SSH keys to the NUC, do the following:

1. Complete the steps in the
   [Flash a new Fuchsia image to the NUC](#flash-fuchsia) section
   in Appendices.

1. To verify that you can connect to the NUC from the host machine,
   run the following command:

   ```posix-terminal
   ffx target show
   ```

   This command prints output similar to the following:

   ```none {:.devsite-disable-click-to-copy}
   $ ffx target show
   Target:
       Name: "fuchsia-54b2-0389-644b"
       SSH Address: "fe81::55b1:2ff2:fe34:567b%en10:22"
   Board:
       Name: "default-board"
       Revision: "1"
       Instruction set: "x64"
   ...
   ```

## Appendices

### Supported NUC models {#supported-nuc-models}

For GPU support, get a NUC7 (Kaby Lake) or NUC8 (Coffee Lake), or a higher
generation.

The list below shows some example models:

 * [Intel® NUC Kit NUC7i5DNKE][NUC7i5DNKE]{:.external}
 * [Intel® NUC Kit NUC7i5DNHE][NUC7i5DNHE]{:.external} (Best choice)
 * [Intel® NUC Kit NUC7i3DNKE][NUC7i3DNKE]{:.external}
 * [Intel® NUC Kit NUC7i3DNHE][NUC7i3DNHE]{:.external}
 * [Intel® NUC Kit NUC8i5BEK][NUC8i5BEK]{:.external}
 * [Intel® NUC Kit NUC8i5BEH][NUC8i5BEH]{:.external}
 * [Intel® NUC Kit NUC8i3BEK][NUC8i3BEK]{:.external}
 * [Intel® NUC Kit NUC8i3BEH][NUC8i3BEH]{:.external}

### Flash a new Fuchsia image to the NUC {#flash-fuchsia}

Once a NUC is running Fuchsia, you can use Fuchsia's flashing
mechanism to provision a new Fuchsia image to the NUC.

To flash a Fuchsia image to your NUC, do the following:

1. Connect the NUC directly to the workstation using an Ethernet cable.

   (Or you can also connect the NUC to a router or WiFi modem in the same
   Local Area Network as the workstation.)

   Note: Network booting only works with the NUC's built-in Ethernet port.
   Netbooting with an USB port (via an Ethernet-to-USB adapter) is not supported.

1. Reboot your NUC.

1. On Fuchsia's boot screen, press the `f` key to select the `fastboot` option.

   Once the NUC is in Fastboot mode, it prints `Fastboot TCP is ready`
   on the screen.

1. **On your workstation**, discover the NUC in Fastboot mode:

   ```posix-terminal
   ffx target list
   ```

   This command prints output similar to the following:

   ```none {:.devsite-disable-click-to-copy}
   $ ffx target list
   NAME                      SERIAL       TYPE       STATE       ADDRS/IP                           RCS
   fuchsia-54b2-0389-644b    <unknown>    Unknown    Fastboot    [fe81::55b1:2ff2:fe34:567b%en10]    N
   ```

   Verify that the device's state is `Fastboot`.

1. Flash a new Fuchsia image to the NUC:

   Note: To build a new Fuchsia image, see the [Build Fuchsia](#build-fuchsia) section above.

   ```posix-terminal
   fx flash
   ```

   If you have multiple devices connected to the host machine previously, you may need to
   explicitly specify the name of the NUC device, for example:

   ```posix-terminal
   fx flash -s fuchsia-54b2-0389-644b
   ```

   When finished, the NUC reboots and starts running the new Fuchsia image.

### Remote management of NUC devices {:#remote-management-of-nuc-devices}

To enable remote management, including KVM, you need to configure
Intel [AMT][amt]{:.external} (Active Management Technology).

Note: This assumes you're using NUC connected to the EdgeRouter. If
your networking setup is different, you may need a different network
configuration.

First, configure Intel ME on your NUC:

1. Reboot your NUC.
1. Enter Intel ME settings by pressing `Ctrl+P` on the boot screen.
1. Select **MEBx Login**
1. Set up a new password, the default one is `admin`.

   Note: The password must be at least 8 characters long, contain both lowercase and
   uppercase characters, at least one digit and at least one non alphanumeric
   character ("_" is considered alphanumeric).

   Tip: If you choose a password that is exactly 8 characters long, you can use the same password
   as the VNC password below.

1. Configure network:

   1. Select **Intel(R) AMT Configuration**.
   1. Unconfigure existing network settings:

      1. Select **Unconfigure Network Access**
      1. Select **Full Unprovision**
      1. Press `Y` to confirm.
   1. Select **Network Setup** > **TCP/IP Settings** > **Wired LAN IPV4 Configuration**.
   1. Set **DHCP Mode** to **Disabled**.
   1. Set **IPV4 Address** to an address reachable from your host machine via the EdgeRouter.

      On your host machine, run `ifconfig` and find the entry that corresponds to the EdgeRouter, for example:

      ``` none {:.devsite-disable-click-to-copy}
      $ ifconfig
      enx00e04c0c13ba: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
              ...
      ```

      In this case, you could try using the address **<IP_ADDRESS>**

   1. Set **Subnet Mask Address** to the netmask of your host machine to EdgeRouter connection, for example **<IP_ADDRESS>**.
   1. Press `Esc` until you return to **Intel(R) AMT Configuration**.
   1. Select **Activate Network Access** and press `Y` to confirm.
   1. Exit Intel ME settings and save your changes.

Now, configure the [`amtctrl`][amtctrl]{:.external} command-line utility on your host machine:

These instructions assume you have set some environment variables:

 * `AMT_HOST`: The IPv4 address you configured in the Intel ME settings.
 * `AMT_PASSWORD`: The password you chose for Intel ME.
 * `VNC_PASSWORD`: A password for accessing the NUC over VNC.

Note: The password used for `VNC_PASSWORD` must be _exactly_ 8 characters long,
must contain both lowercase and uppercase characters, at least one digit and
at least one non alphanumeric character.

1. Clone the `amtctrl` repository:

   ```posix-terminal
   git clone https://github.com/sdague/amt
   ```

1. Install `amtctrl`:

   ```posix-terminal
   cd amt && sudo ./setup.py install
   ```

1. Configure NUC IP address and passwords:

   ```posix-terminal
   amtctrl set -V $VNC_PASSWORD nuc $AMT_HOST $AMT_PASSWORD
   ```

1. Enable VNC:

   ```posix-terminal
   amtctrl nuc vnc
   ```

Now, you can access the NUC from your host machine using any VNC client by connecting to
the IP address set in `AMT_HOST`. Enter the password set in `VNC_PASSWORD` when prompted.

Note: The NUC needs to be plugged in to a monitor with a HDMI cable to accept VNC connections.

You can also turn on, turn off or reboot the NUC with the following terminal commands:

 * To turn on the NUC:

   ```posix-terminal
   amtctrl nuc on
   ```

 * To turn off the NUC:

   ```posix-terminal
   amtctrl nuc off
   ```

 * To reboot the NUC:

   ```posix-terminal
   amtctrl nuc reboot
   ```

[nuc-wiki]: https://en.wikipedia.org/wiki/Next_Unit_of_Computing
[get-started-with-fuchsia]: /docs/get-started/README.md
[usb-setup]: /docs/development/hardware/usb_setup.md
[supported-sys-config]: /docs/reference/hardware/support-system-config.md
[NUC7i5DNKE]: https://ark.intel.com/content/www/us/en/ark/products/122486/intel-nuc-kit-nuc7i5dnke.html
[NUC7i5DNHE]: https://ark.intel.com/content/www/us/en/ark/products/122488/intel-nuc-kit-nuc7i5dnhe.html
[NUC7i3DNKE]: https://ark.intel.com/content/www/us/en/ark/products/122495/intel-nuc-kit-nuc7i3dnke.html
[NUC7i3DNHE]: https://ark.intel.com/content/www/us/en/ark/products/122498/intel-nuc-kit-nuc7i3dnhe.html
[NUC8i5BEK]: https://ark.intel.com/content/www/us/en/ark/products/126147/intel-nuc-kit-nuc8i5bek.html
[NUC8i5BEH]: https://ark.intel.com/content/www/us/en/ark/products/126148/intel-nuc-kit-nuc8i5beh.html
[NUC8i3BEK]: https://ark.intel.com/content/www/us/en/ark/products/126149/intel-nuc-kit-nuc8i3bek.html
[NUC8i3BEH]: https://ark.intel.com/content/www/us/en/ark/products/126150/intel-nuc-kit-nuc8i3beh.html
[ffx]: https://fuchsia.dev/reference/tools/sdk/ffx
[ffx-workflows]: /docs/development/sdk/ffx/index.md
[fuchsia-ssh-keys]: /docs/development/sdk/ffx/create-ssh-keys-for-devices.md
[experimental-hardware]: /docs/contribute/governance/rfcs/0111_fuchsia_hardware_specifications.md#experimental-hardware
[amt]: https://www.intel.com/content/www/us/en/architecture-and-technology/intel-active-management-technology.html
[amtctrl]: https://github.com/sdague/amt

repository: gnoliyil/fuchsia

branch_name: refs/heads/main

repo_name: gnoliyil/fuchsia


text:
# Python Span
A simple library providing `Span` and `ReadOnlySpan` classes. The idea of these are very similar to [C#'s Span<T>](https://github.com/dotnet/corefxlab/blob/master/docs/specs/span.md), however they are a pure-Python implementation of it. The start and end points are handled via Python's `slice` object, meaning negative ends and starts work as expected, and step works is it does for sliced lists.

The classes provide read/write and read-only access to certain sections of list-like object, without having to reallocate them via normal slicing. Any object that can be indexed and has a length can be used, meaning you can even create `ReadOnlySpan`s over strings (useful in processing large strings that could have been read from a file).

These classes are useful when looking at certain regions of a list that is very long (upwards of 100,000s of items). Using the classes looks like this:

```python
import math

data = get_data() # returns a very large list

# we only want the first half of the list
end = int(math.ceil(len(data) / 2))

# without span
first_half = data[:end] # copies the entire first half

# with span
first_half = Span(data, 0, end)
# no copies, just a reference is stored, acts like a list of half the length
```

In the above example, if the list was very long (e.g. 1,000,000 items), then the first example would copy the entire second half of the list into the new variable, whereas the second example just stores the reference, and the start & end points that you requested. The new Span object would then act exactly like a list of half the length (e.g. `len` would return a length of 500,000 for the example before.). The only allocations that are done are for the Span objects themselves, and the object stores very little data inside (just the start, end, and step values, and the object reference), meaning that it will have little impact on memory by itself.

repository: luvies/python-spanning

repo_name: luvies/python-spanning


text:
## @mundus/vectors

A collection of linear algebra functions for 2D and 3D.
Optimized for size and speed.

### License

MIT License

Copyright (c) 2021 Salvatore Previti

repository: SalvatorePreviti/mundus

repo_name: SalvatorePreviti/mundus


text:
Email Templatizer
=======================

A micro application with jQuery and Handlebars to create email templates, preview them, and download their HTML files locally. Check out a [live demo](http://istocode.com/shared/email-templatizer-fancy/).

**Note:** The JavaScript code is free to use under the MIT license. Any brand assets and/or other contents belong to their respective owners and you should not redistribute them in any format. These assets would include logos, PNGs, written contents, the actual email template, and other contents that identify a specific person or company.

This sample app has been open-sourced for its code to be useful to other developers and it's not intended to be copied as a whole. Most likely it will not be maintained.

repository: vasilionjea/email-templatizer-fancy

repo_name: vasilionjea/email-templatizer-fancy


text:
# AbterPHP Framework

[![Build Status](https://github.com/abterphp/framework/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/abterphp/framework/actions)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/abterphp/framework/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/abterphp/framework/?branch=main)
[![Build Status](https://scrutinizer-ci.com/g/abterphp/framework/badges/build.png?b=main)](https://scrutinizer-ci.com/g/abterphp/framework/build-status/main)
![Coverage Status](https://raw.githubusercontent.com/abterphp/framework/main/coverage.svg)

This project serves as the foundations for [AbterPHP](https://github.com/abtercms/abterphp).

repository: abterphp/framework

gha_language: PHP

repo_name: abterphp/framework


text:
---
templateKey: practice-page
title: Definition of Done
subtitle: Shared knowledge and understanding of what it means for a work item to
  be done by a team
date: 2018-08-29T20:14:43.236Z
authors:
  - tdbeattie
  - mtakane
  - mvmaestri
tags:
  - culture
mobiusTag: foundation
icon: /images/dod.jpeg
whatIs: >-
  * Criteria agreed across the team and shared with others that should be met
  before any work items is considered complete by any team member.

  * *Collaboratively created, maintained and enforced criteria by the team.*

  * A place where non-functional and functional work that should be performed for each and every work item can be managed.
whyDo: >-
  * Aligns understanding and shared expectations across stakeholder groups on,
  for example, quality, assurance and documentation activities being performed
  throughout delivery.

  * Drives quality into products being built incrementally.
howTo: >-
  ### Tips for Remote Working

  * It is reasonably easy to find an agreement on both definition of ready and done remotely.

  * *One person can be a facilitator writing it based on everyone's input or everyone can co-edit.*

  * Use virtual white-boarding tool and use techniques such as "roman voting" or adding a sticky w/name to gain consensus.
mediaGallery:
  - link: https://github.com/openpracticelibrary/opl-media/blob/master/images/DoD.JPG?raw=true
resources:
  - link: https://www.scruminc.com/definition-of-done/
    linkType: web
    description: Scrum Inc 5 minute course
  - link: https://www.scrum.org/resources/blog/walking-through-definition-done
    linkType: web
    description: Walking through the Definition of Done
  - link: https://www.agilelearninglabs.com/2018/02/how-to-create-your-teams-definition-of-done/
    linkType: web
    description: How to create your team’s Definition Of Done
  - link: https://openpracticelibrary.com/blog/facilitation-tips-for-remote-sessions/
    linkType: web
    description: Remote Facilitation Tips
participants:
  - The Team
area: foundation-culture-and-collaboration
people: 2+
time: 15 minutes
perspectives:
  - facilitation-tips-for-remote-sessions
difficulty: easy
---
## What is it?

* Criteria agreed across the team and shared with others that should be met before any work items is considered complete by any team member.
* Collaboratively created, maintained and enforced criteria by the team.
* A place where non-functional and functional work that should be performed for each and every work item can be managed.

## Why use it?

* Aligns understanding and shared expectations across stakeholder groups on, for example, quality, assurance and documentation activities being performed throughout delivery.
* Drives quality into products being built incrementally.

## Tips for Remote Working

* It is reasonable easy to find an agreement on both definition of ready and done remotely.
* One person can be a facilitator writing it based on everyone input or everyone can co-edit.
* Use virtual white-boarding tool and use techniques such as "roman voting" or adding a sticky w/name to gain consensus.

## Want to learn more?

* [Scrum Inc 5 minute course](https://www.scruminc.com/definition-of-done/)
* [Walking through the Definition of Done](https://www.scrum.org/resources/blog/walking-through-definition-done)
* [How to create your team’s Definition Of Done](https://www.agilelearninglabs.com/2018/02/how-to-create-your-teams-definition-of-done/)

repository: openpracticelibrary/openpracticelibrary

gha_language: JavaScript

repo_name: openpracticelibrary/openpracticelibrary


text:
# bitexpert/adroit
This package provides a [PSR-7](http://www.php-fig.org/psr/psr-7/) compatible [ADR](http://pmjones.io/adr/) middleware.
Have a look at the [adroit-disco-demo](https://github.com/bitExpert/adroit-disco-demo) project to find out how to use
Adroit.

[![Build Status](https://travis-ci.org/bitExpert/adroit.svg?branch=master)](https://travis-ci.org/bitExpert/adroit)
[![Dependency Status](https://www.versioneye.com/php/bitexpert:adroit/dev-master/badge.svg)](https://www.versioneye.com/php/bitexpert:adroit/dev-master)

Installation
------------

The preferred way of installation is through Composer. Simply add `bitexpert/adroit` as a dependency:

```
composer.phar require bitexpert/adroit
```

Usage
-----

The configure the \bitExpert\Adroit\AdroitMiddleware middleware you need provide an array of
\bitExpert\Adroit\Action\Resolver\ActionResolver, an array of \bitExpert\Adroit\Responder\Resolver\ResponderResolver and
a router instance.

ActionResolver
--------------

As the name implies ActionResolvers are responsible for resolving an action class instance from the so-called actionToken.
The actionToken is basically used to identify a route. Adroit comes with a default implementation of an ActionResolver
(\bitExpert\Adroit\Action\Resolver\ContainerAwareActionResolver) which uses any
[container-interop](https://github.com/container-interop/container-interop) compatible DI container as a backend.

```php
/** @var \Interop\Container\ContainerInterface $container */
$actionResolver = new \bitExpert\Adroit\Action\Resolver\ContainerAwareActionResolver($container);
```

ResponderResolver
-----------------

Similar to the ActionResolvers the ResponderResolvers are responsible for resolving an responder class instance from the
$type defined in the DomainPayload instance. Adroit comes with a default implementation of an ResponderResolver
(\bitExpert\Adroit\Responder\Resolver\ContainerAwareResponderResolver) which uses any
[container-interop](https://github.com/container-interop/container-interop) compatible DI container as a backend.

```php
/** @var \Interop\Container\ContainerInterface $container */
$responderResolver = new \bitExpert\Adroit\Responder\Resolver\ContainerAwareResponderResolver($container);
```

In addition to that we ship a NegotiatingResponderResolver (\bitExpert\Adroit\Responder\Resolver\NegotiatingResponderResolver)
which can be used to select a responder based on the content type of the incoming request.

```php
$negotiatingResponderResolver = new \bitExpert\Adroit\Responder\Resolver\NegotiatingResponderResolver(
    [
        'text/html' => $responderResolver
    ]
);
```

Router
------

The router is responsible for resolving the actionToken from the given route as well building an url for a given
actionToken (and it`s parameters). The router comes in two flavours, once as a simple PropertyRouter
(\bitExpert\Adroit\Router\PropertyRouter) which will look up the actionToken based on an url parameter or the RegexRouter
(\bitExpert\Adroit\Router\RegexRouter) which will map the whole url to an actionToken.

```php
$baseUrl = 'http://myapp.loc:8080';
$router = new \bitExpert\Adroit\Router\RegexRouter($baseUrl);
$router->setRoutes(
    [
        new Route('GET', '/', 'index'),
        new Route('GET', '/question/[:title]_[:id]', 'question'),
        new Route(['GET', 'POST'], '/editquestion', 'editquestion')
    ]
);
```

Actions
-------

Actions come in two flavours as well: The SimpleForwardAction (\bitExpert\Adroit\Action\SimpleForwardAction) which will
always return the defined responder no matter what. In case you want to implement your own action logic (who does not
want that?) extend the \bitExpert\Adroit\Action\AbstractAction base class and simply implement the execute() method. In
case you need some more customizations implement the \bitExpert\Adroit\Action\Action interface.

Action classes are allowed to either return a DomainPayload object (\bitExpert\Adroit\Domain\DomainPayload) or an PSR-7
response object implementing the \Psr\Http\Message\ResponseInterface interface. By default you should aim to return a
DomainPayload object. The PSR-7 response might come in handy when you have to deal with file downloads where you most
likely not want to read the file in your action class, push the content to the responder just to to write it to the response
message body.

The DomainPayload object takes an $type (an identifier for an responder) as well as an array of domain data. The
DomainPayload object will be passed "as-is" to the responder.

Responders
----------

Responders have to return a PSR-7 response object which in will be returned by the AdroitMiddleware. Adroit ships two
different implementations by default. The JsonResponder (\bitExpert\Adroit\Responder\JsonResponder) which will simply
json_encode() the DomainPayload data and the TwigResponder (\bitExpert\Adroit\Responder\TwigResponder) which will render
a Twig template with the given DomainPayload data.

Usage
-----

```php
/** @var \Psr\Http\Message\ServerRequestInterface $request */
/** @var \Psr\Http\Message\ResponseInterface $response */
$middleware = new \bitExpert\Adroit\AdroitMiddleware([$actionResolver], [$responderResolver], $router);
$response = $middleware($request, $response);
```

Adroit itself does not depend on a concrete PSR-7 implementation which means you should be able to use it in your set-up
without running into problems. Just for the unit tests Adroit depends on zendframework/zend-diactoros as a PSR-7 implementation.

License
-------

Adroit is released under the Apache 2.0 license.

repository: dez-php/adroit

repo_name: dez-php/adroit


text:
# Instant auxiliary tools

This document describes the Java helper programs shipped along with Instant.

Each tool's source code is located in a directory in the `tools/` subdirectory
of the source tree, with a pre-compiled `.jar` file of the code being located
in `tools/` as well (so, a tool `X` has its source code in `tools/X` and a
pre-compiled archive at `tools/X.jar`).

## amend-manifest

    amend-manifest filename key value [outfile]

This tool takes a JAR file at `filename`, adds a `key`-`value` pair to the
main section of its manifest, and writes the result to `outfile`. The latter
may be omitted (or the same as `filename`) for the tool to operate in-place.

## console-client

    console-client [--help|-?] [--interactive|-I] [--batch|-B] [--gui|-G]
                   [--login|-l USERNAME] [<address>]

This tool provides a counterpart to Instant's
[backend console](CONFIG.md#instantconsoleaddr).

The `--interactive`, `--batch`, and `--gui` flags are used to select the
tool's mode of operation (see below). `--login`, if given, indicates that the
tool should authenticate itself to the console; the user name is provided as
an argument after the option while the password is read interactively.
`address` is the address (a `HOST:PORT` pair or a JMX service URL) to connect
to; this argument is mandatory in batch mode.

The tool provides three modes of operation:

- **Interactive CLI mode** (`--interactive`): The tool prompts the user for
  commands (or credentials) and displays the console's output. If `address`
  is not given, the tool prompts for the address to connect to. If `--login`
  is not given, an attempt is made to connect without authentication; if that
  fails, the user is asked for credentials and a second (and final) connection
  attempt is made.
- **Batch CLI mode** (`--batch`): The tool processes input deterministically:
  The `address` command-line argument is connected to; if-and-only-if
  `--login` is given, the first line of input is interpreted as a password;
  all other input lines are interpreted as commands. There is exactly one
  attempt to connect; whether to use authentication is decided based on
  whether `--login` is provided.
- **GUI mode** (`--gui`): A graphical interface for connecting to the console
  and interacting with it is shown. `address` and `--login` pre-fill fields
  of the connection form.

The CLI modes communicate via the terminal they are invoked at, or, failing
that, the standard input/output streams; (only) when using batch mode without
a TTY, no prompts are written. If it is explicitly specified, the GUI mode
requires, self-evidently, an appropriate graphical environment to be present
(and accessible by the tool).

The default mode depends on whether the machine is deemed headless (i.e.
lacking a graphical environment suitable for the GUI; interactive CLI mode is
used on headless systems, GUI mode elsewhere). Defaulting to a GUI when
started with no arguments allows the tool to be invoked from, e.g., a
graphical file manager.

repository: CylonicRaider/Instant

repo_name: CylonicRaider/Instant


text:
chromedriver.py
===============

Chromedriver's download script.

	$ python chromedriver.py path/to/install
	WARNING:root:fetching new 2.9 version of chromedriver
	WARNING:root:trying url http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip
	WARNING:root:release notes: http://chromedriver.storage.googleapis.com/2.9/notes.txt
	WARNING:root:----------ChromeDriver v2.9 (2014-01-31)----------
	Supports Chrome v31-34
	Resolved issue 665: Use /data/local/tmp for command line flags on user builds [OS-Android, Pri-0]
	Resolved issue 696: Return window handle to App window (like Google Keep) in command driver.getWindowHandles [Pri-0]
	Resolved issue 694: Update http://chromedriver.storage.googleapis.com/LATEST_RELEASE for users to query for latest release and do automatic update in script [Pri-0]
	Resolved issue 690: Fix clicking on Map Area [Pri-0]
	Resolved issue 454: chromedriver didn't support Debian 7 [Pri-0]
	Resolved issue 638: chomedriver.exe 2.6 to 2.8 built on Win7 build bot always produce empty chromedriver.log on local windows machine. [Pri-0]
	Resolved issue 672: Wait 60 seconds for chrome to start up on all OS and 30 seconds for chrome shutdown on Mac and Linux. [Pri-0]
	Resolved issue 660: Port used for android adb forward leaks. [Pri-0]
	Resolved issue 676: LaunchApp method for launching Chrome apps using their ID [OS-All, Pri-0]

	WARNING:root:done

	$ python chromedriver.py path/to/install
	WARNING:root:current version of chromedriver is already installed