text:
---
layout: cv
title: Xiaohu Ruan
email:
  url: https://mail.google.com/
  text<EMAIL_ADDRESS>homepage:
  url: http://xiaohujecky.github.io/xiaohu_cv_eng/
  text: xiaohujecky.github.io/xiaohu_cv_eng
---

# Xiaohu **Ruan**

{% include cv-contact.html %}

## Education

### **University of Chinese Academy of Sciences, Institute of Semiconductors** `2011.9 -2014.6`

```
Beijing, China
```

- M.S. in Software Engineering
- Computer vision in [High Speed Circuit and Neural Network Lab](http://lab.semi.ac.cn/rgsjwl/index.html)

### **Minzu University of China** `2007.9 - 2011.6`

```
Beijing, China
```

- B.S. in [Electronic Information Engineering](https://www.muc.edu.cn/info/1194/1378.htm)
- Basic programming C/C++, Circuit design of hardware.

## Publications

### [**An assessment method for face alignment based on feature matching**](https://www.cnki.net/kcms/detail/23.1538.TP.20150113.1131.010.html)

**RUAN Xiaohu\***, LI Weijun\*, QIN Hong, DONG Xiaoli, ZHANG Liping

_CAAI Transactions on Intelligent Systems, 2015, 10(1): 12-19._
[[PDF](https://www.cnki.net/kcms/detail/23.1538.TP.20150113.1131.010.html)]

### [**Video query method**](https://patents.google.com/patent/CN103020260A/en)

LI Weijun, **RUAN Xiaohu**, and DONG Xiaoli.

_Application CN2012105671361A events. Patent citations (6) Cited by (2) Legal events._

### [**An method of image classification and its device**](http://zlqiao.com/zlqiao/patent-a06d6f548fc6450fbcc3ce31ae90171e.html)
_Tongdun Techonlogy Co.,Ltd.<PHONE_NUMBER>97X_

### [**Method and device for identifying road traffic sign**](http://zlqiao.com/zlqiao/patent-3350313dc9a34164998216e5138f1541.html)
_Alibaba Group, Amap Information Technology Co., Ltd.<PHONE_NUMBER>589_

----

## Professional Experience

### [**vivo Mobile Communication Co.,Ltd.**](https://www.vivo.com/brand/about) `2019.8 - now`

_Computer Vision Engineer, Departmant of Hangzhou Artificial Intelligence_ `Hangzhou, China`
- Develop a small and fast-implemented project of 'object recognize' for the things generally appeared in daily life(Coke can, Mineral water bottles, vegatables, friuts and things like that), which based on the technology of image retreval and deep learning.
- Create an open-source-within-company framework which hold deep neural network projects and functions that are frequently used in the field of computer vision, which enable the programmers and product managers put their ideas into products easily and quikly.

### **Tongdun Techonlogy Co.,Ltd.** `2017.1 - 2017.5`

_Computer Vision Engineer, Artificial Intelligence Department_  `Hangzhou, China`
- Develop a algorithm pipeline for chinese OCR(Optical Character Recognition), which include text line detection and recognition. The referenced work is [CTPN(ECCV2016 Weilin Huang .etc)](https://arxiv.org/pdf/1609.03605.pdf), [SSD](https://arxiv.org/pdf/1512.02325.pdf), [Seglink(CVPR2017)](http://mc.eistar.net/UpLoadFiles/Papers/SegLink_CVPR17.pdf), [CRNN](https://arxiv.org/pdf/1507.05717.pdf), and [seq2seq Attention model](https://ai.googleblog.com/2017/07/building-your-own-neural-machine.html). The algorithm is served in the company's business products.
- Use the deep neural network algorithm in detection and classification to solve the practical problems in industry, likely, QR code detection, Porngraph recognization, picture of advertisement recognization etc. .
- Help to build the framework of Deep Learning Platform. The platform is used to label the customer images and choose the plugin algorithm to train/test/deploy the deeping learning models.

### **Alibaba Group** `2014.6 - 2017.4`

_Computer Vision Engineer, Pailitao team, Institute of Data Science and Technologies_  `Hangzhou, China`
- Worked on algorithms used in the system of hyperscale image retrieval, which including data analysis and pre-classification of the query image's production category in the Taobao and Tmall(the e-commerce platforms in Alibaba Group) when users search their deired products with a picture.

_Computer Vision Engineer, Amap Data center_   `Beijing, China`
- Worked on algorithms used in the recognization of all kinds of traffic signs in the videos uploaded by map collection vehicle, including traffic ban sign/restrictions/warning and so on.

## Honors & Awards

Phi Beta Kappa `Dickinson, 2018`

Excellence in Computer Science Award `Columbia, 2018`

Travel Award PL Mentoring Workshop (PLMW) `SPLASH, 2018`

Tau Beta Pi, Engineering Honor Society `Columbia, 2017`

Computer Science Departmental Honors `Dickinson, 2016`

Pi Mu Epsilon, Mathematics Honor Society `Dickinson, 2016`

Upsilon Pi Epsilon, Computer Science Honor Society `Dickinson, 2016`

Alpha Lambda Delta, First year Honor Society `Dickinson, 2013`

John Montgomery Scholarship `Dickinson, 2013`

## Service

Research Experiences for Undergraduates in Software Engineering (REUSE) Admission Committee `CMU, 2019`


text:
---
layout: cover
---
# Welcome to my Project Portfolio

---
layout: section
---
# Projects I've Made

---
---
# ax-toolkit
This is a set of scripts designed for making Axelor easier to use and deploy.

It currently includes:
- ax-get.py

  A Python script which makes it easy to download Axelor in both compiled-WAR form and in source form.
- ax-inconv.py

  A Python script which takes a list of inventory items (currently only support Excel files as input) and outputs a CSV file that can be imported into Axelor.

---
---
# genscripts
This is a set of scripts for use with Gentoo servers. Contributions are always welcome.

It currently includes:
- gensync.sh

  A shell script to ensure that '''emerge --sync''' hasn't been run more than once in a day.

- genwork.sh

  Adds a file warning other scripts not to do anything to disruptive, as some serious work is going on.

- genoff.sh

  A wrapper to '''poweroff''' that waits until any genwork files have been removed before shutting down the computer.

---
---
# add
This is one of the first programs I've ever made. Currently only adds two floats together. More features are added only on request.

---
---
# divisus
A Python script for converting columns of text into a CSV file. This script can be considered as the first attempt at an inventory conversion solution for Axelor before _ax-inconv.py_ was created.

---
---
# strcrop
A simple C program that crops user-provided strings. Aims to be a string cropping library someday.

---
layout: section
---
# Projects I've Forked
(And made changes to)

---
---
# Speckpater
A Python platformer game where a Priest collects Bibles in a dangerous Jungle. Major improvements are ongoing.

---
---
# tomcat-rpm-spec
Provides scripts and an RPM spec file to easily generate an updated RPM package for _Apache Tomcat_.

---
title: The End
layout: end
---

license: MIT

repository: TechPowerAwaits/project-portfolio

branch_name: refs/heads/main

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: TechPowerAwaits/project-portfolio


text:
---
layout: default
title: International Attendees
description: Information and Advice for International Attendees
parent: Conference
grand_parent: Home
nav_order: 9
---

[![Web Banner](/assets/images/Event_Banner_Graphic.png)](/conference/)

[Back to Conference Home Page](index.md)
{: style="text-align: right; font-size: small;" }

# Attending the Conference from Outside New Zealand

## AppSec New Zealand Conference 2021

**The conference team do not anticipate significant easing of travel restrictions to New Zealand, by the dates of the conference. If you are permitted to travel to New Zealand, all arrangements for required managed isolation/quarantine stays (including their costs) are your responsibility.**

**In the event you are permitted to travel to New Zealand for the conference, please be aware of the current visa / travel authorisation requirements below.**

Effective on 1 October 2019, new travel requirements took effect for visitors to New Zealand from Visa Waiver countries.

Here are the requirements, as we (the conference committee) understand them - the usual "does not constitute legal advice" disclaimers apply:

1. If you are in one of the groups listed on Immigration New Zealand's [Travelers who do not need an NZeTA](https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/about-visa/nzeta#https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/tools-and-information/your-journey-to-new-zealand/before-you-travel-to-new-zealand/travellers-who-do-not-need-nzeta/slider) page: no worries, you can just turn up;

2. If you are travelling on a passport meeting the conditions listed on the New Zealand [Visa Waiver Countries](https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/tools-and-information/general-information/visa-waiver-countries) page: You will need to obtain a **[New Zealand Electronic Travel Authority (NZeTA)](https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/about-visa/nzeta)**;

3. If you are travelling on any other passport, you will need to apply for a visa to visit New Zealand:

    a. If you are visiting New Zealand, and will *attend* the conference and/or a training class as part of your visit, you should be able to travel on a **[Visitor Visa](https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/about-visa/visitor-visa)**. This should be true, even if you are presenting a talk at the main conference, because speakers do not receive compensation.

    b. For those visiting New Zealand to *present* a training class, we have been made aware of conflicting information provided by Immigration New Zealand staff and embassy officials. Some trainers have been advised they can come to New Zealand on a **[Business Visitor Visa](https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/about-visa/business-visitors-visa)**, while others have been informed they must apply for a **[Specific Purpose Work Visa](https://www.immigration.govt.nz/new-zealand-visas/apply-for-a-visa/about-visa/specific-purpose-or-event-work-visa)**. The latter visa requires more documentation, and takes longer to process, so please plan accordingly.

If you're unsure what travel documentation you need, we highly recommend you [contact Immigration New Zealand](https://www.immigration.govt.nz/contact) early.

branch_name: refs/heads/master


text:
DockingHost
===========

The DockingHost project is a little framework for dockable forms.

The source is written as a draft, so you can integrate it into your project at once.
Only the MainForm.pas is written as an example showing how to use the framework.

HowTo
-----
The only thing you have to do is to inherit the main-form of your own project from the
DockHost.pas (have a look on the MainForm.pas, it shows how this is done).

repository: egroups/DockingHost

repo_name: egroups/DockingHost


text:
# ios-appsflyer-mopicker-sample-app

Mopicker is a sample app, that has been written in native Swift programming language using SwiftUI and Combine frameworks in order to demonstrate the AppsflyerSDK implementation.

# Launching the project

#### To launch the project in limited functionality mode with AppsFlyerSDK, please, follow next steps:

1) Clone the repository or download it as a .zip archive;
2) Go to the cloned or unarchived project directory using terminal and run `pod install` command. If this command is unavailable to you, please install Cocoapods dependency manager (https://cocoapods.org/).
3) To be able to test AppsFlyer SDK, open the `mopicker-sample-app.xcworkspace` file, go to `Assets/Info.plist` and add your __af_dev_key__ and __af_app_id__ (Appendix 1).

**_Appendix 1_**

#### In order to launch the project in full-mode with Firebase authentification and Google Sign-in features, please do the following after completing first three steps:

4) Create projects in Google and Firebase dashboards to see the data flow in consoles, after launch of full-mode application  (https://firebase.google.com/, https://developers.google.com/identity/sign-in/ios);
5) Open the __Info.plist__ file and add your __google_client_id__ (Appendix 1) and add your __REVERSED_CLIENT_ID__ to the url-scheme as it is described in (https://developers.google.com/identity/sign-in/ios/sdk) in order to activate **Google Sign-In**;
6) To enable **Firebase** in the app you should remove existing `GoogleService-Info.plist` file in `Assets` folder and add your own file to the project navigator, which you will recieve after creating a project in Firebase Console (https://console.firebase.google.com/)(Appendix 2);

**_Appendix 2_**

7) Go to the `AppConstants.swift` file and change `var isOpenSource` property to `false`;

_**NOTE:** If you change the app to the open source and do not provide Firebase of Google Sign-in identifiers, the app will crash._


text:
# Personal Portfolio and Blog of Ryosuke

A personal portfolio and blog created with the [GatsbyJS](http://gatsbyjs.org/docs/) framework to generate a static React powered website. It's lightning fast, SEO and PWA friendly, and deploys directly to a CDN like Github Pages or [Netlify](http://netlify.com).

This is a JavaScript alternative to the static site generator solutions written in [Go](https://gohugo.io) or [Ruby](https://jekyllrb.com/). It's also more fleshed out than the Gatsby Starter Blog with features like blog archives, image handling, SEO optimization, and a few more.

## Structure

* Home
* Projects
* * Pagination Archive
* Blog
* * Pagination Archive
* Tags
* * Tag Archives
* About

## Post Format / Fields

```markdown
---
title: Deploy a Static React Blog using GatsbyJS and Github
date: "2018-03-21"
section: blog
cover_image<EMAIL_ADDRESS>tags: [ 'design', 'development', 'react', 'github', 'gatsbyjs', 'ssg', 'static site generator' ]
---

Your post here
```

* Section can be `blog` or `project`.
* Tags must be array
* Body content can include Markdown or HTML.

## Plugins

### Codepen

To embed Codepen modules, just copy the embed code and remove the JS script that gets imported.

### [Twitter](https://www.gatsbyjs.org/packages/gatsby-plugin-twitter/?=)

Seamlessly embed Tweets into posts by copying the blockquote portion of the embed code to your Markdown file. Don't copy the linked JS file, the plugin handles that automatically.

### [Manifest](https://www.gatsbyjs.org/packages/gatsby-plugin-manifest/?=)

Configure in `gatsby-config.js`.

### [RSS Feed](https://www.gatsbyjs.org/packages/gatsby-plugin-feed/?=)

Configure in `gatsby-config.js`.

## Development

Running on GatsbyJS, an SSG that creates static React apps.

1. `npm install`
2. `npm run develop`

## Deployment

### Github Pages

We locally build the files, then deploy using an NPM script that updates a specific Git repo branch called `gh-pages`.

To enable this, just initialize a git repo in the project, commit your changes, and add your Github repo as a remote repo. Make sure to label the remote as `origin`, otherwise the Gatsby deploy won't know which repo to push to.

**Deploy site to `origin` remote repo:**

`npm run deploy`

#### Creating or editing content

1. `git pull` from remote origin to ensure you have the latest posts and to merge any conflicts.
2. Add a new folder to `src/content/projects` or `src/content/blog` named after your post. This will be converted to the slug of the article -- you don't need to 'kebab-case' your title, but keep the format in mind.
3. Create a Markdown file in the folder. Make sure to use previous files as a template to include all the appropriate fields (listed above).
4. Fill out the post, make sure to include a cover image (see next step for handling images)
5. For any images, include them in the same folder as the post's Markdown and link locally using `<img src="./my-image.jpg" />`.
6. Run `npm run deploy` in the project root to deploy to Github Pages.

### Netlify

This site is also capable of deploying on Netlify. Simply login to Netlify, create a new app, and point to this repository. Follow the steps, make sure Netlify is running `gatsby build` and pointing to the `/public` directory. This also allows you to use the Netlify CMS, since it requires a server for OAuth2 support and hosting on Netlify allows you re-build on each edit (rather than building from you personal machine and deploying from there).

## Credits

* [GatsbyJS](http://gatsbyjs.org)
* [ReactJS](http://reactjs.org)
* Icons by [Davide Pacilio](https://dribbble.com/Davide86)

repository: whoisryosuke/ryosuke-gatsby-blog

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: whoisryosuke/ryosuke-gatsby-blog


text:
# ng-onload
Binds Angular.js scope function to given HTML elements onload event; for example, iframe.

There is no direct way of binding angular to elements onload event as commonly the HTML elements `onload=""` attribute looks into the JavaScripts global name space (window.*) which is a big no-no. It used to be the norm back in the day of how to do things but with modern frameworks like AngularJs and the such the approach has changed a lot.

This is just one example (and by no means the only way) of how to get Angular behave nicely with HTML elements onload event. As `<iframe onload="test()">` looks into window.test for a callback we need to bound the onload event to look into provided angular scope for the callback.

### Installation

    bower install ng-onload --save

### Usage - TL;DR
Super short version of how to use the ng-load directive in your Angular application.

    // Include it in Angular as per
    angular.module("magicalRocketUnicornApplication", [ "ngOnload" ])

    // After that it's ready to rock - Usage in HTML
    // Please note the use of 'contentLocation' variables, it's a named property and this way it provides the 'location' of the IFrame to the callback

### Usage
A longer example with some other Angular content included that you'll normally have in your Angular.js application.

application.js:

    // Creating magical Angular application to solve problem X
    angular
        .module("magicalRocketUnicornApplication", [ "ngOnload" ])
        .controller("UnicornController", function($scope) {
            // This is the scope callback we are going to call when the elements
            // onload event triggers

            $scope.hello = function(contentLocation) {
                // contentLocation === iframe.contentWindow.location
                // it's undefined when contentWindow cannot be found from the bound element
                alert("Hello world!");
            };
        });

index.html:

    <!doctype html>

            <meta charset="utf-8">

## Other
You can find and example .html and how it's used inside the /test directory. There currently are no specific unit tests available but feel free to contribute.

Please note that the code is written in ES6 JavaScript which is then compiled to ES5 compatible JavaScript and the compiled + uglified result can be found from `/release/ng-onload.min.js`.

This small angular directive started from my old GIST: https://gist.github.com/mikaturunen/f0b45def06bc83ccea9e

## FAQ

#### 1

Q. iframe location does not work! It's undefined!

A. It does. It has been fixed and it explicitly takes advantage of `named properties` and that's some dark magic right there. Look at the `test/index.test.html` to see it in action.

repository: gikundi/vesselwinescommercepro

repo_name: gikundi/vesselwinescommercepro


text:
# employee-record

An element providing a starting point for your own reusable Polymer elements.

## Dependencies

Element dependencies are managed via [Bower](http://bower.io/). You can
install that via:

    npm install -g bower

Then, go ahead and download the element's dependencies:

    bower install

## Playing With Your Element

If you wish to work on your element in isolation, we recommend that you use
[Polyserve](https://github.com/PolymerLabs/polyserve) to keep your element's
bower dependencies in line. You can install it via:

    npm install -g polyserve

And you can run it via:

    polyserve

Once running, you can preview your element at
`http://localhost:8080/components/employee-record/`, where `employee-record` is the name of the directory containing it.

## Testing Your Element

Simply navigate to the `/test` directory of your element to run its tests. If
you are using Polyserve: `http://localhost:8080/components/employee-record/test/`

### web-component-tester

The tests are compatible with [web-component-tester](https://github.com/Polymer/web-component-tester).
Install it via:

    npm install -g web-component-tester

Then, you can run your tests on _all_ of your local browsers via:

    wct

#### WCT Tips

`wct -l chrome` will only run tests in chrome.

`wct -p` will keep the browsers alive after test runs (refresh to re-run).

`wct test/some-file.html` will test only the files you specify.

## Yeoman support

If you'd like to use Yeoman to scaffold your element that's possible. The official [`generator-polymer`](https://github.com/yeoman/generator-polymer) generator has a [`seed`](https://github.com/yeoman/generator-polymer#seed) subgenerator.

repository: Polymer/polycasts

repo_name: Polymer/polycasts


text:
[![Build Status](
https://travis-ci.com/nickrusso42518/narc.svg?branch=master)](
https://travis-ci.com/nickrusso42518/narc)

[![published](
http://cs.co/codeex-badge)](
https://developer.cisco.com/codeexchange/github/repo/nickrusso42518/narc)

# Nornir/Netmiko ASA Rule Checker
This simple program uses the Cisco ASA `packet-tracer` utility to test traffic
flows across the firewall. On a per-ASA basis, users specify a list of
simulations in YAML or JSON format. This program returns the result of those
tests in a variety of formats. Both IPv4 and IPv6 are supported.

This project has limited functionality on Cisco Firepower Threat Defense
(FTD) as the `packet-tracer` utility is available in FTD. **FTD support is
experimental and is not particularly stable nor extensively tested.**

> Contact information:\
> Email<EMAIL_ADDRESS>> Twitter:  @nickrusso42518

  * [Installation](#installation)
  * [Components](#components)
  * [Variables](#variables)
  * [Validation](#validation)
  * [Output Formats](#output-formats)
  * [Other Options](#other-options)
  * [Limitations](#limitations)
  * [Testing](#testing)

## Installation
Follows these steps to get started. This assumes you have Python 3.6 or
newer already installed, along with `pip` for Python package management:
  1. Clone the repository: `git clone https://github.com/nickrusso42518/narc.git`
  2. Create a new virtual environment (venv): `python3.6 -m venv ~/narc`
  3. Activate the new venv: `source ~/narc/bin/activate`
  4. Install packages into the venv: `pip install -r requirements.txt`
  5. Type `make` and ensure all tests pass. See "Testing" for more details.

## Components
This project is built on two powerful Python-based tools:
  1. [Nornir](https://github.com/nornir-automation/nornir),
     a  task execution framework with concurrency support
  2. [Netmiko](https://github.com/ktbyers/netmiko),
     a library for accessing network device command lines

Below is a diagram of the high-level architecture. The text of this README
explains all the individual components, including those not shown.
![High-level Architecture](img/narc.jpg)

## Variables
The `host_vars/` directory contains individual YAML files, one per ASA, that
contain a list of dictionaries named `checks`. Using Nornir for concurrency
and Netmiko for SSH-based device access, the tool issues a `packet-tracer`
command for each check. The data is returned as XML which is easily converted
into Python data structures for further processing. To keep things simple for
users, XML is never exposed outside of the program (see "Output Formats").
An example file might be `host_vars/asa1.yaml`, which is shown below.

```
---
checks:
  - id: "DNS OUTBOUND"
    in_intf: "inside"
    proto: "udp"
    src_ip: "<IP_ADDRESS>"
    src_port: 5000
    dst_ip: "<IP_ADDRESS>"
    dst_port: 53
    should: "allow"
  - id: "HTTPS OUTBOUND"
    in_intf: "inside"
    proto: "tcp"
    src_ip: "<IP_ADDRESS>"
    src_port: 5000
    dst_ip: "<IP_ADDRESS>"
    dst_port: 443
    should: "allow"
  - id: "SSH INBOUND"
    in_intf: "management"
    proto: "tcp"
    src_ip: "fc00:192:0:2::2"
    src_port: 5000
    dst_ip: "fc00:8:8:8::8"
    dst_port: 22
    should: "drop"
  - id: "PING OUTBOUND"
    in_intf: "inside"
    proto: "icmp"
    src_ip: "<IP_ADDRESS>"
    icmp_type: 8
    icmp_code: 0
    dst_ip: "<IP_ADDRESS>"
    should: "allow"
  - id: "L2TP OUTBOUND"
    in_intf: "inside"
    proto: 115
    src_ip: "<IP_ADDRESS>"
    dst_ip: "<IP_ADDRESS>"
    should: "drop"
...
```

You can also use JSON format, which may bring better performance when `checks`
is very large. If both `.json` and `.yaml` files exist for a given host, the
JSON file is given preference and the YAML file is ignored. If neither file
is specified, the Nornir task raises a `FileNotFoundError`.

You can use the IP protocol number (1-255) or the protocol name, assuming the
ASA supports it. Currently, only the names `icmp`, `tcp`, and `udp` are
supported. For `icmp`, you must specify the `icmp_type` and `icmp_code`.
For `tcp` or `udp`, you must specify the `src_port` and `dst_port`. For
all other protocols, you only need to specify the `src_ip` and `dst_ip`.
If you specify protocol number of `6` instead of `tcp`, this script will treat
it as a `rawip` packet, which can be desirable for generalized TCP testing
if you want to omit ports. The same is true for UDP (17) and ICMP (1).

Note that it is uncommon for firewalls to filter traffic based on source port.
The `packet-tracer` utility **requires** specifying a value. Additionally, the
`id` key is useful for documentation to describe each check. This string
is also displayed in some of the output format styles.

## Validation
Each individual `check` dictionary is checked for validity. The
following checks are performed on each check:
  * All required keys are present: `id in_intf proto should src_ip dst_ip`.
    These keys are required regardless of the check type.
  * `should` is `"allow"` or `"drop"`
  * All conditional keys are present
    * `src_port` and `dst_port` for TCP/UDP
    * `icmp_type` and `icmp_code` for ICMP
  * `src_ip` and `dst_ip` are valid IPv4 or IPv6 addresses
  * `src_ip` and `dst_ip` are using the same IP version (both v4 or both v6)
  * `src_port` and `dst_port` are integers in the range 0-65535 when present
  * `icmp_type` and `icmp_code` are integers in the range 0-255 when present
  * `proto` is one of the following:
    * A string equal to `"tcp"`, `"udp"`, or `"icmp"`
    * An integer in the range 0-255 (uses the `rawip` ASA protocol option)

Once the individual checks are validated, one final test ensures
that there are no duplicate `id` fields across any checks.

## Output Formats
In the past, this program gave the user many options regarding formats. Those
options are gone, replaced by the following actions.
  1. A terse, text-based output is written to a file named `outputs/result.txt`
     The format is: `{host} {check id} -> {PASS or FAIL}`
     The final field measures whether the actual result matched the intended
     result. Rules that have `should: allow` that actually result in `ALLOW`
     receive a `PASS`. Rules with `should: drop` that actually `DROP` also get a
     `PASS`. Any other combination receives a `FAIL`, indicating a mismatch
     between intent and reality.
  2. To provide additional detail, a CSV-formatted string is written to a file
     name `outputs/result.csv`. This option displays a superset of the data in
     the "terse" format. The output includes column headers as well,
     simplifying shell redirection to output files. The command
     below is a handy way to view CSV files from the shell (use arrows to pan):
     `column -s, -t outputs/result.csv | less -S`
  3. Finally, the program returns the results as structured data in
     JSON format to `outputs/result.json`. This data is largely unchanged,
     with the exception of wrapping all of a given host's results under a
     subdictionary with a key equal to the check `id` field. Note that
     this output is verbose and explains every processing phase of the
     firewall for a given simulation.

## Other Options
To improve usability, the tool offers some command-line options:

  * To reduce the output generated, users may opt to only see the failures. Use
   `-f` or `--failonly` to apply this filter, which is handy on large
   `check` lists. Note that this affects the terse, CSV, and JSON formats.
  * Some users prefer to see status updates as the script runs. Use
    `-s` or `--status` to enable logging to `stdout` in the following format:
    `{hostname}@{utc_timestamp}: {msg}`

Here are some example outputs to demonstrate these options.

```
$ python runbook.py && cat outputs/result.txt
ASAV1        DNS OUTBOUND             -> FAIL
ASAV1        HTTPS OUTBOUND           -> PASS
ASAV1        SSH INBOUND              -> PASS
ASAV1        PING OUTBOUND            -> PASS
ASAV1        L2TP OUTBOUND            -> PASS
ASAV2        DNS OUTBOUND             -> PASS
ASAV2        HTTPS OUTBOUND           -> FAIL
ASAV2        SSH INBOUND              -> PASS
ASAV2        PING OUTBOUND            -> PASS
ASAV2        L2TP OUTBOUND            -> PASS

$ python runbook.py --failonly && cat outputs/result.txt
ASAV1        DNS OUTBOUND             -> FAIL
ASAV2        HTTPS OUTBOUND           -> FAIL

$ python runbook.py --status
ASAV1@2019-12-31T18:37:57.975656: loading YAML vars
ASAV1@2019-12-31T18:37:57.978265: loading vars succeeded
ASAV1@2019-12-31T18:37:57.978427: starting  check DNS OUTBOUND (1/5)
ASAV2@2019-12-31T18:37:57.978814: loading JSON vars
ASAV2@2019-12-31T18:37:57.978965: loading vars succeeded
ASAV2@2019-12-31T18:37:57.979099: starting  check DNS OUTBOUND (1/5)
ASAV1@2019-12-31T18:38:03.976345: completed check DNS OUTBOUND (1/5)
ASAV1@2019-12-31T18:38:03.976397: starting  check HTTPS OUTBOUND (2/5)
ASAV2@2019-12-31T18:38:04.076485: completed check DNS OUTBOUND (1/5)
ASAV2@2019-12-31T18:38:04.076538: starting  check HTTPS OUTBOUND (2/5)
ASAV1@2019-12-31T18:38:04.578326: completed check HTTPS OUTBOUND (2/5)
ASAV1@2019-12-31T18:38:04.578377: starting  check SSH INBOUND (3/5)
ASAV2@2019-12-31T18:38:04.678691: completed check HTTPS OUTBOUND (2/5)
ASAV2@2019-12-31T18:38:04.678740: starting  check SSH INBOUND (3/5)
ASAV1@2019-12-31T18:38:05.180719: completed check SSH INBOUND (3/5)
ASAV1@2019-12-31T18:38:05.180774: starting  check PING OUTBOUND (4/5)
ASAV2@2019-12-31T18:38:05.280919: completed check SSH INBOUND (3/5)
ASAV2@2019-12-31T18:38:05.280967: starting  check PING OUTBOUND (4/5)
ASAV1@2019-12-31T18:38:05.782703: completed check PING OUTBOUND (4/5)
ASAV1@2019-12-31T18:38:05.782752: starting  check L2TP OUTBOUND (5/5)
ASAV2@2019-12-31T18:38:05.883009: completed check PING OUTBOUND (4/5)
ASAV2@2019-12-31T18:38:05.883055: starting  check L2TP OUTBOUND (5/5)
ASAV1@2019-12-31T18:38:06.384632: completed check L2TP OUTBOUND (5/5)
ASAV2@2019-12-31T18:38:06.485029: completed check L2TP OUTBOUND (5/5)
```

## Limitations
To keep things simple (for now), the tool has some limitations:
  1. Only source and destination IP matches are supported.
  2. All YAML var files must use `.yaml`, not `.yml`, as their
     file extensions. This minimizes Nornir modifications.

## Testing
This project is extensively tested. All testing conducted on
the following ASAv virtual appliance:
```
ASAV1# show version

Cisco Adaptive Security Appliance Software Version 9.12(2)
Firepower Extensible Operating System Version 2.6(1.141)

Hardware:   ASAv, 8192 MB RAM, CPU Xeon E5 series 2300 MHz, 1 CPU (2 cores)
Model Id:   ASAv10
```

### Regression
A GNU `Makefile` is used to automate testing with the following targets:
  * `lint`: Runs `yamllint` and `pylint` linters, a custom JSON linter,
    and the `black` formatter
  * `unit`: Runs unit tests on helper functions via `pytest`.
  * `dry`: Runs a series of local tests to ensure the code works. These
    do not communicate with any ASAs and are handy for regression testing
  * `clean`: Deletes any artifacts, such as `.pyc`, `.log`, and `output/` files
  * `all`: Default target that runs the sequence `clean lint unit dry`

### Performance
It is unlikely that this project will be run on a large number of inventory
devices. That is, the number of ASAs in scope is likely to be small. However,
the length of the `checks` list for each ASA is likely to be large, especially
for more complex rulesets. The outputs below provide some "wall clock"
completion times for a variety of `checks` list lengths. In general, the
intial `netmiko` connectivity and issuance of the first command takes about
5 seconds. Each subsequent command takes about 750 ms. Both of these
estimates assume very low latency (less than 5 ms) and only
using local authentication/authorization (no RADIUS/TACACS).

#### 10 checks, 1 host
Completed in approximately 10 seconds.
```
$ python runbook.py --status
ASAV1@2019-12-31T18:44:27.589602: loading YAML vars
ASAV1@2019-12-31T18:44:27.594586: loading vars succeeded
ASAV1@2019-12-31T18:44:27.594787: starting  check test0 (1/10)
ASAV1@2019-12-31T18:44:32.559337: completed check test0 (1/10)
(snip)
ASAV1@2019-12-31T18:44:37.377834: starting  check test9 (10/10)
ASAV1@2019-12-31T18:44:37.979797: completed check test9 (10/10)
```

#### 100 checks, 1 host
Completed in approximately 65 seconds (1 minute).
```
$ python runbook.py --status
ASAV1@2019-12-31T18:46:32.466578: loading YAML vars
ASAV1@2019-12-31T18:46:32.493279: loading vars succeeded
ASAV1@2019-12-31T18:46:32.494623: starting  check test0 (1/100)
ASAV1@2019-12-31T18:46:37.458609: completed check test0 (1/100)
{snip)
ASAV1@2019-12-31T18:47:36.459852: starting  check test99 (100/100)
ASAV1@2019-12-31T18:47:37.061772: completed check test99 (100/100)

```

#### 1000 checks, 1 host
Completed in approximately 607 seconds (10 minutes).
```
$ python runbook.py --status
ASAV1@2019-12-31T18:51:55.426311: loading YAML vars
ASAV1@2019-12-31T18:51:55.667978: loading vars succeeded
ASAV1@2019-12-31T18:51:55.681037: starting  check test0 (1/1000)
ASAV1@2019-12-31T18:52:00.645887: completed check test0 (1/1000)
(snip)
ASAV1@2019-12-31T19:02:01.469790: starting  check test999 (1000/1000)
ASAV1@2019-12-31T19:02:02.071796: completed check test999 (1000/1000)
```

#### 1000 checks, 2 hosts
Completed in approximately 607 seconds (10 minutes). Also notice that the
JSON variable loading with `ASAV2` took approximately 3 ms while the YAML
variable lodaing with `ASAV1` took approximately 300 ms. For rulesets with
thousands of items in the `checks` list, using JSON is recommended. Last,
so long as your Linux machine has enough CPU cores/sockets for each host,
additional hosts will not meaningfully impact completion times.
```
$ python runbook.py --status
ASAV1@2019-12-31T19:05:24.926371: loading YAML vars
ASAV2@2019-12-31T19:05:24.947493: loading JSON vars
ASAV2@2019-12-31T19:05:24.950366: loading vars succeeded
ASAV2@2019-12-31T19:05:24.962976: starting  check test0 (1/1000)
ASAV1@2019-12-31T19:05:25.223925: loading vars succeeded
ASAV1@2019-12-31T19:05:25.236867: starting  check test0 (1/1000)
ASAV2@2019-12-31T19:05:30.148560: completed check test0 (1/1000)
ASAV1@2019-12-31T19:05:30.199834: completed check test0 (1/1000)
(snip)
ASAV2@2019-12-31T19:15:30.996224: starting  check test999 (1000/1000)
ASAV1@2019-12-31T19:15:31.009734: starting  check test999 (1000/1000)
ASAV2@2019-12-31T19:15:31.598462: completed check test999 (1000/1000)
ASAV1@2019-12-31T19:15:31.623626: completed check test999 (1000/1000)
```

repository: an-maksimov/narc

repo_name: an-maksimov/narc


text:
Getting Started
===============

Use composer to install it by adding the following to your `composer.json` file.

``` bash
composer require henrikbjorn/lurker
```

And then run `composer update henrikbjorn/lurker` to get the package installed.

Tracking Resources
------------------

Lurker works by giving the resource watcher a tracking id which is the name of the event and a path to
the resource you want to track.

When all the resources have been added that should be track you would want to add event listeners for them so
your can act when the resources are changed.

``` php
<?php

use Lurker\Event\FilesystemEvent;
use Lurker\ResourceWatcher;

$watcher = new ResourceWatcher;
$watcher->track('twig.templates', '/path/to/views');

$watcher->addListener('twig.templates', function (FilesystemEvent $event) {
    echo $event->getResource() . 'was' . $event->getTypeString();
});

$watcher->start();
```

The above example would watch for all events `create`, `delete` and `modify`. This can be controlled by passing a
third parameter to `track()`.

``` php
<?php

$watcher->track('twig.templates', '/path/to/views', FilesystemEvent::CREATE);
$watcher->track('twig.templates', '/path/to/views', FilesystemEvent::MODIFY);
$watcher->track('twig.templates', '/path/to/views', FilesystemEvent::DELETE);
$watcher->track('twig.templates', '/path/to/views', FilesystemEvent::ALL);
```

Note that `FilesystemEvent::ALL` is a special case and of course means it will watch for every type of event.


text:
---
id: intro
title: Introduction
slug: /
---

# Introduction

Native HLDS or ReHLDS server doesnt have any stream method unlike CSGO to send game events to specific endpoint (there is remote logging, but information sended is sufficial).

So to make this project work we had to recreate that feature in AmxModX.

For connections we use TCP sockets, and full diagram of connections is like below.

![graph1](/img/tutorial/graph1.png)

repository: Counter-Strike-HUD/docs

repo_name: Counter-Strike-HUD/docs


text:
---
id: faq
title: Validator FAQ
sidebar_label: FAQ
---

## How do I make my full-node a validator?

A validator is added to the validator set by governance, so you cannot directly add your validator to the set.  Instead, run `curl --silent --fail 'http://localhost:16657/status' | jq -r .result.validator_info.pub_key.value` on your validator and submit the resulting 44 character pub_key to IOV via the ticket that was created when you applied for the validator program.  Once we have your validator's pub_key then governance will add it to the validator set.

## Why is my validator's voting_power only one when I see others with more than one?

IOV runs validator(s) with higher voting_power on testnets so that the chain doesn't get halted if other validators go offline.

## How do I create an address for IOV tokens?

Install the Neuma browser extension and then browse to https://wallet.neuma.io.

repository: iov-one/docs

gha_language: JavaScript

repo_name: iov-one/docs


text:
---
title: "Pmean: My teaching and research statement"
author: "Steve Simon"
source: "http://blog.pmean.com/teaching-and-research/"
date: "2018-04-02"
categories:
- Blog post
tags:
- Professional details
output: html_document
---

I am applying to a variety of jobs and some of them ask for a statement
about teaching or research. Here's something I wrote where the employer
asked for a combination of the two.

<!---More--->

## Teaching

I have taught in a wide range of non-traditional formats: short courses
at regional, national, and international conferences, and webinars for a
geographically diverse audience. Students in these classes have a choice
and will not tolerate a poorly taught class. I take it as validation of
my teaching quality that I have been re-invited over and over again to
give talks by the same organizations (American Society of Andrology, The
Analysis Factor, International Research Conference on Complementary
Medicine, Medical Library Association, Midwest Society of Pediatric
Research).

I don't have (and don't believe in) an overarching philosophy of
teaching. Good teaching comes from the little things, and I attribute my
teaching success to three little things: finding compelling examples,
using humor to make a point, and spending a large portion of my limited
teaching time on small group exercises. I also want to mention some of
the special challenges that I have faced with teaching in an online
(webinar) format.

## Compelling teaching examples

It takes a lot of time to find compelling teaching examples. They need
to be vivid and memorable. They need to reflect the practice of
statistics in the real world, but at the same time they need to avoid
obscure details that only specialists in an area can follow.

In a book chapter that I wrote for Big Data Analysis for Bioinformatics
and Biomedical Discoveries, I was faced with a challenge to find a
compelling data set to illustrate the R programming language in action.
Most data sets used in Bioinformatics, however, are narrowly focused and
require a fairly specialized knowledge to fully comprehend. I chose a
data set that had broader appeal and which was easily followed by anyone
with a reasonable medical background, Son et al. Database of mRNA gene
expression profiles of multiple human organs, Genome Res 2005.
15:443-450. This study took tissue samples from 19 different organs of
30 people (158 samples total) and fed them to a DNA microarray. This
provided expression levels of almost 19 thousand genes. This made the
data set large enough to qualify for a big data analysis. More
importantly, the comparison was concrete and easy to discuss. How does
gene expression differ in the heart versus the liver, or in the pancreas
versus the spleen? Also important to me was that the data used in Son et
al was freely available for download at the journal's website.

Another compelling data set is mortality on the Titanic, a large ocean
liner that in 1912 struck an iceberg and sunk. One of the first things
you might do with this data set is to calculate a two by two table of
gender versus survival. The Titanic sunk during an era where society
really did believe in the mantra "women and children first" though
perhaps more so among first and second class passengers. The
crosstabulation of gender and survival would look something like this.

```{}
{r titanic, echo=FALSE}
d <- list(c("Female", "Male"), c("No", "Yes"))
ti <- matrix(c(154, 709, 308, 142), 2, 2, dimnames=d)
print(ti)
```

You can bring these numbers to life by pointing out that Kate Winslet
was in the upper right corner of the 308 women who survived and that
Leonardo DiCaprio, sadly, was in the lower left corner of the 709 men
who died. The data set has an interesting feature: the relative risk of
death is 2.5 times higher for males than females, but the odds ratio is
much higher, almost 10. It also allows you to study a rather complex
interaction of gender and passenger class. I've used the Titanic data
set in a tutorial article about measures of risk (Simon SD.
Understanding the odds ratio and relative risk. J Androl. 2001.
22(4):533-6), in a short course on logistic regression, and for some of
the homework assignments in the Introduction to R, Introduction to SAS,
and Introduction to SPSS classes. I take as validation of this approach
the fact that other groups (most notably Kaggle) have also adopted the
Titanic as an instructional data set.

Compelling examples are not limited to data sets. In my book,
Statistical Evidence in Medical Trials, I talk about blinding with
specific attention to blinding in surgical trials. Surgery is easily
understood: you cut someone open, take something out, and sew them back
up again. But it requires special challenges to ensure blinding, such as
the use of extra large bandages to cover up the size of the incision. I
make special reference to a study of Parkinson's Disease where fetal
cells were injected directly into the brain. The study had a control
group, and in order to maintain the blind, the control patients also had
their heads shaved, were put under an anesthetic, and the surgeons
actually drilled into their skulls. The only difference was that nothing
was injected after drilling if you were in the control group. Needless
to say, this was a highly controversial study with one ethical expert
writing a critical article with the title "I Need a Placebo Like I Need
a Hole in the Head." The gruesome thought of skull drilling makes this
example memorable.

There is no more compelling example relating to research methodology
than the efforts to find a treatment for AIDS. Controversies surrounding
AIDS research has changed the way we approach research today. When I
lecture about surrogate outcomes, it is easy enough to come up with
examples where reliance on surrogate outcomes has led us astray. The
classic example is the CAST trial which showed that the use of
anti-arrythmic drugs in patients with heart rhythm problems actually led
to an increase in mortality versus placebo. It is harder to find
examples where reliance on surrogate outcomes has helped us. AIDS
trials, however, do clearly illustrate the value of surrogate outcomes.
In the first studies of anti-retroviral treatments for AIDS patients,
scientists originally advocated the use of "hard" endpoints like
mortality and opportunistic infections. But AIDS advocates pushed for
surrogate outcomes like changes in CD4 cell counts because hard
endpoints took too long and required waiting until you had accumulated a
sufficient number of bad events in the untreated group. It is clear that
reliance on surrogate outcomes reduced the number of deaths in the
clinical trial itself and allowed much earlier FDA approval of these
treatments.

## Using humor to make a point

My audiences are often apprehensive. Will this guy speak a lot of Greek
and formulas to me? A bit of humor very early in the talk will often
allay some of those fears. I try hard, however, to use humor as well to
make a point. Humor comes from an exaggeration of a basic idea to levels
of absurdity, which you can use profitably to emphasize your basic idea
later in your talk.

In a lecture on sample size justification for a short course on grant
writing, I started with a (fictional) story of a researcher who gets a
six year, ten million dollar NIH grant and writes up a report
summarizing the research saying "This is a new and innovative surgical
approach and we are 95% confident that the cure rate is somewhere
between 3% and 98%." This becomes a repeated touchstone for the rest of
the talk. The agency that you are seeking to get grant money from wants
some assurance that the results will be informative when you finish your
work, and not a confidence interval that goes from 3% to 98%.

The previous joke is an original of mine, but I'm not above stealing
other people's jokes. There is a classic about two statisticians
travelling on an airplane and one engine after another explodes. After
each explosion, the pilot announces that everything is okay, but the
flight is delayed further and further after each explosion. After the
third explosion, one statistician turns to the other and say "Boy I hope
that last engine doesn't explode" [dramatic pause] "or we'll be up
here forever!". I use this joke when I teach linear regression, because
it illustrates a dangerous extrapolation beyond the range of observed
data. Later, I introduce the intercept term and offer an interpretation
(the estimated average value of Y when X equals zero). Then I point out
that such an interpretation is a dangerous extrapolation when you have
no data near the value X=0. In fact,the estimated travel time of a jet
with X=0 engines is also an intercept term requiring the exact type of
dangerous extrapolation.

I also use humor to assess my audience as well. At the very start, I'll
tell a corny joke about degrees of freedom (a joke so bad that I won't
repeat it here). I look at who laughs and who doesn't. When most of my
audience laughs, I compliment them by telling them that if you
understood that joke, you won't have any problems with the rest of my
lecture. When most of my audience is quiet, I tell them that they are
going to learn a lot today (and I teach things a bit more slowly).

Humor can be overdone, and students are not listening to you for
entertainment. I try to keep my jokes short and get them out of the way
early. But a little bit of humor does seem to help a lot.

 I really hate them. When you are
giving a short course at a research conference, you have a limited time
frame, usually three to four hours. Small group exercises can easily eat
up a third to a half of that time. I'd much rather be talking because
there's so much to teach and so little time. Even so, I include small
group exercises in almost all my short courses. The feedback I have
gotten from students has been that the small group exercises are the
best part of the class.

Constructing a small group exercise is not easy. You have to find a
problem that students can tackle, so it can't be too hard, but it has to
be challenging enough to force them to use some of the things they have
just learned. It has to be something that everyone in the group feels
that they can contribute. And it has to be something that each small
group can summarize to the entire class in five minutes or less.

The reason that small group exercises work is that students have a
variety of different experiences and can learn from each other. The more
experienced students benefit because they have to understand the
concepts at a higher level in order to articulate these concepts to the
rest of the group. The less experienced students benefit because they
get a chance to hear about the same concepts a second time and from a
different perspective.

In the short course on grant writing, we gave each group a different
research paper (actually, just the abstract from the paper) and asked
them to suggest a new study with a different research design that builds
on the paper's findings and that an agency might want to fund. Showing
just the abstract is a big no-no in Evidence Based Medicine, but we
apologized and explained that if we handed them a full paper they would
run out of time before they even finished the research paper. Each group
then appointed a spokesperson to summarize the original paper (just the
PICO: Patient group, Intervention, Comparison group, and Outcome
measure) and then propose their new research design. Once the
spokesperson was done, we asked if anyone else in the small group wanted
to add anything and opened it up for comments and questions by the other
students. Getting our students to visualize a new research study was one
of the big successes of our short course.

In a short course on setting up an independent statistical consulting
practice, I was actually able to get two small group exercises squeezed
into a four hour format. The first exercise was pairing up students and
asking them to share with their partner where they hoped to be five
years from now. This served as an ice breaker and got students to think
about what a career as a consultant might mean for them. The second
small group exercise took some fictional accounts (loosely based on
reality) of bad client interactions. The groups had to decide on the
best course of action, and this quite honestly might involve just
walking away from the project completely, an option that is always
available to an independent consultant. The short time frame did not
allow each group to summarize their findings to the rest of the class,
but the students still found the small group exercises to be valuable.

In a short course, Statistics for Medical Librarians, that I have taught
in an online format and at multiple regional and national meetings of
the Medical Library Association, I used small group exercises to dissect
statistics found in actual peer-reviewed publications. I teach concepts
like confidence intervals, provide a non-technical interpretation, and
then ask students to do the same in small groups. I show them actual
papers (actually abstracts again to save time) that show how a
confidence interval might look "in the wild." Then each group has to
summarize the abstract using a PICO format and then interpret the
highlighted confidence interval in that abstract. All of the abstracts
that I choose are from Open Source journals so the librarians can track
down the full articles after the class ends, if they are so inclined.

## Online teaching

I wanted to mention a bit about the special challenges associated with
online teaching, because I see a transition to online teaching almost
everywhere I look. I have done webinars, a form of online training, for
several several organizations. I've learned a lot from these webinars,
though they are not the same as teaching a semester long class in an
online format.

One lesson I have learned is that you have to work much much harder at
establishing a rapport with your students. In every webinar I have
taught, I do not have the option of requiring the students to make
themselves visible on a webcam, and only in a few did I have the option
of having students ask questions orally rather than through a chat box.
This makes the webinars less fun, quite frankly, than a short course
taught to a live audience. But I have embraced the webinar format
because it allows the participation of a large number of students who
are otherwise geographically isolated.

To make up for not seeing and often not hearing the students, I try to
make myself seen--using my own webcam when possible. I also take extra
time to more directly encourage student participation. It starts with a
joke. I introduce the joke with an exhortation. It is difficult, I point
out, to say something funny and then hear total silence on the other
end, so I after I tell this joke, I want you to type something in the
chat box. A "haha" if you liked the joke or a "groan" if you hated it.
Then I read the chorus of responses after the joke. It reinforces the
connection between me and my audience and it lowers the barrier for
students to use the chat box later for more serious comments.

When you ask for questions during a webinar, you need to wait long
enough for people to type their questions. And you need to follow up
your answer with another exhortation "Did that make sense" because you
don't get the feedback from the knowing nods or the glazed eye
confusion.

A webinar format demands a good Powerpoint presentation. I do not always
use Powerpoint for live talks and short courses and subscribe to the
admonition of many that "Powerpoint is Evil." For a webinar, however, if
you don't give students a Powerpoint slide to look at, it makes it that
much harder to keep a student's attention.

I've taught two traditional courses (Introduction to R and Introduction
to SPSS) in an online format. These are in an asynchronous format.
Students listen to mp4 files where you lecture and show Powerpoint
slides and live screen shots of R and SPSS as those programs grind
through their computations. The one issue I've noticed with the
asynchronous format is that if one student asks a question, the other
students would not normally get to benefit from hearing that question
and hearing my response. They also lose out on the opportunity to add
something to my answer if they can. So it is very important to share
questions and answers that otherwise would only come to you privately
via email.

Neither Introduction to R nor Introduction to SPSS lends itself well to
small group exercises, but I do recognize by watching others at my
current job that small group exercises take a much different form in an
online format. In particular, they require much more written
communication than oral communication, and the effort, especially for an
asynchronous format, is spread out over a longer time frame. This can
actually be an advantage because you need to explain yourself more
clearly in a written format and the slower pace encourages more thought
as well.

No doubt that I will encounter other issues as I teach more classes in
an online format. I learned a lot about online teaching at various talks
at the Joint Statistical Meetings, and plan to keep my eyes and ears
open for other people's experiences.

## Research

My best research efforts have been collaborative. I feel like these
efforts represent something that neither I nor my co-authors could have
developed by ourselves. I've had many wonderful research collaborations
over the years. I want to highlight two of them: patient accrual in
clinical trials and with mining information from the electronic health
record. I also need to describe my efforts to help others be successful
in their research endeavors.

## Patient accrual

In 2006, I gave a journal club presentation on how to use control charts
to monitor the process of patient accrual in a clinical trial. Too many
studies, I hate to say, fail to meet their sample size requirements
because researchers grossly underestimated the amount of time it would
take to recruit patients. I discussed this control chart in the context
of a clinical trial, but it really applies to any prospective research
study that collects data from human volunteers.

Byron Gajewski, one of the other faculty members at the journal club,
suggested that this problem might be better solved with a Bayesian
approach. That turned my research around 180 degrees but it was worth
it. His suggestion led to a very profitable avenue of research for the
two of us.

The beauty of a Bayesian approach is that it requires the specification
of a prior distribution. The prior distribution represents what you know
and what you don't know about how quickly volunteers will show up on
your doorstep asking to join your study. You can think of the prior
distribution as a way to quantify your ignorance. You choose a very
broad and variable prior distribution if you know very little about
accrual patterns. This might be because you're new to the area, you're
using a novel recruiting approach, and/or there's very little experience
of others that you can draw upon. You choose a very narrow and precise
prior distribution if you've worked on this type of study many times
before, your recruiting techniques are largely unchanged, and/or there's
lots of experience of others that you can draw upon. What you don't do,
even if you are very unsure about accrual, is to use a flat or
non-informative prior. A flat prior would be like admitting "I don't
know: the study might take ten weeks or it might take ten years and I
think both possibilities are equally likely." Someone with that level of
ignorance would be unqualified to conduct the research.

The very act of asking someone to produce a prior distribution will
force them to think about accrual, and that in and of itself is a good
thing. But the advantage of specifying a prior shows during the trial
itself. As the trial progresses you get actual data on the accrual rate,
and you can combine that with your prior distribution, as any good
Bayesian would, to get an updated estimate of how long the trial will
take. Here is where the precision of the prior distribution kicks in. If
you have a broad prior with high variance, then even a little bit of bad
news about accrual during the trial itself will lead to a drastic
revision in your estimated time to complete the trial. You will act
quickly, either by adding extra centers to a multi-center trial, hiring
an extra research co-ordinator to beat the bushes for volunteers, or (if
the news is bad enough) cutting your losses by ending the trial early
for futility. If you have a narrow prior with low variance, then you've
done this trial often enough that you don't panic over a bit of bad
news. If the data keeps coming in and it shows a much slower accrual
rate than you expected, then you will eventually reach a point where you
need to take action. But there's a cost associated with a premature
overreaction that a precise prior will protect you against.

Dr. Gajewski put one of his graduate student, Joyce Jiang, on the trail,
and she contributed several additional publications after completing a
successful dissertation defense of her extensions in this area. I worked
very closely with Drs. Gajewski and Jiang, and found an interesting
theoretical contribution to Bayesian data analysis that was hidden in
their work.

One of the problems with getting researchers to produce a prior
distribution is that they sometimes are wrong--spectacularly wrong. If
you have a strong prior attached to a prior that is sharply at odds with
the actual accrual data, you'd like to find a way to discount that prior
distribution, but you'd like to keep that strong prior for the precision
it gives you when the prior and the actual accrual data agreed with one
another. They came up with a very clever solution. Attach a hyperprior
to the precision of the prior distribution. If the accrual data and the
prior are in sync, the precision stays high. But if there is a serious
discrepancy between the accrual data and the prior, the hyperprior
shifts and leads to a much weaker prior distribution.

I dubbed the method they proposed the hedging hyperprior, and suggested
that it might work in other Bayesian settings as well. It turns out to
be equivalent to the modified Power prior proposed by Yuyan Duan in
2006, but the formulation of the hedging hyperprior is both simpler and
more intuitive. I have presented a simple example applying the hedging
hyperprior to the beta-binomial model and am preparing a manuscript for
publication.

The work that Dr. Jiang did on her dissertation was not just limited to
the accrual problem but included an additional Bayesian application to a
validation model using expert opinion. The strength of her work in these
two areas led to her appointment to a post-doctoral fellowship at Yale
University. Dr. Gajewski and I continue to collaborate with her on these
models. We have four peer-reviewed publications and an R package so far,
and plan to collaborate with other researchers in this area.

Closely related to my research on patient accrual is an effort to audit
the records of Institutional Review Boards (IRBs). Too often,
researchers fail to obtain the sample size that they promised in the
original research protocol, mainly because subject recruitment takes
longer than expected. It is very easy to compare the protocol submitted
to the IRB to the final report. In the study of 135 submissions to one
IRB, more than half of the researchers failed to reach their enrollment
targets and the average shortfall was more than 50%. I have approached
many other IRBs to ask to replicate this work, but none have shown any
interest. But I plan to continue to ask anyone who works on an IRB to
help me.

## Mining the electronic health record

In January 2016, I was offered the opportunity to work on a research
grant funded by the Patient Centered Outcomes Research Institute.<U+00A0> The
grant supported the Greater Plains Collaborative, a consortium of ten
academic health care centers in the midwest. It was run out of
Enterprise Analytics, located at Kansas University Medical Center. I
jumped at the chance and dropped much of my other work to focus on this
grant.

My assignment, derived through discussions with the head of Enterprise
Analytics, Russ Waitman, was to develop a develop a phenotype of breast
cancer from information in the electronic health record (EHR) and
validate it against information in the breast cancer registry.

Such a phenotype would have great value in identifying patients for
prospective clinical trials. The advances in high throughput genome
sequencing and the linkage of that information with the EHR allows for
exploration of novel precision medicine options. Developing a phenotype
from the EHR is fraught with peril because information in the EHR on
basic issues like diagnoses and treatments is often coded
inconsistently. Having a link between the EHR and a tumor registry
provides an external validation of the accuracy the EHR phenotype.

The EHR at KUMC (and the other sites in the Greater Health
Collaborative) is stored in an Oracle database and is accessible through
an i2b2 system that is very easy to use. My work, however, required
access to the full database as well as some of the metadata. With the
help of Dr. Waitman and the SQL expert sitting across from me, Dan
Connolly, I was able to pull information directly from Oracle.

I used a big data model, LASSO regression, to predict whether a patient
was in the breast cancer tumor registry and set up sparse matrices as
input to better manage the size of the data sets. The breast cancer
cases were compared against three separate control groups and in spite
of the massive size of the independent variable matrix (more than 45,000
columns), this model ran in under ten minutes. The resulting sensitivity
and specificity were very high, putting to rest concerns that the EHR
data might be too incomplete or inconsistent to produce an accurate
phenotype. The LASSO regression model could easily be run for other
tumor types, and just as quickly validated. I have presented these
results at a local research conference and plan to submit a
peer-reviewed publication soon.

An interesting side effect of this research is also worth mentioning. I
had a passing knowledge of SQL prior to my work with Dr. Waitman and Mr.
Connally, but I had to quickly learn and apply a broad range of SQL
programming to get the data into R and the LASSO regression model. SQL
is a fairly easy language to learn, but many of the students in the
Bioinformatics program at UMKC do not have even a cursory knowledge of
SQL. So I am partnering with a database expert at UMKC to develop a new
class, Introduction to SQL, that will cover some of the basic skills
that an researcher would need to query data stored in a relational
database. This class is not intended to teach someone to become a
database administrator, but rather a competent user of other people's
databases. It will parallel to a large extent classes that I have
already helped develop and teach: Introduction to R, Introduction to
SAS, and Introduction to SPSS.

My work on the PCORI grant has been transferred a different grant and I
plan to work with partners at Truman Health Center and Children's Mercy
Hospitals to develop more research utilization of EHR at their
locations. I also have been asked to help develop an analytics platform
simplifies data mining of the EHR through a standardized library of
functions interfacing SQL databases and R. This library would pull
appropriate meta data descriptors as well, expanding the types of
analyses available to the end user.

## Helping others with research

I am a great believer in the Harry Truman quote "Anything is possible if
you don't care who gets the credit." A major portion of my career has
been helping others become successful researchers. This work is quiet,
behind the scenes, and often leads to very little recognition for me.
But I enjoy watching someone developed from a scared and timid person
starting out with their very first research study to someone who has
learned enough that now he/she is mentoring others.

A large part of my work is helping people who are struggling in their
graduate studies. It might be some extra tutoring for that seemingly
impossible statistics class. More often, though, it is guiding students
through the difficult process of writing and defending their
dissertation. I did this for free for doctors, nurses, and other health
care professionals that I worked with at Children's Mercy Hospitals and
Clinics. After I left that job, I started my own consulting business,
and I got lots of referrals to graduate students. They typically are
struggling with their disserations and with a dissertation committee
that was not giving adequate direction on the data analysis. For a
dissertation, you can't do the data analysis for them because they have
to be able to explain their work during the dissertation defense. You
have to teach them those things that they didn't pick up in their
earlier statistics class and teach them so thoroughly that they can
offer a clear and convincing presentation of the analysis that they ran.
You have to help them anticipate the types of questions that they might
get and how best to answer those questions. Perhaps the most important
thing is to get them a sense of self-confidence that they are working on
an important problem and that they have a solid and defensible plan for
solving that problem.

Another big portion of my work is helping people write their first
grant. The first grant is almost always for an amount too small to
support a statistician as a co-investigator. But these are the grants
that need to most help and support. I help with the research design, the
sample size justification, and the data analysis plan. But my work is
not just limited to that. If the specific aims are vague, if the
literature review rambles incoherently, or if the research budget is
unrealistic, I offer gentle suggestions to fix these problems. I try
very hard not to overstep my bounds; I don't know the science as well as
they do. But I can often provide valuable feedback by looking at things
from the perspective of an outsider who has seen hundreds of grants in
dozens of different scientific fields.

I've taken many classes in grant writing to better understand the whole
process and to improve my ability to work with new researchers. But
recently I have taught the classes myself. In 2012, I co-developed a
class in grant writing for researchers in Complementary and Alternative
Medicine with a prominent statistician working for what was then called
the National Center for Complementary and Alternative Medicine and with
another statistician working at a major college of Chiropractic
Medicine. We repeated this class in 2014 for the same conference. I
provided lectures on designing a pilot study, justifying your sample
size, and what a scientist should look for in a collaborating
statisticians. I gained the most benefit, however, by listening to the
lectures of the other statisticians. One of the best was a discussion
about insuring consistency between the specific aims, the research
design, the data analysis plan, and the budget. Another excellent talk
was on hiring a data manager and preparing a solid data management plan
(including budgets!).

When you include the small internal grants that provide seed money for
new researchers, I have helped write hundreds of grants, too many to
track. I do list those grants where I am on the budget, but these
represent just the tip of the iceberg.

Finally, I help new researchers navigate the daunting process of getting
Institutional Review Board (IRB) approval for their studies. At
Children's Mercy Hospital and Clinics, I was housed very close to the
people who ran the IRB and got to know them very well. It would have
been a conflict of interest for me to serve on the IRB, because I would
be reviewing protocols that I helped write. But I did work extensively
with the IRB, answering technical questions, accepting referrals from
researchers whose protocols had glaring problems with scientific rigor,
and providing training courses on ethical issues associated with
research. Statisticians, I believe, are key players in assuring the
ethical conduct of research. Often researchers are barred from the
optimal research design by ethical constraints and our job is to help
find an alternative design that meets the needs of the researcher while
still protecting the rights of the research volunteers.

repository: pmean/build-website

repo_name: pmean/build-website


text:
<!-- >>>>>> BEGIN GENERATED FILE (include): SOURCE includer.md -->
# Page Title

## Page Contents
- [Includer level-two title.](#includer-level-two-title)
  - [Includer level-three title.](#includer-level-three-title)
  - [Another includer level-three title.](#another-includer-level-three-title)
- [Another includer level-two title.](#another-includer-level-two-title)
- [Includee 0 level-two title.](#includee-0-level-two-title)
  - [Includee 0 level-three title.](#includee-0-level-three-title)
  - [Another includee 0 level-three title.](#another-includee-0-level-three-title)
- [Another includee 0 level-two title.](#another-includee-0-level-two-title)
- [Includee 1 level-two title.](#includee-1-level-two-title)
  - [Includee 1 level-three title.](#includee-1-level-three-title)
  - [Another includee 1 level-three title.](#another-includee-1-level-three-title)
- [Another includee 1 level-two title.](#another-includee-1-level-two-title)

## Includer level-two title.

### Includer level-three title.

### Another includer level-three title.

## Another includer level-two title.

<!-- >>>>>> BEGIN INCLUDED FILE (markdown): SOURCE markdown/use_cases/include_files/include_page_toc/markdown_0.md -->

## Includee 0 level-two title.

### Includee 0 level-three title.

### Another includee 0 level-three title.

## Another includee 0 level-two title.
<!-- <<<<<< END INCLUDED FILE (markdown): SOURCE markdown/use_cases/include_files/include_page_toc/markdown_0.md -->

<!-- >>>>>> BEGIN INCLUDED FILE (markdown): SOURCE markdown/use_cases/include_files/include_page_toc/markdown_1.md -->

## Includee 1 level-two title.

### Includee 1 level-three title.

### Another includee 1 level-three title.

## Another includee 1 level-two title.
<!-- <<<<<< END INCLUDED FILE (markdown): SOURCE markdown/use_cases/include_files/include_page_toc/markdown_1.md -->

<!-- <<<<<< END GENERATED FILE (include): SOURCE includer.md -->


text:
[![New Relic Experimental header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Experimental.png)](https://opensource.newrelic.com/oss-category/#new-relic-experimental)

# New Relic CAF Tracker

New Relic video tracking for CAF Receivers.

## Requirements

This video monitor solutions can work both, on top of New Relic's **Browser Agent** or standalone.

## Build

Install dependencies:

```
$ npm install
```

And build:

```
$ npm run build:dev
```

Or if you need a production build:

```
$ npm run build
```

## Usage

Load **scripts** inside `dist` folder into your page.

```html
<script src="../dist/newrelic-caf.min.js"></script>
```

> If `dist` folder is not included, run `npm i && npm run build` to build it.

If **NOT** using the New Relic Browser Agent, add this line of code:

```javascript
nrvideo.Core.setBackend(new nrvideo.NRInsightsBackend("ACCOUNT ID", "API KEY"));
```

To initialize the backend you need an ACCOUNT ID and an API KEY.

The ACCOUNT ID indicates the New Relic account to which you would like to send the Chromecast data. For example, https://insights.newrelic.com/accounts/xxx. Where “xxx” is the Account ID.

To register the API Key, follow the instructions found [here](https://docs.newrelic.com/docs/telemetry-data-platform/ingest-apis/introduction-event-api/).

Finally, init the CAF tracker:

```javascript
nrvideo.Core.addTracker(new nrvideo.CAFTracker());
```

## Examples

Check out the `samples` folder for complete usage examples.

## Known Limitations

- When not using the New Relic Browser Agent, some attributes are missing, like `ASN` or `country`. See the full list [here](https://docs.newrelic.com/attribute-dictionary/?attribute_name=&events_tids%5B%5D=8302&event=PageAction).
- Due to the way the chromecast player works, when an `END` happens, the `contentSrc` attribute is incorrect.

## Support

New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.

We encourage you to bring your experiences and questions to the [Explorers Hub](https://discuss.newrelic.com) where our community members collaborate on solutions and new ideas.

## Contributing

We encourage your contributions to improve New Relic CAF Tracker! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at<EMAIL_ADDRESS>
**A note about vulnerabilities**

As noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).

## License

New Relic CAF Tracker is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.


text:
# Pellicularia salmonicolor (Berk. & Broome) Dastur, 1946 SPECIES

#### Status
SYNONYM

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

#### Published in
Curr. Sci. 15(7): 193 (1946)

#### Original name
Corticium salmonicolor Berk. & Broome, 1875

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Polyporales/Phanerochaetaceae/Phanerochaete/Phanerochaete salmonicolor/ Syn. Pellicularia salmonicolor/README.md

repo_name: mdoering/backbone


text:
Atmega8BootLoader
=================

256B Atmega bootloader

This boot loader supports a derivative of the X-Modem protocol, and RS-485.
For more information on it see http://www.ejdevices.com/Atmega8Bootloader.html


text:
# P4Runtime PTF tests for ONOS fabric.p4

## Dependencies (on the test machine)

- [ptf](https://github.com/p4lang/ptf)
- [scapy with extensions](https://github.com/p4lang/scapy-vxlan)
- [P4Runtime](https://github.com/p4lang/PI#building-p4runtimeproto): the
protobuf / gRPC Python code for P4Runtime must have been generated and installed
in the Python path.
- [BMv2](https://github.com/p4lang/behavioral-model/blob/master/targets/simple_switch_grpc)
- [ONOS](https://github.com/opennetworkinglab/onos): for fabric.p4 code and
pre-compiled artifacts (no need to build ONOS, simply clone the repo)
- Set `ONOS_ROOT` env variable to the location where you cloned the ONOS repo

## Before running the tests

### Fabric profiles

fabric.p4 is available in different profiles. Each profile provides different
forwarding capabilities and is determined by the preprocessor flags used to
compile fabric.p4.

The available profiles are:

| Profile name | p4c preprocessor flags | Description |
| -------------| -----------------------|-------------|
| `fabric` | *None* | Basic fabric profile |
| `fabric-spgw`| `-DWITH_SPGW` | With SPGW user plane functionality |
| `fabric-int`| `-DWITH_INT_SOURCE` `-DWITH_INT_TRANSIT` | With INT (spec v0.5) source and transit functionality  |
| `fabric-spgw-int`| `-DWITH_SPGW` `-DWITH_INT_SOURCE` `-DWITH_INT_TRANSIT` | With both SPGW and INT functionalities |

### Compiling fabric.p4 for BMv2

If running tests on BMv2, you can use the pre-compiled artifacts
(BMv2 JSON and P4Info) distributed with ONOS. These files are located under:

```
$ONOS_ROOT/pipelines/fabric/impl/src/main/resources/p4c-out
```

If you need to make changes to fabric.p4, you can recompile the
P4 program using the following commands:

```
cd $ONOS_ROOT/pipelines/fabric/impl/src/main/resources
make
```

The `make` command will build all profiles. To build only a specific
profile:

```
make <profile-name>
```

### Compile for other targets

Compile fabric.p4 with the desired backend and preprocessor flags. For example,
to compile for Tofino:

```
cd $ONOS_ROOT/pipelines/fabric/impl/src/main/resources/
p4c --target tofino --arch v1model -DWITH_SPGW -o fabric-spgw.out \
    --p4runtime-format text --p4runtime-file fabric-spgw.out/p4info.proto \
    fabric.p4
```

## Steps to run the tests with BMv2

1. Setup veth interfaces, using the script provided with BMv2. This script
should be executed only once before executing any PTF test, or after a reboot
of the test machine.

    ```
    cd <path to bmv2 repo>/tools
    sudo ./veth_setup.sh
    ```

If using the ONOS-P4 Dev VM, the `veth_setup.sh` script will be located
under `/home/sdn`.

2. Run the PTF tests using a convenient `make` command:

    ```
    cd fabric-p4test/tests/ptf
    make
    ```

    The `make` command will execute tests for all fabric profiles. To run tests for
    only a specific profile:

    ```
    make <profile-name>
    ```

    Alternatively, you can run the `ptf-runner.py` script with BMv2 arguments.
    For example, to run tests for the `fabric` profile:

    ```
    sudo ./ptf_runner.py --device bmv2 \
        --p4info ${ONOS_ROOT}/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt \
        --bmv2-json ${ONOS_ROOT}/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json \
        --ptf-dir fabric.ptf --port-map port_map.veth.json \
        all ^spgw
    ```

## Steps to run the tests with Tofino

1. Start `bf_switchd` (with `--skip-p4`) as you normally do.

2. Run `ptf_runner.py` with Tofino arguments and `--skip-test`:

    ```
    sudo ./ptf_runner.py --device tofino \
        --p4info p4info.txt \
        --tofino-bin tofino.bin \
        --tofino-ctx-json context.json \
        --ptf-dir fabric.ptf --port-map port_map.veth.json \
        --skip-test
    ```

    This will configure the pipeline on the switch, but will *not* execute the
    tests.

3. Configure switch ports using `bf_switchd` CLI.

4. Execute tests by running `ptf_runner.py` with `--skip-config` (since the
pipeline is already configured):

    ```
    sudo ./ptf_runner.py --device tofino \
        --p4info p4info.txt \
        --tofino-bin tofino.bin \
        --tofino-ctx-json context.json \
        --ptf-dir fabric.ptf --port-map port_map.veth.json \
        --skip-config all ^spgw
    ```

## Running the right PTF tests for the right profile

Based on which preprocessor flags you are using to compile fabric.p4 (i.e. which
fabric.p4 profile you are trying to use), some PTF tests will not be
available. For example, you will only be able to run the SPGW tests successfully
if fabric.p4 was compiled with `-DWITH_SPGW`. We have tagged the fabric PTF
tests to enable you to choose which ones to run based on the fabric.p4 profile
you are using. You simply need to provide the appropriate PTF "test specs" at
the end of the `ptf_runner.py` command-line invocation based on your
preprocessor flags as per this table:

| Profile | PTF test specs |
| ------- | -------------- |
| `fabric` | `all ^spgw ^int` |
| `fabric-spgw` | `all ^int` |
| `fabric-int` | `all ^spgw` |
| `fabric-spgw-int` | `all` |

For an example of how PTF test specs are used, you can refer to [this
Makefile](./Makefile) used for BMv2 tests.

## Port map JSON file

This file is required to let PTF know which test interface corresponds to which
P4 dataplane port number. Consider the following test topology:

```
             ASIC under test
******************************************
148          149          134          135
 |            |            |            |
 |            |            |            |
 |            |            |            |
ens2f0       ens2f1       ens2f2       ens2f3
******************************************
              PTF test server
```

For this topology one may use the following port map JSON file:
```
[
    {
        "ptf_port": 0,
        "p4_port": 148,
        "iface_name": "ens2f0"
    },
    {
        "ptf_port": 1,
        "p4_port": 149,
        "iface_name": "ens2f1"
    },
    {
        "ptf_port": 2,
        "p4_port": 134,
        "iface_name": "ens2f2"
    },
    {
        "ptf_port": 3,
        "p4_port": 135,
        "iface_name": "ens2f3"
    }
]
```

The `"ptf_port"` is the id used to reference the port in the Python PTF
tests. As of now, `"ptf_port"` must be equal to the index of the entry in the
port map JSON array of interfaces. Port numbers must never be used directly when
calling PTF Python functions (e.g. `send_packet`); instead, when writing your
own tests, call the `swports` method which will map the `"ptf_port"` to the
`"p4_port"` based on the provided port map JSON file.

gha_language: Python


text:
# Create Mesh

All visible objects in 3D scene are meshes. Different meshes has different shapes. In previous sections, we once created face meshes such as rectangle planes, cubes, spheres, we also created line geometries such as coordinate meshes. In this section, we'll discuss how to create meshes with different shapes.

## Primitive Meshes

Primitive meshes includes rectangle plane, cubes, spheres, cylinders, cones. We created planes and cubes before, now let's see how to create spheres, cylinders and cones.

1. Use `MeshBuilder.createSphere(scene, radius, widthSegs, heightSegs)` to create sphere.
2. Use `MeshBuilder.createCylinder(scene, radius, height, segs)` to create cylinder.
3. Use `MeshBuilder.createCone(scene, radius, height, segs)` to create cone.

When creating a mesh, you need to specify the scene. You need to specify the radius when creating a sphere; and you need to specify radius and height when creating a cylinder or a cone.

![](https://gw.alicdn.com/tfs/TB1ApAjphTpK1RjSZR0XXbEwXXa-591-202.png)

These meshes' surface is curved, G3D use line strip to simulate curve line. For example, a circle could be roughly simulated using 6 lines, or nicely simulated using 128 lines. The `segs` argument is used to specify how many lines should be used to simulate a circle. The larger the number is, the nicer G3D simulates (and cost more, of course).

![](https://gw.alicdn.com/tfs/TB1lS7kphTpK1RjSZFGXXcHqFXa-264-264.png)

This example demonstrated how to create sphere, cylinder and cones, with different `segs` arguments.

JS Bin on jsbin.com

We created three cylinders, three spheres and three cones, with `segs` 6, 16 and 128. It's obvious that segs deeply affect how nice the curved face is simulated.

## Meshes with Custom Shapes

Except for these pre-defined shaped meshes, we can alse mannually create vertices and make up our own custom shaped meshes. It's a little bit tricky, so let's begin with a simple issue: How to create custom shaped **line** mesh. (Spheres, cubes and so on are face meshes, but the coordinate mesh we created before is line mesh).

### Line Mesh

Assume that we want to create a line strip in X-Y plane, passing through (0, 0, 0), (1, 1, 0), (1, 0, 0), (2, 1, 0), (2, 0, 0) and so on, as the following image shows:

![](https://gw.alicdn.com/tfs/TB1vWqMpCzqK1RjSZFjXXblCFXa-619-314.png)

Let's see the demo:

JS Bin on jsbin.com

First, create two arrays `vertices` and `indices`:

```javascript
const vertices = [];
const indices = [];
for(let i=0; i<4; i++){
    vertices.push(0+i, 0, 0, 1+i, 1, 0);
    if(i!==0){
        indices.push(i*2-1, i*2);
    }
    indices.push(i*2, i*2+1);
}

// vertices: [0,0,0, 1,1,0, 1,0,0, 2,1,0, 2,0,0, 3,1,0, ...]
//            0      1      2      3      4      5
// indices:  [0,1, 1,2, 2,3, 3,4, 4,5, ...]
```

The array `vertices` container all vertice positions along the line strip, each three values for a vertices. The line containers 8 vertices, so the length of `vertices` is 24.

The array `indices` defines how the vertices in `vertices` composite a line strip. Each value in `indices` is an index for `vertices` array, corresponding with a vertice. In the example, `indices` is [0,1,1,2,...]. The first two value 0 and 1 means: The first line, start with the 0th vertice in `vertices` which is (0, 0, 0), ends with the 1st vertice which is (1, 1, 0); the following two value 1 and 2 means: the second line, start with 1st vertice which is (1, 1, 0) and ends with the 2nd vertice which is (1, 0, 0); and so on.

![](https://gw.alicdn.com/tfs/TB1rd6ypxTpK1RjSZFGXXcHqFXa-619-321.png)

Then we can create a `LineMesh` object, and create a `LineGeometry`, passing `vertices` and `indices` in. Notice that we put `indices` in a `default` property, this is because a line mesh may contain multiple line strips, the first one's name is `default` by default.

```javascript
const lines = new G3D.LineMesh(scene);
lines.geometry = new G3D.LineGeometry({
    vertices,
    indices: {
        default: indices
    }
})
```

So we finished creating a custom shaped line mesh.

 Assum that we want to create a face mesh composited of two rectangle planes ABCD and EFGH:

![](https://gw.alicdn.com/tfs/TB1T5nOpsfpK1RjSZFOXXa6nFXa-505-443.png)

See the example:

JS Bin on jsbin.com

Except for `vertices` and `indices`, we need to create `uvs` and `normals`.

```javascript
const vertices = [
    0,1,2, // A
    0,0,2, // B
    1,1,2, // C
    1,0,2, // D
    1,1,2, // E
    1,0,2, // F
    1,1,0, // G
    1,0,0  // H
];
const normals = [];
const uvs = [];
for(let i=0; i<8; i++){
    if(i<=3){
        normals.push(0,0,1);
    }else{
        normals.push(1,0,0);
    }
    uvs.push(0,0);
}
```

The array `vertices` container 8 points, which is the similar to when we created line mesh before.

Normal is the vector perpendicular to the face. For line meshes, normals makes no sense, but for face meshes, normals participates in computing the light and the final render color, it's essantial. In our example, for the first four vertices, normal is (0, 0, 1), and for the 4 vertices left, normal is (1, 0, 0).

You may notice that the mesh has only 6 vertices literally, cause point C and point E is the same point, as well as D and F. C and E has the same position, but the normal is different, so we have to split it into two points.

> UV is similar to normals, it's data for each vertices, but UV only need two values for one vertice. UV is related to the texture and material, as we have not involved in these issues, we can just specify (0, 0) for each vertice.

At last we created the vertice index array `indices`. For line geometry, the rule is "each two indices make up a line segment", and here for face geometry, the rule is "each three indices make up a triangle". Face meshes are composited with triangles, so rectangle plane should be split into two triangles. Here in the example, `indices` demonstrate 4 triangles, they are triangle ABC and BDC (which composite rectangle ABCD), and triangle EFH and HGE (which composite rectangle EFGH).

```javascript
const indices = [
    0,1,2, // triangle ABC
    1,3,2, // triangle BDC
    4,5,7, // triangle EFH
    7,6,4  // triangle HGE
]
```

At last, create a `Mesh`. We used `LineMeshed` and `LineGeometry` before, here we need `Mesh` and `Geometry`. For the same reason, `indices` is in the `default` property.

```javascript
const mesh = new G3D.Mesh(scene);
mesh.geometry = new G3D.Geometry({
    vertices,
    normals,
    uvs,
    indices: {
        default: indices
    }
});
```

Please drag your mouse in the right rendering canvas, to rotate the camera to the backside of our mesh (or you can edit code to change the camera, `camera.alpha = 200`). You find that when camera looks at the mesh from back side, the mesh is gone! (This won't happen for the mesh you created from `MeshBuilder.createPlane()`).

This is because, mostly face mesh is closed, you are not supposed to see the back side of a plane. For better performance, we'll not render the back side. In G3D, `Geometry` has a 'facing', when creating `Geometry`, you can specify a `facing` property as `Geometry.FACING.FRONT` (the default value)，`Geometry.FACING.BACK` or `Geometry.FACING.BOTH`.

So if we want the mesh to be seen from both side, then specify `BOTH` as following code shows:

```
mesh.geometry = new G3D.Geometry({
    ...
    facing: G3D.Geometry.FACING.BOTH
})
```

How to recognize the front side and back side? Here we use the Right Hand Rule again. Use your right hand, make the four fingers rotate along the triangle vertices in order (A->B->C, eg), then the thumb is pointing at the front side.

## Summary

In this section we learned: 1) How to create pre-defined shaped meshes using `MeshBuilder`. 2) How to create custom shaped meshes. Hope the artical is helpful.

path: /doc/guide/Create Mesh.md

filename: Create Mesh.md


text:
Google Maps editor for EPiServer 7.5
====================================

How to use (detailed): http://tedgustaf.com/blog/2014/10/google-maps-custom-editor-for-episerver-75/

1. Install nuget

2. Add the following to your content type

        public virtual MapPoint Coordinates { get; set; }

repository: quangbrightsoft/epimapbox

repo_name: quangbrightsoft/epimapbox


text:
---
layout: page
title: Documentation
---

Simple project files watcher and deployer.

The scenario is when we are developing in your local workspace and the program only runs in specific runtime environment, we have to setup by ourself to make the program run and debug on runtime folders, or remote machines. Caravan is the automation tool designed for solving such kind of problems by watching the file changes, and deploy them automatically to its destination.

![](/assets/civ-5-caravan.png)

This is the caravan in [Sid Meier's Civilization V](http://www.civilization5.com/), where the project name originally comes from.

## Installation

```
$ gem install caravan
```

## Usage

```
$ caravan --help

    -s, --source SOURCE_PATH         Source path
    -d, --dest DEST_PATH             Destination path
    -m, --mode DEPLOY_MODE           Deploy mode
    -i, --ignore IGNORE_FILES        Ignore files
    -o, --once                       Deploy for once
    -b, --debug                      Debug mode
    -l, --load YAML_FILE             YAML file (Default: ./caravan.yml)
        --version                    Show version
```

## Examples

Deploy to local directory:

```
$ caravan -s /path/to/project/. -d /path/to/deploy -m shell
```

Deploy to remote machines:

```
$ caravan -s /path/to/project/. -d user@remote_machines:/path/to/deploy -m rsync
```

Deploy only once:

```
$ caravan -s /path/to/project/. -d user@remote_machines:/path/to/deploy -m rsync --once
```

## Configuration

Generate default configuration:

```
$ cd /path/to/src
$ caravan --init
```

A `caravan.yml` will be generated as `/path/to/src/caravan.yml`. You may specify any options in command arguments except source path.

```
debug: false
deploy_mode: rsync_local
incremental: true
exclude:
- ".git"
- ".svn"
```

You may also write `src` and `dst` to `caravan.yml`. Hence, deployment made even easier.

```
$ caravan
```

`caravan.yml` can be named as you like. To load your own YAML file, use `--load`:

```
$ caravan --load my-caravan.yml
```

### Deploy Modes

* Shell
    * `cp` in local.
* Secure copy (scp)
    * `scp` to remote machines, _not recommended_.
* [rsync](https://rsync.samba.org/)
    * `rsync` to remote machines, which is the default and recommended mode because it is incremental. Thus, it performs much better.
* rsync_local
    * `rsync` in local.

## Plan

- [x] Basic watching and deploying
- [x] Exclude watching unwanted files
- [x] `caravan.yml` for project-specialized configuration
- [x] Callbacks for deployment
    - [x] `after_create`
    - [x] `after_change`
    - [x] `before_deploy`
    - [x] `after_deploy`
    - [x] `before_destroy`
- [ ] ~~Multiple deployment configurations~~
- [ ] Extension to deploy methods

## License

[MIT](/LICENSE)

repository: crispgm/caravan

gha_language: Ruby

repo_name: crispgm/caravan


text:
# Hand segmentation from RGBD input

Super real-time pipeline (<2 ms/frame on CPU) for hand & wrist segmentation based on random decision forests, joint bilateral upsampling, decision adjustment and post-processing.

# Overview

The pipeline offers 3 operating modes: { TRAIN, TEST, LIVE }.

TRAIN

640x480 depth images and ground truth must be provided to train a RDF.
Ground truth must be provided as a single channel image where hand pixels must be labeled with 255 intensity, while wrist pixel must be labeled with 60 intensity.
Note that in order to get super real-time performance the RDF is actually trained on downsampled input, post-processing is then used at run-time to increase the resolution to original value.

TEST

Loads a trained random decision forest and evaluates the accuracy of the complete pipeline on a test set. Should be used to tune meta-parameters of the algorithm.

LIVE

Loads a trained random decision forest and runs the pipeline on streaming RGBD input acquired from Intel Realsense sensor. Note that the pipeline for now supports only such sensor and the code must be modified in order to use other sensors.

For additional info refer to to examples/c++/h_seg.cpp, the code it’s well commented and self-explanatory.

# Data-set and trained forest

Train-set (29820 frames), Test-set (365 frames) and the associated trained RDF can be found on:

[https://drive.google.com/open?id=0B3Uu7sqBtl6GRVlmQ2FRWW44MDg](https://drive.google.com/open?id=0B3Uu7sqBtl6GRVlmQ2FRWW44MDg)

# Installing and Dependencies

Fertilized Forests Decision Forest library - contained in src/

The fertilized forests library is a general purpose, platform independent, easy
to extend, Decision Forest library. You can find detailed information including
API documentation on [http://www.fertilized-forests.org](http://www.fertilized-forests.org).

Boost

OpenCV

OpenMP

Eigen

repository: mbencherif/hand-seg-rdf

repo_name: mbencherif/hand-seg-rdf