text:
## group `plane` {#group__plane}

In projective geometry, planes are the fundamental element through which all other entities are constructed. Lines are the meet of two planes, and points are the meet of three planes (equivalently, a line and a plane).

The plane multivector in PGA looks like $d\mathbf{e}_0 + a\mathbf{e}_1 + b\mathbf{e}_2 + c\mathbf{e}_3$. Points that reside on the plane satisfy the familiar equation $d + ax + by + cz = 0$.

### Summary

 Members                        | Descriptions
--------------------------------|---------------------------------------------
`public  ` [`plane`](#group__plane_1ga06059c2dd2626f53f552d904060e3ff8)`() = default`             |
`public  ` [`plane`](#group__plane_1gaf3f1f15a24e94cea2795dc5b978b69f2)`(__m128 xmm) noexcept`             |
`public  ` [`plane`](#group__plane_1ga51933d8d8853797034621ce41ad34a8e)`(float a,float b,float c,float d) noexcept`             | The constructor performs the rearrangement so the plane can be specified in the familiar form: ax + by + cz + d
`public  explicit ` [`plane`](#group__plane_1ga29dbb1804fa3ec402f901ca8049d60bc)`(float * data) noexcept`             | Data should point to four floats with memory layout `(d, a, b, c)`  where `d`  occupies the lowest address in memory.
`public void ` [`load`](#group__plane_1ga5a00871dbe19d7658b7e8cda71b326f2)`(float * data) noexcept`             | Unaligned load of data. The `data`  argument should point to 4 floats corresponding to the `(d, a, b, c)`  components of the plane multivector where `d`  occupies the lowest address in memory.
`public void ` [`normalize`](#group__plane_1gae5e1e0af05e84799d27d7b8782fe5f22)`() noexcept`             | Normalize this plane $p$ such that $p \cdot p = 1$.
`public plane ` [`normalized`](#group__plane_1ga15ec918ecd05f7e9b21887afa590d405)`() const noexcept`             | Return a normalized copy of this plane.
`public float ` [`norm`](#group__plane_1ga2f86598e6a327c72201e68615bd10384)`() const noexcept`             | Compute the plane norm, which is often used to compute distances between points and lines.
`public void ` [`invert`](#group__plane_1ga8b2ee34f6cc0fd6992520835b13c10e6)`() noexcept`             |
`public plane ` [`inverse`](#group__plane_1gab3e738eb24a1528e69a1a3ebd75c051e)`() const noexcept`             |
`public bool KLN_VEC_CALL ` [`operator==`](#group__plane_1ga1163a89d4d307d9f8812cd491d5e80e1)`(plane other) const noexcept`             |
`public bool KLN_VEC_CALL ` [`approx_eq`](#group__plane_1ga4fecdce7f0b686851053d5edfe55aed8)`(plane other,float epsilon) const noexcept`             |
`public plane KLN_VEC_CALL ` [`operator()`](#group__plane_1ga1c7a11e35d91c2aee88a4152b1799ca9)`(plane const & p) const noexcept`             | Reflect another plane $p_2$ through this plane $p_1$. The operation performed via this call operator is an optimized routine equivalent to the expression $p_1 p_2 p_1$.
`public line KLN_VEC_CALL ` [`operator()`](#group__plane_1ga782e4e0b1b93ab5bffb2c972f6d7acfa)`(line const & l) const noexcept`             | Reflect line $\ell$ through this plane $p$. The operation performed via this call operator is an optimized routine equivalent to the expression $p \ell p$.
`public point KLN_VEC_CALL ` [`operator()`](#group__plane_1ga20b6577f6d1717e1ec086314d3ebd497)`(point const & p) const noexcept`             | Reflect the point $P$ through this plane $p$. The operation performed via this call operator is an optimized routine equivalent to the expression $p P p$.
`public plane &KLN_VEC_CALL ` [`operator+=`](#group__plane_1gaf80a42a5457dd6f4686501f46e22635c)`(plane b) noexcept`             | Plane addition.
`public plane &KLN_VEC_CALL ` [`operator-=`](#group__plane_1gac4f9a791dcfa8910218d843522fd5509)`(plane b) noexcept`             | Plane subtraction.
`public plane & ` [`operator*=`](#group__plane_1ga9b9724a8d77be2b8cd68b86c1fde963c)`(float s) noexcept`             | Plane uniform scale.
`public plane & ` [`operator*=`](#group__plane_1ga65224cbcfae331161073e8d5829d870d)`(int s) noexcept`             | Plane uniform scale.
`public plane & ` [`operator/=`](#group__plane_1ga2ab699f0afa0a6d33dda86029167b429)`(float s) noexcept`             | Plane uniform inverse scale.
`public plane & ` [`operator/=`](#group__plane_1gae86c20070f4cea4f66d79265f495dec8)`(int s) noexcept`             | Plane uniform inverse scale.
`public float ` [`x`](#group__plane_1gad2a57bafbd388d4ca9ca98d0074fee0a)`() const noexcept`             |
`public float ` [`e1`](#group__plane_1gaa80c303821219e07892d3cb2a46a548b)`() const noexcept`             |
`public float ` [`y`](#group__plane_1gadce64826f47e1a017fba8fefab69c174)`() const noexcept`             |
`public float ` [`e2`](#group__plane_1ga09f8041b7603bcbe9273933f88368f28)`() const noexcept`             |
`public float ` [`z`](#group__plane_1ga2a01bee79dfb0c11414dc5a936397987)`() const noexcept`             |
`public float ` [`e3`](#group__plane_1ga82e3a007a85af14bc9c4563f206d4c16)`() const noexcept`             |
`public float ` [`d`](#group__plane_1gab3aa088fdf83091809bb7e08ace460bb)`() const noexcept`             |
`public float ` [`e0`](#group__plane_1gadcaf9730f9c22581d196d74b3197769c)`() const noexcept`             |
`public plane KLN_VEC_CALL ` [`operator+`](#group__plane_1ga6d2534f1b282e146cdda7cd36dd4876f)`(plane a,plane b) noexcept`             | Plane addition.
`public plane KLN_VEC_CALL ` [`operator-`](#group__plane_1ga2afbbeb64867bf4b3d68b56fc71c439a)`(plane a,plane b) noexcept`             | Plane subtraction.
`public plane KLN_VEC_CALL ` [`operator*`](#group__plane_1ga0909ca0b8d5e499d81880382be07006c)`(plane p,float s) noexcept`             | Plane uniform scale.
`public plane KLN_VEC_CALL ` [`operator*`](#group__plane_1ga94594aec80d6cda91582a3728a767ca0)`(float s,plane p) noexcept`             | Plane uniform scale.
`public plane KLN_VEC_CALL ` [`operator*`](#group__plane_1ga13a4925eaf838675c23479343ee7e765)`(plane p,int s) noexcept`             | Plane uniform scale.
`public plane KLN_VEC_CALL ` [`operator*`](#group__plane_1ga46d2c31f730f0760f0c22c6022bb0a3b)`(int s,plane p) noexcept`             | Plane uniform scale.
`public plane KLN_VEC_CALL ` [`operator/`](#group__plane_1ga0f591eb9e778135613a1d5c4a3ac5d51)`(plane p,float s) noexcept`             | Plane uniform inverse scale.
`public plane KLN_VEC_CALL ` [`operator/`](#group__plane_1gafa4b66325f423b360e28b5b5efffa75f)`(plane p,int s) noexcept`             | Plane uniform inverse scale.
`public plane KLN_VEC_CALL ` [`operator-`](#group__plane_1gae018fc4984db372392abd5305b86a212)`(plane p) noexcept`             | Unary minus (leaves displacement from origin untouched, changing orientation only)

### Members

####   [plane](#group__plane_1ga06059c2dd2626f53f552d904060e3ff8)() = default  {#group__plane_1ga06059c2dd2626f53f552d904060e3ff8}

####   [plane](#group__plane_1gaf3f1f15a24e94cea2795dc5b978b69f2)(__m128 xmm) noexcept  {#group__plane_1gaf3f1f15a24e94cea2795dc5b978b69f2}

####   [plane](#group__plane_1ga51933d8d8853797034621ce41ad34a8e)(float a,float b,float c,float d) noexcept  {#group__plane_1ga51933d8d8853797034621ce41ad34a8e}

The constructor performs the rearrangement so the plane can be specified in the familiar form: ax + by + cz + d

####  explicit  [plane](#group__plane_1ga29dbb1804fa3ec402f901ca8049d60bc)(float * data) noexcept  {#group__plane_1ga29dbb1804fa3ec402f901ca8049d60bc}

Data should point to four floats with memory layout `(d, a, b, c)`  where `d`  occupies the lowest address in memory.

#### void  [load](#group__plane_1ga5a00871dbe19d7658b7e8cda71b326f2)(float * data) noexcept  {#group__plane_1ga5a00871dbe19d7658b7e8cda71b326f2}

Unaligned load of data. The `data`  argument should point to 4 floats corresponding to the `(d, a, b, c)`  components of the plane multivector where `d`  occupies the lowest address in memory.

!!! tip
    This is a faster mechanism for setting data compared to setting
    components one at a time.

#### void  [normalize](#group__plane_1gae5e1e0af05e84799d27d7b8782fe5f22)() noexcept  {#group__plane_1gae5e1e0af05e84799d27d7b8782fe5f22}

Normalize this plane $p$ such that $p \cdot p = 1$.

In order to compute the cosine of the angle between planes via the inner product operator `|` , the planes must be normalized. Producing a normalized rotor between two planes with the geometric product `*`  also requires that the planes are normalized.

#### plane  [normalized](#group__plane_1ga15ec918ecd05f7e9b21887afa590d405)() const noexcept  {#group__plane_1ga15ec918ecd05f7e9b21887afa590d405}

Return a normalized copy of this plane.

#### float  [norm](#group__plane_1ga2f86598e6a327c72201e68615bd10384)() const noexcept  {#group__plane_1ga2f86598e6a327c72201e68615bd10384}

Compute the plane norm, which is often used to compute distances between points and lines.

Given a normalized point $P$ and normalized line $\ell$, the plane $P\vee\ell$ containing both $\ell$ and $P$ will have a norm equivalent to the distance between $P$ and $\ell$.

#### void  [invert](#group__plane_1ga8b2ee34f6cc0fd6992520835b13c10e6)() noexcept  {#group__plane_1ga8b2ee34f6cc0fd6992520835b13c10e6}

#### plane  [inverse](#group__plane_1gab3e738eb24a1528e69a1a3ebd75c051e)() const noexcept  {#group__plane_1gab3e738eb24a1528e69a1a3ebd75c051e}

#### bool KLN_VEC_CALL  [operator==](#group__plane_1ga1163a89d4d307d9f8812cd491d5e80e1)(plane other) const noexcept  {#group__plane_1ga1163a89d4d307d9f8812cd491d5e80e1}

#### bool KLN_VEC_CALL  [approx_eq](#group__plane_1ga4fecdce7f0b686851053d5edfe55aed8)(plane other,float epsilon) const noexcept  {#group__plane_1ga4fecdce7f0b686851053d5edfe55aed8}

#### plane KLN_VEC_CALL  [operator()](#group__plane_1ga1c7a11e35d91c2aee88a4152b1799ca9)(plane const & p) const noexcept  {#group__plane_1ga1c7a11e35d91c2aee88a4152b1799ca9}

Reflect another plane $p_2$ through this plane $p_1$. The operation performed via this call operator is an optimized routine equivalent to the expression $p_1 p_2 p_1$.

#### line KLN_VEC_CALL  [operator()](#group__plane_1ga782e4e0b1b93ab5bffb2c972f6d7acfa)(line const & l) const noexcept  {#group__plane_1ga782e4e0b1b93ab5bffb2c972f6d7acfa}

Reflect line $\ell$ through this plane $p$. The operation performed via this call operator is an optimized routine equivalent to the expression $p \ell p$.

#### point KLN_VEC_CALL  [operator()](#group__plane_1ga20b6577f6d1717e1ec086314d3ebd497)(point const & p) const noexcept  {#group__plane_1ga20b6577f6d1717e1ec086314d3ebd497}

Reflect the point $P$ through this plane $p$.

repository: jeremyong/klein

repo_name: jeremyong/klein


text:
DSL For Backwards Compatability Support
=======================================

The purpose of this module is to provide support for recipes written for cloudify 2.6 and below, to be able to run on the latest cloudify installation.

If your recipe contains any one of the following imports:

```
import org.cloudifysource.dsl.context.ServiceContext
import org.cloudifysource.dsl.context.ServiceContextFactory
import org.cloudifysource.dsl.context.Service
import org.cloudifysource.dsl.context.ServiceInstance
```

Than this module is required and should be placed under the ${CLOUDIFY_HOME}/lib/platform/cloudify folder.

repository: guilhermejccavalcanti/cloudify

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: guilhermejccavalcanti/cloudify


text:
---
description: Specification of the DroneBridge raw protocol
---

# Raw protocol

This protocol is used for long range communication in monitor mode. The basic idea is the same as with WifiBroadcast. The protocol allows simple plug & fly as no configuration is needed. Changing the `comm id` is required if multiple pilots want to use the same frequency.

{% hint style="info" %}
While it is optimized for use in UAS applications it is designed to carry any kind of payload
{% endhint %}

## Protocol structure

| Radiotap header | DroneBridge custom header | payload |
| :---: | :---: | :---: |

#### Radiotap header

Use any that works. You can set the transmission bit rate here \(works with Ralink cards only\). Higher bit rate means less latency and more data but also less range.

## Raw Protocol v2 header

Total length of the header is 10 bytes. Allows frames to be injected by most/all drivers supporting injection & monitor mode

      Byte
      Field
      Description

      0-3
      FCF duration

RTS frame: 0xb4 0x00 0x00 0x00

Data frame: 0x08 0x00 0x00 0x00

      4
      direction

0x01 if packet is for drone

0x03 if packet is for ground station

      5
      comm id

      Has to be the same on drone and ground station. Associates drone with
        ground station

      6
      port

DB-control: 0x01

DB-telemetry: 0x02

DB-video: 0x03

DB-communication: 0x04

DB-status: 0x05

DB-proxy: 0x06

DB-RC: 0x07

      7-8
      payload length

unsigned int 16 bit

little endian

      9
      sequence number

      increases with every frame sent to same port. Used to make software diversity
        possible. Range: 0-255

{% hint style="info" %}
If **DroneBridge compatibility mode** is enabled the **DB raw header gets extended by 10 bytes** of random data. These bytes are likely to overwritten on reception by un-patched WiFi drivers. The 10 byte padding makes sure no payload data is overwritten. Compatibility mode should be used in case a receiver with un-patched drivers is used \(e.g. default Ubuntu etc.\)

**Compatibility mode can automatically be detected** on reception if the **length of the received frame is bigger than the sum of: Radiotap header length, DB header length & payload length**
{% endhint %}

## Payload

{% hint style="danger" %}
Minimal payload length depends on used frame type \(tested with AR9271\):

* Data frame: minimal payload length: **14 bytes**
* RTS frame: minimal payload length: **6 bytes**
* Beacon frame: minimal payload length: **14 bytes**
{% endhint %}

Can be anything. Just make sure the transmission bit rate is set appropriate. In the case of DroneBridge the payload can be on of the following things:

* DroneBridge communication protocol \(change settings etc.\)
* MSP \(Multiwii Serial Protocol\)
* H264 in MPEG-TS container in case of GoPro video transmission using DroneBridge video module
* LTM \(Light Telemetry Protocol\)

## Encrypted Payload

The specification for encrypted messages is as follows:

      field
      length
      description

      Nonce

      16 bytes

Nonce as part of the encryption. Must not be reused for any other

message with same key

      MAC

      16 bytes
      MAC or TAG to verify the integrity of the message & authenticate the
        sender

      Payload

      0 - 1458 bytes
      Encrypted data. Length must not exceed 1458 bytes since the MTU in
        most WiFi drivers is ~1500 bytes

The encrypted payload lies inside the DroneBridge raw protocol payload field. DroneBridge libraries support AES encryption with 128, 192, 256 bit key length. Authentication is done using [EAX](https://en.wikipedia.org/wiki/EAX_mode). The Python library uses the [PyCryptodomex ](https://pycryptodome.readthedocs.io/en/latest/)implementation. That way DroneBridge allows for end to end encryption of all messages. It is not recommended to enable it on latency sensitive applications like real-time video & audio streams.

repository: DroneBridge/Docs

repo_name: DroneBridge/Docs


text:
CampusNetDrop
=========================
This is a tiny application to synchronize the shared files of your courses, projects and groups from DTU CampusNet to your personal computer. After configuration of your login and your courses, the application will be able to download the shared files of these courses with the same structure as online. Every time you re-run the downloader it will check for new versions of already downloaded files and of course download new files.

This is the GUI version, for the command line version for experienced users see the other repository.

Compiled Windows and Mac OSX versions can be downloaded here:

[Windows Version](http://moebergjones.de/cndrop/CampusNetDrop-Windows.zip "Windows Version")

Windows Version: Copy it into your user folder. If you copy it into your C:\Programs\what\ever directory, you have to run it as admin.

[Mac Version](http://moebergjones.de/cndrop/CampusNetDrop-Mac.zip "Mac Version")

Mac Version: Unzip and copy the folder 'CampusNetDrop' into your USER folder and start the application from there. Otherwise it will have some problems.

To run it from the source of this repository:
Download the source and run:
```python CampusNetDrop.py```

The code is Python 2.7

![Alt text](cnDrop10.png?raw=true "Download tab")

![Alt text](cnDrop11.png?raw=true "Configure tab")

license: MIT

repository: Rassibassi/CampusNetDrop

repo_name: Rassibassi/CampusNetDrop


text:
---
layout: post
title: "Building a Pimple/Container from a YAML file"
date: "2014-09-29"
tags:
  - "php"
  - "symfony"
  - "technology"
  - "config"
  - "container"
  - "dic"
  - "pimple"
  - "solid"
  - "yaml"
---

The last May I attended to the great [deSymfony day](http://day.desymfony.com/) conference in Barcelona. At speaker's dinner I had a great conversation with [Máximo Cuadros](https://twitter.com/mcuadros_) about Dependency Injection Containers. We discuss about the customisation of containers. I said that I prefer Symfony´s DIC instead of Pimple, mainly because its configuration with YAML (or even xml) files. But In fact we can customise [Pimple/Containers](http://pimple.sensiolabs.org/) with YAML files in a similar way than we do it with Symfony's DIC. In this example we're going to see one way to do it.

We can easily extend the Pimple/Container and add a function to load a YAML files, parse them and build the container. But doing this we're violating various SOLID principles. First we're violating the Open-Close principle, because to extend our Pimple/Container with the new functionality we are adding new code within an existing class. We're also violating the Dependency Inversion Principle and our new Pimple/Container is going to be harder to maintain. And finally we're obviously violating the Single Responsibility Principle, because our new Pimple/Container is not only a DIC, it's also a YAML parser.

There's another way to perform this operation without upsetting SOLID principles. We can use the Symfony's Config [component](http://blog.servergrove.com/2014/02/21/symfony2-components-overview-config/)

The idea is simple. Imagine this simple application:

```php
use Pimple\Container;

$container = new Container();
$container['name'] = 'Gonzalo';

$container['Curl'] = function () {
    return new Curl();
};
$container['Proxy'] = function ($c) {
    return new Proxy($c['Curl']);
};

$container['App'] = function ($c) {
    return new App($c['Proxy'], $c['name']);
};

$app = $container['App'];
echo $app->hello();
```

We define the dependencies with code. But we want to define dependencies using a yml file for example:

```yaml
parameters:
  name: Gonzalo

services:
  App:
    class:     App
    arguments: [@Proxy, %name%]
  Proxy:
    class:     Proxy
    arguments: [@Curl]
  Curl:
    class:     Curl
```

As we can see we're using a similar syntax than Symfony's DIC YAML files. Now, with our new library we can use the following code:

```php
use Pimple\Container;
use G\Yaml2Pimple\ContainerBuilder;
use G\Yaml2Pimple\YamlFileLoader;
use Symfony\Component\Config\FileLocator;

$container = new Container();

$builder = new ContainerBuilder($container);
$locator = new FileLocator(__DIR__);
$loader = new YamlFileLoader($builder, $locator);
$loader->load('services.yml');

$app = $container['App'];
echo $app->hello();
```

Now our Pimple/Container is just a Pimple/Container nothing more. It doesn't know anything about yaml, parsers and thing like that. It's doesn't have any extra responsibility. The responsibility of the parser falls on YamlFileLoader You can see the library in my [github](https://github.com/gonzalo123/yml2pimple) account. It's but one usage example of Symfony's Config component. It only allows Yaml files, but it can be extended with Xml files adding a XmlFileLoader.


text:
JavaTailer monitors files for appended data much like the Unix tail command.

This implementation uses the NIO.2 `WatchService` to monitor file events and
thus version 7 or greater of Java® is required.

The "tailer" runs in its own thread and utilizes a callback mechanism that
the user implements to notify of file change events.

# License

This software is licensed under the Apache License, v2.0.  See the `LICENSE`
file.  The Copyright notice is contained in the `NOTICE` file.

# Using

See `TailerTest.java` for a working example of how to instantiate the thread
and build your callback object.

Short version:

```TailerCallback callback = new TailerCallback() { ... }; // implement interface methods
TailerThread tailer = new TailerThread(callback, "/home/me", "fileToMonitor.txt");
tailer.start(); // start the thread
if (!tailer.waitForStart(2000)) {
    throw new RuntimeException("TailerThread didn't start up within 2s");
}
```

Then add lines to `/home/me/fileToMonitor.txt` and the `receiveEvent()` in
your `TailerCallback` implementation will receive the appended lines.

To signal the thread to stop:
```tailer.doStop();
tailer.interrupt();
```

# Building

The build system is gradle.  To build:

`gradle build`

To run just the tests:

`gradle test`

To install the gradle wrapper (perhaps for your IDE):

`gradle wrapper --gradle-version 2.12`

Or, if you prefer, replace 2.12 with the latest Gradle version.

To publish to your local maven repository:
`gradle publishToMavenLocal`

repository: bkoehm/javatailer

repo_name: bkoehm/javatailer


text:
[< Back to the documentation](/#)

## Installation
If you prefer video lessons, welcome to the [Udemy Course](https://insomniac-bot.com/udemy_course/). We'll go through all installation steps together!

### Windows
1. Download and install python from [python.org](https://www.python.org/downloads/windows/). Better choose latest stable release.
2. Open Command Prompt.
3. Run `python -m pip install --upgrade pip` to make sure you've got the latest pip version.
4. Run `python -m pip install insomniac` to install insomniac package.
5. Download [start.py](https://raw.githubusercontent.com/alexal1/Insomniac/master/start.py) to a directory where you're going to launch the script from (right-click on the link, then Save As).
6. Download and unzip [Android platform tools](https://developer.android.com/studio/releases/platform-tools), move them to a folder where you won't delete them accidentally. Standard place is `C:\Users\<your username>\Android\sdk\platform-tools\`.
7. [Add platform-tools path to the PATH environment variable](https://github.com/alexal1/Insomniac/wiki/Adding-platform-tools-to-the-PATH-environment-variable). If you do it correctly, Command Prompt command `adb devices` will print `List of devices attached`.
8. Connect your Android phone via USB cable _or_ use [emulator](https://www.patreon.com/posts/how-to-install-43543116).
9. Enable [Developer options](https://developer.android.com/studio/debug/dev-options#enable) on the Android phone/emulator:
>On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen. To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version:
>
> Android 9 (API level 28) and higher: Settings > About Phone > Build Number
>
> Android 8.0.0 (API level 26) and Android 8.1.0 (API level 26): Settings > System > About Phone > Build Number
>
> Android 7.1 (API level 25) and lower: Settings > About Phone > Build Number
10. Switch on **USB debugging** (and also **Install apps via USB** and **Allow ADB debugging in charge only mode** if there are such options) on the Developer options screen. You may also want to enable **Stay awake while charging**.
11. Android device will ask you to allow computer connection. Press "Connect".
12. Type `adb devices` in Command Prompt. It will display attached devices. There should be exactly one device.

### macOS
1. Download and install python from [python.org](https://www.python.org/downloads/mac-osx/). Better choose latest stable release.
2. Open Terminal.
3. Run `python3 -m pip install --upgrade pip` to make sure you've got the latest pip version.
4. Run `python3 -m pip install insomniac` to install insomniac package.
5. Download [start.py](https://raw.githubusercontent.com/alexal1/Insomniac/master/start.py) to a directory where you're going to launch the script from (right-click on the link, then Download Linked File As).
6. Download and unzip [Android platform tools](https://developer.android.com/studio/releases/platform-tools), move them to a folder where you won't delete them accidentally. Standard place is `~/Library/Android/sdk/platform-tools/`.
7. [Add platform-tools path to the PATH environment variable](https://github.com/alexal1/Insomniac/wiki/Adding-platform-tools-to-the-PATH-environment-variable). If you do it correctly, Terminal command `adb devices` will print `List of devices attached`.
8. Connect your Android phone via USB cable _or_ use [emulator](https://www.patreon.com/posts/how-to-install-43485861).
9. Enable [Developer options](https://developer.android.com/studio/debug/dev-options#enable) on the Android phone/emulator:
>On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen. To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version:
>
> Android 9 (API level 28) and higher: Settings > About Phone > Build Number
>
> Android 8.0.0 (API level 26) and Android 8.1.0 (API level 26): Settings > System > About Phone > Build Number
>
> Android 7.1 (API level 25) and lower: Settings > About Phone > Build Number
10. Switch on **USB debugging** (and also **Install apps via USB** and **Allow ADB debugging in charge only mode** if there are such options) on the Developer options screen. You may also want to enable **Stay awake while charging**.
11. Android device will ask you to allow computer connection. Press "Connect".
12. Type `adb devices` in Terminal. It will display attached devices. There should be exactly one device.

### Ubuntu
1. Open Terminal.
2. Run `sudo apt-get update && sudo apt-get upgrade` to update & upgrade current packages.
3. Run `sudo apt install python3-pip` to install pip.
4. Run `python3 -m pip install insomniac` to install insomniac package.
5. Download [start.py](https://raw.githubusercontent.com/alexal1/Insomniac/master/start.py) to a directory where you're going to launch the script from (right-click on the link, then Save Link As).
6. Run `sudo apt-get install -y android-tools-adb android-tools-fastboot` to install Android platform tools.
7. Connect your Android phone via USB cable _or_ use [emulator](https://www.patreon.com/posts/how-to-install-43485861).
8. Enable [Developer options](https://developer.android.com/studio/debug/dev-options#enable) on the Android phone/emulator:
>On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen. To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version:
>
> Android 9 (API level 28) and higher: Settings > About Phone > Build Number
>
> Android 8.0.0 (API level 26) and Android 8.1.0 (API level 26): Settings > System > About Phone > Build Number
>
> Android 7.1 (API level 25) and lower: Settings > About Phone > Build Number
9. Switch on **USB debugging** (and also **Install apps via USB** and **Allow ADB debugging in charge only mode** if there are such options) on the Developer options screen. You may also want to enable **Stay awake while charging**.
10. Android device will ask you to allow computer connection. Press "Connect".
11. Type `adb devices` in Terminal. It will display attached devices. There should be exactly one device.

### Raspberry Pi
1. Open Terminal.
2. Run `python3 -m pip install --upgrade pip` to make sure you've got the latest pip version.
3. Run `python3 -m pip install insomniac` to install insomniac package.
4. Download [start.py](https://raw.githubusercontent.com/alexal1/Insomniac/master/start.py) to a directory where you're going to launch the script from (right-click on the link, then Save link as).
5. Run `sudo apt-get update && sudo apt-get upgrade` to update & upgrade current packages.
6. Run `sudo apt-get install -y android-tools-adb android-tools-fastboot libopenjp2-7` to install Android platform tools.
7. Connect your Android phone via USB cable _or_ use [emulator](https://www.patreon.com/posts/how-to-install-43485861).
8. Enable [Developer options](https://developer.android.com/studio/debug/dev-options#enable) on the Android phone/emulator:
>On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen. To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version:
>
> Android 9 (API level 28) and higher: Settings > About Phone > Build Number
>
> Android 8.0.0 (API level 26) and Android 8.1.0 (API level 26): Settings > System > About Phone > Build Number
>
> Android 7.1 (API level 25) and lower: Settings > About Phone > Build Number
9. Switch on **USB debugging** (and also **Install apps via USB** and **Allow ADB debugging in charge only mode** if there are such options) on the Developer options screen. You may also want to enable **Stay awake while charging**.
10. Android device will ask you to allow computer connection. Press "Connect".
11. Type `adb devices` in Terminal. It will display attached devices. There should be exactly one device.

gha_language: Python

gha_license_id: MIT


text:
# NebulaGraph Java

[NebulaGraph Java](https://github.com/vesoft-inc/nebula-java/tree/{{java.branch}}) is a Java client for connecting to and managing the NebulaGraph database.

## Prerequisites

You have installed Java 8.0 or later versions.

## Compatibility with NebulaGraph

See [github](https://github.com/vesoft-inc/nebula-java/tree/{{java.branch}}).

## Download NebulaGraph Java

- (Recommended) To install a specific version of NebulaGraph Java, use the Git option `--branch` to specify the branch. For example, to install v{{ java.release }}, run the following command:

  ```bash
  $ git clone --branch {{java.branch}} https://github.com/vesoft-inc/nebula-java.git
  ```

- To install the daily development version, run the following command to download the source code from the `master` branch:

  ```bash
  $ git clone https://github.com/vesoft-inc/nebula-java.git
  ```

## Use NebulaGraph Java

!!! note

    We recommend that each thread uses one session. If multiple threads use the same session, the performance will be reduced.

When importing a Maven project with tools such as IDEA, set the following dependency in `pom.xml`.

!!! note

    `3.0.0-SNAPSHOT` indicates the daily development version that may have unknown issues. We recommend that you replace `3.0.0-SNAPSHOT` with a released version number to use a table version.

```bash
<dependency>
  <groupId>com.vesoft</groupId>
  <artifactId>client</artifactId>
  <version>3.0.0-SNAPSHOT</version>
</dependency>
```

If you cannot download the dependency for the daily development version, set the following content in `pom.xml`. Released versions have no such issue.

```bash
<repositories>
  <repository>
    <id>snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
  </repository>
</repositories>
```

If there is no Maven to manage the project, manually download the [JAR file](https://repo1.maven.org/maven2/com/vesoft/) to install NebulaGraph Java.

### Core of the example code

The NebulaGraph Java client provides both Connection Pool and Session Pool modes, using Connection Pool requires the user to manage session instances.

- Session Pool

  For all the code, see [GraphSessionPoolExample](https://github.com/vesoft-inc/nebula-java/blob/{{java.branch}}/examples/src/main/java/com/vesoft/nebula/examples/GraphSessionPoolExample.java).

- Connection Pool

  For all the code, see [GraphClientExample](https://github.com/vesoft-inc/nebula-java/blob/{{java.branch}}/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java).

repository: vesoft-inc/nebula-docs

gha_language: HTML

repo_name: vesoft-inc/nebula-docs


text:
---
title: Improved canine exome designs, featuring ncRNAs and increased coverage of protein
  coding genes.
date: '2015-08-01'
draft: false
publishDate: '2020-11-16T09:04:00.461979Z'
authors:
- Bart J G Broeckx
- Christophe Hitte
- Frank Coopman
- Geert E C Verhoeven
- Sarah De Keulenaer
- Ellen De Meester
- Thomas Derrien
- Jessica Alfoldi
- Kerstin Lindblad-Toh
- Tim Bosmans
- Ingrid Gielen
- Henri Van Bree
- Bernadette Van Ryssen
- Jimmy H Saunders
- Filip Van Nieuwerburgh
- Dieter Deforce
publication_types:
- '2'
abstract: "By limiting sequencing to those sequences transcribed as mRNA, whole exome\
  \ sequencing is a cost-efficient technique often used in disease-association studies.\
  \ We developed two target enrichment designs based on the recently released annotation\
  \ of the canine genome: the exome-plus design and the exome-CDS design. The exome-plus\
  \ design combines the exons of the CanFam 3.1 Ensembl annotation, more recently\
  \ discovered protein-coding exons and a variety of non-coding RNA regions (microRNAs,\
  \ long non-coding RNAs and antisense transcripts), leading to a total size of approximately\
  \ 152 Mb. The exome-CDS was designed as a subset of the exome-plus by omitting all\
  \ 3' and 5' untranslated regions. This reduced the size of the exome-CDS to approximately\
  \ 71 Mb. To test the capturing performance, four exome-plus captures were sequenced\
  \ on a NextSeq 500 with each capture containing four pre-capture pooled, barcoded\
  \ samples. At an average sequencing depth of 68.3x, 80% of the regions and well\
  \ over 90% of the targeted base pairs were completely covered at least 5 times with\
  \ high reproducibility. Based on the performance of the exome-plus, we estimated\
  \ the performance of the exome-CDS. Overall, these designs provide flexible solutions\
  \ for a variety of research questions and are likely to be reliable tools in disease\
  \ studies."
featured: false
publication: '*Scientific reports*'
tags:
- '"Animals"'
- '"Base Composition"'
- '"Dogs"'
- '"Exome"'
- '"Genetic Variation"'
- '"Genomics"'
- '"High-Throughput Nucleotide Sequencing"'
- '"Proteins"'
- '"RNA"'
- '"Untranslated"'
- '"Reproducibility of Results"'
- '"genetics"'
- '"methods"'
doi: 10.1038/srep12810
---


text:
# Micro service: Create stripe invoice as Pdf

Micro service to create and stream Invoice as PDF to customer

Based on [stripe-pdf-invoice](https://github.com/jonathanasquier/stripe-pdf-invoice)

See [working with Stripe invoices](https://stripe.com/docs/subscriptions/invoices)

## Pre-requisites

Set `STRIPE_SECRET` environment variable

## Configuration

Use `src/config.js` to configure invoice and stripe options to suit your needs...

## Testing

Using [Ava endpoint testing recipe](https://github.com/avajs/ava/blob/master/docs/recipes/endpoint-testing.md)

```js
test('signup:Success', async t => {
  t.plan(2)

  const res = await request(makeApp())
    .post('/signup')
    .send({email<EMAIL_ADDRESS>password: '123123'})

  t.is(res.status, 200)
  t.is(res.body.email<EMAIL_ADDRESS>});
```

## License

MIT


text:
---
layout: post
title: "Daily Journal"
date: 2014-04-28 14:11
comments: true
categories:
flashcards:
  - front: What is `ignoredModules` useful for in the `broccoli-es6-concatenator` plugin?
    back: It prevents a file from being transpiled, and basically marks a module as something that'll be implemented later
---

## `npm install` git repos

NOTE: this section is not complete; placeholding for later.

After many abortive attempts to find the right syntax for running
`npm install`, I figured I'd delve into what URL syntax it actually
expected, and why.

Here's a bunch of stuff that didn't work:

    npm install git+ssh@github.com:stefanpenner/ember-cli.git
    npm install https://github.com/stefanpenner/ember-cli.git

Why couldn't `npm install` just figure out what I meant? Well, I don't
know, but here's a breakdown of the above.

_This is a helpful resoure: https://help.github.com/articles/which-remote-url-should-i-use_

Basically, you can clone GitHub repos either with HTTPS or SSH urls. SSH
urls require an SSH keypair to generated on your computer and registered
to your GitHub accounts.

So here's the first thing I tried:

    https://help.github.com/articles/using-ssh-agent-forwarding

This is an HTTPS url.

Q: Why does/did GitHub even require a password for cloning a repo?
What's insecure about that read info? Possible answer: even if you don't
have read access to a repo, a man in the middle might tell you you do,
and then you're sending priv data, blah blah blah.

## `Gdiff`, diffing in vim

This was a very helpful resource:

http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/

    :Gdiff
    :ls # list all the open buffers in their names
    :diffget BUFSPEC # when inside a conflict region,
                     # say which buffer to get content from
    :diffput BUFSPEC # when inside a conflict region,
                     # say which buffer to get content from
    :only # close all buffer except this one

I ended up adding the following to my `.vimrc.after`:

    :nnoremap <Leader>dg :diffget <CR>
    :nnoremap <Leader>dp :diffput <CR>

Note that this arg-less form is useful when diffing between local
changes and your last checkin; I use it a bunch for `ember-cli` when I
call `ember init` to reset my app structure to the latest `ember-cli`
blueprint (note that this process is still pretty miserable).

## Broccoli `ignoredModules` and `legacyFilesToAppend`

These options come from the `broccoli-es6-concatenator`.

- `ignoredModules`: don't transpile this module or add it to the list of
  importable modules. This is useful when you have a file that's already
  in AMD format (not ES6), and you want to be able to es6 `import` that
  module, so you put it in `ignoredModules` so it's not treated as an
  es6 file that needs to be imported.
- `legacyFilesToAppend`: non-es6 files (global libraries) that should be
  appended to the end of the final output JS file.

Note: `loaderFile` is automatically added as a legacy files, why, duh,
because the loader file obviously needs to be a global, non-module file.

So, wtf does this mean (the latest iteration of the blueprint
Brocfile.js from ember-cli):

    if (app.env !== 'production') {
      push.apply(app.ignoredModules, [
        'qunit',
        'ember-qunit'
      ]);

      push.apply(app.legacyFilesToAppend, [
        'test-shims.js',
        'ember-qunit/dist/named-amd/main.js'
      ]);
    }

Well, thanks to the geniuses in freenode IRC `#ember-cli`, I've learned
that:

- This shouldn't be in the blueprint Brocfile.js, but rather should be
  in the ember-cli lib `EmberApp` abstraction over the Brocfile.js, but
  anyway:
- The intent is that by specifying an `ignoredModules` item, you're
  basically saying "I intent to import a module with this name, and
  because I'm opting out of generating it now via an ES6 file, I'll be
  adding an AMD module for this file later"

And if you try to `import something from 'nonexistent-module'`, you'll
get a loader error.

This all seems really obvious, right?  :(

repository: machty/alexmatchneer-blog

extension: markdown

repo_name: machty/alexmatchneer-blog


text:
---
breadcrumbs:
- label: Countries
  url: "../../"
- label: 'Tanzania '
  url: "../"
layout: featured_site
contentful:
  sys:
    id: 1MRBSR83yUwGoo8s4AKICk
    created_at: !ruby/object:DateTime 2016-07-27 07:45:12.791000000 Z
    updated_at: !ruby/object:DateTime 2016-07-27 07:45:12.791000000 Z
    content_type_id: featured_site
    revision: 1
  title: Kolo, Tanzania
  slug: kolo
  chapters:
  - sys:
      id: 1NISbAVcjSMI4SEWE8WgAm
      created_at: !ruby/object:DateTime 2016-07-27 07:45:19.053000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 14:24:34.308000000 Z
      content_type_id: chapter
      revision: 2
    title: ''
    title_internal: Kolo Chapter 1
    body: The Kondoa rock art sites are located on the eastern slopes of the Maasai
      escarpment, which borders the western side of the Great Rift Valley in central
      Tanzania, covering an area of over 2,336 km². Stretching for around 18 km along
      the escarpment, the exact number of rock art sites in the Kondoa area is unknown
      but is estimated to be up to 450, the oldest of which are thought be more than
      2,000 years old. The extensive and spectacular collection of rock paintings
      are attributable to both hunter-gatherer and pastoralist communities and the
      images are testament to the changing socio-economic environment in the region.
      The hunter-gatherer rock paintings of Kondoa are dominated by human figures
      and animals. While a dark reddish brown predominates, other colours include
      yellow, orange, red and white.  Some of the shelters are still considered to
      have cultural associations with the people who live nearby, reflecting their
      beliefs, rituals and cosmological traditions. In 2006, Kondoa was nominated
      and listed as one of UNESCO’s World Heritage rock art sites in Africa.
  - sys:
      id: 2e0bNc68UUM0YKaM40Sm4C
      created_at: !ruby/object:DateTime 2016-07-27 07:45:11.871000000 Z
      updated_at: !ruby/object:DateTime 2017-01-24 15:57:32.216000000 Z
      content_type_id: image
      revision: 2
    image:
      sys:
        id: 4qqgpg1KTmKwEA8kQsg8Qe
        created_at: !ruby/object:DateTime 2016-07-27 07:46:35.056000000 Z
        updated_at: !ruby/object:DateTime 2016-07-27 07:46:35.056000000 Z
      title: TANKON0030027 jpeg edited-1
      description:
      url: "//images.ctfassets.net/xt8ne4gbbocd/4qqgpg1KTmKwEA8kQsg8Qe/1d8fb417f4142acaf65be18c6c6b8ea0/TANKON0030027_jpeg_edited-1.jpg"
    caption: View looking out over Kondoa landscape. 2013,2034.16829 © TARA/David
      Coulson
    col_link: http://www.britishmuseum.org/research/collection_online/collection_object_details.aspx?objectId=3709780&partId=1&searchText=2013,2034.16829&page=1
  - sys:
      id: 5WqTYb2ohiCaseea44yMWg
      created_at: !ruby/object:DateTime 2016-07-27 07:45:19.050000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 14:22:52.499000000 Z
      content_type_id: chapter
      revision: 2
    title: ''
    title_internal: 'Kolo Chapter 2 '
    body: "The sites at Kolo are the most famous of the Kondoa paintings. Kolo comprises
      three rock art sites, known as Kolo 1, 2 and 3. The main site, Kolo 1 (known
      locally as Mongomi wa Kolo) is a large, imposing rock shelter that is only accessible
      by following a winding path at the end of a dirt road. This site contains many
      fine-line red paintings, some of which are very faded; but the site is still
      used by the local community for secret rituals. Kolo 2 is located south of the
      main site and includes human and animal figures, while Kolo 3 is north of Kolo1
      and is characterised by human, animal and geometric figures. The renowned palaeontologist
      Mary Leakey surveyed and documented many of the paintings at Kolo in the 1950s.
      \ The examples we see here are thought to have been made by early hunter-gatherer
      groups, ancestors of the modern Sandawe, one of the first cultural groups to
      inhabit Kondoa.   \n\n"
  - sys:
      id: 5JuWPWO5Z6w8aeeWMqQ8oK
      created_at: !ruby/object:DateTime 2016-07-27 07:45:11.850000000 Z
      updated_at: !ruby/object:DateTime 2017-01-24 15:58:56.845000000 Z
      content_type_id: image
      revision: 2
    image:
      sys:
        id: 6hDS1W5bdSYICYEse20Wuw
        created_at: !ruby/object:DateTime 2016-07-27 07:46:35.991000000 Z
        updated_at: !ruby/object:DateTime 2016-07-27 07:46:35.991000000 Z
      title: TANKON0030032 jpeg edited-1
      description:
      url: "//images.ctfassets.net/xt8ne4gbbocd/6hDS1W5bdSYICYEse20Wuw/48e981adce78ac63fc6ec12701fa5145/TANKON0030032_jpeg_edited-1.jpg"
    caption: Three slender figures with elongated bodies wearing elaborate curved
      feather-like headdresses. Kolo 1, Kondoa, Tanzania. 2013,2034.16832 © TARA/David
      Coulson
    col_link: http://www.britishmuseum.org/research/collection_online/collection_object_details.aspx?objectId=3709777&partId=1&searchText=2013,2034.16832&page=1
  - sys:
      id: 1o3g8TuJuc8MiGyQ6g6g42
      created_at: !ruby/object:DateTime 2016-07-27 07:45:18.949000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 14:23:12.269000000 Z
      content_type_id: chapter
      revision: 2
    title: ''
    title_internal: Kolo Chapter 3
    body: "__Art__\n\nAmong the animals depicted are elephants, giraffes, antelopes,
      eland, rhinoceros and wildebeest; while human figures are represented as slender
      and elongated, often with elaborate hairstyles or headdresses, holding bows
      and arrows. Groups of figures are also shown bent at the waist, with some appearing
      to take on animal characteristics. These paintings have been associated with
      Sandawe cultural beliefs. \n\nThe Sandawe communicate with the spirits by taking
      on the power of an animal and some features at Mongomi wa Kolo can be understood
      by reference to the Sandawe traditional practice known as simbó (Ten Raa 1971,
      1974). Developing Ten Raa’s observations, Lewis-Williams (1986) proposed that
      simbó is the ritual of being a lion, and that simbó dancers are believed to
      turn into lions. Lim (1992, 1996) adopted a site-specific approach to the rock
      art and has suggested that the importance of place is as important as the images
      themselves. According to Lim the potency of a place is produced through ritual
      activities, so that meaning resides in the process of painting in a particular
      location, rather than in the painted image itself.  \n"
  - sys:
      id: 2H6WyW8gaISq2KgkCGa2k0
      created_at: !ruby/object:DateTime 2016-07-27 07:45:18.861000000 Z
      updated_at: !ruby/object:DateTime 2017-01-24 16:05:45.603000000 Z
      content_type_id: chapter
      revision: 5
    title_internal: Kolo chapter 4
    body: |+
      Ritual Practices

      Ritual sites are generally located near fig and baobab trees, and springs. However, about 3 m south of the main Kolo shelter, a cavity underneath a huge boulder is used, even today, by local diviners, healers and rainmakers to invoke visions and communicate with the spirits. Oral traditions indicate that Mongomi wa Kolo is considered more powerful than other ritual places in Kondoa, and its unusual location may contribute to its efficacy.  The other two shelters of Kolo 2 and 3 are also used for ritual ceremonies.

  - sys:
      id: 5gBuZ4nsoo4M2QOoCOs8Cs
      created_at: !ruby/object:DateTime 2016-07-27 07:45:14.737000000 Z
      updated_at: !ruby/object:DateTime 2017-01-24 16:06:33.160000000 Z
      content_type_id: image
      revision: 3
    image:
      sys:
        id: 6HJM4veidyg8KAO6WsaOcc
        created_at: !ruby/object:DateTime 2016-07-27 07:46:35.269000000 Z
        updated_at: !ruby/object:DateTime 2016-07-27 07:46:35.269000000 Z
      title: TANKON0030008 jpeg edited-1
      description:
      url: "//images.ctfassets.net/xt8ne4gbbocd/6HJM4veidyg8KAO6WsaOcc/85bf74728415037376fb5eca97f3f527/TANKON0030008_jpeg_edited-1.jpg"
    caption: Group of five figures, one with animal-like head and grazing antelope
      on the left. Kolo 1, Kondoa, Tanzania. 2013,2034.16820 © TARA/David Coulson
    col_link: http://www.britishmuseum.org/research/collection_online/collection_object_details.aspx?objectId=3709705&partId=1&searchText=2013,2034.20311+&images=true&people=197356&museumno=2013,2034.16819&page=1
  - sys:
      id: 4dRHbbM4IU0MQog4kuOCGY
      created_at: !ruby/object:DateTime 2016-07-27 07:45:18.820000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 14:23:50.727000000 Z
      content_type_id: chapter
      revision: 2
    title: ''
    title_internal: Kolo chapter 5
    body: |-
      __Conservation__

      When Mary Leakey was surveying the Kondoa rock paintings in 1983 she predicted that if serious preservation and conservation measures were not put in place the paintings would be destroyed by 2020. Although inscribed onto the UNESCO World Heritage List in 2006, it has been noted paintings are being destroyed by the dust from the ground and in some cases rainwater is causing the paintings to deteriorate.
  - sys:
      id: 5SJRvFQ6NasOKwWYogwWqM
      created_at: !ruby/object:DateTime 2016-07-27 07:45:11.820000000 Z
      updated_at: !ruby/object:DateTime 2017-01-24 16:07:01.378000000 Z
      content_type_id: image
      revision: 2
    image:
      sys:
        id: 27ttIF1VA4e8ekcAcea4G6
        created_at: !ruby/object:DateTime 2016-07-27 07:46:35.042000000 Z
        updated_at: !ruby/object:DateTime 2016-07-27 07:46:35.042000000 Z
      title: TANKON0030014 jpeg edited-1
      description:
      url: "//images.ctfassets.net/xt8ne4gbbocd/27ttIF1VA4e8ekcAcea4G6/d705e5dbf518d996376eed7193eb1ae2/TANKON0030014_jpeg_edited-1.jpg"
    caption: Panel of slender red figures with elongated bodies, showing large figure
      bent at waist. Kolo 1, Kondoa, Tanzania. 2013,2034.16824 © TARA/David Coulson
    col_link: http://www.britishmuseum.org/research/collection_online/collection_object_details.aspx?objectId=3709771&partId=1&searchText=2013,2034.16824&page=1
  - sys:
      id: 2O7PwT55ZmSSgsWkeEAQsq
      created_at: !ruby/object:DateTime 2016-07-27 07:45:18.796000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 09:51:08.628000000 Z
      content_type_id: chapter
      revision: 3
    title: ''
    title_internal: Kolo Chapter 6
    body: |+
      Moreover, the documentation of paintings at Kondoa is incomplete, and some areas have not been surveyed at all. Bwasiri (2008) advocates an urgent need to collate all existing information in this region and implement a sites and monuments record that also takes into account living heritage values.

  - sys:
      id: 4xFpVDUn2EA8c0k2WWGaaK
      created_at: !ruby/object:DateTime 2016-07-27 07:45:11.820000000 Z
      updated_at: !ruby/object:DateTime 2017-01-24 16:07:17.252000000 Z
      content_type_id: image
      revision: 2
    image:
      sys:
        id: 4eWYwHYojCu0EIYyoQGgMI
        created_at: !ruby/object:DateTime 2016-07-27 07:46:37.039000000 Z
        updated_at: !ruby/object:DateTime 2016-07-27 07:46:37.039000000 Z
      title: TANKON0030085 jpeg
      description:
      url: "//images.ctfassets.net/xt8ne4gbbocd/4eWYwHYojCu0EIYyoQGgMI/4b39bad47efe37b9e6d0ab830c823649/TANKON0030085_jpeg.jpg"
    caption: Painted panel damaged by water seepage. Kolo 1, Kondoa, Tanzania. 2013,2034.16876
      © TARA/David Coulson
    col_link: http://www.britishmuseum.org/research/collection_online/collection_object_details.aspx?objectId=3709830&partId=1&searchText=2013,2034.16876&page=1
  citations:
  - sys:
      id: 4khc2F5ABWm0kyKoUooa80
      created_at: !ruby/object:DateTime 2016-07-27 07:45:18.097000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 09:56:15.212000000 Z
      content_type_id: citation
      revision: 3
    citation_line: "Bwasiri, E.J 2008.  'The Management of Indigenous Heritage: A
      Case Study of Mongomi wa Kolo Rock Shelter, Central Tanzania'. MA Dissertation,
      University of the\nWitwatersrand \n\nLeakey, M. 1983. *Africa’s Vanishing Art
      – The Rock Paintings of Tanzania.* London, Hamish Hamilton Ltd.\n\nLewis-Williams,
      J.D.  1986. ‘Beyond Style and Portrait: A Comparison of Tanzanian\nand Southern
      African Rock Art’. *Contemporary Studies on Khoisan 2*. Hamburg, Helmut Buske
      Verlag\n\nLim, I.L.  1992. ‘A Site-Oriented Approach to Rock Art: a Study from
      Usandawe, Central Tanzania’. PhD Thesis, University of Michigan\n\nTen Raa,
      E. 1971. ‘Dead Art and Living Society: A Study of Rock paintings in a Social
      Context’. *Mankind* 8:42-58\n\nTen Raa, E. 1974. ‘A record of some prehistoric
      and some recent Sandawe rock paintings’. *Tanzania Notes and Records* 75:9-27\n"
  background_images:
  - sys:
      id: 6cqE0uH6mswkKcOkWA6waC
      created_at: !ruby/object:DateTime 2016-07-27 07:46:32.004000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 07:46:32.004000000 Z
    title: TANKON0030029
    description:
    url: "//images.ctfassets.net/xt8ne4gbbocd/6cqE0uH6mswkKcOkWA6waC/7e3e2d492733456ba58f56ccbf8e5bac/TANKON0030029.jpg"
  - sys:
      id: DiswAHlgIgmsgEMUiQYm4
      created_at: !ruby/object:DateTime 2016-07-27 07:46:32.111000000 Z
      updated_at: !ruby/object:DateTime 2016-07-27 07:46:32.111000000 Z
    title: TANKON0030077
    description:
    url: "//images.ctfassets.net/xt8ne4gbbocd/DiswAHlgIgmsgEMUiQYm4/a68c86b9a0f96c2c658570a581af71f3/TANKON0030077.jpg"
---

repository: kingsdigitallab/african-rock-art

repo_name: kingsdigitallab/african-rock-art


text:
# CP59-RijndaelEncryption
Home made Rijndael encryption 128-bits. Written in C.

- - - -

# How to use #
####Compile and RUN!

	cd CP59-RijndaelEncryption
	make
	./rijndael -f [filename] -k [key] [--encrypt|--decrypt]

!!!!Exclusive for MacOS!!!!


text:
# Generate Source Code Change Pattern from Review History

## How to Use

### 0 Cloning this repository

```sh
git clone https://github.com/Ikuyadeu/review_pattern_gen.git
cd review_pattern_gen
pip3 install antlr4-python3-runtime prefixspan PyGithub unidiff numpy
git clone https://github.com/Ikuyadeu/CodeTokenizer.git
```

### 1 Preparing config file

Making empty `config` file

```sh
touch config
```

and edit `config` file like berrow

(If your target `Python` repository name is `tensorflow/models`)
```properties
[GitHub]
id = YourGitHubId
password = YourGitHubPassword
token = (**option if you will collect from private repo)YourGitHubToken
[Target]
owner = Your Target GitHub Repository Owner (e.g. tensorflow)
repo = Your Target GitHub Repository (e.g. models)
lang = Your Target Language (e.g. Python)
[Rule]
threshold = Rule threshold (e.g. 2, it means all repeated changes are rule)
```
**GitHub token can be generated from https://github.com/settings/tokens)

### 2 Collecting training data set

```sh
python3 collect_pulls.py
python3 collect_changes.py
```

Output:
* Pull List (`data/pulls/{owner}_{repo}.csv`)
* Change List (`data/changes/{owner}_{repo}_python.json`)

### 3 Generating frequently appered patterns

This process needs long time

```sh
python3 generate_rules.py
```

Output:
* Pattern (`data/rules/{owner}_{repo}_python.json`)

### 4 Evaluating detected patterns

```sh
python3 evaluated_rules.py
```

Output:
* Pattern (`data/rules/{owner}_{repo}_python_evaluated.json`)

### Sample

This repository put a part of `tensorflow/model`s' review data on each directory.
Also, these data is shorter than correct data set.

### Thanks

I would like to thank the Support Center for Advanced Telecommunications (SCAT) Technology Research, Foundation. This system was supported by JSPS KAKENHI Grant Numbers JP18H03222, JP17H00731, JP15H02683, and JP18KT0013.

Also, this repository use other repository
https://github.com/Ikuyadeu/CodeTokenizer


text:
# Binary classifier performance evaluation

Whether you are building a binary classifier or need to audit one built
by someone else, there are many things we'd like to know about its performance.
The following sections describe functions that are designed to let you easily get at
commonly used binary classifier performance diagnostic metrics.

The functions are relatively performant and are capable of handling millions of rows
of data.

## kstest

The two sample Kolmogorov-Smirnov test is a statistical test of whether two empirical
distributions are the same.
The test is based on finding the maximum separation between the two cumulative
distribution functions (CDF) and determining the p-value of the test statistic.

For binary classifiers, the predicted probabilities of the two classes should be
different, thus the interest isn't whether the probability distributions
are different, rather, it is how large is the maximal separation and
where does it occur.

Let's generate some data to illustrate the idea.

```@example kstest
using Random, Distributions, Plots

Random.seed!(123)

n100 = rand(Normal(100, 10), 1000)
n100a = rand(Normal(100, 10), 1000)
n120 = rand(Normal(120, 10), 1000)
n140 = rand(Normal(140, 10), 1000)

histogram(n100, nbins = 50, opacity= 0.3)
histogram!(n100a, nbins = 50, opacity= 0.3, legend = nothing)
savefig("kstest-1.svg"); nothing # hide
```

![](kstest-1.svg)

We can use the `kstest` function to find the maximum separation and its location.
The required input is a vector designating the two classes and another vector of
the values, this is the typical data structure of model scoring on
development or validation data.

```@example kstest
using DSUtils

cls = [fill(0, length(n100)); fill(1, length(n100a))]
values = [n100; n100a]
kstest(cls, values)
```

`kstest` returns results in a named tuple:

- `n`, total number of observations
- `n1`, total number of observations in class 1
- `n0`, total number of observations in class 0
- `baserate`, n1 / n, the incidence rate of class 1
- `ks`, the maximum separation between CDF1 and CDF0, a value between [0, 1]
- `ksarg`, argmax, the value where maximum separation is achieved
- `ksdep`, depth of argmax in the sorted values (default sort is from high to low)

ks of 0 means the distributions are indistinguishable,
ks of 1 says the two distributions are complete separable.
These two distributions have negligible separation since they are drawn from the
same distribution.

We now test on moderate separation:

```@example kstest
histogram(n100, nbins = 50, opacity= 0.3)
histogram!(n120, nbins = 50, opacity= 0.3, legend = nothing)
savefig("kstest-2.svg"); nothing    # hide
```

![](kstest-2.svg)

```@example kstest
cls = [fill(0, length(n100)); fill(1, length(n120))]
values = [n100; n120]
kstest(cls, values)
```

There's considerable separation between the classes, and ks is larger than before.

Let's test on widely separately data:

```@example kstest
histogram(n100, nbins = 50, opacity= 0.3)
histogram!(n140, nbins = 50, opacity= 0.3, legend = nothing)
savefig("kstest-3.svg"); nothing    # hide
```

![](kstest-3.svg)

```@example kstest
cls = [fill(0, length(n100)); fill(1, length(n140))]
values = [n100; n140]
kstest(cls, values)
```

We can see that the two classes are nearly separable and
ks is now quite high at 0.949.
These examples illustrate how `ks` can serve as an indicator of the ability to
separate the two classes.

## auroc

A good binary classifier would have high sensitivity
(able to recognize True Positive) and high specificity
(able to recognize True Negatives, hence have low False Positive).
A plot of the trade-off curve of True Positive Rate versus False Positive Rate
at various cutoff probabilities is called the
Receiver Operating Characteristics (ROC) curve.
One way to quantify performance is by the area under the ROC curve,
often abbreviated as AUC or C,
many packages would compute AUC via numeric integration of the ROC curve.
AUC is in the range [0, 1], a perfect model has AUC of 1,
a random model has AUC of 0.5,
and a perfectly backwards model would have AUC of -1.

There is another interpretation of AUC which provides more intuition than
simply as the area under a curve.
If we make all possible pair-wise comparisons between the probabilities of
class 1 with class 0, we can count the incidences of:

- Concordant: class 1 probability > class 0 probability
- Tied: class 1 probability ≈ class 0 probability
- Discordant: class 1 probability < class 0 probability

Then we can compute:

- AUC: (Concordant + 0.5 Tied) / (N1 * N0)
- Gini: 2AUC - 1, or (Concordant - Discordant) / (N1 * N0)
- Goodman-Kruskal Gamma: (Concordant - Discordant) / (Concordant + Discordant),
no penalty for Tied
- Kendall's Tau: (Concordant - Discordant) / (0.5 * (N1+N0) * (N1+N0-1))

We can interpret AUC as the percentage of time class 1 probabilities is larger
than class 0 probabilities (ignoring ties).

The mathematical proof can be found at
[Stack Exchange](https://stats.stackexchange.com/questions/180638/how-to-derive-the-probabilistic-interpretation-of-the-auc)
and
[Professor David J. Hand's article](https://pdfs.semanticscholar.org/1fcb/f15898db36990f651c1e5cdc0b405855de2c.pdf).

```@example kstest
cls = [fill(0, length(n100)); fill(1, length(n140))]
values = [n100; n140]
auroc(cls, values)
```

`auroc` returns results in a named tuple:

- `conc`, number of concordant comparisons
- `tied`, number of tied comparisons
- `disc`, number of discordant comparisons
- `auc`, area under ROC curve, or just area under curve
- `gini`, 2auc - 1

## bcdiag

While `kstest` and `auroc` provide diagnostic measures for comparing
model performance, when there is a model of interest,
it is likely that we need to produce many graphs and table to understand and
document its performance, `bcdiag` allows us to do this easily.

```@example bcd
using Random
using GLM
using DSUtils

function logitgen(intercept::Real, slope::Real, len::Int; seed = 888)
    Random.seed!(seed)
    x = 10 .* rand(len)                     # random uniform [0, 10)
    # sort!(x)                                # x ascending
    logit = @. intercept + slope * x        # logit(prob) = ln(p / (1 + p)) = linear equation
    prob = @. 1. / (1. + exp(-logit))       # probability
    y = rand(len) .<= prob
    y, x
end

m = DataFrame(logitgen(-3, 0.6, 100_000), (:target, :x))
m_logistic = glm(@formula(target ~ x), m, Binomial(), LogitLink())
m.pred = predict(m_logistic)

kstest(m.target, m.pred)
```

```@example bcd
auroc(m.target, m.pred)
```

Running `bcdiag` prints a quick summary:

```@example bcd
mdiag = bcdiag(m.target, m.pred)
```

The output structure allows us to create the following plots and tables to understand:
- the ability of the model to separate the two classes
- the accuracy of the probability point estimates
- how to set cutoff for maximum accuracy
- performance of the model at varying cutoff depth

## ksplot

`ksplot` plots the cumulative distribution of class 1 (true positive rate)
and class 0 (false positive rate) versus depth.

```@example bcd
ksplot(mdiag)
savefig("bcd-ksplot.svg"); nothing # hide
```

It shows where the maximum separation of the two distributions occur.

![](bcd-ksplot.svg)

## rocplot

`rocplot` plots the true positive rate vs. false positive rate (depth is implicit).

```@example bcd
rocplot(mdiag)
savefig("bcd-rocplot.svg"); nothing # hide
```

A perfect model has auc of 1, a random model has auc of 0.5.

![](bcd-rocplot.svg)

## biasplot

Both `ksplot` and `rocplot` rely on the ability of the model to
rank order the observations, the score value itself doesn't matter.
For example, if you took the score and perform any monotonic transform,
`ks` and `auc` wouldn't change.
There are occasions where the score value does matter, where the probabilities
need to be accurate, for example, in expected return calculations.
Thus, we need to understand whether the probabilities are accurate,
`biasplot` does this by plotting the observed response rate versus
predicted response rate to look for systemic bias.
This is also called the *calibration* graph.

```@example bcd
biasplot(mdiag)
savefig("bcd-biasplot.svg"); nothing # hide
```

![](bcd-biasplot.svg)

An unbiased model would lie on the diagnonal, systemic shift off the diagonal
represents over or under estimate of the true probability.

## accuracyplot

People often refer to **(TP + TN) / N** as accuracy of the model,
that is, the ability to correctly identify correct cases.
It is used to compare model performance as well - model with higher accuracy
is a better model.
For a probability based classifier, a cutoff is required to turn probability
to predicted class. So, what is the cutoff value to use to achieve
maximum accuracy?

There are many approaches to setting the best cutoff, one way is to
assign utility values to the four outcomes of [TP, FP, FN, TN] and
maximize the sum across different cutoff's.
Accuracy measure uses the utility values of [1, 0, 0, 1] giving TP + TN.
You can assign negative penalty terms for misclassification as well.

Note that this is different from `kstest` - maximum separation on cumulative
distribution (normalized to 100%) does not account for class size difference,
e.g., class 1 may be only 2% of the cases.

```@example bcd
accuracyplot(mdiag)
savefig("bcd-accuracyplot.svg"); nothing # hide
```

![](bcd-accuracyplot.svg)

## liftcurve

`liftcurve` plots the actual response and predicted response versus depth,
with baserate as 1.

```@example bcd
liftcurve(mdiag)
savefig("bcd-liftcurve.svg"); nothing # hide
```

We can easily see where the model is performing better than average,
approximately the same as average, or below average.

![](bcd-liftcurve.svg)

## cumliftcurve

`cumliftcurve` is similar to `liftcurve`, the difference is it is a plot
of *cumulative* response rate from the top of the model.

```@example bcd
cumliftcurve(mdiag)
savefig("bcd-cumliftcurve.svg"); nothing # hide
```

![](bcd-cumliftcurve.svg)

## liftable

`liftable` is the table from which `liftcurve` is plotted.

```@example bcd
liftable(mdiag)
```

## cumliftable

`cumliftable` is the *cumulative* version of `liftable`.

```@example bcd
cumliftable(mdiag)
```

branch_name: refs/heads/main


text:
Test 5-02 - OVA Reboot
=======

# Purpose:

To verify that an OVA version of Harbor can be rebooted. Its configuration remains unchanged and should work the same way as before a reboot.

# References:
User guide, installation guide of Harbor OVA version.

# Environment:
* This test requires an OVA binary of Harbor.
* A vCenter, at least an ESX host, and a network that supports DHCP.
* A linux host with Docker CLI installed (Docker client).

# Test Steps:

1. From vSphere Web Client, import Harbor's OVA onto an ESX host.
2. In the deployment wizard, enter different passwords of Linux root user, Harbor admin user and MySQL root user.
3. Leave the networking settings blank.
4. Configure email settings. (can be mail server that does not exist )
5. Power on the imported OVA.
6. Wait a few minutes for the VM's booting and its IP address comes up in vCenter. (may need to refresh in Web Client)
7. Open a browser and enter http://VM_IP_address.
8. Log in as admin user of Harbor.
9. Create a new project.
10. On a Docker client host, use `docker login <harbor_host>` command to log in as the admin user.
11. Run some `docker push` and `docker pull` commands to push images to the project and pull from the project.
12. On vSphere, open the console of Harbor's VM, log in as root user using the password entered during deployment.
13. On vCenter Web Client, reboot the VM. (soft reboot)
14. After the VM starts up, repeat Step 7-12, should work the same.
15. Power off the VM, and the power it on. (hard reboot)
16. After the VM starts up, repeat Step 7-12, should work the same.
17. On vSphere, open the console of Harbor's VM, log in as root user, type `ovfenv` command to verify environment variables are the same as those entered during deployment.

# Expected Outcome:
* In Step 1-12, everything should work without errors. The passwords entered during deployment should work in Step 7, 9 and 11.
* In Step 14, 16, the VM should work the same before the reboot or power-off.
* Step 17, environment variables should remain unchanged as those entered during deployment.

# Possible Problems:
None

repository: goharbor/harbor

gha_language: Go

repo_name: goharbor/harbor


text:
## Optional arguments decorator
Originally published: 2013-01-28 01:25:55
Last updated: 2013-01-28 05:03:43
Author: Maxime H Lapointe

If you need your decorator to receive arguments, optional or not, then you should decorate it with the opt_arg_dec decorator to handle all the logic that this implies for you.


text:
---
id: greaterThanOrEqualTo
title: .greaterThanOrEqualTo
---

The `.greaterThanOrEqualTo` rule is used to ensure that the value of a given `number` property is greater than or equal to a given value.

## Example

```typescript
import { Validator } from 'fluentvalidation-ts';

type FormModel = {
  age: number;
};

class FormValidator extends Validator<FormModel> {
  constructor() {
    super();

    this.ruleFor('age').greaterThanOrEqualTo(18);
  }
}

const formValidator = new FormValidator();

formValidator.validate({ age: 18 });
// ✔ {}

formValidator.validate({ age: 16 });
// ❌ { age: 'Value must be greater than or equal to 18' }
```

## Reference

### `.greaterThanOrEqualTo(threshold: number)`

A number validation rule which takes in a threshold and ensures that the given property is greater than or equal to it.

## Example Message

> Value must be greater than or equal to `[threshold]`

repository: AlexJPotter/fluentvalidation-ts

gha_language: TypeScript

repo_name: AlexJPotter/fluentvalidation-ts


text:
---
external help file: Curl2PS-help.xml
Module Name: Curl2PS
online version:
schema: 2.0.0
---

# Get-CurlCommand

## SYNOPSIS
Converts the curl command into the module's internal CurlCommand class. Useful for debugging.

## SYNTAX

```
Get-CurlCommand [[-CurlString] <String>] [<CommonParameters>]
```

## DESCRIPTION
Converts the curl command into the module's internal CurlCommand class. Useful for debugging.

## EXAMPLES

### Example 1
```powershell
PS> $str = 'curl -X GET https://server/api/path -H "Accept: application/json" -H "Authorization: Bearer {{token}}"'
PS> Get-CurlCommand -CurlString $str

Headers    : {Accept, Authorization}
Verbose    : False
RawCommand : curl -X GET https://server/api/path -H "Accept: application/json" -H "Authorization: Bearer {{token}}"
User       :
Body       :
URL        : https://server/api/path
Method     : GET
```

Returns the Curl string as the internal object class.

## PARAMETERS

### -CurlString
The curl string to format as a CurlCommand object

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### CurlCommand

## NOTES

## RELATED LINKS

gha_language: PowerShell


text:
Better Breadcrumbs
======================
Contributors: fireg

Tags: `breadcrumbs`, `navigation`, `list`, `bread`, `crumbs`

Requires at least: 4.0

Tested up to: 4.1

Stable tag: trunk

License: MIT

License URI: http://opensource.org/licenses/MIT

Produces a better breadcrumb list for all your pages, categories, and taxonomies.

Description
----------------
Produce a better hierarchy and display of your breadcrumbs on all your pages, posts, archives, and taxonomies (where most other plugins fall way short).

Installation
----------------
1. Install plugin
2. Activate
3. Add `better_breadcrumbs()` to your templates

repository: JonathanWolfe/better-breadcrumbs

repo_name: JonathanWolfe/better-breadcrumbs


text:
---
layout: post
mathjax: true
title:  "Chapter 2: Solving Linear Equation"
crawlertitle: "All about vectors"
summary: "Just a sumary about vectors"
date:   2020-09-26
categories: ['Linear Algebra']
tags: linear-algebra
author: unknown
bg: "african-penguins.jpg"
---

## Summary | Chapter 2 (Part B)
# Elimination Using Matrices
The ultimate purpose of elimination is to knock out variables from other equations and hence find the solution of x in $$Ax = b$$.

## Matrices times Vectors and $$Ax = b$$
Ax = b represents both row and column form.
$$Ax = a_{i1} x_1 + .. + a_{in} x_n  =\sum\limits_{j=1}^n a_{ij}x_j $$

where, x = $$\begin{bmatrix}
    x_1 \\
    x_2 \\
    x_3 \\
    . \\
    . \\
    .
\end{bmatrix}$$
$$A = \begin{bmatrix}
    a_{1,1} & a_{1,2} & ... \\
    . &  & \\
     . & &
\end{bmatrix}
$$

## Matrix Form of One Elimination Step
Elimination matrix has the extra non-zero entry $$-l$$ in the $$i,j$$ position in an identity matrix and hence subtracts $$l$$ times row $$j$$ from row $$i$$. Inverse of an elimination matrix reverses the action. If $$E$$ multiplied by $$l$$ and subtracted then $$E^{-1}$$ multiplies and adds the rows.
Example of elimination matrix:

$$
\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0 \\
-l & 0 & 1
\end{bmatrix}
$$

With this we can create 0 at any desired position in the matrix and also makes computation efficient.

# Matrix Multiplication

- Associative so $$A(BC) = (AB)C$$
- NOT commutative so $$AB \neq BA$$.
- Commutative $$A + B = B + A$$
- Distributive $$c(A + B) = cA + cB$$
- Associative $$A + (B + C) = (A + B) + C$$

## Matrix $$P_{ij}$$ for Row Exchange
When zero is pivot, we might have to exchange rows as zero cannot be a pivot. For this we use permutation matrix $$P_{ij}$$ which exchanges ith row and jth row.
example:

$$P_{ij} = \begin{bmatrix}
                1 & 0 & 0\\
                0 & 0 & 1 \\
                0 & 1 & 0
                \end{bmatrix}$$

The above permutation matrix says: take $$A_{C1}$$ to $$B_{C1}$$; take $$A_{C3}$$ to $$B_{C2}$$ and $$A_{C2}$$ to $$B_{C3}$$

# Matrix multiplication
## First way
For a matrix multiplication AB to create C the number columns of A must equal the number of rows of B.

$$AB = C $$

$$(m * n) (n * p) = m * p$$

So here we get the result matrix as $$m * p$$.

-  If A and B are n * n then AB is n * n
-  Also each dot product needs n multiplication so computation of AB needs $$n^3$$ separate multiplication which is the cost of calculation of AB.

## Second and Third way: Column and Row picture
Column picture gives: Matrix A times (every column of B) i.e

$$A [b_1, b_2, ... , b_p] = [Ab_1, ... , Ab_p]$$.

Similarly Row picture Every row of A times
(Matrix B) i.e

[row of A] . $$\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6\\7 & 8 & 9 \end{bmatrix}$$

## Fourth way: column multiply row
Here we multiply column 1 to n of A with 1 to n rows of B and add them.

$$\begin{bmatrix}
    1 & 2 & 3\\
    . & . & . \\
    . & . & .
    \end{bmatrix}
\begin{bmatrix}
    4 & . & .\\
    5 & . & . \\
    6 & . & .
    \end{bmatrix}
    = (1*4) + (2*5) + (3*6)
$$

## Block Multiplication

-  Matrix can be divided into blocks which can give a better picture for complex matrices
-  We can use block multiplication to eliminate multiple elements with single matrix

# Inverse Matrix
The matrix $$A^{-1}$$ is the inverse of A if $$A^{-1}A = I$$ and  $$AA^{-1} = I$$.
## Testing Inverse

- If matrix is diagonally dominant, it has inverse.
- $$A^{-1}$$ exists iff elimination produces $$n$$ pivot points. That is no diagonal element should be zero.
-  Matrix A can not have two different inverse which means x = $$A^{-1}B$$ has one and only solution.
-  If $$Ax = 0$$, we cannot divide by 0 to create $$A^{-1}$$.
-  $$A^{-1}$$ exists if determinant of $$A \neq 0$$.

## Inverse of A+B and AB

Even if A and B are invertible separately, it does not guarantee that $$A+B$$ will be invertible. For example if $$A + B$$ adds to $$0$$; no inverse exists. However, the product of A and B has inverse and takes the form: $$(AB)^{-1} = B^{-1}A^{-1}$$ so $$(AB) (B^{-1}A^{-1}) = I$$

## Diagonally Dominant Matrix
The matrices whose diagonal element is greater than the sum of it other element in a row. We can easily determine if a matrix has inverse by checking if it is diagonally dominant. Mathematically,

$$|a_{ij}| > \sum\limits_{j \neq i} |a_{ij}|$$

Example:

\begin{bmatrix}
    5 & 1 & 3\\
    1 & 7 & 3\\
    2 & 1 & 8
    \end{bmatrix}
$$

## Calculating Inverse with Gaussian Jordan Elimination

Here we solve all n equations together to find inverse of A. First form an augmented matrix $$[A I]$$, then unlike Gaussian continue elimination to reduced echelon form $$R = I$$ which finally converts to $$[I A^{-1}]$$.

# Factorization: A=LU

Here we try to eliminate without exchanging rows. L is the lower triangular matrix which is the combination of inverse of elimination matrices. U is upper triangular matrix with pivot on its diagonal.

$$E_{21}A = U $$

$$
\begin{bmatrix}
    1 & 0 \\
    -4 & 1 \\
    \end{bmatrix}
\begin{bmatrix}
    2 & 1 \\
    8 & 7 \\
    \end{bmatrix}
    =
\begin{bmatrix}
    2 & 1 \\
    0 & 3 \\
    \end{bmatrix}
$$

$$
A = L U
$$

$$
\begin{bmatrix}
2 & 1 \\
8 & 7 \\
\end{bmatrix}
    =
\begin{bmatrix}
1 & 0 \\
4 & 1 \\
\end{bmatrix}
\begin{bmatrix}
    2 & 1 \\
    0 & 3 \\
\end{bmatrix}
$$

Here L = $$E_{21}^{-1}$$ . Similarly for three dimensional matrix we have $$E_{32}E_{31}E_{21}A = U$$ and $$ L = E_{21}^{-1}E_{31}^{-1}E_{32}^{-1}$$

# Transpose of a Matrix
If $$A_{ij}$$ is a matrix then its transpose $$(A^T)_{ij} = A_{ji}$$
For example:

$$A = \begin{bmatrix}
    4 & 1 & 2\\
    5 & 7 & 1 \\
    \end{bmatrix}
A^T= \begin{bmatrix}
    4 & 5\\
    1 & 7\\
    2 & 1
    \end{bmatrix}
$$

Note: $$AA^T$$ gives a square matrix, which can be used to find inverse of a matrix.

$$
\begin{bmatrix}
    1 & 3\\
    2 & 3\\
    4 & 1
    \end{bmatrix}
$$
$$\begin{bmatrix}
    1 & 2 & 4\\
    3 & 3 & 1
    \end{bmatrix}
$$
= $$\begin{bmatrix}
    10 & 11 & 7\\
    11 & 13 & 11\\
    7 & 11 & 17
    \end{bmatrix}
$$

$$(R^TR)^T = R^TR^{TT} = R^TR$$
Hence symmetric.

### Symmetric matrix
If a matrix A = $$A^T$$, then A is symmetric.

# Permutations
Permutation matrices have rows of identity in any order.
Example: Permutation matrices of 3 * 3 matrix.

$$
\begin{bmatrix}
    1 & & \\
     & 1 & \\
     & & 1
\end{bmatrix}
\begin{bmatrix}
     & 1 & \\
     1 &  & \\
     & & 1
\end{bmatrix}
\begin{bmatrix}
     & & 1 \\
     & 1 & \\
     1& &
\end{bmatrix}
\begin{bmatrix}
    1 & & \\
     &  & 1\\
     & 1 &
\end{bmatrix}
\begin{bmatrix}
     & & 1\\
    1 &  & \\
     1 & &
\end{bmatrix}
\begin{bmatrix}
     & & 1\\
     1 &  & \\
     & 1 &
\end{bmatrix}
$$

-  $$P^{-1} = P^T$$
-  for $$n*n$$ matrix there are $$n!$$ permutations.

repository: anilkumarshrestha/studygroup

repo_name: anilkumarshrestha/studygroup


text:
---
# Display name
title: Piotr Szymański

# Username (this should match the folder name)
authors:
- admin

# Is this the primary user of the site?
superuser: true

# Role/position
role: Assistant Professor at Wrocław University of Science & Technology; Machine Learning Engineer in Avaya Inc.; - Chairman of the Society for Beautification of the City of Wrocław; Vice-charmain of the Wrocław's District Council of Brochów

# Organizations/Affiliations
organizations:
- name: Stanford University
  url: ""

# Short bio (displayed in user profile at end of posts)
bio: Piotr Szymański is an assistant Professor at the Department of Computational Intelligence at the Wrocław University of Science and Technology and a Machine Learning Engineer at Avaya. Professionally involved in data analysis, statistical reasoning, geospatial data science, natural language processing, machine learning and artificial intelligence techniques. He is an alumni of the Top 500 Innovators program at Stanford University, worked in several institutions over the years incl. Hasso Plattner Institute in Potsdam, Josef Stefan Institute in Ljubljana, University of Notre Dame and University of Technology Sydney. He is the author of scikit-multilearn, a popular python library for multi-label classification. Apart from multi-label classification, Piotr published papers concerning urban data, traffic analysis and bridging the gap between ASR and NLP in spoken language understanding systems. In his free time he is an urban activist in Wrocław and a member of a city district council.

interests:
- Artificial Intelligence
- Computational Linguistics
- Information Retrieval

education:
  courses:
  - course: PhD in Computer Science
    institution: Department of Computational Intelligence, Wrocław University of Science and Technology
    year: 2020
  - course: PhD in Mathematics (abandoned)
    institution: Faculty of Fundamental Problems of Technology, Wrocław University of Science and Technology
    year: 2009-2012
  - course: MSc BEng in Computer Science, Algorythm Analysis
    institution: Faculty of Fundamental Problems of Technology, Wrocław University of Science and Technology
    year: 2009

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link: '#contact'  # For a direct email link, use<EMAIL_ADDRESS>- icon: twitter
  icon_pack: fab
  link: https://twitter.com/GeorgeCushen
- icon: google-scholar
  icon_pack: ai
  link: https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ
- icon: github
  icon_pack: fab
  link: https://github.com/gcushen
# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# - icon: cv
#   icon_pack: ai
#   link: files/cv.pdf

# Enter email to display Gravatar (if Gravatar enabled in Config)
email: ""

# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
user_groups:
- Researchers
- Visitors
---

Piotr Szymański is an assistant Professor at the Department of Computational Intelligence at the Wrocław University of Science and Technology and a Machine Learning Engineer at Avaya. Professionally involved in data analysis, statistical reasoning, geospatial data science, natural language processing, machine learning and artificial intelligence techniques. He is an alumni of the Top 500 Innovators program at Stanford University, worked in several institutions over the years incl. Hasso Plattner Institute in Potsdam, Josef Stefan Institute in Ljubljana, University of Notre Dame and University of Technology Sydney. He is the author of scikit-multilearn, a popular python library for multi-label classification. Apart from multi-label classification, Piotr published papers concerning urban data, traffic analysis and bridging the gap between ASR and NLP in spoken language understanding systems. In his free time he is an urban activist in Wrocław and a member of a city district council.

repository: niedakh/starter-academic

repo_name: niedakh/starter-academic


text:
[![Gem Version](https://badge.fury.io/rb/testlab.png)](http://badge.fury.io/rb/testlab)
[![Dependency Status](https://gemnasium.com/zpatten/testlab.png)](https://gemnasium.com/zpatten/testlab)
[![Build Status](https://secure.travis-ci.org/lookout/testlab.png)](http://travis-ci.org/lookout/testlab)
[![Coverage Status](https://coveralls.io/repos/zpatten/testlab/badge.png?branch=master)](https://coveralls.io/r/zpatten/testlab)
[![Code Climate](https://codeclimate.com/github/zpatten/testlab.png)](https://codeclimate.com/github/zpatten/testlab)

# A Quick Note on Versioning

I attempt to keep TestLab in line with Semantic Versioning when incrementing version numbers.  I am human so I may screw this up on, hopefully rare, occasion.  Semantic Versioning is delicious and everyone should be following this schema, especially when it comes to Ruby Gems which have a habit of pushing your projects into "dependency hell".

* http://semver.org/

# TestLab

A toolkit for building virtual computer labs.

What is TestLab?  TestLab lets you iterate virtual infrastructure quickly.  Using a `Labfile` you can define how you want your virtual infrastructure laid out.  You can define multiple network segments and containers (i.e. boxen).  TestLab will then build and demolish this virtual infrastructure as you have dictated in the `Labfile`.

TestLab can also import and export containers, making it easy to share them.  TestLab supports the latest LXC versions, allowing for ephemeral cloning operations, furthering your ability to iterate quickly.  TestLab can be used for many other applications, including infrastructure unit and integration testing, allowing for vastly more complex configurations and more effective resource sharing than traditional VM solutions.

TestLab can be run via the command-line or can be interfaced with directly via Ruby code.

# Using TestLab Interactively

    $ tl
    NAME
        tl - TestLab - A toolkit for building virtual computer labs

        TestLab is based around the abstraction of three main components: nodes, networks and containers. Nodes represent a system
        (bare-metal or virtualized) that hosts containers. Networks repesent a Linux bridge on a node. Containers simply represent a
        Linux Container (LXC) running on its parent node which is typically connected to a network on the node.

        In addition to the core component abstractions, TestLab shares a series of core tasks that are universal across all of the
        components. These are create and destroy, up and down, provision and deprovision. Several other core tasks, such as build,
        demolish, recycle and bounce encapsulate the previously mentioned tasks and simply act as convenience tasks.

        You can execute almost all of the tasks against the entire lab, or individual lab components.

        When building a lab from scratch, you will typically run 'tl build'. To breakdown your lab, destroying all the components, you
        will typically run 'tl demolish'. If you want to re-build the lab you can run 'tl recycle' which will run the demolish task
        followed by the build task against all the lab components. If you want to power-cycle the entire lab you can run 'tl bounce'
        which will run the down task followed by the up task against all the lab components. Again these tasks can be run against the
        lab as a whole or individual components.

        You can view the status of the entire lab using 'tl status', or view the status of individual components using 'tl node status',
        'tl network status' or 'tl container status'.

        You can easily get help for any of the component tasks using the syntax 'tl help <component>'. This can be extended to the
        following syntax 'tl help <task>' or 'tl help <component> <task>' for more in-depth help.

    SYNOPSIS
        tl [global options] command [command options] [arguments...]

    VERSION
        1.1.0

    GLOBAL OPTIONS
        -l, --labfile=path/to/file     - Path to Labfile: ${REPO}/Labfile (default: none)
        -r, --repo=path/to/directory   - Path to Repository directory: ${PWD} (default: /home/zpatten/code/chef-repo)
        -c, --config=path/to/directory - Path to Configuration directory: ${REPO}/.testlab-$(hostname -s) (default: none)
        --version                      - Display the program version
        -v, --[no-]verbose             - Show verbose output
        -q, --[no-]quiet               - Quiet mode
        --help                         - Show this message

    COMMANDS
        help        - Shows a list of commands or help for one command
        container   - Manage lab containers
        network     - Manage lab networks
        node        - Manage lab nodes
        build       - Build the lab (create->up->provision)
        demolish    - Demolish the lab (deprovision->down->destroy)
        bounce      - Bounce the lab (down->up)
        recycle     - Recycle the lab (demolish->build)
        create      - Create the lab components
        destroy     - Destroy the lab components
        up          - On-line the lab components
        down        - Off-line the lab components
        provision   - Provision the lab components
        deprovision - De-provision the lab components
        status      - Display the lab status

## Getting Help

TestLab uses the GLI RubyGem, which gives us a command line pattern similar to that of Git.  Therefore help is easy to get:

    tl help
    tl help node
    tl help container
    tl help network

## Container Help

Here is a sample of the help output for the container tasks:

    $ tl help container
    NAME
        container - Manage lab containers

    SYNOPSIS
        tl [global options] container [command options]  bounce
        tl [global options] container [command options]  build
        tl [global options] container [command options]  console
        tl [global options] container [command options] [-t container|--to container] copy
        tl [global options] container [command options]  create
        tl [global options] container [command options]  demolish
        tl [global options] container [command options]  deprovision
        tl [global options] container [command options]  destroy
        tl [global options] container [command options]  down
        tl [global options] container [command options]  ephemeral
        tl [global options] container [command options] [--output filename] [-c level|--compression level] export
        tl [global options] container [command options] [--input filename] import
        tl [global options] container [command options]  persistent
        tl [global options] container [command options]  provision
        tl [global options] container [command options]  recycle
        tl [global options] container [command options] [-i filename|--identity filename] [-u username|--user username] ssh
        tl [global options] container [command options]  ssh-config
        tl [global options] container [command options]  status
        tl [global options] container [command options]  up

    COMMAND OPTIONS
        -n, --name=container[,container,...] - Optional container ID or comma separated list of container IDs (default: none)

    COMMANDS
        build       - Build containers (create->up->provision)
        demolish    - Demolish containers (deprovision->down->destroy)
        recycle     - Recycle containers (demolish->build)
        bounce      - Bounce containers (down->up)
        create      - Initialize containers
        destroy     - Terminate containers
        up          - On-line containers
        down        - Off-line containers
        provision   - Provision containers
        deprovision - De-provision containers
        status      - Display containers status
        ssh         - Container SSH console
        ssh-config  - Container SSH configuration
        console     - Container console
        ephemeral   - Enable ephemeral mode for containers
        persistent  - Enable persistent mode for containers
        copy        - Copy containers
        export      - Export containers
        import      - Import containers

## Interacting with Containers

Almost all commands dealing will containers will take this argument:

    COMMAND OPTIONS
        -n, --name=container[,container,...] - Optional container ID or comma separated list of container IDs (default: none)

You can interact with containers via SSH:

    tl container ssh -n <name>

For example:

    tl container ssh -n server-www-1

Would connect to the container defined as 'server-www-1' in our Labfile.

You can pass an optional username and/or identity to use.  By default TestLab will attempt to SSH as the user defined in the `Labfile` for that container, otherwise the default user for the containers distro is used.

    $ tl help container ssh
    NAME
        ssh - Open an SSH console to a container

    SYNOPSIS
        tl [global options] container ssh [command options]

    COMMAND OPTIONS
        -u, --user=username - Specify an SSH Username to use (default: none)
        -i, --identity=key  - Specify an SSH Identity Key to use (default: none)

You can individually create or destroy, online or offline and provision or deprovision containers:

    tl container create -n server-www-1
    tl container destroy -n server-www-1

    tl container up -n server-www-1
    tl container down -n server-www-1

    tl container provision -n server-www-1
    tl container deprovision -n server-www-1

You can recycle a container, destroying then creating it again, provisioning it back to a "pristine" condition based on the `Labfile`:

    tl container recycle -n server-www-1

You can bounce a container, offlining then onlining it again:

    tl container bounce -n server-www-1

## Ephemeral Container Cloning

As it stands attempting to iterate infrastructure with Vagrant is a slow and painful process.  Enter LXC and ephemeral cloning.  The idea here is that you have a container that is provisioned to a "pristine" state according to the `Labfile`.  You then clone this container and run actions against the container.  After running your actions against the container you want to maybe tweak your Chef cookbook, for example, and re-run it against the container.  Running an ever changing cookbook in development against the same system over and over again causes drift and problems.  With the cloning you can instantly reinstate the container as it was when you first cloned it.

In order to use the ephemeral cloning in LXC, we first need to put our container or containers into an ephemeral mode.  This allows TestLab to do certain operations on the backend to prepare the container for ephemeral cloning.  Then when you are finished, you can easily return the container to a persistent mode.

For example, to put the container into the ephemeral mode:

    $ tl container ephemeral -n chef-client
    [TL] TestLab v1.1.0 Loaded
    [TL] container chef-client ephemeral                         # Completed in 17.3453 seconds!
    [TL] TestLab v1.1.0 Finished (17.8546 seconds)

Now with our container in the ephemeral mode, we can run all of the normal container tasks against it with one simple caveat.  When you offline the container and bring it back online, it will be reverted to the original state it was in before you put it into the ephemeral mode.  The short of all this is, you can do what you will to the container, but the moment you bounce it (offline then online it) it reverts.  This, as you can imagine, is extremely useful for developing applications and infrastructure as code.

You can quickly revert that chef node back to it's previous state in the event the cookbook you are developing has wrecked the node.  For web developers, imagine having a mysql server running in an ephemeral container; you can quickly roll back all database operations just by bouncing the container.

This is effectively transactions for infrastructure.

To put the container back into the default, persistent mode:

    $ tl container persistent -n chef-client
    [TL] TestLab v1.1.0 Loaded
    [TL] container chef-client persistent                        # Completed in 17.3692 seconds!
    [TL] TestLab v1.1.0 Finished (17.8692 seconds)

## Network Routes

TestLab will add network routes for any networks defined in the `Labfile` witch have the `TestLab::Provisioner::Route` provisioner class specified for them.  This will allow you to directly interact with containers over the network.  Here is an example of the routes added with the multi-network `Labfile`.

    $ tl network route show
    [TL] TestLab v1.1.0 Loaded
    TestLab routes:
    <IP_ADDRESS>      <IP_ADDRESS>    <IP_ADDRESS>   UG        0 0          0 vboxnet0
    [TL] TestLab v1.1.0 Finished (0.5063 seconds)

These routes can be manually manipulated as well (regardless of if you have specified the `TestLab::Provisioner::Route` provisioner class for the networks via the `Labfile`):

    $ tl help network route
    NAME
        route - Manage routes

    SYNOPSIS
        tl [global options] network route  add
        tl [global options] network route  del
        tl [global options] network route  show

    COMMANDS
        add  - Add routes to lab networks
        del  - Delete routes to lab networks
        show - Show routes to lab networks

# Using TestLab Programmatically

Accessing TestLab via code is meant to be fairly easy and straightforward.  To get an instance of TestLab you only need about four lines of code:

    log_file = File.join(Dir.pwd, "testlab.log")
    @logger = ZTK::Logger.new(log_file)
    @ui = ZTK::UI.new(:logger => @logger)
    @testlab = TestLab.new(:ui => @ui)

Calling `TestLab.new` without a `:labfile` option will, by default, attempt to read `Labfile` from the current directory.  This behavior can be changed by passing the `:labfile` key with a path to your desired "Labfile" as the value to your `TestLab.new`.

There are several easy accessors available to grab the first container and execute the command `uptime` on it via and SSH connection:

    container = @testlab.containers.first
    container.exec(%(uptime))

We can also execute this command via `lxc-attach`:

    container.lxc.attach(%(-- uptime))

You can access all the nodes for example:

    @testlab.nodes

For more information see the TestLab Documentation, `testlab-repo`, command-line binary and it never hurts to look at the TestLab source itself.

# REQUIREMENTS

* Latest VirtualBox Package
* Latest Vagrant Package (non-gem version)
* Ubuntu 13.04 Base Box Recommended

* Ubuntu 13.04 Server 64-bit (Raring) Base Box - https://github.com/zpatten/raring64

# EXAMPLE USE

* See the `testlab-repo` - https://github.com/lookout/testlab-repo

# RUBIES TESTED AGAINST

* Ruby 1.8.7 (REE)
* Ruby 1.8.7 (MBARI)
* Ruby 1.9.2
* Ruby 1.9.3
* Ruby 2.0.0

# RESOURCES

IRC:

* #jovelabs on irc.freenode.net

Documentation:

* http://lookout.github.io/testlab/

Source:

* https://github.com/lookout/testlab

Issues:

* https://github.com/lookout/testlab/issues

# LICENSE

TestLab - A framework for building lightweight virtual laboratories using LXC

* Author: Zachary Patten <zachary AT jovelabs DOT com> [![endorse](http://api.coderwall.com/zpatten/endorsecount.png)](http://coderwall.com/zpatten)
* Copyright: Copyright (c) Zachary Patten
* License: Apache License, Version 2.0

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

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

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

repository: jimhopp-lookout/testlab

repo_name: jimhopp-lookout/testlab