text:
Team lead: Eric Qian
Team members: Ziwei Zeng, Yisi Liu

This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car. For more information about the project, see the project introduction [here](https://classroom.udacity.com/nanodegrees/nd013/parts/6047fe34-d93c-4f50-8336-b70ef10cb4b2/modules/e1a23b06-329a-4684-a717-ad476f0d8dff/lessons/462c933d-9f24-42d3-8bdc-a08a5fc866e4/concepts/5ab4b122-83e6-436d-850f-9f4d26627fd9).

Please use **one** of the two installation options, either native **or** docker installation.

### Native Installation

* Be sure that your workstation is running Ubuntu 16.04 Xenial Xerus or Ubuntu 14.04 Trusty Tahir. [Ubuntu downloads can be found here](https://www.ubuntu.com/download/desktop).
* If using a Virtual Machine to install Ubuntu, use the following configuration as minimum:
  * 2 CPU
  * 2 GB system memory
  * 25 GB of free hard drive space

  The Udacity provided virtual machine has ROS and Dataspeed DBW already installed, so you can skip the next two steps if you are using this.

* Follow these instructions to install ROS
  * [ROS Kinetic](http://wiki.ros.org/kinetic/Installation/Ubuntu) if you have Ubuntu 16.04.
  * [ROS Indigo](http://wiki.ros.org/indigo/Installation/Ubuntu) if you have Ubuntu 14.04.
* [Dataspeed DBW](https://bitbucket.org/DataspeedInc/dbw_mkz_ros)
  * Use this option to install the SDK on a workstation that already has ROS installed: [One Line SDK Install (binary)](https://bitbucket.org/DataspeedInc/dbw_mkz_ros/src/81e63fcc335d7b64139d7482017d6a97b405e250/ROS_SETUP.md?fileviewer=file-view-default)
* Download the [Udacity Simulator](https://github.com/udacity/CarND-Capstone/releases).

* Speical note about Tensorflow-Gpu
  * this program is ok to use Tensorflow-cpu. the inference speed is good enough (<90ms) in a CPU mode. In case you want to use Tensorflow-GPU, please make sure the version is latest Tensorflow-GPU as per the requirement.txt. And the CUDA 9.0 and CUDNN 7.4.24 (supported version for Ubuntu 16.04)
  * to simplify your setup and validation process, simply use the Docker Installation below, which is the main way the app is developed and tested.

### Docker Installation

Clone this project repository assuming you're on Mac or Linux developerment environment
# go to places where you want to place your project folder
```
git clone https://github.com/ericq/CarND-Capstone.git
```

[Install Docker](https://docs.docker.com/engine/installation/)

Build the docker container
```bash
docker build . -t capstone
```

Run the docker file.
Note that this will start the docker container and mount host $PWD (project folder) directory to the
docker container as '/capstone' directory; the same for log file direcotry.
```bash
docker run -p 4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ --name my_capstone --rm -it capstone
```

Open additional temrinal to access the docker container.
```bash
docker exec -it my_capstone bash
```

### Usage
1. Go to the project folder
```bash
cd /capstone
```

2. Install python dependencies
```bash
apt-get install vim
pip install -r requirements.txt
# in above operation, please ensure that the tensorflow, numpy, pillow all are updated per the specified version in the requirements.txt

```
3. Make and run styx
```bash
cd ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch
```
4. Run the simulator

### Real world testing
1. Download [training bag](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/traffic_light_bag_file.zip) that was recorded on the Udacity self-driving car.
2. Unzip the file
```bash
unzip traffic_light_bag_file.zip
```
3. Play the bag file
```bash
rosbag play -l traffic_light_bag_file/traffic_light_training.bag
```
4. Launch your project in site mode
```bash
cd CarND-Capstone/ros
roslaunch launch/site.launch
```
5. Confirm that traffic light detection works on real life images

repository: ericq/CarND-Capstone

repo_name: ericq/CarND-Capstone


text:
---
hrs_structure:
  division: '1'
  volume: '3'
  title: '10'
  chapter: '121'
  section: 121-20
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0121-0020
    parent: HRS0121
    name: 121-20 Enlistment
weight: 4105
title: Enlistment
full_title: 121-20 Enlistment
---
**§121-20 Enlistment.** Enlistment in the army or air national guard shall be in a manner, form, and for a period of time as may be provided by the laws of the United States, and regulations issued from time to time. No person shall be enlisted in the army or air national guard whose services during the person's preceding term of enlistment have not been honest and faithful. [L 1967, c 196, pt of §1; [HRS §121-20](/title-10/chapter-121/section-121-20/); gen ch 1985]

license: MIT

repository: SamMade/BlueAndKrabby

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: SamMade/BlueAndKrabby


text:
About
-----

Ansible role for installing the minimal x-twm window manager.
Initially testet on CentOS.

Requirements
------------

...

Role Variables
--------------

Up to now no variable, but you can customize the template file for twmrc.

Example Usage
-------------

```yml
roles:
  - ansible-role-x-twm
```

Acknowledgements
----------------

* many thanks to Joe Grant:  http://houseofbrick.com/twm-window-manager-on-rhel-7/

See also
--------

...

License
-------

MIT

repository: mmoole/ansible-role-x-twm

repo_name: mmoole/ansible-role-x-twm


text:
---
layout: "unit"
title: "Guide Entry 88.06.09"
path: "/curriculum/guides/1988/6/88.06.09.x.html"
unitTitle: "Weather Awareness"
unitAuthor: "Beverly B. Stern"
keywords: "Mythology Ancient Greek Aerodynamics Daedalus Orgins Science"
recommendedFor: "Recommended for Consumer Math classes, grades 9-12; Applied Mathematics classes, grades 9-12; General Science classes, grades 7-12; Earth Science classes, grade 8"
---

Guide Entry to 88.06.09:

“Weather Awareness’” objective is to develop student awareness of the atmospheric conditions in which we live. Just as fish living in the conditions at the bottom of an ocean of water, we are people living in the conditions of an ocean of air.

The unit is structured around two main activities: 1) keeping a daily weather log and; 2) developing answers to the following four questions. How is our weather dependent on the earth’s gravity and the sun’s energy? What are four major components of weather? How are storms created? What can we learn from weather reports?

The unit sounds more like a science unit than a math unit, but it depends on what you want to stress. I plan to stress skills from the following areas:

Statistics: Keeping a log requires reading data from either instruments or the morning weather report.

Statistics: Using many charts and tables.

Ratio and Percentage: There are many kinds of comparisons, like the gravities of two planets, or their diameters, etc.

Calculations: Using the Fahrenheit and Celsius formulas for conversion.

Greater than and less than: Applied use in the differences between temperatures of air masses or differences in air pressures.

Longitude and latitude: Locate the cities the paper gives the temperatures for in the weather report or track a hurricane.

There are four weeks of lesson plans.

(Recommended for Consumer Math classes, grades 9-12; Applied Mathematics classes, grades 9-12; General Science classes, grades 7-12; Earth Science classes, grade 8)

Key Words

Mythology Ancient Greek Aerodynamics Daedalus Orgins Science

gha_language: HTML

gha_license_id: MIT


text:
# AnnouncementBundle for Symfony2

Simple announcement bundle for displaying site-wide announcements in a Symfony2 application

*This is still a work-in-progress*

 * Currently requires jQuery (going to make this vanilla javascript eventually)
 * Only Doctrine Entity available at the moment.

repository: paulredmond/AnnouncementBundle

repo_name: paulredmond/AnnouncementBundle


text:
---
layout: nodes.liquid
section: smartContract
date: Last Modified
title: "API Calls Tutorial"
permalink: "docs/advanced-tutorial/"
excerpt: "Calling APIs from Smart Contracts"
whatsnext: {"Make a GET Request":"/docs/make-a-http-get-request/", "Make an Existing Job Request":"/docs/existing-job-request/"}
metadata:
  image:
    0: "/files/04b8e56-cl.png"
---

  https://www.youtube.com/watch?v=ay4rXZhAefs

> 👍 Prerequisites
>
> This tutorial requires basic knowledge about Ethereum, smart contracts, and the Chainlink Request & Receive cycle. If you're unfamiliar with those concepts, follow the [The Basics](../beginners-tutorial/) or [Random Numbers](../intermediates-tutorial/) tutorials.

*By the end of the tutorial, you should know the following:*
- How to request data from a public API in a smart contract
- Understand what Core Adapters and External Adapters are and how Oracle Jobs use them
- Be able to find the Oracle Jobs and Adapters for your contract
- How to request data from an Oracle Job

# 1. Requesting API Data

## 1a. Request & Receive Recap

The request and receive cycle describes how a smart contract requests data from an oracle and receives the response in a separate transaction. If you need a refresher, check out the [Basic Request Model](../architecture-request-model/).

In the [Random Numbers tutorial](../intermediates-tutorial/), we request randomness from a VRF oracle, then await the response. The fulfilment function is already given to us from the `VRFConsumerBase` contract, so oracles already know where to send the response to. However, with API calls, our contract _defines_ which function it wants to receive the response to.

However, before we go into the implementation, let's first understand how Oracle jobs can get data on-chain.

## 1b. Initiators

[Initiators](../initiators/) are what kick off a job inside an Oracle. In the case of a Request and Receive job, the [RunLog](/docs/initiators/#runlog) initiator watches the blockchain for when a smart contract makes a request. Once it catches a request, it initiates the job. This runs the adapters (both core and external) that the job is configured to run, eventually returning the response to the contract that made the request.

## 1c. Core Adapters

Each oracle job has a configured set of tasks it needs to carry out when it is run. These tasks are defined by what [Adapters](../core-adapters/) they support. For example: if a job needs to make a GET request to an API, find a specific unsigned integer field in a JSON response, then submit that back to the requesting contract, it would need a job with the following Core Adapters:
- [HttpGet](../core-adapters/#httpget) - Call the API
- [JsonParse](../core-adapters/#jsonparse) - Parse the JSON and retrieve the desired data
- [EthUint256](../core-adapters/#ethuint256) - Convert the data to Ethereum compatible data type (uint256)
- [EthTx](../core-adapters/#ethtx)  - Submit the transaction to the chain, completing the cycle.

Let's walk through a real example, where we retrieve 24 volume of the ETH/USD pair from the cryptocompare API.

### Core Adapters Example

1. [HttpGet](../core-adapters/#httpget) - Calls the API and returns the body of an HTTP GET result for [ETH/USD pair](https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD).  Example:
```json
{"RAW":
  {"ETH":
    {"USD":
      {
        ...,
        "VOLUMEDAYTO":953806939.7194247,
        "VOLUME24HOUR":703946.0675653099,
        "VOLUME24HOURTO":1265826345.488568
        ...,
      }
    }
  }
}
```

2. [JsonParse](../core-adapters/#jsonparse) - walks a specified `path` (`"RAW.ETH.USD.VOLUME24HOUR"`) and returns the value found at that result. Example: `703946.0675653099`

3. [Multiply](../core-adapters/#multiply) - parses the input into a float and multiplies it by the 10^18. Example: `703946067565309900000000`

4. [EthUint256](../core-adapters/#ethuint256) - formats the input into an integer and then converts it into Solidity's `uint256` format. Example: `0xc618a1e4`

5. [EthTx](../core-adapters/#ethtx) - takes the given input, places it into the data field of the transaction, signs a transaction, and broadcasts it to the network. Example: [transaction result](https://kovan.etherscan.io/tx/0xf36ec811db8bde1245b6aa16bc052d4fbab287b220cf194bb91ae452f1fad084)

**Important: Some core adapters accept parameters to be passed to them to inform them how to run.** For example: [JsonParse](../core-adapters/#jsonparse) accepts a `path` parameter which informs the adapter where to find the data in the JSON object.

Let's see what this looks like in a contract.

### Contract Example

```solidity
{% include samples/APIRequests/APIConsumer.sol %}
```

  Deploy this contract using Remix ↗
    What is Remix?

Let's walk through what's happening here:
1. Constructor - Setup the contract with the Oracle address, Job ID, and LINK fee that the oracle charges for the job
2. `requestVolumeData` - This builds and sends a request, which includes the fulfilment functions selector, to the oracle. Notice how it adds the `get`, `path` and `times` parameters. These are read by the Adapters in the job to perform the tasks correctly. `get` is used by [HttpGet](../core-adapters/#httpget), `path` is used by [JsonParse](../core-adapters/#jsonparse) and `times` is used by [Multiply](../core-adapters/#multiply).
3. `fulfill` - Where the result is sent once the Oracle job is complete

> 📘 Important
>
> The calling contract should own enough LINK to pay the specified fee (by default 0.1 LINK). You can use [this tutorial](../fund-your-contract/) to fund your contract.

This was an example of a basic HTTP GET request. However, it requires defining the API URL directly in the smart contract. This can, in fact, be extracted and configured on the Job level inside the Oracle.

## 1d. External Adapters

We split Adapters into two subcategories:

- Core Adapters - These are what we described earlier and come built-in to each node. (examples: HttpGet, EthUint256, etc)
- External Adapters - These are custom adapters built by node operators and community members, which perform specific tasks like calling a particular endpoint with a specific set of parameters (like authentication secrets that shouldn't be publicly visible smart contracts).

Here are some examples of external adapters:

1. Markets data: AlphaChain
2. Real-world events: SportsData, COVID Tracker
3. Social media proofs: MUBC Retweet Verifier
4. Cryptocurrency aggregators:  Coingecko, CoinAPI

All of these can be found on [Chainlink Market](https://market.link/search/all?network=42).

If all the parameters are defined within the Oracle job, the only thing a smart contract needs to define to consume it is:
- JobId
- Oracle address
- LINK fee
- Fulfillment function

This makes for a much more succinct smart contract, where the `requestVolumeData` function from the [code example above](#contract-example) would look more like this:

```solidity
function requestVolumeData() public returns (bytes32 requestId) {
    Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector);

    // Extra parameters don't need to be defined here because they are already defined in the job

    return sendChainlinkRequestTo(oracle, request, fee);
}
```

# 2. Exercise: Construct your own Contract

Now that we know how core adapters and external adapters are used to construct jobs and how smart contracts can use jobs to make requests let's put that to use!

Head to [Make an Existing Job Request](../existing-job-request/) to see how a smart contract can get any city's temperature using an existing oracle job found on Chainlink Market, without having to specify the URL inside the contract.

Then, using your knowledge of external adapters, find a different adapter on the market, and create another contract that consumes that data. Let us know the cool things you come up with in our discord!

# 3. Further Reading

- Blog: Connect a Smart Contract to the Twitter API
- Blog: Connect a Tesla Vehicle API to a Smart Contract
- Blog: OAuth and API Authentication in Smart Contracts

repository: lukeramsden/documentation

branch_name: refs/heads/main

repo_name: lukeramsden/documentation


text:
# Outline

[![Build Status](https://travis-ci.org/sangupta/outline.svg?branch=master)](https://travis-ci.org/sangupta/outline)
[![Coverage Status](https://coveralls.io/repos/github/sangupta/outline/badge.svg?branch=master)](https://coveralls.io/github/sangupta/outline?branch=master)
[![Maven Version](https://maven-badges.herokuapp.com/maven-central/com.sangupta/outline/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.sangupta/outline)

`Outline` is a Java-annotation based command line argument parser loosely based on
https://github.com/airlift/airline.

The need for `Outline` arose as the development of `airline` is mostly stalled - no
new commits, bug-fixes, or pull-request merges have been made. I tried to use to fix the
same in a fork of mine - but then its very hard dependency on `Google Guava` made me
realize that we could simplify the framework. `airline` is dependent a lot on **immutables**
and thus, copies a lot of data between data-structures which bloats the code to understand.

Thus, began my journey for `Outline` with an aim to simplify the framework and yet be
more-powerful than `airline`.

The codebase is now sane and it can be used to parse almost all Git-like command-structures.
Some examples are listed below.

## Tasks left

* Show argument usage examples in help
* Show arguments usage examples in help

## TODO

Following items are still need to be implemented to attain feature parity with `airline`:

* Generate help guides
* Allow collecting all available commands using reflection
* support for system properties
* support for reading configuration from file
* resolve conflicting names of commands across groups

## Features

Outline supports all features that are supported in `airline` and more as:

* Support for splitting end arguments based on index into individual attributes
* Ability to define command groups using annotation

Common feature set:

* Annotation based definition of commands, options and arguments
* Meta-data driven

## Usage Examples

## Downloads

For now you may use **jitpack.io** to download **snapshots** of the framework:

Add the following `repository` to Maven,

```xml
<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
```

Then add the dependency as,

```xml
<dependency>
    <groupId>com.github.sangupta</groupId>
    <artifactId>outline</artifactId>
    <version>-SNAPSHOT</version>
</dependency>
```

## Versioning

For transparency and insight into our release cycle, and for striving to maintain backward compatibility,
`Outline` will be maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the follow format:

`<major>.<minor>.<patch>`

And constructed with the following guidelines:

* Breaking backward compatibility bumps the major
* New additions without breaking backward compatibility bumps the minor
* Bug fixes and misc changes bump the patch

For more information on SemVer, please visit http://semver.org/.

## License

```
outline - command line argument parser
Copyright (c) 2015-2016, Sandeep Gupta

http://sangupta.com/projects/outline

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

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

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

repository: sangupta/outline

gha_language: Java

repo_name: sangupta/outline


text:
# fix-for-e164
Simple PHP function that attempts to format German phone numbers coming from a free text input to E.164 format.

Far from perfect (humans are so random), but according to our test working in most cases.

Usage:

    $fixed = fixForE164('0172-8899999');


text:
Petit

Petit is a open-source app to help manage basics pets care.

Getting started

Just clone this repository, install all dependencies and build.

$ git clone https://github.com/deboraduarte/petit
$ cd petit; curl https://install.meteor.com/ | sh
$ meteor npm install
$ meteor

repository: deboraduarte/petit

gha_language: JavaScript

repo_name: deboraduarte/petit


text:
# grunt-sass [![Build Status](https://secure.travis-ci.org/sindresorhus/grunt-sass.png?branch=master)](http://travis-ci.org/sindresorhus/grunt-sass)

[Grunt][grunt] tasks to compile SCSS to CSS using [node-sass](https://github.com/andrew/node-sass)

**Bugs with the output should be submitted on the [libsass](https://github.com/hcatlin/libsass) repo which is the actual compiler.
Make sure to review its issue tracker for known bugs before using this task as it can bite you later on.**

## Overview

This task uses the experimental and superfast Node.js based Sass compiler [node-sass](https://github.com/andrew/node-sass) (which only compiles .scss files).

*Note that node-sass is currently under heavy development and might be unstable, there are also some stuff missing, like a compression option. Check out [grunt-contrib-sass](https://github.com/gruntjs/grunt-contrib-sass) (based on Ruby Sass) if you want something stable that also supports the old syntax, but in turn much slower.*

## Getting Started

If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide, as it explains how to create a [gruntfile][Getting Started] as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

```shell
npm install --save-dev grunt-sass
```

[grunt]: http://gruntjs.com
[Getting Started]: https://github.com/gruntjs/grunt/wiki/Getting-started

## Documentation

See the [Gruntfile](https://github.com/sindresorhus/grunt-sass/blob/master/Gruntfile.js) in this repo for a full example.

### Options

#### includePaths

Type: `Array`
Default: `[]`

Import paths to include.

#### outputStyle

Type: `String`
Default: `nested`
Values: `'nested'`, `'expanded'`, `'compact'`, `'compressed'`

Specify the CSS output style.

*According to the [node-sass](https://github.com/andrew/node-sass) documentation, there is currently a problem with lib-sass so this option is best avoided for the time being.*

#### sourceComments

Type: `String`
Default: `'none'`
Values: `'none'`, `'normal'`

Set what debug information is included in the output file.

**Note that this is the Sass debugInfo and not Source Maps. You can track Source Maps progress [here](https://github.com/hcatlin/libsass/issues/122).**

### Example config

```javascript
grunt.initConfig({
	sass: {									// Task
		dist: {								// Target
			files: {						// Dictionary of files
				'main.css': 'main.scss'		// 'destination': 'source'
			}
		},
		dev: {								// Another target
			options: {						// Dictionary of render options
				includePaths: [
					'path/to/imports/'
				]
			},
			files: {
				'main.css': 'main.scss'
			}
		}
	}
});

grunt.loadNpmTasks('grunt-sass');
grunt.registerTask('default', ['sass']);
```

### Example usage

#### Compile

```javascript
grunt.initConfig({
	sass: {
		dist: {
			files: {
				'main.css': 'main.scss'
			}
		}
	}
});
```

#### Compile with render options

If you specify `options`, they will be passed along to the [node-sass](https://github.com/andrew/node-sass) `render` method.

```javascript
grunt.initConfig({
	sass: {
		dist: {
			options: {
				includePaths: ['imports/are/here/'],
				outputStyle: 'nested'
			},
			files: {
				'main.css': 'main.scss'
			}
		}
	}
});
```

#### Compile multiple files

You can also compile multiple files into multiple destinations.

```javascript
grunt.initConfig({
	sass: {
		files: {
			'main.css': 'main.scss',
			'widgets.css': 'widgets.scss'
		}
	}
});
```

## Breaking changes

### 0.6.0

You can no longer use an array as src to concat multiple files. Use Sass `@import` instead.

## License

MIT License • © [Sindre Sorhus](http://sindresorhus.com)

repository: blackfalcon/node-sass-boilerplate

repo_name: blackfalcon/node-sass-boilerplate


text:
# matrixor
[![GitHub release][release-image]][release-url]
[![PyPI release][pypi-image]][pypi-url]
[![Build][build-image]][build-url]
[![MIT License][license-image]][license-url]

[release-image]:https://img.shields.io/github/release/akb89/matrixor.svg?style=flat-square
[release-url]:https://github.com/akb89/matrixor/releases/latest
[pypi-image]:https://img.shields.io/pypi/v/matrixor.svg?style=flat-square
[pypi-url]:https://pypi.org/project/matrixor/
[build-image]:https://img.shields.io/github/workflow/status/akb89/matrixor/CI?style=flat-square
[build-url]:https://github.com/akb89/matrixor/actions?query=workflow%3ACI
[license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]:LICENSE.txt

Matrix transformations in Python. Implements algorithm 2.4 (AO+Scaling) of the paper:

```tex
@article{devetal2018,
    title={{Absolute Orientation for Word Embedding Alignment}},
    author={Sunipa Dev and Safia Hassan and Jeff M. Phillips},
    journal={CoRR},
    year={2018},
    volume={abs/1806.01330}
}
```

## Install
```shell
pip install matrixor
```

or, after a git clone:
```shell
python3 setup.py install
```

## Run

### Align two models with Absolute Orientation + Scaling and return RMSE
To align two embeddings, run:
```shell
matrixor align \
  --matrix-1 /abs/path/to/xxx.vec.npy  \
  --matrix-2 /abs/path/to/yyy.vec.npy \
```
pass in the `--average` to return the averaged RMSE by aligning A and B then B and A (alignment may not be symmetric due to floating point average)


text:
layout: post title: "Status Update: An unfortunate delay" date: 2012-06-28 20:50 comments: true

Dear Neflarians,

We regret to inform you that due to unforeseen circumstances, our promised Talisman update will be delayed a few weeks. Two weeks ago we were on pace for an early finish to the update and we had planned to have beta testers for talisman by this week. However both me (Jack) and Drew were bogged down by our day job. And since we are the main programmers, the update has been stalled. It was a hellish 2 weeks for us which consisted of 12 hours/day work, even into the weekends. This week we both are having to move into a new living place so it will be hectic at best. We will continue to push the development of the update as soon as possible.

We’d also like to announce the coming reset date to take place on the 30th of July.

Confirmed list of update features:
_ Talisman
_ Interface (frontpage, char creation and in-game interface/chat)
_ A jukebox feature for music tracks in nef.

repository: Olivine-Labs/Neflaria-Blog

extension: markdown

repo_name: Olivine-Labs/Neflaria-Blog


text:
# vault-nacl

> A symmetric encrypted vault using [tweetnacl][] elliptic curves

[![NPM version](https://badge.fury.io/js/vault-nacl.svg)](https://www.npmjs.com/package/vault-nacl/)

<!-- [![Build Status](https://secure.travis-ci.org/commenthol/vault-nacl.svg?branch=master)](https://travis-ci.org/commenthol/vault-nacl) -->

Allows to symmetrically encrypt dedicated values in a configuration file,
or the complete file itself, using one password.

Implements [xsalsa20-poly1305 secretbox][] and [pbkdf2][] with different digests
for safe encryption.

Default is sha256 (310000 iterations) which can be changed to 'sha384', 'sha512'
(120000 iterations).

Uses `VAULT_NACL(...)` markers with Base64 encrypted secret inside the vault to
identify encrypted values for decryption.

New values attributed with `VAULT_NACL(...)VAULT_NACL` are used for later
encryption.

Choose the CLI or API to fit your usecase.

[xsalsa20-poly1305 secretbox]: https://www.npmjs.com/package/tweetnacl#secret-key-authenticated-encryption-secretbox
[pbkdf2]: https://tools.ietf.org/html/rfc8018

## toc

<!-- !toc (minlevel=2 omit="toc") -->

* [installation](#installation)
* [usage cli](#usage-cli)
* [api](#api)
  * [enc-decrypt](#enc-decrypt)
  * [vault](#vault)
* [internals](#internals)
* [license](#license)

<!-- toc! -->

## installation

```
npm install --save vault-nacl
```

## usage cli

_Encrypt single value_

```bash
$ vault-nacl encrypt
✔ Vault password · ***************
✔ Confirm Vault password · ***************
✔ Secret · *********
VAULT_NACL(AQAQJwAA6mwY4MkxGLKi4T0IZaOeh5Ul7iUv7SRzYK50xQR8iYNOXZQ9+lmSSb8PYkkk5zITgbCC/HbAJJ2B)
```

_Decrypt single value_

```bash
$ vault-nacl decrypt
✔ Vault password · ***************
✔ Vault · VAULT_NACL(AQAQJwAA6mwY4MkxGLKi4T0IZaOeh5Ul7iUv7SRzYK50xQR8iYNOXZQ9+lmSSb8PYkkk5zITgbCC/HbAJJ2B)
my secret
```

_Encrypt a configuration file_

```bash
echo {"secret":"VAULT_NACL(my secret hidden value)VAULT_NACL"} > config.json

$ vault-nacl encrypt config.json
✔ Vault password · ***************
✔ Confirm Vault password · ***************

$ cat config.json
{"secret":"VAULT_NACL(AQAQJwAA+XJjGfdtC8jCt7xsWoPBCz2p/qs5MXpzmsqV5jFGCm6xfZgKcADzu3glf1z/5KxKaFFJbtCvX5rAqh/jq3UhRsMHHirldw==)"}
```

_Decrypt a configuration file_

```bash
$ vault-nacl decrypt config.json
✔ Vault password · ***************
✔ Confirm Vault password · ***************
{"secret":"my secret hidden value"}
```

See `vault-nacl --help` for complete list of options.

Or take a look at the [man-page][].

[man-page]: https://github.com/commenthol/vault-nacl/blob/master/man/vault-nacl.md

## api

### enc-decrypt

_asynchronous_

`EncDec` handles `VAULT_NACL(...)` encoded strings in strings or objects.

```js
const { EncDec } = require('vault-nacl')
const password = '$€creT'
const secret = { mySecret: `VAULT_NACL(a $€Cr3T secret)VAULT_NACL` }

const encdec = new EncDec(password)
const result = await encdec.encrypt(secret)
//>  { mySecret: 'VAULT_NACL(AQAQJwAA+CWBR7...+qAo=)' }

await encdec.decrypt(result)
//> { mySecret: 'a $€Cr3T secret' }
```

_synchronous_

`EncDecSync` handles `VAULT_NACL(...)` encoded strings in strings or objects
synchronously.

> NOTE: This function is blocking.

```js
const { EncDecSync } = require('vault-nacl')
const password = '$€creT'
const secret = { mySecret: `VAULT_NACL(a $€Cr3T secret)VAULT_NACL` }

const encdec = new EncDecSync(password)
const result = encdec.encrypt(secret)
//>  { mySecret: 'VAULT_NACL(AQAQJwAA+CWBR7...+qAo=)' }

encdec.decrypt(result)
//> { mySecret: 'a $€Cr3T secret' }
```

### vault

`Vault` provides the interface to en- and decryption.

_asynchronous_

```js
const { Vault } = require('vault-nacl')

const password = '$€creT'

async function main() {
  const vault = new Vault(password)

  const ciphertext = await vault.encrypt('my secret message')
  const orginal = await vault.decrypt(ciphertext)
  //> 'my secret message'

  vault.clear() // clear password
}
main()
```

_synchronous_

This example uses a different digest and iterations:

```js
const { Vault } = require('vault-nacl')

const password = '$€creT'

const vault = new Vault(password, { digest: 'sha512', iterations: 20000 })
const ciphertext = vault.encryptSync('my secret message')
const orginal = vault.decryptSync(ciphertext)
//> 'my secret message'

vault.clear() // clear password
```

## internals

Format of the base64 encrypted secret:

**Version 1**

| 1 Byte    | 1Byte  | 4Bytes     | 32Bytes | n-Bytes      |
| --------- | ------ | ---------- | ------- | ------------ |
| version=1 | digest | iterations | salt    | boxed secret |

- digest: digest index. See src/Vault.js DIGESTS
  0='sha256', 1='sha384', 2='sha512', 3='ripemd', 4='whirlpool'
- iterations: Number of iterations. Default 310000
- salt: Used salt for key derivation

## license

MIT licensed

[tweetnacl]: https://npmjs.com/package/tweetnacl

repository: commenthol/vault-nacl

repo_name: commenthol/vault-nacl


text:
# Restfull API Documentation

DotApp provides an easy way to write your API endpoints using swagger tool.

In `app.js` file you can define your docs middleware url

``` javascript
import App from "dotapp";
import { docs, notFound, serverError } from "dotapp/middlewares";

const app = App();

app.use("/api/v1/docs", docs("v1"));

app.use(notFound());
app.use(serverError());

export default app;
```

In the above code, you must specify the version like `v1` which resolve to the `docs/v1` folder in your project.

## Configuration

`docs/v1/index.js` is the configuration file where you can modify and add new API endpoints.

``` javascript
// docs/v1/index.js

import auth from "~/docs/v1/modules/auth";
import media from "~/docs/v1/modules/media";
import user from "~/docs/v1/modules/user";
import role from "~/docs/v1/modules/role";
import permission from "~/docs/v1/modules/permission";

export default {
    swagger: "2.0",
    info: {
        title: "DOTAPP",
        description: "The API documentation",
        version: "1.0.0",
    },
    basePath: "/api/v1",
    paths: {
        ...auth,
        ...media,
        ...user,
        ...role,
        ...permission
    },
    securityDefinitions: {
        "bearer token": {
            type: "apiKey",
            name: "Authorization",
            in: "header",
        },
    },
    responses: {
        "200": {
            description: "Successful operation",
        },
        "401": {
            description: "Unauthenticated",
        },
        "403": {
            description: "Access denied",
        },
        "404": {
            description: "API not found",
        },
        "422": {
            description: "Validation error",
        },
        "429": {
            description: "Rate limit exceeded",
        },
        "500": {
            description: "Internal server error",
        },
    },
};
```
This is the result when browsing `http://localhost:3000/docs`.

![docs](/manual/images/docs.png)

Reference: https://swagger.io/tools/swagger-ui/

repository: basemkhirat/dotapp-core

repo_name: basemkhirat/dotapp-core


text:
Overview
========
This document demonstrates how to start up POS and manage storage resources. The target audience is whoever wants to learn about POS and explore its capabilities. The minimum knowledge of Linux administration would be sufficient.

Prerequisites
=============
* Hardware: Poseidon server
  - Reference server h/w implementation engineered by Samsung and Inspur
  - The number of processors: 2
  - The number of memory slots: 32
  - Memory speed: 3200 MT/s
  - Network speed: up to 600 GbE
  - PCIe generation: gen4
  - Storage: E1.S SSD * 32 ea
* OS: Ubuntu 18.04 (kernel: 5.3.0-19-generic)
* Application binary: ibofos, cli
* Application config: /etc/ibofos/conf/ibofos.conf
* Application scripts to configure environments
* Writable file system for RPC socket, application logs/dump, and hugepage info

Run-list
========
The following configs are used for this demonstration, but may change as this document gets revised.

|Config|Value|
|------|-----|
|H/W|Poseidon Server|
|OS|Ubuntu 5.3.0-19-generic|
|POS location|$IBOF_HOME/bin/ibofos|
||$IBOF_HOME/bin/cli|
|POS config|/etc/ibofos/conf/ibofos.conf|
|POS scripts|$IBOF_HOME/script/start_ibofos.sh|
||$IBOF_HOME/lib/spdk-19.10/script/rpc.py|
||$IBOF_HOME/test/script/set_irq_affinity_cpulist.sh|
||$IBOF_HOME/test/script/common_irq_affinity.sh|
||$IBOF_HOME/script/setup_env.sh|
||$IBOF_HOME/lib/spdk-19.10/scripts/setup.sh|
||$IBOF_HOME/lib/spdk-19.10/scripts/common.sh|
|POS log|/var/log/ibofos/ibofos.log|
|POS dump|/etc/ibofos/core/*.core|
|SPDK RPC Server UDS|/var/tmp/spdk.sock|
|Hugepage information|/tmp/uram_hugepage|

**_ibof, which stands for intellgent jbof, is internal project name of Poseidon OS._**

We provide the step-by-step guide to run POS commands with actual outputs in the below. The same could be achieved through web interface called M-Tool. Managing POS with M-Tool is explained in GUI section.

Step 1. Start POS application
-----------------------------

```
# Check if you have local NVMe devices attached to the OS with its Kernel Device Driver.
ibof@ibof-target:~$ sudo fdisk -l | grep nvme
Disk /dev/nvme0n1: 64 GiB,<PHONE_NUMBER>6 bytes, 134217728 sectors
Disk /dev/nvme1n1: 64 GiB,<PHONE_NUMBER>6 bytes, 134217728 sectors
Disk /dev/nvme2n1: 64 GiB,<PHONE_NUMBER>6 bytes, 134217728 sectors
Disk /dev/nvme3n1: 64 GiB,<PHONE_NUMBER>6 bytes, 134217728 sectors

# Become root and run POS application as a daemon process.
ibof@ibof-target:~$ sudo -s

# Start POS
root@ibof-target:IBOF_HOME/script# ./start_ibofos.sh

# The first four messages show that the local NVMe devices have been detached from the OS, which exploits its Kernel Device Driver. The last four messages show that they are now attached to SPDK, which exploits Userspace Device Driver.
0000:04:00.0 (15ad 07f0): uio_pci_generic -> nvme
0000:0c:00.0 (15ad 07f0): uio_pci_generic -> nvme
0000:13:00.0 (15ad 07f0): uio_pci_generic -> nvme
0000:1b:00.0 (15ad 07f0): uio_pci_generic -> nvme
0000:04:00.0 (15ad 07f0): nvme -> uio_pci_generic
0000:0c:00.0 (15ad 07f0): nvme -> uio_pci_generic
0000:13:00.0 (15ad 07f0): nvme -> uio_pci_generic
0000:1b:00.0 (15ad 07f0): nvme -> uio_pci_generic

# The hugepage reservation is done at this step, but no message is displayed.
# Hugepages are reserved for about 1/3 of total size of primary memory in the target system.

/home/ibof/projects/ibofos-devel/script
apport.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apport
Current maximum # of memory map areas per process is 65535.
Setup env. done!

ibofos is running in background...logfile=ibofos.log

# Verify if the application is up and running
root@ibof-target:IBOF_HOME/script# ps -ef | grep ibofos | grep -v grep
root      1400     1 99 Nov 26 ?      10-12:03:09 ../bin/ibofos

# At this point, you shouldn't see NVMe devices except for the OS device itself if it is also an NVMe device.
# All of them should have been detached from the OS and attached to SPDK library with Userspace Device Driver.
ibof@ibof-target:~$ sudo fdisk -l | grep nvme
```

Step 2. Create Write Buffer within DRAM
---------------------------------------

```
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py bdev_malloc_create -h
usage: rpc.py bdev_malloc_create [-h] [-b NAME] [-u UUID]
                                 total_size block_size

positional arguments:
  total_size            Size of malloc bdev in MB (float > 0)
  block_size            Block size for this bdev

optional arguments:
  -h, --help            show this help message and exit
  -b NAME, --name NAME  Name of the bdev
  -u UUID, --uuid UUID  UUID of the bdev

# This command will create a SPDK block device called "malloc bdev" that is a userspace ramdisk with the total size of 8192 MB, the block size of 512 B, and name as "uram0".
# Currently, only 512 bytes of block size is supported for the write buffer.
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py bdev_malloc_create -b uram0 8192 512
uram0
```

The recommended size of uram0 may differ by environment. Please refer to "bdev" section in Learning POS Environment for further details.

Step 3. Check POS information and version
-----------------------------------------

```
# Root is not necessary in order to run "cli" commands.
# The actual output may differ from this according to the env you execute the command
ibof@ibof-target:IBOF_HOME/bin$ ./cli system info

Request to Poseidon OS
    xrId        :  2825009e-2f88-11eb-8607-005056adb61a
    command     :  GETIBOFOSINFO

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "capacity": "0GB (0B)",
    "rebuildingProgress": "0",
    "situation": "DEFAULT",
    "state": "OFFLINE",
    "used": "0GB (0B)"
}

ibof@ibof-target:IBOF_HOME/bin$ ./cli system version

Request to Poseidon OS
    xrId        :  3256290e-2f88-11eb-96a6-005056adb61a
    command     :  GETVERSION

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "version": "pos-0.7.3"
}
```
POS CLI command generates a random UUID and embeds into a request, so one could easily investigate any specific issue by filtering server logs by request id called "rid".

Step 4. Scan NVMe Devices
-------------------------
```
# If this is the first run, you wouldn't see any devices showing up in the output as in the following.
ibof@ibof-target:IBOF_HOME/bin$ ./cli device list

Request to Poseidon OS
    xrId        :  2067c0c1-2f8a-11eb-a513-005056adb61a
    command     :  LISTDEVICE

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

# Let POS scan devices. POS should discover NVMe devices and remember their information (in memory)
ibof@ibof-target:IBOF_HOME/bin$ ./cli device scan

Request to Poseidon OS
    xrId        :  4ce8066f-2f8a-11eb-9d5b-005056adb61a
    command     :  SCANDEVICE

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

# Let's give it one more try with "list". Since the local NVMe devices have been scanned, POS should
# be able to give us the list.
ibof@ibof-target:IBOF_HOME/bin$ ./cli device list

Request to Poseidon OS
    xrId        :  53d159b7-2f8a-11eb-8579-005056adb61a
    command     :  LISTDEVICE

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "devicelist": [
        {
            "addr": "0000:04:00.0",
            "class": "SYSTEM",
            "mn": "VMware Virtual NVMe Disk",
            "name": "unvme-ns-0",
            "size":<PHONE_NUMBER>6,
            "sn": "VMWare NVME-0002",
            "type": "SSD"
        },
        {
            "addr": "0000:0c:00.0",
            "class": "SYSTEM",
            "mn": "VMware Virtual NVMe Disk",
            "name": "unvme-ns-1",
            "size":<PHONE_NUMBER>6,
            "sn": "VMWare NVME-0003",
            "type": "SSD"
        },
        {
            "addr": "0000:13:00.0",
            "class": "SYSTEM",
            "mn": "VMware Virtual NVMe Disk",
            "name": "unvme-ns-2",
            "size":<PHONE_NUMBER>6,
            "sn": "VMWare NVME-0000",
            "type": "SSD"
        },
        {
            "addr": "0000:1b:00.0",
            "class": "SYSTEM",
            "mn": "VMware Virtual NVMe Disk",
            "name": "unvme-ns-3",
            "size":<PHONE_NUMBER>6,
            "sn": "VMWare NVME-0001",
            "type": "SSD"
        },
        {
            "addr": "",
            "class": "SYSTEM",
            "mn": "uram0",
            "name": "uram0",
            "size":<PHONE_NUMBER>,
            "sn": "uram0",
            "type": "NVRAM"
        }
    ]
}
```

Step 5. Import POS Array
------------------------
If you have not created any POS array before, you could start with a new one and import into the POS (Step 5a). Otherwise, you could load existing POS arrays if POS is not aware of them due to host reboot or POS restart (Step 5b).

Step 5a. Create new POS Array
-----------------------------
Now that POS has completed the scanning, it should be able to create POS array with a set of block devices we choose.

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli array create -b uram0 -d unvme-ns-0,unvme-ns-1,unvme-ns-2 -s unvme-ns-3  --name POSArray --raidtype RAID5

Request to Poseidon OS
    xrId        :  8b68a56b-2f8a-11eb-af95-005056adb61a
    command     :  CREATEARRAY
    Param       :
{
    "name": "POSArray",
    "raidtype": "RAID5",
    "buffer": [
        {
            "deviceName": "uram0"
        }
    ],
    "data": [
        {
            "deviceName": "unvme-ns-0"
        },
        {
            "deviceName": "unvme-ns-1"
        },
        {
            "deviceName": "unvme-ns-2"
        }
    ],
    "spare": [
        {
            "deviceName": "unvme-ns-3"
        }
    ]
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
```
As you may have noticed, some of the parameters should be passed in from the output of the previous step ("cli device list" command).
* The write buffer device (-b) should be the name of a device whose "type" is "NVRAM".
* The data devices (-d) should be comma-separated list of devices, the type of which being "SSD".
* The name of POS array must comply with a naming convention described in Creating POS Array.
* As of Nov/30/2020, the available RAID types (--raidtype) are only ["RAID5"]
Once POS array has been created, you could query the POS array information as in the following:

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli array list_device --name POSArray

Request to Poseidon OS
    xrId        :  f16396ea-2f8a-11eb-bd77-005056adb61a
    command     :  LISTARRAYDEVICE
    Param       :
{
    "name": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "devicelist": [
        {
            "name": "uram0",
            "type": "BUFFER"
        },
        {
            "name": "unvme-ns-0",
            "type": "DATA"
        },
        {
            "name": "unvme-ns-1",
            "type": "DATA"
        },
        {
            "name": "unvme-ns-2",
            "type": "DATA"
        },
        {
            "name": "unvme-ns-3",
            "type": "SPARE"
        }
    ]
}
```

Step 5b. Load existing POS Array
--------------------------------
"Load" command is to support a case that POS/host has restarted and lost its in-memory state. The following command will retrieve the array information from MBR partition and import into POS.

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli array load --name POSArray

Request to Poseidon OS
    xrId        :  f6fa9d6b-4f16-11eb-b888-005056adb61a
    command     :  LOADARRAY
    Param       :
{
    "name": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
```
Please make sure that Step 2 (creating write buffer) and Step 4 (scanning NVMe devices) should run before the LOADARRAY command. After a reboot/restart, the write buffer should be recreated and rescanned. Otherwise, LOADARRAY command would fail.

Step 6. Mount POS Array
-----------------------
Even though we have POS array provisioned, we can't use it until it is mounted. Let's check out what happens with system state around POS array mount.

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli system info

Request to Poseidon OS
    xrId        :  7d7dcf05-32ab-11eb-b334-005056adb61a
    command     :  GETIBOFOSINFO

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "capacity": "0GB (0B)",
    "rebuildingProgress": "0",
    "situation": "DEFAULT",
    "state": "OFFLINE",
    "used": "0GB (0B)"
}

ibof@ibof-target:IBOF_HOME/bin$ ./cli system mount

Request to Poseidon OS
    xrId        :  31dbc740-2f8c-11eb-ae95-005056adb61a
    command     :  MOUNTIBOFOS

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

ibof@ibof-target:IBOF_HOME/bin$ ./cli system info

Request to Poseidon OS
    xrId        :  3f30be48-2f8c-11eb-9afa-005056adb61a
    command     :  GETIBOFOSINFO

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "capacity": "120.31277138GB<PHONE_NUMBER>80B)",
    "rebuildingProgress": "0",
    "situation": "NORMAL",
    "state": "NORMAL",
    "used": "0GB (0B)"
}
```

Please note that state field in the output has changed from OFFLINE to NORMAL. Also, "capacity" is now reflecting the size of the NVMe storage pool available to POS.

Please note that, as of Nov/30/2020, POS supports a single POS array only, which is why "mount" command belongs to "system" (i.e., it's currently "cli system mount", but not "cli array mount --name POSArray"). Once POS gets a new feature to support multi array, the command will change accordingly.

Step 7. Configure NVM Subsystems for NVMe Over Fabric Target
------------------------------------------------------------
POS is ready to perform volume management task, but still unable to expose its volume over network since we haven't configured an NVM subsystem yet. POS is not ready to expose its volume over network since it does not have NVM subsystem in which NVM namespaces(s) are created. Creating NVM subsystem remains in manual fashion  (vs. running automatically during POS startup) by design. Administrators need to understand its functionality so that they can easily come up with a workaround when needed. Once we have enough understanding about various user environments, this step could be automated in a future release.

```
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_create_subsystem -h
usage: rpc.py nvmf_create_subsystem [-h] [-t TGT_NAME] [-s SERIAL_NUMBER]
                                    [-d MODEL_NUMBER] [-a] [-m MAX_NAMESPACES]
                                    nqn

positional arguments:
  nqn                   Subsystem NQN (ASCII)

optional arguments:
  -h, --help            show this help message and exit
  -t TGT_NAME, --tgt_name TGT_NAME
                        The name of the parent NVMe-oF target (optional)
  -s SERIAL_NUMBER, --serial-number SERIAL_NUMBER
                        Format: 'sn' etc Example: 'SPDK00000000000001'
  -d MODEL_NUMBER, --model-number MODEL_NUMBER
                        Format: 'mn' etc Example: 'SPDK Controller'
  -a, --allow-any-host  Allow any host to connect (don't enforce host NQN
                        whitelist)
  -m MAX_NAMESPACES, --max-namespaces MAX_NAMESPACES
                        Maximum number of namespaces allowed

root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_create_subsystem nqn.2019-04.ibof:subsystem1 -a -s IBOF00000000000001 -d IBOF_VOLUME_EXTENSION -m 256
```

The following command configures TCP transport to use when network connection is established between an initiator and a target. is between initiator and target.

```
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_create_transport -h
usage: rpc.py nvmf_create_transport [-h] -t TRTYPE [-g TGT_NAME]
                                    [-q MAX_QUEUE_DEPTH]
                                    [-p MAX_QPAIRS_PER_CTRLR]
                                    [-c IN_CAPSULE_DATA_SIZE] [-i MAX_IO_SIZE]
                                    [-u IO_UNIT_SIZE] [-a MAX_AQ_DEPTH]
                                    [-n NUM_SHARED_BUFFERS]
                                    [-b BUF_CACHE_SIZE] [-s MAX_SRQ_DEPTH]
                                    [-r] [-o] [-f] [-y SOCK_PRIORITY]

optional arguments:
  -h, --help            show this help message and exit
  -t TRTYPE, --trtype TRTYPE
                        Transport type (ex. RDMA)
  -g TGT_NAME, --tgt_name TGT_NAME
                        The name of the parent NVMe-oF target (optional)
  -q MAX_QUEUE_DEPTH, --max-queue-depth MAX_QUEUE_DEPTH
                        Max number of outstanding I/O per queue
  -p MAX_QPAIRS_PER_CTRLR, --max-qpairs-per-ctrlr MAX_QPAIRS_PER_CTRLR
                        Max number of SQ and CQ per controller
  -c IN_CAPSULE_DATA_SIZE, --in-capsule-data-size IN_CAPSULE_DATA_SIZE
                        Max number of in-capsule data size
  -i MAX_IO_SIZE, --max-io-size MAX_IO_SIZE
                        Max I/O size (bytes)
  -u IO_UNIT_SIZE, --io-unit-size IO_UNIT_SIZE
                        I/O unit size (bytes)
  -a MAX_AQ_DEPTH, --max-aq-depth MAX_AQ_DEPTH
                        Max number of admin cmds per AQ
  -n NUM_SHARED_BUFFERS, --num-shared-buffers NUM_SHARED_BUFFERS
                        The number of pooled data buffers available to the
                        transport
  -b BUF_CACHE_SIZE, --buf-cache-size BUF_CACHE_SIZE
                        The number of shared buffers to reserve for each poll
                        group
  -s MAX_SRQ_DEPTH, --max-srq-depth MAX_SRQ_DEPTH
                        Max number of outstanding I/O per SRQ. Relevant only
                        for RDMA transport
  -r, --no-srq          Disable per-thread shared receive queue. Relevant only
                        for RDMA transport
  -o, --c2h-success     Disable C2H success optimization. Relevant only for
                        TCP transport
  -f, --dif-insert-or-strip
                        Enable DIF insert/strip. Relevant only for TCP
                        transport
  -y SOCK_PRIORITY, --sock-priority SOCK_PRIORITY
                        The sock priority of the tcp connection. Relevant only
                        for TCP transport

root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_create_transport -t tcp -b 64 -n 2048
```

The following command makes a given NVM subsystem listen on a TCP port and serve incoming NVMe-oF requests.

```
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_subsystem_add_listener -h
usage: rpc.py nvmf_subsystem_add_listener [-h] -t TRTYPE -a TRADDR
                                          [-p TGT_NAME] [-f ADRFAM]
                                          [-s TRSVCID]
                                          nqn

positional arguments:
  nqn                   NVMe-oF subsystem NQN

optional arguments:
  -h, --help            show this help message and exit
  -t TRTYPE, --trtype TRTYPE
                        NVMe-oF transport type: e.g., rdma
  -a TRADDR, --traddr TRADDR
                        NVMe-oF transport address: e.g., an ip address
  -p TGT_NAME, --tgt_name TGT_NAME
                        The name of the parent NVMe-oF target (optional)
  -f ADRFAM, --adrfam ADRFAM
                        NVMe-oF transport adrfam: e.g., ipv4, ipv6, ib, fc,
                        intra_host
  -s TRSVCID, --trsvcid TRSVCID
                        NVMe-oF transport service id: e.g., a port number

root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ifconfig
br-ffbb105da0b0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
        ether 02:42:bc:6d:42:c0  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
        ether 02:42:5a:48:ef:31  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
        inet6 fe80::250:56ff:fead:b61a  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:ad:b6:1a  txqueuelen 1000  (Ethernet)
        RX packets 10347809  bytes<PHONE_NUMBER> (5.6 GB)
        RX errors 0  dropped 1807  overruns 0  frame 0
        TX packets 2678399  bytes<PHONE_NUMBER> (1.3 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens192f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
        inet6 fe80::250:56ff:fead:62e3  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:ad:62:e3  txqueuelen 1000  (Ethernet)
        RX packets 49543  bytes 9172204 (9.1 MB)
        RX errors 0  dropped 522  overruns 0  frame 0
        TX packets 7280  bytes 636436 (636.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 35058288  bytes<PHONE_NUMBER>4 (21.7 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35058288  bytes<PHONE_NUMBER>4 (21.7 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_subsystem_add_listener nqn.2019-04.ibof:subsystem1 -t tcp -a <IP_ADDRESS> -s 1158
```

In the above example, the NVM subsystem called "nqn.2019-04.ibof:subsystem1" has been configured to listen on (<IP_ADDRESS>, 1158) and use TCP transport. If you miss this step, POS wouldn't be able to mount POS volumes even though it could create new ones.

At this point, you should be able to retrieve the configured NVM subsystem like in the following:

```
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_get_subsystems
[
  {
    "nqn": "nqn.2014-08.org.nvmexpress.discovery",
    "subtype": "Discovery",
    "listen_addresses": [],
    "allow_any_host": true,
    "hosts": []
  },
  {
    "nqn": "nqn.2019-04.ibof:subsystem1",
    "subtype": "NVMe",
    "listen_addresses": [
      {
        "transport": "TCP",
        "trtype": "TCP",
        "adrfam": "IPv4",
        "traddr": "<IP_ADDRESS>",
        "trsvcid": "1158"
      }
    ],
    "allow_any_host": true,
    "hosts": [],
    "serial_number": "IBOF00000000000001",
    "model_number": "IBOF_VOLUME_EXTENSION",
    "max_namespaces": 256,
    "namespaces": []
  }
]
```

Step 8. Create POS Volume
-------------------------

This step is to create a logical entry point of the target side IO which will be shown as a namespace in an NVM subsystem. POS volume is wrapped as a "bdev" and can be attached to a particular NVM subsystem. "bdev" is a block device abstraction offered by SPDK library.

```
# Create a volume
ibof@ibof-target:IBOF_HOME/bin$ ./cli volume create --name vol1 --size<PHONE_NUMBER> --maxiops 0 --maxbw 0 --array POSArray

Request to Poseidon OS
    xrId        :  05fcfcc1-2f8e-11eb-9cac-005056adb61a
    command     :  CREATEVOLUME
    Param       :
{
    "name": "vol1",
    "array": "POSArray",
    "size":<PHONE_NUMBER>
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

# Retrieve volume information
ibof@ibof-target:IBOF_HOME/bin$ ./cli volume list --array POSArray

Request to Poseidon OS
    xrId        :  3e3ea57c-2f8e-11eb-a2ad-005056adb61a
    command     :  LISTVOLUME
    Param       :
{
    "array": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "volumes": [
        {
            "id": 0,
            "maxbw": 0,
            "maxiops": 0,
            "name": "vol1",
            "remain": "1.073741824GB<PHONE_NUMBER>B)",
            "status": "Unmounted",
            "total": "1.073741824GB<PHONE_NUMBER>B)"
        }
    ]
}
```

Please note that the initial status of POS volume is Unmounted.

Step 9. Mount POS Volume
------------------------
This is to make a particular POS volume ready to perform IO. After this step, POS volume is attached as bdev to an NVM subsystem and seen as an NVM namespace.

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli volume mount --name vol1 --array POSArray

Request to Poseidon OS
    xrId        :  b4224be2-2f97-11eb-bd11-005056adb61a
    command     :  MOUNTVOLUME
    Param       :
{
    "name": "vol1",
    "array": "POSArray"
}

ibof@ibof-target:IBOF_HOME/bin$ ./cli volume list --array POSArray

Request to Poseidon OS
    xrId        :  ea8e0b0c-2f97-11eb-9d8a-005056adb61a
    command     :  LISTVOLUME
    Param       :
{
    "array": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "volumes": [
        {
            "id": 0,
            "maxbw": 0,
            "maxiops": 0,
            "name": "vol1",
            "remain": "1.073741824GB<PHONE_NUMBER>B)",
            "status": "Mounted",
            "total": "1.073741824GB<PHONE_NUMBER>B)"
        }
    ]
}
```

Please note that the status of the volume has become Mounted.  If we check the NVM subsystem again, we can notice an NVM namespace has been added to an NVM subsystem with its bdev_name as follows.

```
# Retrieve NVM subsystem information
root@ibof-target:IBOF_HOME/lib/spdk-19.10/scripts# ./rpc.py nvmf_get_subsystems
[
  {
    "nqn": "nqn.2014-08.org.nvmexpress.discovery",
    "subtype": "Discovery",
    "listen_addresses": [],
    "allow_any_host": true,
    "hosts": []
  },
  {
    "nqn": "nqn.2019-04.ibof:subsystem1",
    "subtype": "NVMe",
    "listen_addresses": [
      {
        "transport": "TCP",
        "trtype": "TCP",
        "adrfam": "IPv4",
        "traddr": "<IP_ADDRESS>",
        "trsvcid": "1158"
      }
    ],
    "allow_any_host": true,
    "hosts": [],
    "serial_number": "IBOF00000000000001",
    "model_number": "IBOF_VOLUME_EXTENSION",
    "max_namespaces": 256,
    "namespaces": [
      {
        "nsid": 1,
        "bdev_name": "bdev0",
        "name": "bdev0",
        "uuid": "06d53d40-33b7-4d05-be20-58220496a43d"
      }
    ]
  }
]
```
Once mounted, the connection is established between an initiator and an NVM subsystem. Then, POS volume becomes accessible over network by an initiator.

Step 10. Unmount POS Volume
---------------------------

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli volume unmount --name vol1 --array POSArray

Request to Poseidon OS
    xrId        :  319c6a9f-2fb4-11eb-a9bd-005056adb61a
    command     :  UNMOUNTVOLUME
    Param       :
{
    "name": "vol1",
    "array": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

ibof@ibof-target:IBOF_HOME/bin$ ./cli volume list --array POSArray

Request to Poseidon OS
    xrId        :  352d6cce-2fb4-11eb-ab45-005056adb61a
    command     :  LISTVOLUME
    Param       :
{
    "array": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "volumes": [
        {
            "id": 0,
            "maxbw": 0,
            "maxiops": 0,
            "name": "vol1",
            "remain": "1.073741824GB<PHONE_NUMBER>B)",
            "status": "Unmounted",
            "total": "1.073741824GB<PHONE_NUMBER>B)"
        }
    ]
}
```

Please note that the status of the POS volume has changed from "Mounted" to "Unmounted".

Step 11. Delete POS Volume
--------------------------

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli volume delete --name vol1 --array POSArray

Request to Poseidon OS
    xrId        :  95e706cc-2fb4-11eb-b82f-005056adb61a
    command     :  DELETEVOLUME
    Param       :
{
    "name": "vol1",
    "array": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

ibof@ibof-target:IBOF_HOME/bin$ ./cli volume list --array POSArray

Request to Poseidon OS
    xrId        :  97b9746e-2fb4-11eb-b2f1-005056adb61a
    command     :  LISTVOLUME
    Param       :
{
    "array": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
```

POS volume can be deleted only when it is in Unmounted state.

Step 12. Unmount POS Array
--------------------------

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli system unmount

Request to Poseidon OS
    xrId        :  d32e2fbd-2fb4-11eb-91a3-005056adb61a
    command     :  UNMOUNTIBOFOS

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

ibof@ibof-target:IBOF_HOME/bin$ ./cli system info

Request to Poseidon OS
    xrId        :  d601d366-2fb4-11eb-874c-005056adb61a
    command     :  GETIBOFOSINFO

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "capacity": "0GB (0B)",
    "rebuildingProgress": "0",
    "situation": "DEFAULT",
    "state": "OFFLINE",
    "used": "0GB (0B)"
}
```

Step 13. Delete POS Array
-------------------------

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli array delete --name POSArray

Request to Poseidon OS
    xrId        :  39434590-32d4-11eb-ae61-005056adb61a
    command     :  DELETEARRAY
    Param       :
{
    "name": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :

ibof@ibof-target:IBOF_HOME/bin$ ./cli array info --name POSArray

Request to Poseidon OS
    xrId        :  3cb6ebf0-32d4-11eb-bba1-005056adb61a
    command     :  ARRAYINFO
    Param       :
{
    "name": "POSArray"
}

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
    Data         :
 {
    "name": "POSArray",
    "state": "NOT_EXIST"
}
```

POS array can be deleted only when it is in OFFLINE state.

Step 14. Shut down POS application
----------------------------------

```
ibof@ibof-target:IBOF_HOME/bin$ ./cli system exit

Request to Poseidon OS
    xrId        :  81f12c3c-32d4-11eb-8a99-005056adb61a
    command     :  EXITIBOFOS

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :
    Solution     :
```

Please make sure that POS is not running anymore as in the following.

```
ibof@ibof-target:IBOF_HOME/bin$ ps -ef | grep ibofos | grep -v grep
```


text:
# POC
In project is means `Proof of concept`

In this I took help from this [link](https://hapipal.com/getting-started)

If you want run that project then you have to run that command Line by line

        npm install

It will install all packages which is in `package.json`

## Configuration

For Run this you also have to make `.env` file instead of `sample.env` you will got `server/sample.env`
In this you have to git your databse name and others details about database

`DB_NAME`,
`DB_HOST`,
`DB_USER`,
`DB_PASS`,
`PORT`

## migration

There is a `migration-file` so you also have to install Knex with the help of `npm`

        npm i knex --save

so it will help you to run migration to make `migrate:latest` or `make:migration-file`
After that you can run

        knex migrate:latest

make sure that you filled that all `Configuration` things.

## Server

For run the Server you have to run

        npm start


text:
# Mercedes-Benz-Greener-Manufacturing

DESCRIPTION

Reduce the time a Mercedes-Benz spends on the test bench.

Problem Statement Scenario:
Since the first automobile, the Benz Patent Motor Car in 1886, Mercedes-Benz has stood for important automotive innovations. These include the passenger safety cell with a crumple zone, the airbag, and intelligent assistance systems. Mercedes-Benz applies for nearly 2000 patents per year, making the brand the European leader among premium carmakers. Mercedes-Benz is the leader in the premium car industry. With a huge selection of features and options, customers can choose the customized Mercedes-Benz of their dreams.

To ensure the safety and reliability of every unique car configuration before they hit the road, the company’s engineers have developed a robust testing system. As one of the world’s biggest manufacturers of premium cars, safety and efficiency are paramount on Mercedes-Benz’s production lines. However, optimizing the speed of their testing system for many possible feature combinations is complex and time-consuming without a powerful algorithmic approach.

 Others will work with a dataset representing different permutations of features in a Mercedes-Benz car to predict the time it takes to pass testing. Optimal algorithms will contribute to faster testing, resulting in lower carbon dioxide emissions without reducing Mercedes-Benz’s standards.

If for any column(s), the variance is equal to zero, then you need to remove those variable(s).

Check for null and unique values for test and train sets.

Apply label encoder.

Perform dimensionality reduction.

Predict your test_df values using XGBoost

license: Unlicense

gha_license_id: Unlicense


text:
# NPS Tool Demo: Extract Topic & Sentiment from text

The direct feedback acquired from customers or respondents of customer surveys . This calls for the challenge to **parse** and **organize** all the **unstructured feedback** and organize the data into a more digestible and **actionable insight**.
This tool allows teams to parse and analyze texts such as reviews, verbatims, tweets, etc. using the pipeline contained within this tool.

This tool is most useful if you have more than 10k reviews, verbatims, tweets, etc. Especially if you have a need for recurring analysis of the same data. For example, annual surveys with the same categories, constant influx of similar textual data, or one time large volumes of data.

👈 **Please select any of the _steps_ in the sidebar to start.**

repository: NickvanZanten/domain-adapted-atsc

repo_name: NickvanZanten/domain-adapted-atsc


text:
# A library for talking to the Roland INTEGRA-7

Uses MIDI for exchanging messages with the Roland INTEGRA-7 sound module.

* Abstracts from the MIDI-implementation used (only `javax.sound.midi` is implemented for now)
* Covers all of the document [INTEGRA-7 MIDI Implementation](https://www.roland.com/us/support/by_product/integra-7/owners_manuals/ac9d1b3b-a17a-417a-acc9-a67f1b757087/) (almost for now)
* Supports multiple INTEGRA-7 at the same time
* May access random addresses without dumping everything (see example below)
* In theory, it's extensible to also support other devices than the INTEGRA-7

## Open tasks

* The library is in very early stages. The API is sure to change!
* SysEx implementation is *read-only* for now (shouldn't be to hard to make read-write, though)
* Support for un-documented SysEx-commands (as found by Wonderer [here](https://forums.rolandclan.com/viewtopic.php?f=54&t=55157&sid=cf16f62b3c5824b84ab4ad104d2a819c&start=15))
* Additional facade covering the [INTEGRA-7 Parameter Guide](https://www.roland.com/us/support/by_product/integra-7/owners_manuals/699b4cf7-caf9-4d94-a284-47b026e102f9/)
    * Especially find a way of better abstracting from signed values as some range `-63..63` and some `-64..63`

## Examples

See [ExampleMain.kt](src/main/kotlin/de/tobiasblaschke/midipi/lib/ExampleMain.kt) for working examples.

### Discover an INTEGRA-7

Uses the Java-internal midi-libraries for searching for an INTEGRA-7.

When using this interface, there's not a lot to hold on to, but the OS-supplied device name.
Another option would be to send SysEx-identity requests to each device discovered.

```kotlin
val integra7 = MBJavaMidiDiscovery().scan()
            .filterIsInstance<MBJavaMidiEndpoint.MBJavaMidiReadWriteEndpoint>()
            .first { it.name.contains("INTEGRA7") }
```

### Read single fields via SysEx

SysEx-requests return regular a Java `Future<>` for resolving the response.

It is possible to fetch entire structures as well as single fields.
The corresponding names of the request-builders and the returned structures line up.

```kotlin
integra7.withConnection { connection ->
    val con = RolandIntegra7(connection)

   // slow access (fetches the entire studio-set)
   println("Studio set name: " + con.request { it.studioSet }.get().common.name)

   // fast access (fetches only the name)
   println("Studio set name: " + con.request { it.studioSet.common.name }.get())
}
```

### Load a sound

Will use CC and PC messages to load a sound. Then read the name of the loaded sound via SysEx.

```kotlin
integra7.withConnection { connection ->
    val con = RolandIntegra7(connection)

    // Load SN-A "Pure ClavCA1" on channel 5
    con.send(BankSelectMsb(MidiChannel.CHANNEL_5, 89))
    con.send(BankSelectLsb(MidiChannel.CHANNEL_5, 64))
    con.send(ProgramChange(MidiChannel.CHANNEL_5, 35))

    // Assume part == channel
    println( "Expecting 'Pure ClavCA1' == " + con.part(IntegraPart.P5).sound.tone.tone.common.name)
}
```

### Send an RPN-Message

RPN-Messages may be sent like normal MIDI-messages even though they result in multiple actual messages:

```kotlin
integra7.withConnection { connection ->
    val con = RolandIntegra7(connection)

    con.send(RolandIntegra7RpnMessage.PitchBendSensitivity(MidiChannel.CHANNEL_1, semitones = 4))
}
```

## Requirements

* JDK 8 or higher
* [Kotlin stdlib](https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib) 1.4.10


text:
# JavaScript and HTML
The purpose of this project was to help Dana create an interactive webpage that allows readers to parse the data around UFO sightings. So we built: A webpage to allow users to view the data using HTML, and A table that presents the data using JavaScript.

# Filters
Then we create the table for filters of:
1. Date
2. City
3. State
4. Country
5. Shape

# Technologies used
VS Code, javascript, css, html and bootstrap

# Webpage
![](static/images/webpage.png)

# Recommendation
Maybe in the future, we could add more links for more information, more photos or vedios than just words showing on the page, that would more attractive to people.

repository: Melody-Lii/UFOs

repo_name: Melody-Lii/UFOs


text:
# @n1ru4l/graphql-live-query

## 0.8.1

### Patch Changes

- fbbee22: re-add `isLiveQueryOperationDefinitionNode` function

## 0.8.0

### Minor Changes

- e893ecc: Add `throttle` argument for the `@live` directive for negotiating a throttle between the server and the client. This is useful for preventing the server to spam the client for data that might be updating too frequently.
- 8e14fd2: improve ESM support by using export fields and .mjs file extensions

## 0.7.1

### Patch Changes

- 88270dc: feat: allow conditional live queries via the if argument on the live directive

## 0.7.0

### Minor Changes

- f244baa: Add `NoLiveMixedWithDeferStreamRule` rule.

### Patch Changes

- ca21161: Mark live query execution results via the boolean isLive property published by the AsyncIterator. This makes identifying live queries easier. A possible use-case where this is useful might be a wrapper around InMemoryLiveQueryStore.execute that creates patches from the last and next execution result."

## 0.6.0

### Minor Changes

- 7b37628: Remove exported `extractLiveQueries` function.

### Patch Changes

- 37f0b6d: rename `isLiveOperationDefinition` to `isLiveQueryOperationDefinitionNode`

## 0.5.0

### Minor Changes

- 6cfe3e5: Replace `executeLiveQuery` with `execute`.

  Instead of passing two execute functions to the server options, now only a single execute function is passed to the server.

  The `execute` function can now return a `AsyncIterableIterator<ExecutionResult>`.

  `@n1ru4l/socket-io-graphql-server` has no longer a dependency upon `@n1ru4l/graphql-live-query`.

## 0.4.0

### Minor Changes

- b086fc8: Shape the API to be more "compatible" with graphql-js.

  **BREAKING CHANG** Rename `InMemoryLiveQueryStore.triggerUpdate` method to `InMemoryLiveQueryStore.invalidate`. `InMemoryLiveQueryStore.invalidate` now also accepts an array of strings.

  **BREAKING CHANGE** `InMemoryLiveQueryStore` no longer implements `LiveQueryStore`. The `LiveQueryStore` interface was removed

  **BREAKING CHANGE** Rename `InMemoryLiveQueryStore.register` to `InMemoryLiveQueryStore.execute`. `InMemoryLiveQueryStore.execute` returns a `AsyncIterableIterator` which publishes the execution results.

## 0.3.0

### Minor Changes

- 6a03905: **BREAKING CHANGE**: Change API of `LiveQueryStore`.

  The register method of the `LiveQueryStore` now has changed:

  ```ts
  import type { DocumentNode, ExecutionResult } from "graphql";

  export type UnsubscribeHandler = () => void;
  export type OperationVariables = { [key: string]: any } | null | undefined;

  export abstract class LiveQueryStore {
    abstract async triggerUpdate(identifier: string): Promise<void>;
    abstract register(
      operationDocument: DocumentNode,
      operationVariables: OperationVariables,
      executeQuery: () => Promise<ExecutionResult>,
      publishUpdate: (executionResult: ExecutionResult, payload: any) => void
    ): UnsubscribeHandler;
  }
  ```

## 0.2.0

### Minor Changes

- aa2be73: chore: unify how packages are built.

repository: strblr/graphql-live-query

repo_name: strblr/graphql-live-query


text:
---
layout: post
title:      "The Importance of Psychology in Web Design by Henry Lewington"
subtitle:   "Considering the psychological drivers of the target audience can have a surprisingly positive influence on how users will utilise a website..."
date:       2015-04-05 12:00:00
header-img: "img/23bg_18.jpg"
---

The Importance of Pscyhology in Web Design

In this article from Creative Bloq author Henry Lewington speaks about trust, psychological triggers, and using the psychological force when designing your web site.

Favorite quote:

Without stifling creativity, by offering familiar and recognisable patterns, a website will instantly put visitors at ease... or do the opposite. The site's purpose must be immediately clear. Is the site providing information or selling a product or service? Users must be able to easily move between pages of interest. Steering too far away from basic user expectations in an effort to differentiate, can actually be counterproductive.


text:
# Composite Design Pattern

### Intent

“Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.”

Excerpt From: Erich Gamma. “Design Patterns: Elements of Reusable Object-Oriented Software.”


text:
## IQL

![](https://upload-images.jianshu.io/upload_images/3597066-e19cdef507fd77a7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

An ad hoc query service based on SparkSQL has the following characteristics：
- Elegant interaction mode, support multiple data sources, multi-data source hybrid computing
- Spark Permanent Service, Automatic Engine Discovery Based on Zookeeper
- Load balancing, random execution of multiple engines
- Implementation of Parallel Query in Multi-session Mode
- Use spark FAIR scheduling to avoid resources being monopolized by large tasks
- Spark-based dynamic resource allocation, does not occupy executor resources without tasks
- Support for Cluster and Client mode startup
- SQL dynamic add stream task based on Structured Streaming
- Similar to Spark Shell interactive data analysis
- Efficient script management, complete the association of each script with import/include syntax
- Permission verification for data source operations

Supported data sources：hdfs、hive、hbase、kafka、mysql、es、solr、mongo

Supported file formats：parquet、csv、orc、json、text、xml

Added support for Hbase, MySQL, and ES in addition to the Sink supported by Structured Streaming

## [Quickstart](https://github.com/teeyog/IQL/blob/master/docs/en/quick-start.md)

## Basic grammar
 ```
 load syntax and save syntax
 load and save syntax to load and save data, just write the configuration information
 after the where condition, such as loading mysql data into a temporary table:
 load jdbc.'tableName'
 where driver="***"
     and url="***"
 as tb_mysql;
 Here tb_mysql can be used at any where, such as:select * from tb_mysql; save tb_mysql as json.'path'。

 Save the data to HBase:
 save tb_mysql as hbase.'tbname'
 where `hbase.zookeeper.quorum`="localhost:2181"

 select syntax
 The select syntax is no different from normal sql, you can directly as a temporary table.
 such as：select * from tb_mysql limit 10 as tb_temp;
 Here tb_temp can be used at any time, and if there is no as ** at the end, the result will be
 displayed directly on the web.

 explain syntax
 You can directly explain a select query, or you can directly explain an intermediate temporary table
 such as tb_temp above;

 import syntax
 Can import the entire sql script

 register syntax
 Can register udf, register watermark, etc.

 Other grammar support：create、drop、insert、refresh、set、show
 ```

### HBase

#### load data

example：

```
load hbase.t_mbl_user_version_info
where `spark.table.schema`="userid:String,osversion:String,toolversion:String"
	   and `hbase.table.schema`=":rowkey,info:osversion,info:toolversion"
	   and `hbase.zookeeper.quorum`="localhost:2181"
as tb;
```

| parameter | description | defaults |
| ------------- |:-------------:|:-------------:|
| hbase.zookeeper.quorum | zookeeper address| localhost:2181|
| spark.table.schema | spark tempview mapping schema（eg: "ID:String,appname:String,age:Int"）|  |
| hbase.table.schema| HBase table mapping schema（eg: ":rowkey,info:appname,info:age"）|  |
| spark.rowkey.view.name| The name of the spark tempview corresponding to the rowkey. After the value is set, only the data corresponding to the rowkey is obtained.  |   |

> The HBase data corresponding to the specified rowkey set can be obtained. The spark.rowkey.view.name is the tempview corresponding to the rowkey set. By default, the first column is the rowkey column.

#### save data

example：

```
save tb1 as hbase.tableName
where `hbase.zookeeper.quorum`="localhost:2181"
      and `hbase.table.rowkey.filed`="name"
```

| parameter | description | defaults |
| ------------- |:-------------:|:-------------:|
|hbase.zookeeper.quorum | zookeeper address| localhost:2181|
|hbase.table.rowkey.field | The field name of the rowkey of the hbase table in the spark tempview| first field |
|bulkload.enable| whether to enable bulkload| false|
|hbase.table.name | HBase table name  |   |
|hbase.table.family | column family name  |  info |
|hbase.table.region.splits | Pre-partition mode 1：specify each subsection of the pre-partition as a string array，eg: ['1','2','3']  |   |
|hbase.table.rowkey.prefix | Pre-partition mode 2：when rowkey is a number, just specify the prefix form, such as 00, you can generate 100 partitions such as 00-99  |   |
|hbase.table.startKey | startkey |   |
|hbase.table.endKey | endkey  |   |
|hbase.table.numReg | number of pre-partitions |   |
|hbase.check_table | when writing to the hbase table, do you need to check if the table exists  |  false |
|hbase.cf.ttl | ttl |  |

### MySQL
- load data
```
load jdbc.ai_log_count
where driver="com.mysql.jdbc.Driver"
      and url="jdbc:mysql://localhost/db?characterEncoding=utf8"
      and user="root"
      and password="***"
as tb;
```

- save data
```
save append tb as jdbc.aatest_delete;
```

### File operation (format can be json、orc、csv、parquet、text)
- load data
 ```
load format.`path` as tb;
```

- save data
```
save tb as formate.`path` partitionBy uid coalesce 2;
```

### Kafka

- batch job
 ```
load kafka.`topicName`
where maxRatePerPartition="200"
	and `group.id`="consumerGroupId"
as tb;
select * from tb;
```
| parameter | description | defaults |
| ------------- |:-------------:|:-------------:|
| autoCommitOffset | whether to submit offset | false |
- stream job
```
load kafka.`mc-monitor`
where startingoffsets="latest"
	and failOnDataLoss="false"
	and `spark.job.mode`="stream"
as tb1;

register watermark.tb1
where eventTimeCol="timestamp"
and delayThreshold="10 seconds"

select window.end as time_end,
count(1) as count
from tb1 a
group by  window(a.timestamp,"10 seconds","10 seconds")
as tb2;

save tb2 as json.`/tmp/abc6`
where outputMode="Append"
	and streamName="Stream"
	and duration="10"
	and sendDingDingOnTerminated="true"
	and<EMAIL_ADDRESS>	and checkpointLocation="/tmp/cp/cp16";
```

| parameter | description | defaults |
| ------------- |:-------------:|:-------------:|
| spark.job.mode | job mode（batch or stream）| batch |
| mail.receiver | job failure email notification (multiple mailboxes separated by commas)|  |
| sendDingDingOnTerminated | Dingding robot notification | false |

> Stream job failure will automatically restart, can be configured by streamJobMaxAttempts (default 3 times)

### Register UDF function
- method one:

```
register udf.`myupper`
where func="
	def apply(name:String)={
		name.toUpperCase
	}
";

load jsonStr.'
{"name":"ufo"}
{"name":"uu"}
{"name":"HIN"}
' as tb1;

select myupper(name) as newName from tb1;
```

- method two:
```
create temporary function myupper as 'cn.mc.udf.MyUPpperUDF' using jar 'hdfs://dsj01:8020/tmp/udf-test-1.0-SNAPSHOT.jar';
```

### include (import equivalent) syntax, introducing script fragments through paths

![import grammar](https://upload-images.jianshu.io/upload_images/3597066-cf42197b02fbaa5c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

### reference
[StreamingPro之MLSQL](https://github.com/allwefantasy/streamingpro)

[spark sql在喜马拉雅的使用之xql](https://github.com/cjuexuan/mynote/issues/21)


text:
<!---======================= begin_copyright_notice ============================

Copyright (C) 2020-2022 Intel Corporation

SPDX-License-Identifier: MIT

============================= end_copyright_notice ==========================-->

# Appendix: Debug Information

Debug information in vISA is emitted as structures mapping virtual
bytecode input to machine code output. There are several mapping tables
emitted and each is described below.

Debug Information Header
========================

Debug information header format is as follows:

```
    DebugFormatHeader
    {
      ud magic_number;
      uw numCompiledObjects;
      DebugInfoFormat debugInfo[numCompiledObjectsObjects];
    }
```

-   **magic_number**: A magic number used to identify debug information
    format used. This number is equal to 0xdeadd010 currently. Changes
    to debug information format will change this.
-   **numCompiledObjects**: Number of objects, ie kernels and stack call
    functions, having debug information in debug information stream.
-   **debugInfo:** Actual debug information for each compiled object.
    Compiled object refers to either a kernel or a stack call function.
    Debug information format per object is as follows:

```
    DebugInfoFormat
    {
      uw objectNameLen;
      ub objectName[objectNameLen];
      ud reloc_offset;
      MappingTable offsetMap;
      MappingTable indexMap;
      VarInfoMap vars;
      uw numSubs
      SubroutineInfo subInfo[numSubs];
      CallFrameInfo frameInfo;
    }
```

-   **nameLen:** Length of name of object.
-   **objectName:** Name of the object. Not null terminated.
-   **relocOffset:** Represents offset of first instruction in binary
    buffer. Value is 0 for kernels, non-zero for stack call functions.
-   **offsetMap:** Mapping for vISA instruction offset to Gen
    instruction offset. Base of vISA offset is first instruction of
    compilated object. Offsets expressed in bytes. This table is
    optional and may be absent when vISA file is not generated. When
    absent, offsetMap.numElements field is set to 0.
-   **indexMap:** Mapping for vISA instruction index from vISA input to
    Gen instruction offset. vISA instruction index starts at 0 for first
    vISA instruction and increases in unit step.
-   **vars:** Table mapping virtual variables with physical assigned
    storage location.
-   **numSubs:** Number of sub-routines that are part of this
    compilation object.
-   **subInfo:** Debugging information for each included sub-routine.
-   **frameInfo:** Debug information about call frame in presence of
    stack call callees.

```
    MappingTable
    {
      ud numElements;
      VISAMap data[numElements];
    }
```

-   **numElements:** Number of entries in mapping table.
-   **<data:**> Actual mapping from vISA instruction offset to Gen
    instruction.

```
    VISAMap
    {
      ud visaOffset/visaIndex;
      ud genOffset;
    }
```

-   **visaOffset/visaIndex:** Byte offset/vISA index in vISA input.
-   **genOffset:** Byte offset of corresponding Gen instruction in
    compiled code. If a vISA instruction leads to several Gen
    instruction, this points to first one. All Gen instructions between
    current genOffset and next mapping entry's genOffset are a result of
    lowering current vISA instruction. In case of scheduled code, Gen
    instructions resulting from a single vISA instruction could be
    scattered in generated code. In such cases, union of all such
    entries need to be considered to map to a single vISA instruction.
    Generated mapping is best effort and there could be some vISA
    instructions absent due to optimizations.

```
    VarInfoMap
    {
      ud numElements;
      VarInfo var[numElements];
    }
```

-   **numElements:** Number of elements in variable mapping table.
-   **var:** Actual mapping entry. Valid only when optimizations are
    disabled.

```
    VarInfo
    {
      uw nameLen;
      ub varName[nameLen];
      VarLiveIntervalsVISA lr;
    }
```

-   **nameLen:** Number of characters in name field.
-   **varName:** Non null terminated string of characters.
-   **lr:** Live-internal information in expressed in vISA index.

```
    VarLiveIntervalsVISA/VarIntervalsGenISA
    {
      uw numIntervals;
      IntervalVISA/GenISA intervals[numIntervals];
    }
```

-   **numIntervals:** Number of intervals having valid mapping.
-   **intervals:** Actual live-intervals.

```
    IntervalVISA/GenISA
    {
      uw start/ud start;
      uw end/ud end;
      ub virtualType;
      ub physicalType;
      union
      {
        Register
        {
          uw regnum;
          uw subRegNum;
        }
        Memory
        {
          ud isBaseOffBEFP : 1;
          d memoryOffset : 31;
        }
      }
    }
```

-   **start:** Variable is uw type for IntervalVISA and represents vISA
    index where current variable becomes live, ie has a valid value.
    Variable is ud type for IntervalGenISA type and represents Gen ISA
    start offset in bytes. Entire variable becomes live even if only a
    subset of elements are defined.
-   **end:** Variable is uw type for IntervalVISA and represents vISA
    index where current variable's value is no longer available.
    Variable is ud type for IntervalGenISA type and represents Gen ISA
    end offset in bytes. A variable is no longer live once all elements
    are no longer used.

-   **virtualType:** Can take one of following values:

|  Value          |  Interpretation |
| --- | --- |
|  0              |  Address vISA variable |
|  1              |  Flag vISA variable |
|  2              |  General vISA variable |

-   **physicalType:** Can take one of following values:

|  Value          |  Interpretation |
| --- | --- |
|  0              |  Address vISA variable |
|  1              |  Flag vISA variable |
|  2              |  General vISA variable |
|  3              |  Memory |

-   **regNum:** Valid if physicalType is 0, 1, 2. Indicates physical
    register number holding vISA variable.
-   **subRegNum:** Valid if physicalType is 0, 1, 2. Indicates physical
    sub-register number holding vISA variable. Expressed in byte units.
-   **isBaseOffBEFP:** Valid if physicalType is 3. Size is 1 bit.
    Bit-field set to 0 if vISA variable offset is represented based off
    BE_FP (ie, back-end frame pointer). If 1, it represents absolute
    offset in scratch space.
-   **memoryOffset:** Bit-field with size 31 bits. Valid if physicalType
    is 3. Field holding signed memory offset in byte units.

```
    SubroutineInfo
    {
      uw nameLen;
      ub name[nameLen];
      ud start;
      ud end;
      VarLiveIntervalsGenISA retVal;
    }
```

-  **nameLen:** Number of characters in name field.
-  **name:** Name of sub-routine. Not null terminated.
-  **start:** Index of first vISA instruction in sub-routine.
-  **end:** Index of last vISA instruction in sub-routine.
-  **retval:** Live-interval information of variable holding return
   address. This can be used to determine call site from where
   control was transferred.

```
    CallFrameInfo
    {
      uw frameSizeInBytes;
      ub befpValid;
      VarLiveIntervalsGenISA befp;
      ub callerbefpValid;
      VarLiveIntervalsGenISA callerbefp;
      ub retAddrValid;
      VarLiveIntervalsGenISA retAddr;
      uw numCalleeSaveEntries;
      PhyRegSaveInfoPerIP calleeSaveEntry[numCalleeSaveEntries];
      uw numCallerSaveEntries;
      PhyRegSaveInfoPerIP callerSaveEntry[numCallerSaveEntries];
    }
```

-   **frameSizeInBytes:** Number of bytes used by current frame.
-   **befpValid:** Set to 1 if BE_FP pointer is valid. When back-end
    stack is not used such as for standalone kernel, this will be 0.
-   **befp:** Live-interval of BE_FP. Present only when befpValid is
    set to 1. Field absent and should not be read when befpValid is 0.
-   **callerbefpValid:** Indicates whether BE_FP of caller frame is
    valid. Can be used to virtually unwind stack.
-   **callerbefp:** Live-interval of caller's BE_FP. Valid only when
    callerbefpValid is 1.
-   **retAddrValid:** Set to 1 when current object is a stack call
    function. It indicates that current object may return to caller
    frame.
-   **retAddr:** Live-interval of variable holding return address of
    current frame. Valid only if retAddrValid is 1.
-   **numCalleeSaveEntries:** Number of entries in callee save area
    table. Useful during virtual stack unwinding.
-   **calleeSaveEntry:** Caller frame's variables allocated to callee
    save area will be written out to memory on current frame so current
    compiled object can reuse such registers. To retrieve value of such
    variables from caller frame allocated to callee save area, a
    debugger would need to read memory location on current frame where
    callee save physical registers are stored. This member provides
    relevant mapping between callee save physical register and its
    location on current frame. Callee save registers are stored in
    memory before first vISA instruction in a frame and restored just
    before fret vISA instruction.
-   **numCallerSaveEntries:** Number of entries in caller save area
    table. Useful during virtual stack unwinding.
-   **callerSaveEntry:** Any caller save registers live across a stack
    call site will be stored in memory of current frame before the
    function call and will be restored after returning from the call.
    Caller save registers will be reused by callee stack call function.
    In callee stack call function, if debugger wants to virtually unwind
    stack and query a caller frame variable that was allocated to a
    caller save register, debugger needs to lookup this table to get the
    location where the variable's value is available.

```
    PhyRegSaveInfoPerIP
    {
      ud genIPOffset;
      uw numEntries;
      RegInfoMapping data[numEntries];
    }
```

-   **genIPOffset:** Caller/callee save entry at this Gen IP.
-   **numEntries:** Number of mapping entries for caller/callee save
    area.
-   **<data:**> Holds mapping information for caller/callee save
    registers and their storage location in memory. This is useful for
    virtual stack unwinding.

```
    RegInfoMapping
    {
      uw srcRegOff;
      uw numBytes;
      ub dstInReg;
      Mapping dst;
    }
```

-   **srcRegOff:** Physical register for which this caller/callee save
    entry is emitted. Physical register is expressed in byte units and
    zero based off GRF file. So r0.0 is expressed as 0 and r1.0 is
    expressed as 32.
-   **numBytes:** Total number of bytes beginning srcRegOff for this
    caller/callee save entry.
-   **dstInReg:** Indicates whether physical register in srcRegOff is
    stored in a register or memory.
-   **dst:** Actual location where registers indicated by srcRegOff and
    numBytes are stored.

repository: intel/intel-graphics-compiler

gha_license_id: NOASSERTION

repo_name: intel/intel-graphics-compiler


text:
---
title: "Addition"
operator: "+"
repl: "https://repl.it/@imrandyk/Addition"
docs: "https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators#addition-operator-"
---

This operator adds two numbers, it is commonly used to concatenate strings together. If a number and a string are used together it will concatenate them together.

Less commonly it can be used for combing delgates of the same type.

```cs
// Mathmatical Use
Console.WriteLine (1 + 1); // 2

// String Concatenation Use
Console.WriteLine("Hello " + "World"); // "Hello World"
Console.WriteLine(1 + "1"); // "11"

// Delegate Use
Action a = () => Console.Write(1+1);
Action b = () => Console.Write(1+1);
Action ab = a + b;
ab(); // "22"
```

repository: imrandyk/csharp-operator-lookup

repo_name: imrandyk/csharp-operator-lookup


text:
### [CVE-2021-29451](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29451)
![](https://img.shields.io/static/v1?label=Product&message=Portofino&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=%7B%22CWE-347%22%3A%22Improper%20Verification%20of%20Cryptographic%20Signature%22%7D&color=brighgreen)

### Description

Portofino is an open source web development framework. Portofino before version 5.2.1 did not properly verify the signature of JSON Web Tokens. This allows forging a valid JWT. The issue will be patched in the upcoming 5.2.1 release.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

repo_name: trickest/cve


text:
# Virginia boy to compete on Food Network’s ‘Chopped Junior&

Published at: **2019-11-03T00:00:00+00:00**

Author: ****

Original: [The Washington Times](https://www.washingtontimes.com/news/2019/nov/3/virginia-boy-to-compete-on-food-networks-chopped-j/)

CHESTERFIELD, Va. (AP) - An 11-year-old boy from Virginia has been chosen to compete on the Food Network show “Chopped Junior.”
Jake Nelson, of Chesterfield, will appear on the season premiere on Nov. 12.
The sixth-grader at Robious Middle School has been cooking for years. Mid-Atlantic dishes are his specialty, combining local ingredients like fresh seafood with chicken, turkey or pork loin.
During his audition for “Chopped Junior,” he prepared soft shell crabs.
In July, his family traveled to New York to tape the show. He can’t reveal what happened until the episode airs, but told the Richmond Times-Dispatch it was an “amazing” experience.
Information from: Richmond Times-Dispatch, http://www.richmond.com

          Manage Newsletters

Copyright © 2019 The Washington Times, LLC.

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported