text:
@xingrz/download2 [![test](https://github.com/xingrz/download/actions/workflows/test.yml/badge.svg)](https://github.com/xingrz/download/actions/workflows/test.yml)
==========

[![][npm-version]][npm-url] [![][npm-downloads]][npm-url] [![license][license-img]][license-url] [![issues][issues-img]][issues-url] [![stars][stars-img]][stars-url] [![commits][commits-img]][commits-url]

Download and extract files.

## Install

```sh
npm install --save @xingrz/download2
```

## Usage

```ts
import { writeFileSync, createWriteStream } from 'fs';
import download from '@xingrz/download2';

(async () => {
	await download('http://unicorn.com/foo.jpg', 'dist');

	writeFileSync('dist/foo.jpg', await download('http://unicorn.com/foo.jpg'));

	download('unicorn.com/foo.jpg').pipe(fs.createWriteStream('dist/foo.jpg'));

	await Promise.all([
		'unicorn.com/foo.jpg',
		'cats.com/dancing.gif'
	].map(url => download(url, 'dist')));
})();
```

### Proxies

To work with proxies, read the [`got documentation`](https://github.com/sindresorhus/got#proxies).

## API

### `download(url[, destination][, options])`

Returns both a `Promise<Buffer>` and a [Duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with [additional events](https://github.com/sindresorhus/got#streams-1).

If `extract: true` is set, returns `Promise<File[]>` instead of `Promise<Buffer>`.

#### `url`

Type: `string`

URL to download.

#### `destination`

Type: `string` (optional)

Path to directory where your file will be written.

#### `options`

Type: `Object`

Same options as [`got`](https://github.com/sindresorhus/got#options) and [`@xingrz/decompress`](https://github.com/xingrz/decompress#options) in addition to the ones below.

##### `extract`

Type: `boolean`

If set to `true`, try extracting the file using [`@xingrz/decompress`](https://github.com/xingrz/decompress).

##### `filename`

Type: `string`

Name of the saved file. Will be ignored if `extract` is set to `true`.

## License

MIT © [Kevin Mårtensson](https://github.com/kevva), [XiNGRZ](https://github.com/xingrz)

[npm-version]: https://img.shields.io/npm/v/@xingrz/download2.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/@xingrz/download2.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@xingrz/download2
[license-img]: https://img.shields.io/github/license/xingrz/download?style=flat-square
[license-url]: LICENSE
[issues-img]: https://img.shields.io/github/issues/xingrz/download?style=flat-square
[issues-url]: https://github.com/xingrz/download/issues
[stars-img]: https://img.shields.io/github/stars/xingrz/download?style=flat-square
[stars-url]: https://github.com/xingrz/download/stargazers
[commits-img]: https://img.shields.io/github/last-commit/xingrz/download?style=flat-square
[commits-url]: https://github.com/xingrz/download/commits/master

repository: harrykc/download

repo_name: harrykc/download


text:
# Sonatype Nexus OSS on Amazon EKS

Deploy Sonatype Nexus3 via Helm on EKS.

- Use EFS via EFS CSI driver, PV and PVC as Nexus3 data storage
- Create a dedicated S3 bucket as Nexus3 blobstore
- Use external DNS to create record in Route53 for ingress domain name
- Use ACM to get certificate of domain name

## Architecture diagram
![architecture diagram](arch.png)

## Usage

### Prerequisites
- An AWS account
- Nodejs LTS installed, such as 12.x or 14.x
- A public hosted zone in Route53(optional)
- Has default VPC with public and private subnets cross two available zones at least, NAT gateway also is required
- Install dependencies of app
```
npm run init
```

### Deploy to EKS with managed EC2 nodes
```
npm run deploy -- -c domainName=<the hostname of nexus3 deployment>
```

### Deploy with Route53 managed domain name
```
npm run deploy -- -c domainName=<nexus.mydomain.com> -c r53Domain=<mydomain.com>
```

### Default login
Check [installation guide of Helm chart sonatype-nexus](https://github.com/Oteemo/charts/tree/master/charts/sonatype-nexus#installing-the-chart)

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This library is licensed under the MIT-0 License. See the LICENSE file.

Also this application uses below open source projects,

- [Nexus OSS](https://github.com/sonatype/nexus-public)
- [travelaudience/kubernetes-nexus](https://github.com/travelaudience/kubernetes-nexus/)
- [Oteemo/charts](https://github.com/Oteemo/charts)
- [aws-alb-ingress-controller](https://github.com/kubernetes-sigs/aws-alb-ingress-controller)
- [aws-efs-csi-driver](https://github.com/kubernetes-sigs/aws-efs-csi-driver)
- [external-dns](https://github.com/kubernetes-sigs/external-dns)

repository: zxkane/nexus-oss-on-aws

branch_name: refs/heads/master

extension: md

gha_license_id: NOASSERTION

license_type: permissive

repo_name: zxkane/nexus-oss-on-aws


text:
---
title: Introduction to Collections
episode: 1
image_path: /img/casts/intro-to-collections.jpg
length: 5
video_id: _f4aly6xblQ
description: Learn how to use collections to manage and organize related content.
tags:
  - collections
resources:
  - name: "Explain like I'm five: Jekyll collections"
    link: http://ben.balter.com/2015/02/20/jekyll-collections/
  - name: "Collections documentation"
    link: https://jekyllrb.com/docs/collections/
  - name: "Source code"
    link: https://github.com/CloudCannon/bakery-store/tree/collections
---

**_config.yml**

{% highlight yaml %}
{% raw %}
collections:
  cookies:
    output: true
{% endraw %}
{% endhighlight %}

**cookies.html**
{% highlight liquid %}
{% raw %}
---
layout: page
title: Cookies
---
{% for cookie in site.cookies %}

      {{ cookie.title }}

    {{ cookie.content }}

{% endfor %}
{% endraw %}
{% endhighlight %}

**_cookies/afghan.md**
{% highlight liquid %}
{% raw %}
---
layout: cookie
title: Afghan
image_path: https://upload.wikimedia.org/wikipedia/commons/d/d1/AfghanBiscuit.jpg
---
An Afghan biscuit is a traditional New Zealand biscuit made from flour, butter, cornflakes, sugar and cocoa powder, topped with chocolate icing and a half walnut. The recipe has a high proportion of butter, and relatively low sugar, and no leavening (rising agent), giving it a soft, dense and rich texture, with crunchiness from the cornflakes, rather than from a high sugar content. The high butter content gives a soft melt-in-the-mouth texture, and the sweetness of the icing offsets the low sugar and the cocoa bitterness. The origin of the recipe and the derivation of the name are unknown, but the recipe has appeared in many editions of the influential New Zealand Edmonds Cookery Book.

Source [Wikipedia](https://en.wikipedia.org/wiki/Afghan_biscuit)
{% endraw %}
{% endhighlight %}

**_layouts/post.html**
{% highlight liquid %}
{% raw %}
---
layout: page
---

{{ page.title }}

    {{ content }}

{% endraw %}
{% endhighlight %}

**cookies.html**
{% highlight liquid %}
{% raw %}
---
layout: page
title: Cookies
---
{% for cookie in site.cookies %}

{{ cookie.title }}

{% endfor %}
{% endraw %}
{% endhighlight %}

license: MIT

repository: drmikeuk/Jekyll-Tips

repo_name: drmikeuk/Jekyll-Tips


text:
IntroViews is inspired by [Paper Onboarding](https://github.com/Ramotion/paper-onboarding-android) and developed with `love` from scratch. I decided to rewrite almost all the features in order to make it available to the `flutter` developers and extensible as possible.

#  Features

- Easy addition of pages.

- Circular page reveal.

- Cool Animations.

- Animation control, if the user stops sliding in the midway.

- Skip button, for skipping the app intro.

- Custom font selection.

- Material Design.

# Getting Started

You should ensure that you add the `intro_views_flutter` as a dependency in your flutter project.

```yaml
dependencies:
 intro_views_flutter: "^1.0.2"
```

You can also reference the git repository directly if you want:

```yaml
dependencies:
 intro_views_flutter:
   git: git://github.com/aagarwal1012/IntroViews-Flutter
```

You should then run `flutter packages get` in your terminal so as to get the package.

# Usage

- `IntroViewsFlutter` widget require a `list` of `PageViewModel` , and some other parameters. Refer the code below to create a PageViewModel page.

  ```dart
  Final page = new PageViewModel(
        pageColor: const Color(0xFF607D8B),
        mainImageAssetPath: 'assets/taxi.png',
        title: 'Cabs',
        body: 'Easy cab booking at your doorstep with cashless payment system',
        iconImageAssetPath: 'assets/taxi-driver.png',
        titleTextColor: Colors.white,
        bodyTextColor: Colors.white,
        iconColor: null,
        titleTextSize: 54.0,
        bodyTextSize: 24.0,
        fontFamily: "MyFont",
        pageTitleBold: false,
        bubbleBackgroundColor: Colors.white,
      );
  ```

- Now refer the code below to get the `IntroViewsFlutter` widget.

  ```dart
  final Widget introViews = new IntroViewsFlutter(
        [page],
        onTapDoneButton: (){
          //Void Callback
        },
        showSkipButton: true,
        pageButtonFontFamily: "Regular",
        pageButtonsColor: Colors.white,
        pageButtonTextSize: 18.0,
      );
  ```
  For further usage refer the [`example`](https://github.com/aagarwal1012/IntroViews-Flutter/tree/master/example/lib) available.

  ***Note :*** If you added more than four pages in the list then there can be overlapping between `page icons` and `skip button`, so my suggestion is just make the `showSkipButton: false`.

# Documentation

### PageViewModel Class

| Dart attribute  | Datatype         | Description                                                  | Default Value |
| :---------------- | :------------------------------ | :----------------------------------------------------------- | :-----------: |
| pageColor | Color | Set color of the page. | Null      |
| mainImageAssetPath | String | Set the main image asset path of the page. | Null      |
| title | String | Set the title text of the page. | Null      |
| body | String | Set the body text of the page. | Null       |
| iconImageAssetPath | String | Set the icon image asset path that would be displayed in page bubble. | Null    |
| titleTextColor | Color | Set the title text color. | Colors.white |
| bodyTextColor | Color | Set the body text color. | Colors.white |
| iconColor | Color | Set the page bubble icon color. | Null |
| bubbleBackgroundColor | Color | Set the page bubble background color. | Colors.white |
| fontFamily | String | Use your own custom font to style the title and body. | Default |
| pageTitleBold | Bool | Set the title font weight to bold. | False |
| titleTextSize | Double | Set the size of title text. | 34.0 |
| bodyTextSize | Double | Set the size of body text. | 18.0 |

### IntroViewFlutter Class

| Dart attribute  | Datatype         | Description                                                  | Default Value |
| :---------------- | :------------------------------ | :----------------------------------------------------------- | :-----------: |
| pages | List<PageViewMode> | Set the pages of the intro screen. | Null      |
| onTapDoneButton | VoidCallback | Method executes on tapping done button. | Null      |
| pageButtonColor | Color | Set the color of skip and done buttons. | Colors.white |
| showSkipButton | Bool | Show the skip button at the bottom of page. | true   |
| pageButtonTextSize | Double | Set the button text size. | 18.0 |
| pageButtonFontFamily | String | Set the font of button text. | Default |

For help on editing package code, view the [flutter documentation](https://flutter.io/developing-packages/).

# Want to contribute !

This is the well `documented` package. I have documented each and every method that I have used, so have a good read to the code and suggest some changes and new feature to be added in the package.
Feel free to [open an issue](https://github.com/aagarwal1012/IntroViews-Flutter/issues).

# License
**IntroViews-Flutter** is licensed under `MIT license`.


text:
# GetStarted

install the package `WeihanLi.DataProtection` in your asp.net core project, register `DataProtection` service in your `startUp` file as follows:

``` csharp
services.AddDataProtection()
            .AddParamsProtection(options =>
            {
                options.ProtectParams = new[]
                {
                    "id"
                };

                // options.AddProtectValue<JsonResult>(r => r.Value); // uncomment to proetct JsonResult value
            });
```

you can do these things by change the option value:

- disable param protection by setting the `Enabled` property value to `false`
- change the protector purpose by change the `ProtectorPurpose` property value
- allow the origin param by setting the `AllowUnprotectedParams` to `true`
- change the status code when the params are not allowed to access
- change the protected params expiry(in minutes) by setting the `ExpiresIn` property value
- set the params to be protected by setting the `ProtectParams`property value(non caseSensitive)

branch_name: refs/heads/dev

gha_language: C#


text:
[![GoDoc](https://godoc.org/github.com/cihangir/geneddl?status.svg)](https://godoc.org/github.com/cihangir/geneddl)
[![Build Status](https://travis-ci.org/cihangir/geneddl.svg)](https://travis-ci.org/cihangir/geneddl)

# geneddl

Tired of bootstrapping?

Json-schema based SQL generation with Go (golang).

## Why Code Generation?

Whenever a bootstrap is required for a project we are hustling with creating the
required folder, files, databases, roles/users schemas, sequences, tables,
constraints, extensions types etc...

This package aims to ease that pain

## What is JSON-Schema?

JSON Schema specifies a JSON-based format to define the structure of your data
for various cases, like validation, documentation, and interaction control.  A
JSON Schema provides a contract for the JSON data required by a given
application, and how that data can be modified.

TLDR: here is an example [twitter.json](https://github.com/cihangir/gene/blob/master/example/twitter.json)

## Where is sample output?

Right here [twitter/db](https://github.com/cihangir/gene/blob/master/example/twitter/db)

repository: f/koding

gha_language: CoffeeScript

repo_name: f/koding


text:
# opencv
```
wget https://github.com/opencv/opencv/releases/download/3.4.0/opencv-3.4.0-android-sdk.zip
unzip opencv-3.4.0-android-sdk.zip
```


text:
#Overview
Allows you to append commit messages to Trello cards and move cards according to branching. Commit messages with cards referenced move cards to in progress. Cards merged into master can be moved to a merged and closed list. From there if a commit is merged into a staging branch, the Trello card will move to staging, and the same applies for a production branch.

##Commands
Commit messages are searched for `(start|card|close|fix)e?s? \D?([0-9]+)` to find the card short id. All commands will add the commit message to the card and move the card to in progress if the commit is on a branch other than master, staging, or production.

- Any commit message containing a permutation of `start`, `card`, `close`, `fix` followed by the Trello card will add the commit message to the card. Then, depending on the branch, the card will be moved to in progress, closed & merged, staging, or production.

```
git branch todo_124
```
git checkout todo_124
```
git commit -m 'Added a class to start 124'
```
This will move card #124 to the "in progress" list

```
git commit -m 'Added a few more tests card 124'
```
This will add a message to card #124 but nothing more (as it is already in "in progress")

```
pull request into master
```
This will move card #124 to the "closed & merged" list.
```
merge into staging
```
This will move card #124 to the "staging" list. Ideally, you will have a deploy hook configured to trigger an automatic deployment of the staging branch to your staging server
```
merge into production
```
This will move card #124 to the "production" list. Like staging, a deploy hook would ideall trigger an automatic depoloyment of the production branch to your production server

##Installation

###Gather config values
- **api_key** - Go to [https://trello.com/1/appKey/generate](https://trello.com/1/appKey/generate)
- **oauth_token** - Go to _https://trello.com/1/authorize?response_type=token&name=Trello+Github+Integration&scope=read,write&expiration=never&key=[your-key-here]_ replacing __[your-key-here]__ with the **api_key** from above. Authorize the request and record the token.
- **board_id** - You can get the board id from the URL, for example https://trello.com/board/trello-development/4d5ea62fd76aa1136000000c the board id is _4d5ea62fd76aa1136000000ca_.
- **…list_target_id** - These can be found by opening a card in the list, exporting it as json, and grabbing the "idList" value.

###Deploy to Warpspeed.io
Create a Ruby site on Warpspeed.io to run the github-trello code. Use the Nginx config to set the environmental variables according to the `passenger_env_var [variable] [value]` specification

- Environmental Variables:
	* `api_key=[API_KEY]`
	* `oauth_token=[OATH_TOKEN]`
	* `board_id=[BOARD_ID]`
	* `inprogress_list_target_id=[ID]`
	* `merged_list_target_id=[ID]`
	* `staging_list_target_id=[ID]`
	* `deployed_list_target_id=[ID]`

###Set up GitHub
Simply add you your github-trello url + "/posthook-github" as a WebHook url under "Admin" for your repository. Example:

`http://github-trello.examplesite/posthook-github`

repository: makoetting/github-trello

gha_language: Ruby

repo_name: makoetting/github-trello


text:
# HEPAutoencoders
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Gitter](https://badges.gitter.im/HEPAutoencoders/community.svg)](https://gitter.im/HEPAutoencoders/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

ML-compression of ATLAS trigger jet events using autoencoders, with the PyTorch and fastai python libraries.

It strives to be easy to experiment with, but also parallelizable and GPU-friendly in order to aid hyperparameters scans on clusters.

This repository is developed by Erik Wallin, as a bachelor project at Lund University. Builds directly on the master thesis [project](https://github.com/erwulff/lth_thesis_project) of Eric Wulff. Technical explanations can be found in his [thesis](https://lup.lub.lu.se/student-papers/search/publication/9004751).

[Setup](#setup)

[Quick guide](#quick-guide)

[Data extraction](#data-extraction)

[Training](#training)

[Analysis](#analysis)

[Saving back to ROOT](#saving-back-to-root)

[TODO and ideas](#todo-and-ideas)

## Setup:
#### Running the container:
Pull the docker container containing useful libraries:
`docker pull atlasml/ml-base`

Run an interactive bash shell in the container, allowing the hostmachine to open jupyter-notebooks running in the container. The port 8899 can be changed if it is already taken.
`docker run -it -p 8899:8888 atlasml/ml-base`

#### To install the project:

From inside the container, pull the project from the git repository.
```
git init
git pull https://github.com/Skelpdar/HEPAutoencoders
```

Alternatively, from the hostmachine, use `docker cp` to copy the project files and data into the container. (`docker cp` can be very useful to transfer data to or from the hostmachine.)

Install dependencies (from inside the container):
`pip3 install fastai`
`pip3 install hwcounter`

With jupyter-notebook running, one can access it on the hostmachine from the URL localhost:8899

## Quick guide
**Pre-processing:** Extract data from the ROOT DxAOD file-format in the scripts named `process_*`

The data comes in two types: 4-dim data and the 27-dim data. (Although the original events holds 29 values, only 27 of them are of constant size.)

The ROOT-data should be stored in `data/` (by default)

All processed data will be placed in `processed_data/` after extraction (by default). No normalization or other ML-related pre-processing is done in this step.

**Training:** An (uncommented) example of training a 4D-network is `fastai_AE_3D_200_no1cycle.ipynb` and looks very much like every other training script in this project. If the data you have looks any different it will need to be retrained. See the [report](https://lup.lub.lu.se/student-papers/search/publication/9004751) for previous searches of optimal network sizes.

**Analysis and plots:** An example of running a 4-dimensional already trained network is `4D/fastai_AE_3D_200_no1cycle_analysis.ipynb`
For an example of analysing a 27-D network is `27D/27D_analysis.py`.

**Code structure:** The folders named `4D/`, `25D/` and `27D/` simply holds training analysis scripts for that amount of dimensions.

`nn_utils.py` holds various heplful for networks structures and training functions.

`utils.py` holds functions for normalization and event filtering, amongst others.

## Data extraction
The raw DxAODs can be processed into a 4-dimensional dataset with `process_ROOT_4D.ipynb`, where the data is pickled into a 4D pandas Dataframe. `process_ROOT_27D.ipynb`  does the same for the 27-dimensional data.
Since pickled python objects are very version incompatible, it is recommended to process the raw ROOT DxAODs instead of providing the pickled processed data.

For ease of use, put raw data in `data/` and put processed data in `processed_data/`

The 27-variables in question are:

|Value|
|:---|
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.pt
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.eta
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.phi
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.m
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.ActiveArea
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.ActiveArea4vec_eta
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.ActiveArea4vec_m
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.ActiveArea4vec_phi
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.ActiveArea4vec_pt
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.AverageLArQF
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.NegativeE
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.HECQuality
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.LArQuality
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.Width
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.WidthPhi
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.CentroidR
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.DetectorEta
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.LeadingClusterCenterLambda
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.LeadingClusterPt
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.LeadingClusterSecondLambda
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.LeadingClusterSecondR
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.N90Constituents
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.EMFrac
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.HECFrac
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.Timing
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.OotFracClusters10
HLT_xAOD__JetContainer_TrigHLTJetDSSelectorCollectionAuxDyn.OotFracClusters5

These values are nice to work with since they are not lists of variable length, which suits our networks with constant input sizes. Worth noting is that ActiveArea and N90Constituents are discrete values.

The pre-processing divides every jet as a single event. Further experiments with whole events might be interesting, i.e. a 8-dim or 54-dim AE for dijet events.

## Training
ML details of the training process is in Wullf's [thesis](https://lup.lub.lu.se/student-papers/search/publication/9004751). Two well-functioning examples are `4D/fastai_AE_3D_200_no1cycle.ipynb` and `27D/27D_train.py`.

## Analysis
fastai saves trained models in the folder `models/` relative to the training script, with the .pth file extension.

In `27D/27D_analysis.py` there is analysis of a network with a 18D latent space (i.e. a 27/18 compression ratio), with histogram comparisons of the different values and residual plots. Special attention might be given to these residuals as they tell a lot about the performance of the network.

For a more detailed plots of residuals and correlations between them, see the last part of `4D/fastai_AE_3D_200_no1cycle_analysis.ipynb`

## Saving back to ROOT
To save a 27-dim multi-dimensional array of decoded data back into a ROOT TTree for analysis once again, the script `ndarray_to_ROOT.py` is available. (Soon for other dimensions as well) You'll have to run Athena yourself to turn this into a proper xAOD.

## TODO and ideas:
Analysis scripts for CPU/GPU and memory usage when evaluating the networks.

Adding more robust scripts for extraction from the raw ROOT data, i.e. actual scripts and not jupyter-notebooks, for 4, 25 and 27 dimensions. (And optimize them.)

Chain networks with other compression techniques.

Train on whole events and not only on individual jets.

repository: gitter-badger/HEPAutoencoders

repo_name: gitter-badger/HEPAutoencoders


text:
![IPA](logo.png "IPA Logo")
# (Improved Programming with APIs)
[![Build Status](https://travis-ci.org/vspglobal/ipa.svg)](https://travis-ci.org/vspglobal/ipa)
[![Maven Central](https://img.shields.io/maven-central/v/com.vspglobal.ipa/ipa-parent.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.vspglobal.ipa%22)

<br/>
This project contains various modules to aid in the development and consumption of APIs.   Follow the link on each module for details on how to use.

**Module** | **Overview**
-----------|--------------
 [ipa-jaxrs-basicauth](ipa-jaxrs-basicauth) |  JAX-RS client filter to apply HTTP basic auth header on requests
 [ipa-jaxrs-oauth2](ipa-jaxrs-oauth2) |  JAX-RS client filter to retrieve OAuth2 token and apply it as a header on requests
 [ipa-jaxrs-hystrix](ipa-jaxrs-hystrix) | Bridge between JAX-RS and [Hystrix](https://github.com/Netflix/Hystrix) to provide circuit breakers, caching and metrics from JAX-RS client invocations
 [ipa-jaxrs-util](ipa-jaxrs-util) | Miscellaneous JAX-RS utilities
 [ipa-domain](ipa-domain) |  Contains domain objects that are shared by the various modules.  This artifact has no dependencies.
 [ipa-test](ipa-test) |  Contains utilities for testing APIs.

# Support
Please [create an issue](https://github.com/vspglobal/ipa/issues) for any bugs you come across or feature requests.

# Contributing
[Pull requests](http://help.github.com/send-pull-requests) are welcome; see the [contributor guidelines](CONTRIBUTING.md) for details.

# License
IP is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

For additional information, see the [LICENSE](LICENSE) file.

repository: vspglobal/ipa

repo_name: vspglobal/ipa


text:
#Whose are these?

"Whose sons are these?"

#bless

A father would often pronounce a formal blessing on his children or grandchildren.

#Now Israel's eyes ... could not see

The word "Now" is used here to mark a change from the story to background information about Israel. (See: [[:en:ta:vol2:translate:writing_background]])

#he kissed them

"Israel kissed them"


text:
---
title: 'Community Events'
layout: community-events
---

There are multiple ways you can contribute and get involved in the community:

- Start [**contributing**](/community/contributing/) to the GetMesh project on [Github](https://github.com/tetratelabs/getmesh).
- Join and participate at one of our [**events**](/community/event/).
- Watch videos from [**previous events**](https://github.com/tetratelabs/istio-weekly).
- Join the **#GetIstio** channel on [**Istio Slack**](https://slack.istio.io).
- Get Istio certified at [**Tetrate Academy**](http://certifications.tetrate.io/).

branch_name: refs/heads/main

gha_language: HTML


text:
v1.0.0 (2014-08-28)
-------------------

- The settings management for executable paths has been changed!
  If you depend on this, you'll have to revisit.
- Added support for stylus! (an example file has been bundled as well)

- If running a pre-compiler, the compiled result will always be shown if there
  was an error parsing it
- Added commands to create a new csscheme file (or variation) based on templates
- Added command palette entries to open the readme and settings files
- DumpErrors now show the same debug output as ParseErrors
- Fixed long relative path references in some situations (mainly stylus)
- Fixed wrong syntax file reference with `"preview_compiled_css": true`
- SASScheme files now also get a dedicated syntax which allows CSScheme to more
  accurately match its build system (same for stylus). This relies on the
  external "Sass" package.
- Fixed wrong line number being displayed when an at-rule was encountered
  multiple times
- Added punctuation scopes to auto completion (csscheme, scsscheme)

The 0.3.0 release is a bit older, but I forgot to make PC show the update
message, so it's included here as well:

v0.3.0 (2014-03-08)
-------------------

- Differentiate between style and options list ("fontStyle" vs e.g.
  "tagsOptions") for validation (also #2)
- Allow `"fontStyle": none;` for empty style list (#4)
- Highlight SASS's `index` function
- Fix not showing error message if a line number was not found from the
  compiled SCSS (within the last x lines)
- Added snippets for `@for`, `@each`, `@else if`, `@else`, `@while`
- All "package" related files were moved to a sub-directory

repository: cristianl/CSScheme

repo_name: cristianl/CSScheme


text:
# Admire
Tired of being forced into deprecated, ancient reCAPTCHA libraries that are devoid of Pythonic beauty?

Want to make your life with reCAPTCHA easier?

Worry no more, Admire is here.

## Installation
Installing Admire couldn't be simpler. Assuming you have Python and pip installed, just open up your terminal or command prompt and type `pip install admire`. Heck, you can even copy and paste it.

## Captcha setup
Just toss in your expected source and your reCAPTCHA API key. After that, you're good to go:
```python
from admire import Captcha

captcha = Captcha('www.example.org', 'SECRET_API_KEY')
```

Or, if you're a fan of keyword arguments:
```python
from admire import Captcha

captcha = Captcha(source='www.example.org', secret='SECRET_API_KEY')
```

But what about if you're expecting a package source instead of a hostname? No problem:
```python
from admire import Captcha

captcha = Captcha('org.example.app', 'SECRET_API_KEY', is_package=True)
```

## Verifying tokens
Verifying a user-submitted reCAPTCHA token is as easy as:

```python
from admire import Captcha

captcha = Captcha('www.example.org', 'SECRET_API_KEY')
token = captcha.verify_token('TOKEN')

if token:
	print('Verified token: {}'.format(token))
else:
	print('Could not verify token.')
```

## Setting expirations
Admire even supports expirations for challenges! If a reCAPTCHA challenge was requested more than `expiration` seconds ago, it will return as if the token is invalid:
```python
from admire import Captcha

captcha = Captcha('www.example.org', 'SECRET_API_KEY')
token = captcha.verify_token('TOKEN', expiration=60)

if token:
	print('Verified token: {}'.format(token))
else:
	print('Could not verify token or challenge expired.')
```
## Setting remote IP
If you happen to have the user's IP address, you can use that too for an additional security check:
```python
from admire import Captcha

captcha = Captcha('www.example.org', 'SECRET_API_KEY')
token = captcha.verify_token('TOKEN', remote_ip='<IP_ADDRESS>')

if token:
	print('Verified token: {}'.format(token))
else:
	print('Could not verify token.')
```

## That's it
Working with reCAPTCHA doesn't have to be hard and you don't have to suffer.

So, go ahead and grab a drink; you've earned it. :beers:

repository: Avlyssna/Admire

repo_name: Avlyssna/Admire


text:
##### this is the application for better video calling or work from home features

##### this web application is designed on node and react and functions on a single github page

##### the process to run the application are shared below

##### video explanation in the video folder provided for help

##### download mongosb on your pc for viewing the server

##### download nodejs from the browser on your pc using website nodejs.org

- on installation open the terminal or cmd to check installation
  - npm -v
  - node -v

##### clone the resporatory to a fresh folder

- open two terminals and change directory to the folder locaion

  - to do this copy the folder path which contains all the other folders such as app, video, applicationServer, etc
  - then open terminal and write cd pasteTheFilePathHere

  - terminal 1 // server

    - npm i concurrently
    - cd app
    - npm i
    - cd ..
    - npm i
    - cd applicationServer
    - npm i
    - cd ..
    - cd video
    - npm i
    - cd server
    - npm i
    - cd ..
    - cd ..
    - npm run tsinge

  - terminal 2 // frontend

    - cd app/
    - if linux or mac only
      - export PORT=5000
    - if windows only and only
      - set PORT=5000
    - npm run start

repository: pranavtalreja/Video-call

repo_name: pranavtalreja/Video-call


text:
---
title: Retry
position: 22
---

Very simple node that clear process.exitCode and emit success.

Useful when you need to retry an action that have emitted error.

Number of retry is set in node config

```javascript

// ...

delay = f( "delay", { delay: 5000 });
retry = f( "retry", { retries: 5 }s);

// ...

// If MySQL emit error, retry after 5 seconds
mysql.on("error",
    retry.on("success",
      delay.on("success", mysql)));

```

repository: Hexagon/abstractor

gha_language: JavaScript

repo_name: Hexagon/abstractor


text:
---
templateKey: project
title: THINKClimate
date: 2019-10-01T13:53:16.602Z
client: THINKClimate
description: Event web site for Think Climate, a participant in Al Gore's 24 Hours of Reality, hosted in IBM London.
thumbnail: './img/thumbnails/thinkclimate_thumb.png'
tags:
  - GatsbyJS
  - React
  - Styled Components
  - Netlify CMS
  - Design
  - Volunteer
  - 8pt grid
  - Jamstack
---

![](/img/thinkclimate.png)

To coincide with our team's first [thinkclimate.earth](https://thinkclimate.earth/) event, I designed and built a jamstack web site for hosting event and team information, as well as data capturing subscribe and contact forms.

repository: dyegocarlos/portfolio

repo_name: dyegocarlos/portfolio


text:
---
layout: post
title: Creating this site via Jekyll/github-pages under Ubuntu
author: Tikai Chang
tags: [web, jekyll, "Hello world!"]
comments: true
status: "done"
---
How this site was created under Ubuntu:
1. Follow the instructions [here](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll), notably the steps *Requirements*, *Step 2* and *Step 3*

2. errors were encountered during the `bundle install` and it's post-install verification
	1. *commonmarker*
	2. *nokogiri*
	3. querying the version of *jekyll* with `jekyll -v`

3. Use of the theme [minimal](https://github.com/pages-themes/minimal), supported by github pages. The key is to copy the `_layout` files for things to work, especially `default.html`.

4. `bundle exec jekyll serve` and enjoy!

## problems and solutions after some googling
In the following the dependencies were solved and then the command `bundle install` rerun.

### commonmarker problem:

```
Installing commonmarker 0.17.13 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

...
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
...
```

Solved using `sudo apt-get install ruby2.5-dev`, (replace 2.5 by appropriate version)

### nokogiri problem:

```
Fetching nokogiri 1.10.3
Installing nokogiri 1.10.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

...
...
An error occurred while installing nokogiri (1.10.3), and Bundler
cannot continue.
Make sure that `gem install nokogiri -v '1.10.3' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  github-pages was resolved to 198, which depends on
    jekyll-mentions was resolved to 1.4.1, which depends on
      html-pipeline was resolved to 2.11.0, which depends on
	nokogiri
```

Solved according to [this](https://github.com/flapjack/omnibus-flapjack/issues/72]) page, by installing `zlib1g-dev `(used synaptic package manager but could have used `apt-get install`)

Side-note: *nokogiri* was installed seperately via `sudo gem install nokogiri` instead of the `bundle install`

### `jekyll -v` not working
This is the command to see the jekyll version. The error when querying it gave:
```
Traceback (most recent call last):
	13: from /usr/local/bin/jekyll:23:in `<main>'
	12: from /usr/local/bin/jekyll:23:in `load'
	11: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/exe/jekyll:11:in `<top (required)>'
	10: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
	 9: from /usr/lib/ruby/vendor_ruby/bundler.rb:101:in `setup'
	 8: from /usr/lib/ruby/vendor_ruby/bundler.rb:135:in `definition'
	 7: from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:35:in `build'
	 6: from /usr/lib/ruby/vendor_ruby/bundler/dsl.rb:13:in `evaluate'
	 5: from /usr/lib/ruby/vendor_ruby/bundler/dsl.rb:218:in `to_definition'
	 4: from /usr/lib/ruby/vendor_ruby/bundler/dsl.rb:218:in `new'
	 3: from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:83:in `initialize'
	 2: from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:83:in `new'
	 1: from /usr/lib/ruby/vendor_ruby/bundler/lockfile_parser.rb:95:in `initialize'
/usr/lib/ruby/vendor_ruby/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
```

Following to the reply by *DirtyF* in [this post](https://github.com/jekyll/jekyll/issues/7463)
These steps did the trick:
1. update Rubygems using `gem update --system`
2. update bundler using `gem install bundler`
3. update Gemfile.lock in your project using `bundler update --bundler`

Worked wonders!

## Adjust Gemfile and _config.yaml
Apparently the line `gem "github-pages", group: :jekyll_plugins` in the `Gemfile` is required to test on a local server. I suppose it installs the theme-files by itself.
Then point the `theme` to `minima` in the `_config.yaml` file

## Test and upload
To test locally: `bundle exec jekyll serve`
Otherwise upload(push) final product to github pages, in my case I used the `docs` folder in my github root (adjustable in project settings)

## Finally, as a bonus, Latex
Following [this](https://xuc.me/blog/katex-and-jekyll/) post, here is a little sample:
The inline code snippet `$$\alpha \in \beta $$` renders to $$\alpha \in \beta $$.


text:
---
#
modified-date: October 23, 2018
#
# Title displays on the page and in HTML meta tags
title: Welcome
#
# See layouts/home.html for Site Title + Description
#
# Editable - SECTION CONTENT
#
section-1-image: assets/img/home-section-1.png
section-1-title: Modern, user‑friendly digital services
section-1-link: digital-standards
section-1-alt: Design modern, user-friendly digital services
section-1-copy: The Digital Standards describe the quality standards for modern, user‑friendly digital services on the Veteran-facing Services Platform.
#
section-2-image: assets/img/home-section-2.png
section-2-title: Agile, user‑centered delivery
section-2-link: delivery/
section-2-alt: Agile, user-centered delivery
section-2-copy: The Digital Delivery Guide helps VA teams meet the Digital Standards by engaging with users and using best practices for agile delivery.
#
section-3-image: assets/img/home-section-3.png
section-3-title: Veteran Affairs
APIs
section-3-link: https://developer.va.gov/
section-3-alt: Veteran Affairs APIs
section-3-target: yes
section-3-copy: Veteran Affairs APIs empower our partners to build innovative, Veteran‑centered, cutting edge solutions they can use to manage their care, services, and benefits.
#
# Editable - DESCRIPTION CONTENT
#
subhead: Empowering VA teams to build digital services on the Veteran-facing Services Platform
p1: We created this Handbook based on VA's experience with Vets.gov, as well as best practices from government digital services, government agencies, and the technology industry. It's a tool to help VA teams create the best possible user experience for people interacting with Veteran-facing digital services.
p2: This Handbook provides direction for teams who want to build on the Veteran-facing Services Platform (the technologies and processes that support Vets.gov). But we hope other VA teams find it useful when building their own digital services.
alert-title: Work in progress
alert-copy: We're currently expanding and refining this Handbook.
We encourage you to adopt as much of it as possible and share your feedback.
#
# Don't edit items below - they control the page layout
#
return-top: no
layout: home
permalink: /
page-type: home
twitter_card: large
section-image-1: assets/img/square-90.png
section-image-2: assets/img/square-90.png
section-image-3: assets/img/square-90.png
#
---

{{ content }}

repository: cvega/va-digital-service-handbook

repo_name: cvega/va-digital-service-handbook


text:
### User Group Management

The User Groups page allows you to:
* Create or delete user groups.
* Add users to groups and remove permissions from groups.
* Add permissions to groups and remove permissions from groups.

You can also select a permission on the left to see which groups have that permissions.

### More Info

[Authorization in Wavefront](https://docs.wavefront.com/authorization.html)
[Managing Users and Groups](https://docs.wavefront.com/users_groups.html)

repository: peyao/help

repo_name: peyao/help


text:
# Advanced Apple Debugging Reverse Engineering

For example, try attaching LLDB to the Finder application.
Open up a Terminal window and look for the Finder process, like so:

```
lldb -n Finder
```

You’ll notice the following error:

```
 error: attach failed: cannot attach to process due to System Integrity
Protection
```

### Disabling Rootless
Disabling Rootless
To disable Rootless, perform the following steps:
1. RestartyourmacOSmachine.
2. Whenthescreenturnsblank,holddownCommand+RuntiltheAppleboot logo appears. This will put your computer into Recovery Mode.
3. Now,findtheUtilitiesmenufromthetopandthenselectTerminal.
4. WiththeTerminalwindowopen,type:
  csrutil disable; reboot
5. YourcomputerwillrestartwithRootlessdisabled.
You can verify if you successfully disabled Rootless by trying the same command in Terminal again once you log into your account.
lldb -n Finder
LLDB should now attach itself to the current Finder process. The output of a
successful attach should look like this

![](http://oc98nass3.bkt.clouddn.com/2017-07-04-14991598265621.jpg)

Attaching LLDB to Xcode
Now you’ve disabled Rootless, and you can attach LLDB to processes, it’s time to start your whirlwind tour in debugging. You’re first going to look into an application you frequently use in your day-to-day development: Xcode!
Open a new Terminal window. Next, edit the Terminal tab’s title by pressing ⌘ + Shift + I. A new popup window will appear. Edit the Tab Title to be LLDB.

From
![](http://oc98nass3.bkt.clouddn.com/2017-07-04-14991600960053.jpg)
to

Note: You might notice some output on the Xcode stderr Terminal window; this is due to content logged by the authors of Xcode via NSLog or another stderr console printing function.

![](http://oc98nass3.bkt.clouddn.com/2017-07-04-14991619418698.jpg)

#### `help` and `apropos`

* help：      命令解释
* apropos：   查找包含搜寻的字符的命令信息

![](http://oc98nass3.bkt.clouddn.com/2017-07-05-14992242080249.jpg)

### Helpful Links

1. [Advanced Apple Debugging & Reverse Engineering](https://www.raywenderlich.com/161106/introducing-advanced-apple-debugging-reverse-engineering)
2. [Advanced Apple Debugging & Reverse Engineering](https://videos.raywenderlich.com/courses/82-rwdevcon-2017-vault-workshops/lessons/1)
3. [Advanced App Architecture](https://videos.raywenderlich.com/courses/82-rwdevcon-2017-vault-workshops/lessons/2)

repository: dmaulikr/DailyLearning

repo_name: dmaulikr/DailyLearning


text:
# Push Mate - FCM Push Service

[![Build status](https://ci.appveyor.com/api/projects/status/2r1l6ye1l1cj5rfp/branch/master?svg=true)](https://ci.appveyor.com/project/denstorti/pushmate-fcmpushservice/branch/master)

Allows you to send notifications using Firebase Cloud Messaging.

# How to use it

You need to have your own FCM Server Key to use this library. (Learn more here https://firebase.google.com/docs/cloud-messaging/server)

Create a Message instance:
 ```csharp
var message = new Message
            {
                RegistrationIds = new List<string> { registrationId },
                Notification = new Notification
                {
                    Title = "Title",
                    Body = $"Hello World@!{DateTime.Now.ToString()}"
                }
            };
```

Or simply use a JSON with the correct schema (https://firebase.google.com/docs/cloud-messaging/concept-options):
 ```csharp
string validJson = "{ \"registration_ids\":[\"dG4rFnirWOE:APA91bE3COnsY-flnulPse4b4uKZOUDRpdOAe6DGTU_jWGtJt0P_hBXoN1tOa9Je4ZyAfA11OS3US0fZm6M7EljYipCY1f4MqjDLLvEltfe8_3aDnzwTxRbuw23HQ2JIY2ihXQXUvDym\"],\"priority\":\"Normal\",\"notification\":{\"title\":\"Title\",\"body\":\"Hello World@!23-Jun-18 19:58:47\"}}";
 ```
 Example of JSON request object:
 ```javascript
 {
  "message":{
    "token":"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
    "notification":{
      "title":"Portugal vs. Denmark",
      "body":"great match!"
    },
    "data" : {
      "Nick" : "Mario",
      "Room" : "PortugalVSDenmark"
    }
  }
}
 ```

 Create an instance of the service FcmPushService:
 ```csharp
var fcmPushService = new FcmPushService(serverKey, null, new MockedHttpClientOK());
 ```

Call the async method for sending a push notification (for now it only supports HTTPS; XMPP on the road map);
```csharp
var result = await fcmPushService.SendAsync(validJson);
```

gha_license_id: MIT


text:
# Provisioning Service Client Sample For Update Individual Enrollment

## Overview

This is a quick tutorial with the steps to update an individualEnrollment in the Microsoft Azure IoT Hub
Device Provisioning Service using the [ProvisioningServiceClient](https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.sdk.iot.provisioning.service.provisioningserviceclient?view=azure-java-stable)
on the java SDK.

All the artifacts that you need to execute this sample are ready to be built and executed on this sample.

## References

[Provisioning service client - documentation](https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.sdk.iot.provisioning.service.provisioningserviceclient?view=azure-java-stable)
[Provisioning service client - source code](https://github.com/Azure/azure-iot-sdk-java/tree/master/provisioning/provisioning-service-client)

## How to run the samples on Linux or Windows

Note that the samples for Windows and Linux use Maven.

1. Clone the java SDK repo (https://github.com/Azure/azure-iot-sdk-java.git).
2. Navigate to the sample root `azure-iot-sdk-java/provisioning/provisioning-samples/service-update-enrollment-sample`.
3. Edit the `/src/main/java/samples/com/microsoft/azure/sdk/iot/ServiceUpdateEnrollmentSample.java`
   to add your provisioning service information:
    1. Replace the `[Provisioning Connection String]` by the Provisioning Connection String that you copied from the
        portal.
        ```java
        /*
         * Details of the Provisioning.
         */
        private static final String PROVISIONING_CONNECTION_STRING = "[Provisioning Connection String]";
        ```

    2. For **TPM** attestation:
        1. From the device that you have, you must copy the registrationId and the endorsementKey. If you don't have
            a physical device with TPM, you can use the [tpm-simulator](https://github.com/Azure/azure-iot-sdk-java/tree/master/provisioning/provisioning-tools/tpm-simulator).
        2. Fill the `REGISTRATION_ID` and the `TPM_ENDORSEMENT_KEY` with the device information.
            ```java
            private static final String REGISTRATION_ID = "[RegistrationId]";
            private static final String TPM_ENDORSEMENT_KEY = "[TPM Endorsement Key]";
            ```

    3. For **X509** attestation:
        1. From the device that you have, you must copy the registrationId and the client certificate. If you don't have
            a physical device with X509, you can use the [provisioning X509 cert generator](https://github.com/Azure/azure-iot-sdk-java/tree/master/provisioning/provisioning-tools/provisioning-x509-cert-generator).
            Answer `Y` to provide your common name, the Client Cert commonName is your registrationId.
        2. Fill the `REGISTRATION_ID` with the device commonName, and replace the `TPM_ENDORSEMENT_KEY` by the
            `PUBLIC_KEY_CERTIFICATE_STRING` that contains your client certificate. Be careful to do **not** change your
            certificate, _adding_ or _removing_ characters like spaces, tabs or new lines (`\n`).
            ```java
            private static final String REGISTRATION_ID = "[RegistrationId]";
            private static final String PUBLIC_KEY_CERTIFICATE_STRING =
                    "-----BEGIN CERTIFICATE-----\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
                    "-----END CERTIFICATE-----\n";
            ```
        3. Replace the Attestation mechanism in the sample, line #41, to work with X509 client certificate instead of TPM.

            **Replace:**
            ```java
            Attestation attestation = new TpmAttestation(device.getValue());
            ```

            **By:**
            ```java
            Attestation attestation = X509Attestation.createFromClientCertificates(device.getValue());
            ```

5. In a command line, navigate to the directory `azure-iot-sdk-java/provisioning/provisioning-samples/service-update-enrollment-sample`
    where the `pom.xml` file for this test lives, and build your sample:
    ```
    {sample root}/>mvn install -DskipTests
    ```
6. Navigate to the folder containing the executable JAR file for the sample and run the sample as follows:

    The executable JAR file for update a IndividualEnrollment can be found at:
    ```
    {sample root}/target/service-update-enrollment-sample-{version}-with-deps.jar
    ```

    Navigate to the `target` directory that containing the jar. Run the sample using the following command:
    ```
    java -jar ./service-update-enrollment-sample-{version}-with-deps.jar
    ```

repository: kartben/azure-iot-sdk-java

repo_name: kartben/azure-iot-sdk-java


text:
# Dev Guide
The aims of this document are (1) to provide documentation of the current state of the application, to (2) to provide suggestions for future development, and (3) to identify and document known issues that should be fixed.

## The State of the App

### Pages

### Common components

### State

## Suggestions for Future Development

## Known Bugs

repository: donavynhaley/bg-emotion-tracker-fe-b

repo_name: donavynhaley/bg-emotion-tracker-fe-b


text:
# HTTP Status Codes and Reason Phrases for C, C++ and Qt #

[![Linux build status](https://travis-ci.com/j-ulrich/http-status-codes-cpp.svg?branch=master)](https://travis-ci.com/j-ulrich/http-status-codes-cpp)
[![Windows build status](https://ci.appveyor.com/api/projects/status/ijp196mjo0vsover/branch/master?svg=true)](https://ci.appveyor.com/project/j-ulrich/http-status-codes-cpp/branch/master)

This repository provides the HTTP status codes and reason phrases in different variants for C/C++.

Simply take the variant that fits your needs and copy/use/modify it.

The status codes cover all codes [registered with the IANA](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml).
Initially, the data was taken from [for-GET/know-your-http-well](https://github.com/for-GET/know-your-http-well).

### Table of Contents ###

> - [Variants](#variants)
> - [Example](#example)
> - [Documentation](#documentation)
>   - [Status Codes Enum](#status-codes-enum)
>   - [Category/Class Tests](#categoryclass-tests)
>   - [Reason Phrases](#reason-phrases)
>   - [Conversion Functions](#conversion-functions)
> - [License](#license)

## Variants ##

| Variant                          | Name Scoping           | Status Codes Type                                                                              | Reason Phrases Type |
|----------------------------------|------------------------|------------------------------------------------------------------------------------------------|---------------------|
| [C](HttpStatusCodes_C.h)         | Prefix `HttpStatus_`   | `enum HttpStatus_Code`                                                                         | `const char*`       |
| [C++](HttpStatusCodes_C++.h)     | Namespace `HttpStatus` | `enum Code`                                                                                | `std::string`       |
| [C++11](HttpStatusCodes_C++11.h) | Namespace `HttpStatus` | `enum class Code`                                                                              | `std::string`       |
| [Qt](HttpStatusCodes_Qt.h)       | Namespace `HttpStatus` | `enum Code`<br>When using Qt 5.8 or later: registered in meta type system using `Q_ENUM_NS()`  | `QString`           |

> Note regarding Qt variant: Oldest tested Qt version was Qt 5.2.0 with MinGW 4.8. However, should be working with any Qt 5.x version.
Might also be working with Qt 4 versions but this has not been tested.

## Example ##

```c++
#include "MyHttpReplyClass.h"
#include "HttpStatusCodes_C++.h"
#include <iostream>

void printReplyStatus( MyHttpReplyClass reply )
{
	if ( reply.status == HttpStatus::OK )
		std::cout << "Success!";
	else
		std::cerr << reply.status << " " << HttpStatus::reasonPhrase( reply.status );
}
```

## Documentation ##

> **Note:** The header files contain more detailed Doxygen documentation for all types and functions.

### Status Codes Enum ###

For the complete list of defined enums, see one of the header files.

> **Note:** The maximum supported value for the enums is `1023`. Trying to convert bigger values to the enum types
might be undefined behavior.

##### C Variant #####
```c
enum HttpStatus_Code
{
	HttpStatus_OK       = 200,
	HttpStatus_NotFound = 404
	// ...
};
```

##### C++11 Variant #####
```c++
namespace HttpStatus {
enum class Code
{
	OK       = 200,
	NotFound = 404
	// ...
};
}
```

##### Other Variants #####
```c++
namespace HttpStatus {
enum Code
{
	OK       = 200,
	NotFound = 404
	// ...
};
}
```

### Category/Class Tests ###

##### C Variant #####
```c
char HttpStatus_isInformational( int code );
char HttpStatus_isSuccessful( int code );
char HttpStatus_isRedirection( int code );
char HttpStatus_isClientError( int code );
char HttpStatus_isServerError( int code );
```
Return `1` if the given _code_ belongs to the corresponding class of status codes (see [RFC7231](https://tools.ietf.org/html/rfc7231#section-6)).
Return `0` otherwise.

```c
char HttpStatus_isError( int code);
```
Returns `1` if the given _code_ is either a client error, a server error or any non-standard error code.
Non-standard error codes are status codes with a value of 600 or higher.
Returns `0` otherwise.

##### Other Variants #####
> **Note:** The C++11 variant also provides overloads for `HttpStatus::Code`. So there is no need to cast.

```c++
bool HttpStatus::isInformational( int code );
bool HttpStatus::isSuccessful( int code );
bool HttpStatus::isRedirection( int code );
bool HttpStatus::isClientError( int code );
bool HttpStatus::isServerError( int code );
```
Return `true` if the given _code_ belongs to the corresponding class of status codes (see [RFC7231](https://tools.ietf.org/html/rfc7231#section-6)).
Return `false` otherwise.

```c++
bool HttpStatus::isError( int code );
```
Returns `true` if the given _code_ is either a client error, a server error or any non-standard error code.
Non-standard error codes are status codes with a value of 600 or higher.
Returns `false` otherwise.

### Reason Phrases ###

##### C Variant #####
```c
const char* HttpStatus_reasonPhrase( int code );
```
Returns the HTTP reason phrase string corresponding to the given _code_.

##### C++/C++11 Variants #####
> **Note:** The C++11 variant also provides an overload for `HttpStatus::Code`. So there is no need to cast.
```c++
std::string HttpStatus::reasonPhrase( int code );
```
Returns the HTTP reason phrase string corresponding to the given _code_.

##### Qt Variant #####
```c++
QString HttpStatus::reasonPhrase( int code );
```
Returns the HTTP reason phrase string corresponding to the given _code_.

### Conversion Functions ###

##### C++11 Variant #####
```c++
int HttpStatus::toInt( HttpStatus::Code code );
```
Returns the integer value corresponding to a given a _code_.
This is a convenience function as replacement for a `static_cast<int>()`.

##### Qt Variant #####
```c++
int HttpStatus::networkErrorToStatusCode( QNetworkReply::NetworkError error );
```
Returns the HTTP status code corresponding to the given _error_ if there is one.
Otherwise, `-1` is returned.

```c++
QNetworkReply::NetworkError HttpStatus::statusCodeToNetworkError( int code );
```
Returns the `QNetworkReply::NetworkError` corresponding to the given _code_ if there is one.
For codes where there is no exact match, the best matching "catch all" code (`QNetworkReply::NoError`,
`QNetworkReply::UnknownContentError`, `QNetworkReply::UnknownServerError` or `QNetworkReply::ProtocolFailure`)
is returned.

## License ##
[![CC0](https://licensebuttons.net/p/zero/1.0/80x15.png)](http://creativecommons.org/publicdomain/zero/1.0/)
This project is licensed under [Creative Commons CC0](LICENSE).

repository: Lyall-X/http-status-codes-cpp

repo_name: Lyall-X/http-status-codes-cpp


text:
# CloudChain RKSync

[![Build Status](https://travis-ci.org/rkcloudchain/rksync.svg?branch=master)](https://travis-ci.org/rkcloudchain/rksync)
[![codecov](https://codecov.io/gh/rkcloudchain/rksync/branch/master/graph/badge.svg)](https://codecov.io/gh/rkcloudchain/rksync)
[![Go Report Card](https://goreportcard.com/badge/github.com/rkcloudchain/rksync)](https://goreportcard.com/report/github.com/rkcloudchain/rksync)

CloucChain rksync is a distributed file synchronization protocol. It securely synchronizes files between specified network members. Each of these network members has a digital identity encapsulated in an X.509 digital certificate. All network members constitute a private "subnet" called `channel`. Channel specifies all authorized network members and the files that need to be synchronized. Files can only be synchronized between network members joining the same channel.

A channel is created by a network member, the creator is called `leader`. Only leader can add other network members to the channel, or specify files that need to be synchronized. The channel information is synchronized between all network members through the gossip protocol.

Any non-leader node will randomly selects a neighboring node for file data synchronization. The node periodically ask the neighbor node for file updates. and receives updated data for the file from the node if the file has been updated.

## Goals

Rksync is inspired by [Hyperledger fabric](https://github.com/hyperledger/fabric) block data synchronization algorithm. Here are the goals:

1. **Security**

    First of all, protecting the user's data is paramount. Regardless of our other goals we must never allow the user's data to be susceptible to eavesdropping or modification by unauthorized parties.

2. **Easy**

    A high-level interface designed to reduce the work of implementing file transfer in your application.

3. **High availability**

    Component failures are the norm rather than the exception, therefor, fault tolerance and automatic recovery must be integral to the system.

4. **Automatic**

    User interaction should be required only when absolutely necessary.

## Install

```Go
go get -u github.com/rkcloudchain/rksync
```

## Example

First, you need to start the rksync service:

```Go
package main

import (
    "net"

    "github.com/rkcloudchain/rksync"
    "github.com/rkcloudchain/rksync/config"
)

func main() {
    cfg := &config.Config{
        HomeDir: "/pth/to/home/directory",
        Gossip: &config.GossipConfig{
            FileSystem:     &MyFileSystem{},
            BootstrapPeers: []string{"localhost:8053"},
            Endpoint:       "localhost:9053",
        },
        Identity: &config.IdentityConfig{
            ID: "nodeID",
        },
    }

    lis, err := net.Listen("tcp", "<IP_ADDRESS>:9053")
    if err != nil {
        panic(err)
    }

    srv, err := rksync.Serve(lis, cfg)
    if err != nil {
        panic(err)
    }
    defer srv.Stop()
}
```

### Note

1. **You need to implement the FileSystem interface yourself**

    ```Go
    // FileSystem enables the rksync to communicate with file system.
    type FileSystem interface {
        // Create creates the named file
        Create(chainID string, fmeta FileMeta) (File, error)

        // OpenFile opens a file using the given flags and the given mode.
        OpenFile(chainID string, fmeta FileMeta, flag int, perm os.FileMode) (File, error)

        // Stat returns a FileInfo describing the named file.
        Stat(chainID string, fmeta FileMeta) (os.FileInfo, error)
    }

    // File represents a file in the filesystem
    type File interface {
        io.Closer
        io.ReaderAt
        io.Writer
    }
    ```

2. **The x.509 certificate file representing the digital identity should be placed in the HomeDir directory.**

    The directory structure is:

    ```text
    /HomeDir
      /csp
        /signcerts // Store public key certificate
        /keystore  // Store private key
        /cacerts   // Store trusted CA certificates
    ```

3. **BootstrapPeers**

    The seed node list needs to be added to the BootstrapPeers configuration item. This configuration of all nodes should be consistent.

Once the service is started, you can do the corresponding operation:

* CreateChannel

    ```Go
    err = srv.CreateChannel("testchannel", []common.FileSyncInfo{
        common.FileSyncInfo{Path: "file1.txt", Mode: "Append", Metadata: []byte{...}},
        common.FileSyncInfo{Path: "file2.txt", Mode: "Append", Metadata: []byte{...}},
    })
    ```

* AddMemberToChan

    ```Go
    err = srv.AddMemberToChan("testchannel", "node2ID", node2Cert)
    ```

* AddFileToChan

    ```Go
    err = srv.AddFileToChan("testchannel", "file3.txt", "Append", []byte{...})
    ```

## Current State

RKSync is still in development and the API may be changed. Therefore, we do not guarantee the backward compatibility of the library for the time being.

## License

RKSync is under the Apache 2.0 license. See the [LICENSE](https://github.com/rkcloudchain/rksync/blob/master/LICENSE) file for details.

repository: rkcloudchain/rksync

gha_language: Go

repo_name: rkcloudchain/rksync


text:
---
layout: page
title: About
permalink: /about/
icon: fingerprint
---

This is a fork of the base Jekyll theme, reworked to use the Materialize CSS framework. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/)

You can find the source code for Minima at GitHub:
[jekyll][jekyll-organization] /
[minima](https://github.com/jekyll/minima)

You can find the source code for Jekyll at GitHub:
[jekyll][jekyll-organization] /
[jekyll](https://github.com/jekyll/jekyll)

The source for Materialize CSS at:

[Dogfalo](https://github.com/Dogfalo/) / [materialize](https://github.com/Dogfalo/materialize)

[jekyll-organization]: https://github.com/jekyll


text:
# Project Management
A simple demo application for managing projects. Built with the MERN stack.
Node is required to be installed in order to run this project.

**Setup environment variables**

- cd project_management/back_end
- create .env file.
- setup the ATLAS_URI (URI used for mongodb connection) and TOKEN_SECRET (used for generating authtokens) variables.

**Running the back-end API**

1. cd project_management/back_end
2. npm install
3. npm run prod

**Running the front end**

1. cd project_management
2. npm install
3. npm start (development mode)

repository: ricardoferreirasilva/project-management

repo_name: ricardoferreirasilva/project-management


text:
#  <img src="skill_icon" alt="The Name Game (banana-fana) icon" width="36"> [The Name Game (banana-fana)](http://alexa.amazon.com/#skills/amzn1.echo-sdk-ams.app.b7d21a1d-3166-41de-9841-7f495960b6e9)
![3.2 stars](../../images/ic_star_black_18dp_1x.png)![3.2 stars](../../images/ic_star_black_18dp_1x.png)![3.2 stars](../../images/ic_star_black_18dp_1x.png)![3.2 stars](../../images/ic_star_half_black_18dp_1x.png)![3.2 stars](../../images/ic_star_border_black_18dp_1x.png) 26

To use the The Name Game (banana-fana) skill, try saying...

* *Alexa, open The Name Game and use Alexa.*

* *Alexa, open The Name Game and use Pedro.*

* *Alexa, open The Name Game and use Jenny.*

Kids love playing The Name Game with Alexa. For example, just say “Alexa, open The Name Game and use Jenny” and Alexa will say “Jenny jenny bo-benny, banana-fana fo-fenny, fee fi mo-menny, Jenny.” Try using your name!

***

### Skill Details

* **Invocation Name:** the name game
* **Category:** null
* **ID:** amzn1.echo-sdk-ams.app.b7d21a1d-3166-41de-9841-7f495960b6e9
* **ASIN:** B017OBZR50
* **Author:** Alex Rosen
* **Release Date:** November 11, 2015 @ 14:00:32
* **In-App Purchasing:** No


text:
### Kubernetes sandbox
#### Yet another local Kubernetes
![alt text](https://github.com/spender0/kubernetes-sandbox/raw/master/kubernetes-sandbox.jpg)

#### Motivation
For ones who need to understand Kubernetes's complex architecture.

Such tools as minikube or kubeadm encapsulates the complexity.
As a result you get working kubernates without understanding how the things are done.

It is just well-commented code. I believe that well-commented code examples are much better than tons of instructions.

#### Features:
* SSL certificates and requirements with using old good openssl tool
* Fully automated and dockerized, only docker and docker-compose required
* All settings are transparent, you can fully control the cluster
* New convenient feature is implemented https://kubernetes.io/docs/reference/access-authn-authz/bootstrap-tokens

#### Requirements:
* Docker https://docs.docker.com/install/
* Docker-compose https://docs.docker.com/compose/install/
* Git https://git-scm.com/downloads

#### Run:

```
git clone https://github.com/spender0/kubernetes-sandbox.git

cd kubernetes-sandbox

docker-compose up -d
```

kubectl is available either via docker:

`docker exec -it kubernetes-sandbox_kubeadm_1 bash`

or you can install it https://kubernetes.io/docs/tasks/tools/install-kubectl/

and then run:

```
export KUBECONFIG=conf/admin-local.conf

kubectl -n kube-system get pods
```

#### Stop:
```
docker-compose down
```

#### Remove completely:
```
docker-compose down

git clean -f -d
```

#### References
Based on: https://kubernetes.io/docs/reference/

Docker images: https://console.cloud.google.com/gcr/images/google-containers/GLOBAL

repository: pbumbulis/kubernetes-sandbox

repo_name: pbumbulis/kubernetes-sandbox


text:
---
id: upgrading-to-relay-hooks
title: Upgrading to Relay Hooks
slug: /migration-and-compatibility/
---

[Relay Hooks](/blog/2021/03/09/introducing-relay-hooks) is a set of new Hooks-based APIs for using Relay with React that improves upon the existing container-based APIs.

In this we will cover how to start using Relay Hooks, what you need to know about compatibility, and how to migrate existing container-based code to Hooks if you choose to do so. However, note that migrating existing code to Relay Hooks is ***not*** required, and **container-based code will continue to work**.

## Accessing Relay Hooks

Make sure the latest versions of React and Relay are installed, and that you’ve followed additional setup in our [Installation & Setup](../getting-started/installation-and-setup/) guide:

```
yarn add react react-dom react-relay
```

Then, you can import Relay Hooks from the **`react-relay`** module, or if you only want to include Relay Hooks in your bundle, you can import them from **`react-relay/hooks`**:

```js
import {graphql, useFragment} from 'react-relay'; // or 'react-relay/hooks'

// ...
```

## Next Steps

Check out the following guides in this section:
* [Suspense Compatibility](./suspense-compatibility/)
* [Relay Hooks and Legacy Container APIs](./relay-hooks-and-legacy-container-apis/)

For more documentation on the APIs themselves, check out our [API Reference](../api-reference/relay-environment-provider) or our [Guided Tour](../guided-tour/).

repository: facebook/relay

gha_language: Rust

repo_name: facebook/relay


text:
---
layout: post
title: '[译]Nextpeer拥抱GDX，GDX后面拥抱Nextpeer'
date: 2013-09-14 10:39:00
comments: true
categories: [Libgdx]
---
![Nextpeer](http://tctechcrunch2011.files.wordpress.com/2013/08/nextpeer.png?w=300)
原文链接：http://www.badlogicgames.com/wordpress/?p=3166

> [NextPeer](http://nextpeer.com/) is a service for creating synch and asynch multiplayer games, with tons of features. The big differentiator between NextPeer and Google Play Game Services is that it actually works on both Android and iOS (only leaderboards are crossplatform in GPGS) and that it allows both asynch and synch multiplayer games (only synch is supported by GPGS). The fine folks over at NextPeer, who have their headquaters in Isreal, contacted me a while ago to see if there’s a way to collaborate.

NextPeer是一个被用于创建同步和异步多人游戏的服务，有很多特性功能。NextPeer和Google Play 游戏服务最大的不同是，它实际上适用于Android和iOS（仅排行榜跨平台GPGS），它允许异步和同步多人游戏（仅支持同步由GPGS）。优秀的开发者在Nextpeer，总部设在以色列，前段时间，NextPeer与我联系，看看是否有合作的可能。

> We agreed that we’d start out with working on a [libgdx integration guide](https://developers.nextpeer.com/docs/view/libgdx). Turns out it’s as easy as adding their Android library to your game’s Android project, and then use a tiny shim to make it work with the rest of the libgdx infrastructure. You can find a modified [Super Jumper example on Github](https://github.com/ItamarM/Nextpeer-libgdx).

我们同意我们着手进行[libgdx集成指南](https://developers.nextpeer.com/docs/view/libgdx)。原来它是那么容易，因为他们的Android库添加到你的游戏的Android项目，然后用一个小垫片把它寄托于libgdx的基础设施上。你可以找到一个修改[Super Jumper example on Github](https://github.com/ItamarM/Nextpeer-libgdx)。

> The shim is currently a bit incomplete but can be easily extended if necessary. Also, things do not yet work for iOS. We’ll hold out with that until we finished the RoboVM transition.

垫片目前有点不完整的，但如果有必要，能很容易扩展。此外，事情还不能工作在iOS上。我们会坚持直到我们完成了RoboVM的过渡。

> In the meantime, hop over to NextPeer’s website, register a free account and start integrating multiplayer in your game!

在此期间，跳到NextPeer的网站，注册一个免费帐户，并开始整合多人在你的游戏！


text:
# layoutr

[![pub package](https://img.shields.io/pub/v/layoutr?style=flat-square)](https://pub.dev/packages/layoutr)

A set of succinct Dart/Flutter utilities to help doing responsive layouts with less verbosity.

## Why

There are already a ton of layout/UI libraries out there and this is just another one to solve the same problem: responsive layouts.

This package aims to be a single dependecy to handle responsive use-cases in Flutter applications while keeping the verbosity to a minimum, because we know how quickly verbose (reads harder-to-read) we can get with those Widgets.

## Usage

Before finding out the package's API, make sure to [install this package](https://pub.dev/packages/layoutr/install). With this out of the way, let's get an overview what this package does:

### Layout Resolvers

These are the core layout classes that should make the process of handling multiple-layout widgets much less verbose. We can use these resolvers whenever you have a `BuildContext` (usually in the Widgets `build` function) available.

Even though the magic should happen inside the abstract `LayoutResolver`, we need to extend this class to provide our desired `Breakpoint`s. This is intended due to the fact that there is an incredible amount of use-cases available when building any kind of UI - meaning that these breakpoints are completely subjective, based on each project "constraints".

But that's not any reason to not have built-in Layout Resolvers, and these will probably fit the most generic use-cases. To exemplify the resolvers, we can see how the `CommonLayout` works.

#### Exemplifying with CommonLayout
---

Before diving into the concepts, you have to make sure to provide a `CommonLayout` for your widgets. This can be done
in multiple different ways, although the easiest is to just wrap your top-most widget in the `CommonLayoutWidget`:

```dart
import 'package:layoutr/common_layout.dart';

// ...
CommonLayoutWidget(
  child: /* My child, possibly a MaterialApp/WidgetsApp */,
);
// ...
```

Now, `CommonLayout` is split in 4 breakpoints: `desktop`, `tablet`, `phone` and `tinyHardware`. A simple usage of returning a responsive `Text` widget that has both its value and style customized based on the current device's constraints may be done like the below:

```dart
import 'package:layoutr/common_layout.dart';

// ...

Widget build(BuildContext context) {
  final layout = context.commonLayout;
  final textTheme = Theme.of(context).textTheme;

  return layout.value(
    desktop: () => Text('Desktop layout', style: textTheme.headline1),
    phone: () => Text('Phone layout', style: textTheme.headline4),
    tinyHardware: () => Text('Tiny Hardware layout', style: textTheme.headline6),
  );
}
// ...
```

> **TLDR: all breakpoints don't need to be provided, the layout will automatically find the nearest suitable value for your current breakpoint.**
>
> Long version: you can see that there is no `tablet` supplied to the `layout.value`, and that is intended to exemplify a common scenario, where we may want to just provide two or three arguments - and that means not all possible scenarios are "covered" - and that's where the resolver comes in handy: if the **current breakpoint** value is not passed to `layout.value`, it will fallback to the "nearest" available one, fitting the most suitable layout for your particular value. This "nearest logic" can be confusing, but you can find out more how it works in `LayoutResolver.closestValue`

Other than `layout.value`, the `CommonLayout` provide utilities for simple boolean comparisons:

```dart
import 'package:layoutr/common_layout.dart';

// ...

Widget build(BuildContext context) {
  final layout = context.commonLayout;
  const pageTitle = 'Title';

  final myAppBar = layout.isTabletOrSmaller ? AppBar(title: const Text(pageTitle)) : null;

  return Scaffold(
    // We wan't to have an `AppBar` if the current layout is a tablet or smaller
    appBar: myAppBar,
    body: Center(
      child: Column(
        children: [
          // And we wan't to have a custom title `AppBar` if the current layout is a tablet or smaller
          if (layout.isDesktop)
            Text(pageTitle, style: Theme.of(context).textTheme.headline3),
          // ... the rest of the widget
        ],
      ),
    ),
  );
}
// ...
```

##### Overriding `CommonLayout` resolver
---

To override the sizes for each breakpoint, you can provide your own `CommonLayout` instance:

```dart
import 'package:layoutr/common_layout.dart';
// ...
CommonLayoutWidget(
  resolverBuilder: (constraints) => CommonLayout(constraints.maxWidth, desktop: 800, tablet: 520),
  child: /* My child */,
);
// ...
```

> **TLDR: your app don't need to necessarily use `MaterialApp` (or `WidgetsApp`), just add it above your top-most widget.**
>
> Long version: it's probably the best to add the resolver widget above the top-most widget of your tree, because the all built-in widgets use a `LayoutBuilder` to provide such responsive features, and this may create inconsistencies if they are created in nested widgets, which will only use the parent's `BoxConstraints`. This could also be useful if you wanted to created a resolver that is not necessarily related to the device's sizes, but I fail to see a useful scenario like this at the moment.

##### Overriding `CommonLayout` spacings
---
To override the spacings for each breakpoint, you can provide your own `RawSpacings` instance:

```dart
import 'package:layoutr/common_layout.dart';
// ...
CommonLayoutWidget(
  spacings: const RawSpacings(4, 12, 20, 24, 32, 40, 48, 56, 60),
  child: /* My child */,
);
// ...
```

While the above will customize all spacings for all breakpoints, it's still not responsive, and that's fine. You may
want to use the spacings for the sole benefit of type-safety utilities. Now if you also want them to be responsive,
there is a constructor for that:

```dart
import 'package:layoutr/common_layout.dart';

// ...
CommonLayoutWidget.withResponsiveSpacings(
  desktopSpacings: RawSpacings(8, 16, 24, 32, 40, 52, 60, 68, 80),
  phoneSpacings: RawSpacings(4, 8, 12, 20, 28, 36, 40, 48, 60),
  child: /* My child */,
);
// ...
```

Not sure what spacings mean? Check out [spacings](#spacings).

----
Tips:
- we can easily use this package with common libraries like `provider` (see in [`example/`](example/provider_usage/)) and `river_pod` (see in [`example/`](example/river_pod_usage/`));
- everything explained here is same for all built-in resolvers (like `GranularLayout`), they just differ in the
breakpoints amount/types.

#### Available Built-in `LayoutResolver`
---

- `CommonLayout`: a resolver split in 4 breakpoints: `desktop`, `tablet`, `phone` and `tinyHardware`. Import this resolver through `package:layoutr/common_layout.dart` - (see in [`example/`](example/common_layout/));
- `GranularLayout`: a resolver split in 6 breakpoints: `xxLarge`, `xLarge`, `large`, `medium`, `small` and `xSmall`. Import this resolver through `package:layoutr/granular_layout.dart` - (see in [`example/`](example/granular_layout/)).

#### Custom `LayoutResolver`
---

If the above built-in resolvers don't match the requirements, `LayoutResolver` can be customized by extending it, taking advantage of the utilities built-in in the abstract class itself. To extend the and implement your custom `LayoutResolver`, import `package:layoutr/layoutr.dart`. Check out a custom implementation example in the [`example/`](example/custom_layout/).

### Spacings

All spacing features revolve around `Spacing` enumerator. These are named ranges that should usually fit most use-cases
out there in the wild. They are pretty intuitive: `xxxSmall`, `xxSmall`, `xSmall`, `small`, `medium`, ... and so on.

Spacings are an additional help for situations where we need type-safety, responsivity, or both. Being more specific:
- type-safety: even if you don't want to use it as a responsive value, you will still benefit from having a type-safe
system that will prevent inconsistent spacings, margins and paddings in your application;
- responsivity: the spacings can be customized to one, some or all breakpoints, meaning that you won't have to change
anything if you use the `Spacing` type system.

All built-in `LayoutResolver` will provide the spacings out-of-the-box, so no need to add anything extra other than your root widget. But this might not be the best for most. If wanted, one could use only this package's feature alone (with `SpacingsInheritedWidget`), like so:

```dart
import 'package:layoutr/layoutr.dart';

// ...
LayoutBuilder(
  builder: (context, constraints) {
    // If we wanted, we could use this spacings type-safety/responsivity without the resolver themselves
    final myCustomSpacings = constraints.maxWidth > 800
        ? RawSpacings(16, 24, 32, 40, 52, 60, 68, 76, 80)
        : RawSpacings(8, 12, 24, 32, 40, 48, 56, 64, 72);

    return SpacingsInheritedWidget(
      spacings: myCustomSpacings,
      child: // ... ,
    );
  },
);
// ...
```

Alone this can be somewhat useful, but its potential is enhanced with the built-in utilities and resolvers
widgets - you can even build your own by extending any `BuildContext`, `Widget` or any layout-related element.

An example usage with some of the utilities:

```dart
import 'package:layoutr/layoutr.dart';

// SpacingMixin just helps you to call spacings like `smallSpacing`, instead of `Spacing.smallSpacing`, making it
// overall less verbose.
class MyPage extends StatelessWidget with SpacingMixin {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Text('My page'),
          // Creates a vertical responsive/type-safe spacing
          context.verticalBox(xxxLargeSpacing),
          Container(
            // Creates a vertical symmetrical insets responsive/type-safe spacing
            margin: context.symmetricInsets(vertical: smallSpacing),
            color: Colors.amber,
            // Wraps this widget in a Padding with all insets to this responsive/type-safe spacing
            child: Placeholder().withAllPadding(context, mediumSpacing),
          ),
        ],
      ),
    );
  }
}
```

### Utilities

- Syntax-sugar for common use-cases, like: `deviceWidth` and `deviceHeight`;
- [Helpers] for commonly used elements like `EdgeInsets` and `Padding`, using `Spacing`.

Check out all [spacing utilities](lib/src/utilities.dart).

## Reference OS Projects

List of open source projects that use this package and can be used as a reference to implement your own use-cases:

WIP

## Contributing

Want to contribute? Check it out [here](CONTRIBUTING.md).

repository: olmps/layoutr

repo_name: olmps/layoutr


text:
Quick Start
===========
First, a quick introduction into how this program thinks about the data it is presented with.

The purpose of this program is to ingest data and calculate statistics about said data. Specifically, the statistics we're calculating are correlation statistics. Data comes in the form of "objects", which within the API manifest themselves as Python dictionaries and when loaded from files manifest themselves as JSON objects.

Objects are made up of fields and values, which are respectively keys and values. Here's some example objects:
```
{"server": "Apache", "php": "5", "blacklist": true}
{"server": "Apache", "php": "5", "blacklist": false}
{"server": "NginX",  "php": "5", "blacklist": false}
{"server": "NginX",  "php": "4", "blacklist": true}
{"server": "Apache", "php": "4", "blacklist": true}
{"server": "Apache", "php": "4", "blacklist": true}
```

The centerpiece of this module is the CorrelationDB. Here's an example of how to create one, if the above objects are in file "data.json":
```
>>> c = correlationdb.CorrelationDB(fieldlist=["server", "php", "blacklist"])
>>> c.importFile("data.json")
```

Notice the "fieldlist" argument. The CorrelationDB needs to know what fields it is going to relate in the future, since it stores only the data required to correlate the data, and throws away the rest of the data. Because of this it can literally handle trillions of objects while using only megabytes of memory. It stores the breakdown of each field as a tree, in the order given by the fieldlist. For instance, the internal data structure of "c" after the above is:

```
>>> c.pprint()
server Apache: 4 (66%)
  php 5: 2 (50%) (33%)
    blacklist true: 1 (50%) (17%)
    blacklist false: 1 (50%) (17%)
  php 4: 2 (50%) (33%)
    blacklist true: 2 (100%) (33%)
server NginX: 2 (33%)
  php 5: 1 (50%) (17%)
    blacklist false: 1 (100%) (17%)
  php 4: 1 (50%) (17%)
    blacklist true: 1 (100%) (17%)
```

The meaning of this printout shouldn't affect you, but here it is in case it comes in handy:
<field> <value>: <# of objects> (<% of parent's objects>) (<% of all objects>)

Note the hierarchy. For instance, there is 1 object that has NginX and php 4 and is blacklisted.

But, back to the main point. The CorrelationDB presents an API to quickly and easily compare the relationship between any two fields:
```
>>> c.query2("server", "blacklist")
{"Apache": {"true": 0.75, "false": 0.25},
 "NginX":  {"true": 0.50, "false": 0.50}}
```

The above dictionary means that, for Apache servers, 75% of them are blacklisted while 25% are not. Meanwhile, for NginX servers, 50% are blacklisted while 50% are not.

The query could just as easily run the other way:
```
>>> c.query2("blacklist", "server")
{"true":  {"Apache": 0.75, "NginX": 0.25},
 "false": {"Apache": 0.50, "NginX": 0.50}}
```

Coincidentally, the numbers come out to be the same, but that's because the sample size is six. Note the meaning of this dictionary: Of all blacklisted servers, 75% are Apache and 25% are NginX.

To summarize:
- Of all Apache servers, 75% are blacklisted.
- Of all blacklisted servers, 75% are Apache.
The numbers are the same in this example, but it is important that you recognize the difference.

Now, you ask, "What about more complex queries? What if I wanted to ask 'What tends to cause blacklisted sites?'"

Yes, I am acutely aware that correlation does not equal causation. However, when it comes to big data it is my firm belief that strong correlation is an indicator of a related cause, if not direct causation.

Which is why I say "tends to cause" and not "causes". If it bothers you, do a find-replace on this document and replace "tends to cause" with "strongly indicates a relation that may or may not be indicative of a cause"

But, your question may be: "What tends to cause blacklisted sites?" CorrelationDB has a function called "rootcause2" that will answer that question:
```
>>> c.rootcause2("blacklist", "true")
[("php",    "5",      1, 0.33),
 ("server", "NginX",  1, 0.5),
 ("server", "Apache", 3, 0.75),
 ("php",    "4",      3, 1.00)]
```

The first argument is the field, the second argument is the value you're trying to find a cause for.

rootcause returns a sorted list of tuples. Here's what the values of the tuples mean, in order:
1. Field name (e.g. "php")
2. Field value (e.g. "5")
3. Number of matching objects with the given field/value pair (e.g. 1 object had both php: 5 and blacklist: true)
4. Percentage of all matching objects that had the given field/value pair (e.g. 33% of all php:5 objects had blacklist:true)

Looking at the results above, we can safely conclude:
- php 4 is blacklisted 100% of the time.
- Apache is blacklisted more often than not (75% of the time).
- NginX is a 50/50 tossup.
- and php 5 is blacklisted less than half the time.

Somebody who was analyzing the data could look at this and say "Well, it look like PHP 4 is often blacklisted. I will start looking there."

Planned Future Features:
========================
Improve rootcause, to handle combinations of fields in the correlations:
Given data:
```
{"server": "Apache", "php": "5", "blacklist": true}
{"server": "Apache", "php": "5", "blacklist": false}
{"server": "NginX",  "php": "5", "blacklist": false}
{"server": "NginX",  "php": "4", "blacklist": false} # This is the only difference from above
{"server": "Apache", "php": "4", "blacklist": true}
{"server": "Apache", "php": "4", "blacklist": true}
```

```
>>> c.rootcause2("blacklist", "true")
[("server", "NginX",  0, 0.00),
 ("php",    "5",      1, 0.33),
 ("php",    "4",      2, 0.66),
 ("server", "Apache", 3, 0.75)] # This is the existing functionality.

>>> c.rootcause("blacklist=true")
(server=NginX, 0%)
(php=5, 33%)
(server=Apache, php=5, 50%)
(php=4, 66%)
(server=Apache, 75%)
(server=Apache, php=4, 100%) # Identifies that all Apache/4 servers are blacklisted.
```

Handle nested dictionaries and lists as objects:
```
{"server": {"type": "Apache", "version": [2, 2, 22]},
 "blacklist": ["EmergingThreats", "SpamHaus"]}
```

Handle "fuzzy" queries:
```
>>> c.rootcause("blacklist=true", fuzzy="server.version <= server.version[0]")
# Instead of using [2,2,22] as the server version uses simply "2". Ideally would be able to handle string regex replacing as well: "server.type <= r/Apache.*/Apache/" would change server.type="Apache 2.4.0e" to "Apache"
```

Until Later,
Lane

repository: slietz/correlation-db

repo_name: slietz/correlation-db


text:
##  Mass Close Open Purchase Orders (PO.P4)

<PageHeader />

**Form Details**
[ Form Details ](PO-P4-1/README.md)

**Purpose**
The purpose of PO.P4 is to mass close open purchase orders through a specified
cutoff date. The cutoff date is a required field. Open orders created on or
before the selected date will be included unless there is a pending receipt
against the order.

This process can be run for selected vendors. There is, also, an option to run
the procedure in trial mode before updating the purchase order (i.e. PO) file.
This option gives you the opportunity to review the purchase orders that will
be closed before actually closing them.

**Frequency of Use**
As required.

**Prerequisites**

<badge text= "Version 8.10.57" vertical="middle" />

<PageFooter />

repository: zumasys/docs

repo_name: zumasys/docs


text:
<!--
This template should be used for offboarding Arch Linux team members.
-->

# Offboarding an Arch Linux team member

## Details

- **Team member username**:
- **Currently held roles**: <!-- Add known roles here like TU, DevOps, etc -->
- **Removal request**: <!-- Add link to relevant mailing list mail -->
  - **Voting result**: <!-- Add link to relevant mailing list mail -->

## All roles checklist

- [ ] Remove user email by reverting instructions from `docs/email.md`.
- [ ] Set user to inactive in archweb: https://www.archlinux.org/admin/auth/user/

## TU/Developer offboarding checklist

- [ ] Remove entry in `group_vars/all/archusers.yml`.
- [ ] Remove SSH pubkey from `pubkeys/<username>.pub`.
- [ ] Run `ansible-playbook -t archusers playbooks/*.yml`.
- [ ] Remove the user from the `Trusted Users`/`Developers` groups on Keycloak.
- [ ] Moderate email address on [arch-dev-public](https://lists.archlinux.org/admin/arch-dev-public/members) (find member and moderate)
- [ ] Remove member from [arch-tu mailing lists](https://lists.archlinux.org/admin/arch-tu/members)
- [ ] Remove member from [staff mailing lists](https://lists.archlinux.org/admin/staff/members)

## DevOps offboarding checklist

- [ ] Remove entries in `group_vars/all/root_access.yml`.
- [ ] Run `ansible-playbook -t root_ssh playbooks/*.yml`.
- [ ] Run `ansible-playbook playbooks/hetzner_storagebox.yml playbooks/rsync.net.yml`.
- [ ] Remove the user from the `DevOps` group on Keycloak.
- [ ] Remove member from [arch-devops-private mailing lists](https://lists.archlinux.org/admin/arch-devops-private/members)
- [ ] Remove pubkey from [Hetzner's key management](https://robot.your-server.de/key/index)

## Wiki Administrator checklist

- [ ] Remove the user from the `Wiki Admins` group on Keycloak.
- [ ] Remove member from [arch-wiki-admins mailing list](https://lists.archlinux.org/admin/arch-wiki-admins/members).

repository: bobisapotato/infrastructure

repo_name: bobisapotato/infrastructure


text:
---
layout: post
authors: ["Leah Wasser"]
title: "Hello, Spatio-temporal Data Carpentry"
date: 2016-03-28
time: "14:30:00"
tags: ["Data Carpentry", "GIS"]
---

[Data Carpentry]({{site.dc_url}}) have just announced the availability of
[an introductory lesson on working with geospatial data](http://neon-workwithdata.github.io/NEON-R-Spatio-Temporal-Data-and-Management-Intro/)
developed in conjunction with [NEON](http://www.neonscience.org/)
(the National Ecological Observatory Network).
For details,
please see [the full announcement]({{site.dc_url}}/blog/pilot-spatial-data/) on Data Carpentry's blog.

repository: swcarpentry/website

repo_name: swcarpentry/website


text:
***
![DeepMelody](https://user-images.githubusercontent.com/25820201/31271788-570dc9c8-aabb-11e7-8575-480652b8d7ea.png)

### Using Keras & Tensorflow to generate midi music pieces

I made [*DeepMelody*](https://ryan-kan.github.io/DeepMelody/) for the sole purpose of generating music easily and quickly. Other programs seem too complex to be used, and I thus taken up the challenge to code something that is my own. That is the origin story of DeepMelody.

***
### Dependencies

* [Mido](https://mido.readthedocs.io/en/latest/installing.html) (Midi file reader)
* [Tensorflow](https://www.tensorflow.org/install/) (Machine learning brains)
* [Keras](https://keras.io/#installation) (Machine learning helper)

### Citations

This project derived some of its code from [DeepJazz](https://github.com/jisungk/deepjazz) by [jisungk](https://github.com/jisungk). Thank you!
### Code License, Media Copyright

Code is licensed under the Apache License 2.0
Images and media are copyrighted (Ryan Kan)

repository: Zumbalamambo/DeepMelody

repo_name: Zumbalamambo/DeepMelody


text:
OpenBI
======

The easiest way to create interactive dashboard for the rest of us on this planet.

![] (https://images.indiegogo.com/file_attachments/768056/files/20140805103503-Screen_Shot_2014-08-06_at_0.34.41.png)

Contribute
----------
OpenBI is doing crowdfunding, please feel free to support and share the campaign:
https://www.indiegogo.com/projects/openbi

This project is a part of The Public Software Project. Please feel free to contribute this project, by visiting the following websites:
- GitHub: https://github.com/publicsoftware/OpenBI.git
- Trello: https://trello.com/b/z68nfFvh/openbi
- Demo:   http://openbi.publicsoftwareproject.org/document/1

Installation
------------
>$ git clone https://github.com/publicsoftware/OpenBI.git

>$ cd OpenBI

>$ npm install

>$ node openbi

>Execute SQL statements from doc/schema.sql to local database server

>Open your browser to localhost:3500

Organization Websites
---------------------
- Website: http://publicsoftwareproject.org
- Facebook: https://facebook.com/publicsoftware
- GitHub: https://github.com/publicsoftware
- Trello: https://trello.com/b/V2yIoa5B/the-public-software-project

repository: armando-couto/open-bi

repo_name: armando-couto/open-bi


text:
---
title: "Mac Osx Brew 404 Error Git Local Changes"
date: 2014-01-18
template: "post.hbs"
---

## Brew herrors:

While doing a `brew search` I got this output on the terminal:

```terminal
Error: 404 Not Found
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:277:in `open_http'
/usr/local/Library/Homebrew/cmd/search.rb:68:in `value'
/usr/local/Library/Homebrew/cmd/search.rb:68:in `search_taps'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:230:in `inject'
/usr/local/Library/Homebrew/cmd/search.rb:65:in `each'
/usr/local/Library/Homebrew/cmd/search.rb:65:in `inject'
/usr/local/Library/Homebrew/cmd/search.rb:65:in `search_taps'
/usr/local/Library/Homebrew/cmd/search.rb:30:in `search'
/usr/local/Library/brew.rb:95:in `send'
/usr/local/Library/brew.rb:95
```

[Apparently][], that means that you need to `brew update`.

```terminal
sudo brew update
error: Your local changes to the following files would be overwritten by merge:
        Library/Formula/abcmidi.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
```

Aparently, a local file got modified and broke the repo.
#TODO: how does brew store/manage formulas?#

A quick fix would be to reset the repo and checkout the changed files.

```terminal
cd $(brew --repository)
git reset --hard FETCH_HEAD
```

Follow the link to get an explanation on [FETCH_HEAD][]. But basically, is a reference to the tip of the last fetch.

[Apparently]:(https://github.com/Homebrew/homebrew/issues/24567)
[FETCH_HEAD]: (http://stackoverflow.com/a/9237511/125083)

branch_name: HEAD