text:
# Akamai CLI for Netstorage
*NOTE:* This tool is intended to be installed via the Akamai CLI package manager, which can be retrieved from the releases page of the [Akamai CLI](https://github.com/akamai/cli) tool.

### Local Install, if you choose not to use the akamai package manager
If you want to compile it from source, you will need Go 1.9 or later, and the [Glide](https://glide.sh) package manager installed:
1. Fetch the package:
   `go get https://github.com/partamonov/akamai-cli-netstorage`
1. Change to the package directory:
   `cd $GOPATH/src/github.com/partamonov/akamai-cli-netstorage`
1. Install dependencies using Glide:
   `glide install`
1. Compile the binary:
   `go build -ldflags="-s -w -X main.version={{.Version}}" -o akamai-netstorage`

### Credentials
In order to use this configuration, you need to:
* Set up your credential files as described in the [authorization](https://developer.akamai.com/introduction/Prov_Creds.html) and [credentials](https://developer.akamai.com/introduction/Conf_Client.html) sections of the getting started guide on developer.akamai.com.

Expects `netstorage` section in .edgerc

```
[netstorage]
hostname = XXXXXXXX
key = XXXXXXX
keyname = XXXXXXXX
cpcode = 9999999
path = /some/path or ""
```

## Overview
The Akamai NetStorage Kit is a set of go libraries that wraps Akamai's {OPEN} APIs to help simplify common netstorage tasks.

## Main Usage command
```shell
# akamai netstorage
NAME:
   akamai-netstorage - A CLI to interact with Akamai NetStorage

USAGE:
   akamai-netstorage [global options] command [command options] [arguments...]

VERSION:
   X.X.X

AUTHORS:
   Petr Artamonov
   Rafal Pieniazek

COMMANDS:
     du                  Show disk usage of `DIRECTORY`
     empty-directory, e  Erase all files from `DIRECTORY`, non empty directories inside target `DIRECTORY` will be ignored
     get, g              Download from `OBJECT`
     list, ls            List `OBJECT` content in NetStorage
     mkdir, md           Create `DIRECTORY` recursively
     put                 Upload files from `DIRECTORY`
     rm, delete          Delete `FILE`
     rmdir               Delete `DIRECTORY`
     help, h             Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config FILE, -c FILE   Location of the credentials FILE (default: "/Users/partamonov/.edgerc") [$AKAMAI_EDGERC]
   --cpcode CP CODE         CP CODE to use
   --no-color               Disable color output
   --section NAME, -s NAME  NAME of section to use from credentials file (default: "netstorage") [$AKAMAI_EDGERC_NETSTORAGE_SECTION]
   --help, -h               show help
   --version, -v            print the version
```

### DU command

If you will DU not directory, then the output will be `ls`
```shell
> akamai netstorage du /test
# Directory               Files   Size
/<CPCODE>/test            10      4.3 MB
```

```shell
> akamai netstorage du /test/icons.png
Type    Name        Mtime                           Size     MD5
File:   icons.png   2018-02-12 10:59:30 +0100 CET   3.4 kB   055531dc54f773403865a704e0bdae21
```

### Empty-directory command

Purpose of this command is to delete all files and empty directories inside target `DIRECTORY`. This is a safety measure to prevent deletion of unexpected content.
If you want true recursive behaviour than open support case for Akamai to enable Quick Deletion for required CP Code.
Use `akamai netstorage rmdir --recursively [PATH]` command.

```shell
> akamai netstorage empty-directory test/super/tttt
```

### Get command
```shell
> akamai-netstorage get [command options] --to /local/path [OBJECT]
```

Purpose of this command is to download `OBJECT` from NetStorage.
If given `OBJECT` is directory, then all files will be downloaded. Directories inside target path won't be touched.

If you have such structure:
- dir1
  - dir2
    - file2
  - dir3
  - file1

Then if you will run `akamai netstorage get dir1`, file1 will be downloaded to `~/<CPCODE>/dir1`.

To set local path for download, please use `--to` option

### List command

Purpose of this command is to list directory content or object information

```shell
> akamai netstorage ls
Directory: /225406
Type   Name      Mtime                            Size   MD5
DIR:   test     2016-07-28 11:41:38 +0200 CEST
DIR:   test2    2018-01-31 07:05:58 +0100 CET
```

### Mkdir command

Purpose of this command is to create directories in Netstorage

### Put command

Purpose of this command is to put `OBJECT` to Netstorage. You can upload all files from given directory, if you will specify directory as source.

```shell
> akamai netstorage put --from /tmp/www /CPCODE/test
```

### Rm command

Purpose of this command is to delete `File` in Netstorage

### Rmdir command

Purpose of this command is to delete `Directory` in Netstorage

repository: apiheat/akamai-cli-netstorage

repo_name: apiheat/akamai-cli-netstorage


text:
# [Slack](https://slack.com)

## Links

- [Meet Workflow Builder: the simple way to streamline tasks in Slack (2019)](https://slackhq.com/automate-tasks-in-slack-with-workflow-builder)
- [Workflow examples](https://slack.com/intl/en-gb/slack-tips/workflow-builder-examples)
- [Simple Decisions](https://simplepoll.rocks/decisions/) - Never let another decision get lost in Slack.

repository: lucasczpnk/knowledge

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: lucasczpnk/knowledge


text:
# DTC Protocol Client Library

This project contains a C# library and a sample implementation for accessing services realtime and historical data via the DTC Protocol (www.dtcprotocol.org).

The sample client application is intended to be used as an aid to understanding the DTC Protocol rather than as a standalone data management/viewing tool.

* Only a small number of DTC message types are supported, although any unsupported messages are handled (altough the results are not processed).

* This project compiles x64 using .NET Framework 4.5.1.

* Other than for the intial negotiation, only Json encoding is supported.

This library was originally developed to allow SmartQuant products (OpenQuant / QuantRouter / QuantBase) to access SierraChart data and execution services and isn't actively maintained publicly due to the use of a commercial TCP library for communications.

license: MIT


text:
SixDegrees
================
The idea of this project is find the number of movies (or steps) between any two actors.

The name of the project comes from "Six Degrees of Kevin Bacon".
(See more info here: http://en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon )

This work uses, requires and could not exist without the IMDb JSON API project.
That project can be found at: https://github.com/Omertron/api-imdb


text:
# PCW-WMC
Programming club website for displaying club's information, event details and for sharing resources and announcements. Registered users can view suggestion for resources based on their Codeforces submissions/Github repositories.

## Tech stack
- HTML
- CSS
- Bootstrap
- Django
- Javascript
- Charts.js
- Codeforces API
- Github users API

## Features

- **Home Page:** Home page contains club's introduction. Also there is an announcements section, where club can share announcements.

- **Events Page:** Events page contains the information about the club's events. Users can filter results as per their requirements.

- **Resources Page:** Resources page displays the resources shared by the club. Users can filter resources and download a resource or get its link.

- **About Page:** About page contains club's description and information about its committee members.

- **Profile Page:** Registered users can view and update their details.

- **Codeforces/Github Page:** Registered users can visualise the data based on their codeforces submissions/github repositories. Resources are also suggested based on the data.

- **Admin Page:** Admins can create, update and delete all the contents of the website through this page.

## Licence

MIT licence

gha_license_id: MIT


text:
# KISS (Keep It Stupid Simple) FFmpeg-API for Node.js

[![Build Status](https://travis-ci.com/hokiedsp/node-kiss-ffmpeg.svg?branch=master)](https://travis-ci.com/hokiedsp/node-kiss-ffmpeg)<!-- [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fnode-kiss-ffmpeg%2Fnode-kiss-ffmpeg.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkiss-ffmpeg%2Fnode-kiss-ffmpeg?ref=badge_shield) -->

This library is a simple Node.js JavaScript wrapper for [FFmpeg](http://www.ffmpeg.org). It is aimed for those users who are familiar with FFmpeg cli options (See excellent [FFmpeg Documentation](https://ffmpeg.org/documentation.html)). For those who are searching for a fluent, easy to use library, consider using [fluent-ffmpeg library](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg), which this project is loosely based on.

## Features

- Automatic FFmpeg binary path search via FFMPEG_PATH system environmental variable. This feature is especially useful in Windows, when couple with [FFmpeg Winstaller Python script](https://github.com/hokiedsp/ffmpeg-wininstaller). This configuration originates from [fluent-ffmpeg library](https://github.com/fluent-ffmpeg/node-kiss-ffmpeg).
- Wraps ffmpeg & ffprobe binaries for both asynchronous and synchrous execution modes
- FFmpeg class instances provides useful asynchronous runtime features:
  - Custom events to capture the transcoding codec info and progress
  - Automatic redirection of input and output streams

### Prerequisites

#### Node Version

Currently, kiss-ffmpeg requires Node.js v12.0.0 or later as it makes a heavy use of `str.matchAll()`.

#### FFmpeg and FFprobe binaries

kiss-ffmpeg was developed and tested with the latest FFmpeg (v4.2.1) but should work with all recent releases.

If the `FFMPEG_PATH` environment variable is set, kiss-ffmpeg will use it as the full path to the `ffmpeg` executable. Otherwise, it will attempt to call `ffmpeg` directly (so it should be in your `PATH`). You must also have ffprobe installed (it comes with ffmpeg in most distributions). Similarly, kiss-ffmpeg will use the `FFPROBE_PATH` environment variable if it is set. If not found, it then will try `FFMPEG_PATH` then will attempt to call it in the `PATH`.

Most features should work when using avconv and avprobe instead of ffmpeg and ffprobe, but they are not officially supported at the moment.

**Windows users**: most probably ffmpeg and ffprobe will _not_ be in your `%PATH`, so you _must_ set `%FFMPEG_PATH` and `%FFPROBE_PATH`.

## Installation

Via npm:

```sh
$ npm install kiss-ffmpeg
```

Or grabbing the latest version directly from GitHub as npm Dependency in `package.json`,

```json
"dependencies": {
  "kiss-ffmpeg": "git+https://github.com/hokiedsp/node-kiss-ffmpeg.git",
}
```

Or as a submodule:

```sh
$ git submodule add git://github.com/hokiedsp/node-kiss-ffmpeg.git vendor/kiss-ffmpeg
```

## Usage

### kiss-ffmpeg Module

The kiss-ffmpeg module contains 3 components:

```js
const { FFmpeg, ffprobe, ffprobeSync } = require("kiss-ffmpeg");
```

- `FFmpeg` class, `ffmpeg` binary loose wrapper
- `ffprobe` function to call `ffprobe` asynchronously
- `ffprobeSync` function to call `ffprobe` synchronously

The remainder of this document assumes the above require call has been made.

### Setting binary paths manually

The default paths of both `ffmpeg` and `ffprobe` binary may be overrided during execution.

#### `FFmpeg` Object

The binary path of `ffmpeg` binary is specified in the `command` property of the `FFmpeg` object, which is settable:

```js
FFmpeg.command = "new/path/to/ffmpeg/binary/file"; // full path to the binary file
```

To revert to the default path, set it to a falsy value:

```js
FFmpeg.command = ""; // or any other falsy value
```

#### `ffprobe` and `ffprobeSync` Functions

The `ffprobe` binary path is set by providing `command` key of the `options` input argument of `ffprobe()` and `ffprobeSync()`:

```js
ffprobe("input.mp4", { command: "ffprobe/binary/file" });
ffprobeSync("input.mp4", { command: "ffprobe/binary/file" });
```

<!-- You will find a lot of usage examples (including a real-time streaming example using [flowplayer](http://www.flowplayer.org) and [express](https://github.com/visionmedia/express)!) in the `examples` folder. -->

### Running FFprobe

Both versions of FFprobe functions take the same arguments:

```js
ffprobe(file:String[, options:Object]) => Promise<Object>
ffprobeSync(file:String[, options:Object]) => Object
```

The only difference is that `ffprobe()` returns a promise, which resolves to an Object containing the media information of the input `file`, while `ffprobeSync()` blocks the execution until `ffprobe` completes its execution and returns the Object.

`options` argument accepts most of the cli FFprobe options as its keys. The available options are found [here](https://ffmpeg.org/ffprobe.html). By default, `show_format`, `show_streams`, `show_programs`, and `show_chapters` are enabled. To turn them off, use `hide_format`, `hide_streams`, `hide_programs`, `hide_chapters`, and `hide_all` options.

`ffprobe()` and `ffprobeSync()` utilize the ffprobe option, `-print_format json=compact=1`, to retrieve the media information. Hence, attempting to set `-print_format` option will throw an error (among other options, which obstruct the operation of the functions).

#### Examples

```js
// async call
ffprobe("/path/to/file.mp4")
  .then(info => console.log(info))
  .catch(err => console.error(err));

// sync call (throws error if failed)
let info = ffprobeSync("/path/to/file.mp4");

// retrieve only format info (options as an Array)
info = ffprobeSync("/path/to/file.mp4", ["hide_all", "show_format"]);

// retrieve only video stream info (options as an Object)
info ffprobe("/path/to/file.mp4", {
  hide_all: null, // use null for value of the value-less options
  show_streams: null,
  select_streams: "v"
});

// show SI units & sexagesimal time format
info = ffprobeSync("/path/to/file.mp4", ["pretty"]);
```

### Running FFmpeg

The kiss-ffmpeg `FFmpeg` class instantiates an object, which stores the FFmpeg arguments and runs it accordingly.

```js
let ffmpeg = new FFmpeg();
```

This object has 4 properties:

```js
ffmpeg.inputs; // array of inputs and their FFmpeg options
ffmpeg.outputs; // array of outputs and their FFmpeg options
ffmpeg.global; // FFmpeg global options
ffmpeg.spawnOptions; // child_process.spawn's options argument
```

`ffmpeg.inputs` and `ffmpeg.outputs` follow a similar syntax.

```js
// single input no options
ffmpeg.inputs = "path/to/file.mp4";

// multiple outputs, no options
ffmpeg.outputs = ["path/to/file1.mp4", "path/to/file2.mp4"];

// single input with options
ffmpeg.inputs = { url: "path/to/file.mp4", options: { ss: 1, t: 10 } };

// 3 outputs, 2 with options
ffmpeg.outputs = [
  { url: "path/to/file1.mp4", options: ["an"] },
  "path/to/file2.mp4",
  { url: "path/to/file3.mp4", options: { "c:v": "libx264", "c:a": "aac" } }
];
```

See below for the details of the options arguments.

These properties can be set at the time of the instantiation as well:

```js
ffmpeg = new FFmpeg({inputs: "path/to/file.mp4",
                     outputs:  { url: "path/to/file3.mp4",
                                 options: { "c:v": "libx264", "c:a": "aac" } })
```

Once arguments are set, run FFmpeg either asynchrously or synchronously:

```js
ffmpeg.run()=><ChildProcess>; // internally calls spawn
ffmpeg.runSync()=><Object>;   // internaly calls spawnSync
```

#### FFmpeg input & output urls

The url properties of `inputs` and `outputs` options are typically strings, which are then copied verbatimly as `ffmpeg` spawn arguments. Alternatively, Node.js streams may be given to pipe in/out from the stream. Currently, only 1 stream could be used for input or output because these streams are mapped to stdin and stdout.

TODO: Enable multi-stream support.

#### FFmpeg options

FFmpeg takes 3 types of options: input, output, and global. While the global options applies globally, input and output options are specified per source or destination url, repectively. There are a number of ways to specify any of these options in the FFmpeg instance properties:

| Specified as... | Example                           | Description                                                                                |
| --------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Object          | `{"c:v": "libx264", "an": null}`  | Specify FFmpeg option name (without leading '-') as property name and its value as the property value. For boolean options without value (e.g., `-an`) let the property value be `null`) |
| String[]        | `["y", "qphist"]`                 | Useful if only specifying boolean options.                                                                                |
| String          | `"-map 0 -c:v libx264 -c:a copy"` | String containing the full set of FFmpeg options as used in cli                                                                                |

If an option must be repeated multiple times, specify all option values as an array in its options property value. This feature is useful in setting the `-map` FFmpeg options:

```js
// to map [v] and [a] output nodes of a complex filter graph
ffmpeg.outputs.map = ["[v]", "[a]"];
```

There are a couple special options, unique to kiss.ffmpeg:

| Type   | Name          | Description                                                                                |
| ------ | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| global | `show_banner` | kiss.ffmpeg by default specifies `-hide_banner` global option when calling FFmpeg to minimize clatter in stderr stream. Use this option to override the default behavior.                                       |
| output | `keepopen`    | When an output stream object is specified instead of url string, kiss.ffmpeg automatically closes the stream when FFmpeg process exits. Specifing `keepopen` option to the piped output leaves the stream open. |

**Note:** Be aware that these option settings are **not** validated by kiss-ffmpeg.

### Setting event handlers

Before actually running FFmpeg asynchronously via `ffmpeg.run()`, you may want to set event listeners on it to be notified when FFmpeg process is done. There are 2 ways to capture events from the FFmpeg process: via the Child_Process instance `run()` returns or via the `FFmpeg` instance. Please see [Node.js Child_Process documentation](https://nodejs.org/api/child_process.html#child_process_class_childprocess) for the former, and `FFmpeg` instance fires the following events:

| Event Name   | Callback Signature       | Description                                                                                |
| ------------ | ------------------------ | -------------------------------------------------------------------------------------------------- |
| `start`      | `cb(proc)`               | Emitted immediately after FFmpeg process begun                                                     |
| `codecData`  | `cb(proc, data)`         | Emitted when FFmpeg finish printing its job summary                                                |
| `progress`   | `cb(proc, status)`       | Emitted when FFmpeg printed a progress line                                                        |
| `close`      | `cb(proc, code, signal)` | Pass-through event from ChildProcess                                                               |
| `disconnect` | `cb(proc)`               | Pass-through event from ChildProcess                                                               |
| `error`      | `cb(proc, err)`          | Emits errors passed from ChildProcess or last line FFmpeg printed before terminating with status=1 |
| `end`        | `cb(proc, code, signal)` | Pass-through event from ChildProcess `exit` event                                                  |

#### Event: `'start'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`

The `start` event is emitted just after FFmpeg has been spawned. It is emitted with the Child_Process object, which was spawned when `run()` was called.

```js
ffmpeg.on("start", function(proc) {
  console.log("Spawned FFmpeg with command: " + proc.spawnargs.join(" "));
});
```

#### Event: `'codecData'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`
- `data` \<object\>
  - `inputs` \<object[]\> An array of object containing the FFmpeg input info with properties:
    - `type` \<string\> Always equals `'input'`
    - `index` \<number\> Input index#
    - `format` \<string\> Container format string
    - `url` \<string\> URL of the input
    - `duration` \<number\> Total duration of the media content in seconds
    - `start` \<number\> Starting time in seconds
    - `bitrate` \<number\> Data bitrate in bits/s
    - `metadata` \<object\> (Optional) Key-value pairs
    - `chapters` \<object[]\> (Optional) Array of chapters
      - `index` \<number\> Chapter number
      - `start` \<number\> Starting time in seconds
      - `end` \<number\> Ending time in seconds
    - `programs` \<object[]\> (Optional) Array of programs
      - `name` \<string\> Program name or `"-"` for dangling streams
      - `streams` \<object[]\> Streams that are part of the program. See immediately below for its content.
    - `streams` \<object\> Contained streams (only if no program is defined)
      - `index` \<number\> Stream index
      - `type` \<string\> Stream type: `"video"`|`"audio"`|`"subtitle"`|`"data"`
      - `codecdata` \<string[]\> String array describing the various codec settings
      - `disposition` \<string[]\> Array of dispositions
      - `sidedata` \<string\> Side data
      - `metadata` \<object\> Key-value pairs
  - `outputs` \<object[]\> Array of object containing the FFmpeg output info. Its object content is identical to that of the `inputs` object except for the properties, `duration`, `start`, and `bitrate` are not included.

The `codecData` event is emitted when ffmpeg prints input and output codec information.

```js
ffmpeg.on("codecData", function(data) {
  // assume both audio & video streams exist and no programs defined
  let audiocodec = data.inputs[0].streams
    .find(st => st.type === "audio")
    .codecdata[0].split(" ")[0];
  let videocodec = data.inputs[0].streams
    .find(st => (st.type = "video"))
    .codecdata[0].split(" ")[0];
  console.log(`Input is ${audiocodec} audio with ${videocodec} video`);
});
```

#### Event: `'progress'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`
- `status` \<object\>
  - `qp_hist` \<string\> (Optional) 32-character qp histogram, which is printed when `qphist` global option is specified
  - `frame` \<number\> (Video only) # of frames processed
  - `fps` \<number\> (Video only) frame processing speed in frames/s
  - `q` \<number|Number[]\> (Video only) Video quality index. If more than one output video stream.
  - `last` \<Boolean\> (Video only) Present only if last progress event and reports true
  - `psnr` \<object\> (Video only) Reported PSNR values when `psnr` global(?) option is given.
    - `y` \<number\> PSNR of Y channel
    - `u` \<number\> PSNR of U channel
    - `v` \<number\> PSNR of V channel
    - `*` \<number\> Total PSNR
  - `size` \<number\> Current output file size in bytes
  - `time` \<number\> Current timestamp in seconds
  - `bitrate` \<number\> Current bitrate in bits/s
  - `dup` \<number\> Current number of duplicated frames
  - `drop` \<number\> Current number of dropped frames
  - `speed` \<number\> Current encoding speed relative to the playback speed

The `progress` event is emitted every time ffmpeg reports progress information.

To report the percent completed, the expected total duration shall be precomputed and compare `status.time` to it. For example, a full transcoding job outputs a media file that equals its duration to its input file. Thus, the duration of the output file could be retrieved from `codecData` event:

```js
let T; // total time to be retrieved
ffmpeg
  .on("codecData", (proc, data) => {
    T = data.inputs[0].duration;
  })
  .on("progress", (proc, status) {
    console.log(`Processing: ${(status.time/T*100).toFixed(0)}% done");
  });
```

For more complex jobs, predetermine the output duration by utilizing `ffprobe`/`ffprobeSync`.

#### Event `'close'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`
- `code` \<number\> The exit code if `proc` exited on its own.
- `signal` \<string\> The signal by which `proc` was terminated.

The `'close'` event is a redirected event from the spawned ChildProcess object and is emitted when the stdio streams of a FFmpeg process have been closed. This is distinct from the `'end'` event, since multiple processes might share the same stdio streams.

#### Event: `'disconnect'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`

The `'disconnect'` event is a redirected event from the spawned ChildProcess object and is emitted after calling the `proc.disconnect()` method in parent process. After disconnecting it is no longer possible to send or receive messages, and the `proc.connected` property is false.

#### Event: `'error'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`
- `err` \<Error\> Error object returned from `proc`

The `error` event is emitted when an error occurs when running FFmpeg. This includes `proc` emitting its own `error` event or `proc` exits with non-zero `code` or terminated by a signal or errors passed from underlying ChildProcess.

```js
ffmpeg.on("error", (proc, err) => {
  console.error(`Cannot process video: `${err.message}`);
});
```

#### Event: `'end'`

- `proc` \<ChildProcess\> The ChildProcess instance returned by `ffmpeg.run()`
- `code` \<number\> The exit code if `proc` exited on its own.
- `signal` \<string\> The signal by which `proc` was terminated.

The `end` event is emitted when `proc` exited.

### FFmpeg Examples

#### Save the output to a file

Starts ffmpeg processing and saves the output to a file.

```js
new FFmpeg({
  inputs: "/path/to/file.avi",
  outputs: {
    url: "/path/to/output.mp4",
    options: { "c:v": "libx264", "c:a": "libmp3lame", vf: "scale=w=320:h=240" }
  }
})
  .on("error", (proc, err) => {
    console.error("An error occurred: " + err.message);
  })
  .on("end", () => {
    console.log("Processing finished !");
  })
  .run();
```

#### Pipe the output to a writable stream

Starts processing and pipes ffmpeg output to a writable stream.

```js
var outStream = fs.createWriteStream("/path/to/output.mp4");

new FFmpeg({
  inputs: "/path/to/file.avi",
  outputs: {
    url: outStream,
    options: { "c:v": "libx264", "c:v": "libmp3lame", vf: "scale=w=320:h=240" }
  }
})
  .on("error", (proc, err) => {
    console.error("An error occurred: " + err.message);
  })
  .on("end", () => {
    console.log("Processing finished !");
  })
  .run();
```

If the connected streams are not available at a spawning time of the FFmpeg process, use `"pipe:0"` as the input url and `"pipe:1"` as the output url. The `proc.stdin` and `proc.stdout` streams can then be used to feed/retrieve data.

```js
const proc = new FFmpeg({
  inputs: "/path/to/file.avi",
  outputs: {
    url: "pipe:1",
    options: { "c:v": "libx264", "c:v": "libmp3lame", vf: "scale=w=320:h=240" }
  }
})
  .on("error", (proc, err) => {
    console.error("An error occurred: " + err.message);
  })
  .on("end", () => {
    console.log("Processing finished !");
  })
  .run();

const outStream = fs.createWriteStream("/path/to/output.mp4");
proc.stdout
  .on("data", data => {
    outStream.write(data);
  })
  .on("close", () => outStream.end());
```

#### Produce multiple outputs

```js
new FFmpeg({
  inputs: "/path/to/file.avi",
  outputs: [
    { url: "screenshot.png", options: { an: null, ss: 180 } },
    {
      url: "small.avi",
      options: { "c:v": "copy", "c:a": "copy", vf: "scale=w=320:h=200" }
    },
    { url: "big.avi", options: { "c:a": "copy", vf: "scale=w=640:h=480" } }
  ]
})
  .on("error", err => {
    console.error(`An error occurred: ${err.message}`);
  })
  .on("end", () => {
    console.log("Processing finished !");
  })
  .run();
```

#### Concatenate multiple inputs

```js
new FFmpeg({
  inputs: ["/path/to/part1.avi", "/path/to/part2.avi", "/path/to/part2.avi"],
  outputs: {url: "/path/to/merged.avi", map: ["[vout]","[aout]"]},
  global: {filter_complex: "[0:0] [0:1] [1:0] [1:1] [2:0] [2:1] concat=n=3:v=1:a=1 [vout] [aout]"}
});
  .on("error", function(err) {
    console.error(`An error occurred: ${err.message}`);
  })
  .on("end", function() {
    console.log("Merging finished !");
  });
```

#### Extract frames as images

```js
// only one frame at 7-second mark
new FFmpeg({
  inputs: "/path/to/video.avi",
  outputs: { url: "thumb.jpg", options: { ss: 7, vframes: 1 } }
}).on("end", function() {
  console.log("Screenshots taken");
});

// three frames each separated by 1 second
new FFmpeg({
  inputs: "/path/to/video.avi",
  outputs: { url: "thumb%04d.jpg", options: { vf: "fps=1", vframes: 3 } }
}).on("end", function() {
  console.log("Screenshots taken");
});
```

### Querying capabilities of the installed FFmpeg

kiss-ffmpeg `FFmpeg` class has read-only static class properties supported formats, codecs, encoders and filters.

```js
FFmpeg.version; // FFmpeg version
FFmpeg.formats; // available formats (including devices)
FFmpeg.demuxers; // available demuxers
FFmpeg.muxers; // available muxers
FFmpeg.devices; // available devices
FFmpeg.codecs; // all known codecs
FFmpeg.encoders; // available encoders
FFmpeg.decoders; // available decoders
FFmpeg.bsfs; // available bitstream filters
FFmpeg.filters; // available filters
FFmpeg.pix_fmts; // available pixel formats
FFmpeg.sample_fmts; // available audio sample formats
FFmpeg.layouts; // channel names and standard channel layouts
FFmpeg.colors; // recognized color names
```

Some properties return an object with additional parameters for each entry while others return an string array.

Furthermore, there are static class methods to get more details:

```js
FFmpeg.getMuxerInfo(name); // name: any of FFmpeg.muxers keys
FFmpeg.getDemuxerInfo(name); // name: any of FFmpeg.demuxers keys
FFmpeg.getEncoderInfo(name); // name: any of FFmpeg.encoders keys
FFmpeg.getDecoderInfo(name); // name: any of FFmpeg.decoders keys
FFmpeg.getBsfInfo(name); // name: any of FFmpeg.bsfs element
FFmpeg.getFilterInfo(name); // name: any of FFmpeg.filters keys
```

`getXxxInfo()` methods throw error if the name is invalid. To check check if the supplied FFmpeg binary supports the required feature, use `supportsXxx()` methods:

```js
// returns true if supported, false otherwise
FFmpeg.supportsMuxer(name);
FFmpeg.supportsDemuxer(name);
FFmpeg.supportsEncoder(name);
FFmpeg.supportsDecoder(name);
FFmpeg.supportsBsf(name);
FFmpeg.supportsFilter(name);
```

### Spawning a bare FFmpeg process

kiss.ffmpeg FFmpeg class exposes low-level static functions to spawn FFmpeg process:

```js

// asynchronous
FFmpeg.spawn(args:String[][, options:Object]) => <ChildProcess>

//synchronous
FFmpeg.spawnSync(args:String[][, options:Object]) => <Object>

```

They wrap Node.js's `child_process.spawn` and `child_process.spawnSync`, respectively, and their arguments are passed down unaltered to the respective arguments of the `child_process` functions.

## Contributing

Contributions in any form are highly encouraged and welcome! Be it new or improved presets, optimized streaming code or just some cleanup. So start forking!

### Code contributions

If you want to add new features or change the API, please submit an issue first to make sure no one else is already working on the same thing and discuss the implementation and API details with maintainers and users by creating an issue. When everything is settled down, you can submit a pull request.

When fixing bugs, you can directly submit a pull request.

Make sure to add tests for your features and bugfixes and update the documentation (see below) before submitting your code!

### Documentation contributions

You can directly submit pull requests for documentation changes. Make sure to regenerate the documentation before submitting (see below).

## License

(The MIT License)

Copyright (c) 2019 Takeshi Ikuma<EMAIL_ADDRESS>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: hokiedsp/node-kiss-ffmpeg

gha_language: JavaScript

repo_name: hokiedsp/node-kiss-ffmpeg


text:
http://r-statistics.co/Complete-Ggplot2-Tutorial-Part1-With-R-Code.html

Using xtable with R and Latex, math mode in column names?

as suggested in the xtable gallery vignette you should use a sanitization function (as unikum also suggested). Just some dummy code how I got it working with your example:

library(xtable)
adf.results<-matrix(0,ncol=6,nrow=4)
colnames(adf.results) <- c(" ", "$m^r_t$", "$\\delta p_t$","$R^r_t$", "$R^b_t$", "$y^r_t$")
print(xtable(adf.results),sanitize.text.function=function(x){x})

Avoid data.frame change space to dots
use data.frame(..., check.names=F)


text:
---
imports:
  InlineNotification: cultureamp-style-guide/components/Notification/InlineNotification.js
  IntroParagraph: components/IntroParagraph.js
  "{TipContainer,TipCard}": components/tip-card
---

# Animation

<IntroParagraph>

Meaningful motion helps make our product easy for everyone and tells our brand's story.

</IntroParagraph>

<InlineNotification persistent={true} type="affirmative">**Tip:** Looking for the technical animation guide? _Check out the [Animation Getting Started Guide](/guides/animation)_</InlineNotification>

[[toc]]

## Meaningful motion

We use animation purposefully to:

* Provide our customers, human resource leaders, with visual cues for direction and focus.
* Create a consistent experiential 'feel' across the product.
* Indicate interaction affordances.
* Achieve context shifting.
* Affect our audience's perception of time and indicate something is happening.
* To set a tone that matches our brand.
* Celebrate our customers' milestones.
* Give feedback, especially reassurances.
* Create an emotional, engaging experience with delight.

## Categories of animation

* Choreographed entrances and exits
* Stylized entrances and exits
* Loading and progress
* Show and hide
* Cause and effect
* Ambient information
* Demonstrations
* Interaction feedback

## Designing animations

### Animate once and one hundred times

Every microinteraction animation works well for the first time and the hundredth time.

* Test 100 animated instances shown at once.
* Test a single animation repeated 100 times.

### Aim for a fast time to first interaction

**Aim for a fast time to first interaction of 300ms** or less with primary content or data. Supplementary content may have a delay and arrive after the first 300ms.

### What is _too much_ animation?

#### 1. Use 1 primary call to action

If there are continually running animations on a page, the motion draws the user’s attention to the most important thing they need to be doing.

#### 2. Use more user-initiated animation than system-initiated

We are more adventurous with the amount and size of user-initiated animation than system-initiated. If people want to keep clicking a button because of its fun animations, go wild; for looping animations constantly running on a page, cut back! Note: consider player controls to pause, stop or hide animations. See also: [Pause, Stop, Hide: Understanding Success Criterion 2.2.2 from the Web Content Accessibility Guidelines](https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-pause.html).

#### 3. Minimize browser jank for silky smooth rendering

To minimize browser jank (stuttering or choppiness), we test our animations to ensure they keep up at 60 frames per second, including in old browsers and devices. If they cannot keep up, that might be a sign of too much animation.

### Stagger separate items and synchronize connected items

Separate, individual items that are meaningfully different from each other can move separately, with staggered entrances and exits. For example, navigation items that link to wildly different content can enter one after another.

Connected items move together as a single body. We synchronize movement of groups of closely related items.

### Placeholder loading skeletons predict content

Placeholder loading skeletons fill the space that its future content will occupy when it's loaded.

* Give people an idea of **what’s about to come** and what’s happening (it's currently loading).
* Be **subtle**, because it’s not a real, interactive interface.
* Be **flexible to an unknown number of items or shape of data** being loaded. This might be indicated either through composition to suggest the shape of what will arrive, or through repeatable elements.
* When content arrives, it does not move around sharply compared to the placeholder loading skeleton.
* We don’t currently use gradients in our branding aesthetic, so for ‘shimmering’ skeletons we opt for opacity changes rather than animated gradients.

### Choreographed entrances provide a red carpet experience

A **choreographed entrance** or orchestrated entrance introduces elements in a sequence, potentially with overlapping action. We “stage” the most important content.

A **stylized entrance** applies to a single element that may be standalone or part of a choreographed entrance.

Choreographed, stylized entrances focus attention through movement and reinforce our branding and design.

Choreographed entrances are reserved for “red carpet” or “grand unveiling” experiences, such as first use, onboarding, demos, showcasing new features, or landing pages rather than frequently visited pages.

_In contrast to a placeholder loading skeleton_, choreographed or stylized entrances don’t care how long content takes to load. For example, the whole page might be loaded already, but we only reveal each section with a fade as the person scrolls down the page. A single stylized entrance may mask and replace a short loading spinner.

<TipContainer>
<TipCard title="Try to…" type="tip">

* Aim for **fast time to first interaction** and consider if the stylized entrance _feels_ slower than instantly loading content.
* Use **consistent direction and movement** in relation to local environment to reinforce context and UI metaphors.
* For entrances, exits, and decorations, animation style is **so subtle that you can’t put your finger on it**.
* **Avoid bounces or overshoots**. We make exceptions when the bounce or overshoot is related to the animation effect or behavior itself, such as our emphasized growing "Take action" pill.

</TipCard>
<TipCard title="Avoid…" type="warning">

* **Content rules**. Draw attention to important content and data, not to interface controls.
* **Avoid keeping people from their content with time-consuming or showy entrances**.
* **Avoid contradicting movement that breaks UI metaphors**, such as an element entering with a fade and slide and exiting with a scale.
* **Avoid sharp, noticeable entrances** that draw attention away from the content to the animation itself.
* **Avoid excessively bouncy animations** that tarnish our trustworthy brand.

</TipCard>
</TipContainer>


text:
---
layout: default
---

# Time and Location

**Term:** Spring 2019

**Lectures:**
   * Wednesday 1:30pm – 3:15pm, SI-013
   * Thursday 3:30pm – 5:15pm, SI-007

# Overview

There are two components to this class:

* __Reading, reviewing, and discussing papers__. Students will read a selection of papers to get both a historical perspective and exposure to current research in networking. Students will write reviews of the papers to make sure everyone keeps up with the readings and to develop their (technical) communication skills.

* __Performing a term-long project__. Students will work in teams of two to build  a fully functioning Internet router. Students will design the control plane in Python on a linux host and will design the data plane in the new P4 language on the bmv2 software switch. For the midterm milestone, teams must demonstrate that their routers can interoperate with the other teams by building a small topology utilizing everyone's router.

# Readings

Students must write a review for each assigned paper. Each review should be about a paragraph long and discuss in the student's _own words_ the main idea(s) of each paper, the student's main criticisms (regarding soundness, methodology, presentation, etc.), and the relevance to current systems or future research directions. David Wetherall at the University of Washington has written a [great guide](https://courses.cs.washington.edu/courses/cse561/02sp/reviews.pdf) to reviewing papers.

Every review should answer the following three questions:

* What is the problem?
* What is new or different?
* What are the contributions and limitations?

## Submitting Reviews
Reviews are due the day before the lecture in which the reviewed paper will be
discussed. Students must submit reviews to the course HotCRP website:
[usi-advanced-networking19.hotcrp.com](https://usi-advanced-networking19.hotcrp.com/search?q=&t=s)

After submitting a review, students can read reviews submitted by other
students. Note that students may not update their review; updated reviews will
not be graded.

# Teams

The class will be broken down into teams of two students. We leave it up to each team to decide how to they would like to divide up the workload amongst themselves. However, we highly encourge close collaboration and consulation so that each member is intimiately familiar with both aspects of the router implementation.

# Class Router Interoperation

Routers by nature work cooperatively in large complex environments. In fact, much of the complexity in router design and implementation is inter-operating with routers developed by different teams based on varying assumptions of standard protocol specifications. Inter-operation is such a critical feature of network infrastructure development that it is one of the major focuses of this course. For the midterm milestone, teams must demonstrate interoperability of thier router will all other teams' routers. The students are responsible for initiating communication between groups, coming up with a cooperative integration plan and ensuring that your routers inter-operate with all other routers in the class. It is our goal that every finished router will be able to route traffic cooperatively on a large shared topology.

We have reserved a portion of the total class points to allocate based on participation during inter-operation. This means that we expect all the students to be pro-active from the start about planning and communicating a solid inter-operation strategy between teams during development. It is a good idea to collectively map out a strategy early on in the quarter and have incremental goals that can tested piece-wise. You may meet during designated course hours (since not all lectures are held), use the class email, or meet during class hours.

# Documentation and Deliverables

This is a project based course. There is no midterm or final exam. There is a set of deliverables specified on the [course schedule]({{ site.baseurl }}/schedule). These deliverables are meant to function as milestones for the main task of the semester: building an internet router. We will be using github extensively throughout the course. Each team will fork the starter code from a github repository and will add the instructors as collaborators on their forks. Teams will "submit" their deliverables by adding a tag to a specific commit, this will allow instructors to evaluate their work easily and efficiently, and it's also good code development practice.

In addition to the deliverables specified in the course schedule, teams are also asked to maintain a design document as a README file in their project directory. This document is the instructors' window into the team's design, so it is important to keep it up to date and organized. The design document may contain diagrams, pseudocode, flow charts, or whatever else might be helpful to explain the key design decisions to the instructors. Every Friday, starting March 29, instructors will review each teams design document to ensure that they are on track and making progress. A portion of the total points is reserved for these documentation checks.

Each team will give a 15 min presentation / demonstration at the end of the course explaining project.


text:
---
layout: topic
---
## Requests
Ply is all about automated testing of REST APIs. When executing a test,
you'll send actual HTTP requests to exercise your service endpoints.

Requests are the reusable building blocks you'll arrange to create test sequences, or suites.
Each request represents an HTTP request with parameterized URL, method, headers and payload.
A request suite is a YAML file containing one or more named requests.  Here's an example from
movie-queries.ply.yaml in the [ply-demo](https://github.com/ply-ct/ply-demo) project:
```yaml
moviesByYearAndRating:
  url: '${baseUrl}?year=${year}&rating=${rating}'
  method: GET
  headers:
    Accept: application/json
```
This defines a GET request against [ply-movies](https://github.com/ply-ct/ply-movies/), an
example API we use to illustrate Ply testing.  Our request's name, `moviesByYearAndRating`,
is the top-level key. Note our use of JavaScript [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
expressions embedded in `url`. Every element of a request can be parameterized using [Values](values).

The next request in this suite illustrates another important feature of expressions:
```yaml
movieById:
  # id comes from previous response body
  url<EMAIL_ADDRESS>  method: GET
  headers:
    Accept: application/json
```
Here we use special designator `@` in our URL expression to reference a runtime value from the body of the previous response.
This enables us to construct simple workflows by embedding values from previous requests/responses in subsequent requests.
Ply also supports another special designator `~` that lets you embed regular expressions (more on this in [Results](results)).

Before we move on to show how you can run your Ply request suites, a few points to keep in mind:
  - Suites are identified by their YAML file name, so there's always one suite per file
  - Suites should be self contained; expressions cannot reference runtime values from a different suite
  - During execution:
    - suites are run in parallel
    - but within a suite each request is run sequentially, in order

## Executing
Requests can be run via the [CLI](cli), or within Visual Studio Code by installing the [Ply Extension]().
Either way the outcome is the same, but the VS Code extension has a friendlier interface for comparing actual
vs expected results.

Let's use the CLI to run ply-demo's movie-queries.ply.yaml request suite.  Clone ply-demo and run the request suite:
```
git clone https://github.com/ply-ct/ply-demo.git
cd ply-demo
npm install
npm run ply -- test/requests/movie-queries.ply.yaml
```
In package.json the scripts 'preply' and 'postply' start and stop ply-movies to handle movie-queries REST requests.
The output indicates that all tests passed:
```
Request 'moviesByYearAndRating' submitted at 8/12/2020, 16:54:53:048
Test 'moviesByYearAndRating' PASSED
Request 'movieById' submitted at 8/12/2020, 16:54:53:100
Test 'movieById' PASSED
Request 'moviesQuery' submitted at 8/12/2020, 16:54:53:107
Test 'moviesQuery' PASSED

Overall Results: {"Passed":3,"Failed":0,"Errored":0,"Pending":0,"Not Verified":0}
```
To understand what it means for a request to have PASSED, continue on to [Results](results).

Next Topic: [Results](results)

repository: magrawa/ply

repo_name: magrawa/ply


text:
---
layout: post
title: Authentication routing in a React-Flux application
categories:
- technical
- react-flux
---

Using [react-router](https://github.com/rackt/react-router) it is not immediately clear how to integrate routing into a React-Flux app.

**tl;dr**

My proposed solution is to *only* reference the react-router directly in React components, i.e. not reference the router in Flux actions, dispatchers and stores - so there is only a dependency between the router and the React component layer. I will also define a `RouterStore` that stores the next router `transitionPath` string when a user attempts to go to a page which requires authentication and they are not logged in.

You can check out the source code [here](https://github.com/wmyers/react-flux-authentication-routing).

You will also need to clone a modified version of Auth0's NodeJS JWT API [here](https://github.com/wmyers/nodejs-jwt-authentication-sample).

**Preamble**

Coming from AngularJS, you can get used to a lot of app infrastructure being provided for you. Angular is still a complicated and powerful beast. But React-Flux involves throwing out the MVC rulebook at the start, and implementing your own core functionality for things like http requests.

Importantly React is just the view layer, albeit one that does a lot of clever stuff. For the rest of your app the Flux architecture is recommended to work well with React. Using bundlers like Browserify and Webpack, you can implement NodeJS and NPM modules on the client side to create your Flux application structure. I'm using [Facebook's Flux implementation](https://facebook.github.io/flux/docs/overview.html#content) which does provide a singleton Dispatcher module.

This post assumes an understanding of React, Flux, Browserify etc. For a good introduction to React and Flux see the [Scotch.io tutorials](https://scotch.io/tutorials/learning-react-getting-started-and-concepts).

**ES6 syntax**

Because React-Flux is quite new, its rise in popularity is coinciding with the take up of Javascript ES6 syntax (and in some cases ES7, which is stage 2 ES6). Using Babel (previously 6to5) you can code in ES6 and transpile to ES5. For Browserify bundles, there is the Babelify transform module. Much of the code in this post is ES6 syntax.

**React-Router**

Comparing with Angular again, like many others I've used the well-known (and well-tested) [ui-router](https://github.com/angular-ui/ui-router). It can be defined and used in different ways in nested Angular modules, and works with the Angular application framework as a whole.

[react-router](https://github.com/rackt/react-router) is a bit different, in that it is built to work with React component views, but not really for any encompassing architecture like Flux. So react-router and Flux are a bit of an odd couple. Nevertheless it is quite possible to get them working together.

There are a few proposed techniques already out there, but not many for authentication, which can be more fiddly. The following approach draws on the experience and copies techniques from others, particularly:

* gaeron's [Flux React Router Example](https://github.com/gaearon/flux-react-router-example)
* Auth0's [Adding Authentication to your React Flux App](https://auth0.com/blog/2015/04/09/adding-authentication-to-your-react-flux-app/)
* Ben Anderson's [Yeoman Generator for Flux React](https://github.com/banderson/generator-flux-react)
* Ken Wheeler's [React Flux Cart Demo](https://github.com/scotch-io/react-flux-cart) and other demos

**Src directory structure**

```
js/
---- actions/
-------- LoginActionCreators.js
-------- RouterActionCreators.js
---- components/
-------- App.jsx
-------- AuthenticatedComponent.jsx
-------- Home.jsx
-------- Login.jsx
-------- Private.jsx
-------- Signup.jsx
---- constants/
-------- AppConstants.js
-------- ActionTypes.js
---- dispatchers/
-------- AppDispatcher.js
---- services/
-------- AuthService.js
---- stores/
-------- BaseStore.js
-------- LoginStore.js
-------- RouterStore.js
---- index.jsx
---- router.js
---- routes.jsx
styles/
---- main.css
index.html
```

Points to note:

* the router definition, routes definition and router instantiation are in separate files, as per gaeron's example.
* the router is defined (in `router.js`) using the 'proxy' approach described [here](https://github.com/rackt/react-router/blob/master/docs/guides/flux.md)

**Routes.jsx**

This has a `DefaultRoute` defined. So if going to the root path '/', the router will redirect to this page.

```
<Route path="/" handler={App}>
  <DefaultRoute handler={Home}/>
  <Route name="login" path="/login" handler={Login}/>
  <Route name="signup" path="/signup" handler={Signup}/>
  <Route name="private" path="/private" handler={Private}/>
</Route>
```

**stores/LoginStore.jsx**

This store deals with all authentication actions. It is updated asynchronously when logging in or signing up via the `AuthService`, which is triggered by a dispatch from `LoginActionCreators`.

`LoginStore` *attempts to auto-login in its constructor*. So when the user refreshes the app in the browser, any locally stored token will be retrieved. NB in this demo I am not checking if a locally stored JWT token has expired, only if it exists.

```javascript
_autoLogin () {
  let jwt = localStorage.getItem("my_jwt");
  if (jwt) {
    this._jwt = jwt;
    this._user = jwt_decode(this._jwt);
  }
}
```

**components/App.jsx**

In this component I have the only listener function for any `LoginStore` updates. I only want there to be one listener function for responding to `LoginStore` updates. In this function a `transitionPath` value is retrieved from the `RouterStore`. This value is set whenever a user attempts to go to a page which requires authentication, but they are not logged in. By default `RouterStore.nextTransitionPath` is set to the root path ('/').

```javascript
_onLoginChange() {
  ...

  //get any nextTransitionPath - NB it can only be got once then it self-nullifies
  let transitionPath = RouterStore.nextTransitionPath || '/';

  if(userLoggedInState.userLoggedIn){
    router.transitionTo(transitionPath);
  }else{
    router.transitionTo('login');
  }
}
```

The `_onLoginChange` listener is set up in the `componentDidMount` hook of the React component lifecycle. This hook only fires when React components are rendered on the client side, and only after child components have mounted.

This component renders a top nav bar with a mutable logged-in/out state. It does not require authentication but it will auto-redirect to its `DefaultRoute` which *does* require authentication (read on for more info).

**components/AuthenticatedComponent.jsx**

This is a higher order component (or Decorator) for making the child component that it wraps, require authentication - ie the user must be logged in before being able to navigate to a page component wrapped in an instance of `AuthenticatedComponent`.

In this application the `Home` component page is wrapped in `AuthenticatedComponent` and `Home` is the `DefaultRoute`.

`AuthenticatedComponent` defines a `willTransitionTo` hook which is a react-router hook. Whenever this hook gets fired the router is about to transition to the relevant page, so authentication checking can occur here.

```javascript
static willTransitionTo(transition) {
  if (!LoginStore.isLoggedIn()) {

    let transitionPath = transition.path;

    //store next path in RouterStore for redirecting after authentication
    //as opposed to storing in the router itself with:
    // transition.redirect('/login', {}, {'nextPath' : transition.path});
    RouterActionCreators.storeRouterTransitionPath(transitionPath);

    //go to login page
    transition.redirect('/login');
  }
}
```

So if a user *is not* logged in, firstly I'm storing the transition path (e.g. '/private') in the `RouterStore`. I'm storing it so that it can only be retrieved once, so that old paths don't persist in the `RouterStore`. Note that although I could store the next `transitionPath` in the router itself (using an optional third parameter in a `transition.redirect()` call), I am choosing not to do so. Instead I am storing it in a Flux store.

Then I am re-directing to the login page.

One other caveat is that a `willTransitionTo` hook will get called for the first time *before* a `componentDidMount` or `componentWillMount` hook. Something to be aware of.

**Conclusion**

So the default (not logged-in) use-case works like this:

[Application launches and `LoginStore` attempts to auto-login, but fails because there is no token] =>

[Application routes to root level path '/'] =>

[`router` redirects to authenticated Home.jsx page] =>

[`willTransitionTo` hook in Home.jsx stores transition path in `RouterStore` and then redirects to Login.jsx page] =>

[User logs in and Login.jsx triggers an action in `LoginActionHandlers`] =>

[`LoginStore` updates and then emits CHANGE]  =>

[`_onLoginChange` in App.jsx tells router to transition to stored path (or '/')]


text:
# Ergodox EZ keymap

This is the keymap for the [Ergodox EZ](https://ergodox-ez.com) that I use.
It is based on a German keyboard layout, but it is tailored to my needs.

## Building

To build it, you need the [qmk firmware](https://github.com/qmk/qmk_firmware/) and all of its build dependencies.

You can simply run

```sh
git clone https://github.com/qmk/qmk_firmware.git
cd qmk_firmware/keyboards/ergodox_ez/keymaps
git clone https://github.com/aticu/keymap.git aticu
cd aticu
```

to set everything up.

Afterwards you can use `make` to build the keymap or `make flash` to flash it to your keyboard.

## Layout

Base Layer:
![Default layer](base.png)

Symbol Layer:
![Symbol layer](symbol.png)

Mouse/Game Layer:
![Gaming layer](game.png)

Gimp Layer:
![Gimp layer](gimp.png)

To access the gimp layer, press "Lead" and then "G"

### Special keys

* The Copy/Paste key sends the copy command when held and sends the paste command when released.
* The key next to it closes the currently open window (Alt+F4).
* The Undo/Redo key undoes the last action when pressed and redoes it when held.
* The -> key sends "->" as a string on a German keyboard layout.
* The => key sends "=>" as a string on a German keyboard layout.
* The // key sends "//" as a string on a German keyboard layout.
* The /// key sends "///" as a string on a German keyboard layout.
* The \`\`\` key sends "\`\`\`" as a string on a German keyboard layout.
* The \` key sends "\`" directly on a German keyboard layout (it isn't a dead key).
* The ^ key sends "^" directly on a German keyboard layout (it isn't a dead key).

repository: aticu/keymap

repo_name: aticu/keymap


text:
honeypot
=========

Node.js implementation of the Project Honeypot (Http:BL) API. Because we all hate spam.

  - Utilizes Http:BL from known and loved https://www.projecthoneypot.org/
  - Uses built-in node dns.resolve4 to get response from the DNS API
  - No Unicorns were harmed during development

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

```sh
npm install honeypot
```

Usage
----
```javascript
var honeypot = require('honeypot');

var pot = new honeypot('your_api_key');

pot.query('<IP_ADDRESS>', function(err, response){
    if (!response) {
        console.log("IP not found in honeypot, we're all good!");
    } else {
        console.log("Oh no, it's a spammer mate! Kil it with fire!");
        console.log(response.getFormattedResponse());
        // Suspiious, Comment Spammer
        // Threat Rating: 58 / 255
        // Recency: 1 / 255
    }
});
```

Example within Express
----

```javascript
var honeypot = require('honeypot');

var pot = new honeypot('your_api_key');

// example route for POST /comment/
create: function(req, res) {

    pot.query(req.ip, function(err, response){
      if (!response) {
        console.log("IP not found in honeypot, we're all good!");
        // do some commentary magic
        res.send({ msg: 'we hate spam!' });
      } else {
        console.log("Die!");
        res.send(null);
      }
    });
}
```

Kudos
----

Based on this sweet PHP gist https://gist.github.com/smithweb/7773373.

branch_name: refs/heads/main


text:
Please replace this template with your actual notes for the pull request.  Please make sure that CircleCI tests pass before you submit the pull request.

### Note:
If you did not write unit tests to verify your changes, your PR will automatically be rejected.
Please check [Circle CI](https://circleci.com/gh/KenSuenobu/scattersphere) to make sure
your build is successful.

repository: KenSuenobu/scattersphere

branch_name: refs/heads/develop

gha_language: Scala

repo_name: KenSuenobu/scattersphere


text:
`Synchronization` module provides common layer for synchronization. It provides same guaranties independent of any particular Ruby implementation.

*This is a new module, it is expected to fully stabilize for 1.0 release.*

## Synchronization::Object

Provides common parent for all objects which need to be synchronized or be using other synchronization tools. It provides:

-   Synchronized block
-   Methods for waiting and signaling
-   Volatile fields
-   Ensure visibility of final fields
-   Fields with CAS operations

## Synchronized block

`Synchronization::Object` provides private method `#synchronize(&block)`. For a given object only one Thread can enter one of the blocks synchronized against this object. Object is locked when a thread enters one of the synchronized blocks.

Example of a simple counter which can be used by multiple threads:

```ruby
class SafeCounter < Concurrent::Synchronization::Object
  def initialize
    super
    synchronize { @count = 0 }
  end

  def increment
    synchronize { @count += 1 }
  end

  def count
    synchronize { @count }
  end
end
```

### Naming conventions

Methods starting with `ns_` are marking methods that are not using synchronization by themselves, they have to be used inside synchronize block. They are usually used in pairs to separate the synchronization from behavior:

```ruby
def compute
  service.report synchronize { ns_compute }
end

private

def ns_compute
  ns_compute_reduce ns_compute_map
end
```
where `compute` defines how is it synchronized and `ns_compute` handles the behavior (in this case the computation). `ns_` methods should only call other `ns_` methods or `pr_` methods. They can call normal methods on other objects, but that should be done with care (better to avoid) because the thread escapes this object while the lock is still held, which can lead to deadlock. That's why the `report` method is called in `compute` and not in `ns_compute`.

`pr_` methods are pure functions they can be used in and outside of synchronized blocks.

## Methods for waiting and signaling

Sometimes while already inside the synchronized block some condition is not met. Then the thread needs to wait (releasing the lock) until the condition is met. The waiting thread is then signaled that it can continue.

To fulfill these needs there are private methods:

-   `ns_wait` {include:Concurrent::Synchronization::AbstractObject#ns_wait}
-   `ns_wait_until` {include:Concurrent::Synchronization::AbstractObject#ns_wait_until}
-   `ns_signal` {include:Concurrent::Synchronization::AbstractObject#ns_signal}
-   `ns_broadcast` {include:Concurrent::Synchronization::AbstractObject#ns_broadcast}

All methods have to be called inside synchronized block.

## Volatile fields

`Synchronization::Object` can have volatile fields (Java semantic). They are defined by `attr_volatile :field_name`. `attr_volatile` defines reader and writer with the `field_name`. Any write is always immediately visible for any subsequent reads of the same field.

## Ensure visibility of final fields

Instance variables assigned only once in `initialize` method are not guaranteed to be visible to all threads. For that user can call `ensure_ivar_visibility!` method, like in following example taken from `Edge::AbstractPromise` implementation:

```ruby
class AbstractPromise < Synchronization::Object
  def initialize(future, *args, &block)
    super(*args, &block)
    @Future = future
    ensure_ivar_visibility!
  end
  # ...
end
```

###  Naming conventions

Instance variables with camel case names are final and never reassigned, e.g. `@FinalVariable`.

## Fields with CAS operations

They are not supported directly, but AtomicReference can be stored in final field and then CAS operations can be done on it, like in following example taken from `Edge::Event` implementation:

```ruby
class Event < Synchronization::Object
  extend FutureShortcuts

  def initialize(promise, default_executor = :io)
    @Promise         = promise
    @DefaultExecutor = default_executor
    @Touched         = AtomicBoolean.new(false)
    super()
    ensure_ivar_visibility!
  end
  # ...
  def touch
    # distribute touch to promise only once
    @Promise.touch if @Touched.make_true
    self
  end
  # ...
end
```

Operations on `@Touched` field have volatile semantic.

## Memory model

*Intended for further revision, and extension.*

When writing libraries in `concurrent-ruby` we are reasoning based on following memory model which is further extended by features provided in `Synchronization::Object` (described above).

The memory model is constructed based on our best effort and knowledge of the 3 main Ruby implementations (CRuby, JRuby, Rubinius). When considering certain aspect we always choose the weakest guarantee (e.g. local variable updates are always visible in CRuby but not in JRuby, so in this case JRuby behavior is picked). If some Ruby behavior is omitted here it is considered unsafe for use in parallel environment (Reasons may be lack of information, or difficulty of verification).

This takes in account following implementations:

-   CRuby 1.9 - 2.2 (no differences found)
-   JRuby 1.7
-   JRuby 9 *not examined yet, same behavior as in 1.7 assumed*
-   Rubinius 2.5

We are interested in following behaviors:

-   **volatility** - in Java's sense. Any written value is immediately visible to any subsequent reads including all writes leading to this value.
-   **atomicity** - operation is either done or not as a whole.

### Variables

-   **Local variables** - atomic assignment (only Integer and Object), non-volatile.
    -   Consequence: a lambda defined on `thread1` executing on `thread2` may not see updated values in local variables captured in its closure.
    -   Reason: local variables are non-volatile on Jruby and Rubinius.
-   **Instance variables** - atomic assignment (only Integer and Object), non-volatile.
    -   Consequence: Different thread may see old values; different thread may see not fully-initialized object.
    -   Reason: local variables are non-volatile on Jruby and Rubinius.
-   **Constants** - atomic assignment, volatile.
-   **Assignments of Float** may not be atomic (some implementations (e.g. Truffle) may use native double).

Other:

-   **Global variables** - we don't use them, omitted (atomic and volatile on JRuby and CRuby, Rubinius unknown)
-   **Class variables** - we don't use them, omitted (atomic and volatile on JRuby and CRuby, Rubinius unknown)

### Assumptions

Following operations are **assumed** thread-safe, volatile and atomic on all implementations:

-   Class definition
-   Method definition
-   Library requirement

It's best practice though to eager load before going into parallel part of an application.

### Issues to be aware of

-   **Initialization** - Since instance variables are not volatile and a particular implementation may preinitialize values with nils, based on shapes it already saw, a second thread obtaining reference to newly constructed may still see old preinitialized values instead of values set in `initialize` method. To fix this `ensure_ivar_visibility!` can be used or the object can be safely published in a volatile field.
-   **`||=`, `+=` and similar** - are not atomic.

### Notes/Sources on implementations

-   [JRuby wiki page on concurrency](https://github.com/jruby/jruby/wiki/Concurrency-in-jruby)
-   [Rubinius page on concurrency](http://rubini.us/doc/en/systems/concurrency/)
-   CRuby has GVL. Any GVL release and acquire uses lock which means that all writes done by a releasing thread will be visible to the second acquiring thread. See: <https://github.com/ruby/ruby/blob/ruby_2_2/thread_pthread.c#L101-L107>

license: MIT,Ruby

repository: benjamintanweihao/concurrent-ruby

detected_licenses: MIT Ruby

repo_name: benjamintanweihao/concurrent-ruby


text:
# Baeodromus eupatorii (Arthur) Arthur, 1907 SPECIES

#### Status
ACCEPTED

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

#### Published in
N. Amer. Fl. (New York) 7: 125 (1907)

#### Original name
Dietelia eupatorii Arthur, 1905

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
layout: post
title: Week 7
---

### Tracking of the bugs - the hunt

This is the weekly blog-post for week 8 of 14.

#### Hello there,

This week we had to use one of the bug trackers to track the bugs of a real life project!  We did this assignment in a separate repository.

This concludes this week of open source contributions,
*Cheers!*

> Thank you for reading!

gha_language: CSS


text:
# Blade Tabler Icons

A package to easily make use of [Tabler Icons](https://github.com/tabler/tabler-icons) in your Laravel Blade views.

For a full list of available icons see [the SVG directory](resources/svg) or preview them on [GitHub](https://preview.tabler.io/icons.html).

## Requirements

- PHP 7.2 or higher
- Laravel 7.14 or higher

## Installation

```bash
composer require ryangjchandler/blade-tabler-icons
```

## Usage

Icons can be used a self-closing Blade components which will be compiled to SVG icons:

```blade
<x-tabler-alert-circle />
```

You can also pass classes to your icon components:

```blade
<x-tabler-alert-circle class="w-6 h-6 text-gray-500"/>
```

And even use inline styles:

```blade
<x-tabler-alert-circle style="color: #555"/>
```

### Raw SVG Icons

If you want to use the raw SVG icons as assets, you can publish them using:

```bash
php artisan vendor:publish --tag=blade-tabler-icons --force
```

Then use them in your views like:

```blade
<img src="{{ asset('vendor/blade-tabler-icons/alert-circle.svg') }}" width="10" height="10"/>
```

### Blade Icons

Blade Tabler Icons uses Blade Icons under the hood. Please refer to [the Blade Icons readme](https://github.com/blade-ui-kit/blade-icons) for additional functionality.

## Changelog

Check out the [CHANGELOG](CHANGELOG.md) in this repository for all the recent changes.

## Maintainers

Blade Tabler Icons is developed and maintained by [Ryan Chandler](https://ryangjchandler.co.uk).

## License

Blade Tabler Icons is open-sourced software licensed under [the MIT license](LICENSE.md).

repository: hadefication/blade-tabler-icons

repo_name: hadefication/blade-tabler-icons


text:
# sodium

D language: A ("Deimos"-) binding to libsodium, current version 1.0.8, released on 25 Dec 2015 [https://github.com/jedisct1/libsodium]

The binding code is complete (in master and will be from v.0.0.5); every now and then I'll add some doxygen comments, as I use, become acquainted with functions.

For the time being, take the dependency as of http://code.dlang.org/packages/sodium/~master
If the linker should complain about undefined reference(s) concerning libsodium, it's time to check whether the installed version of libsodium provides the function(s) in question.
I'm thinking about expanding this binding to a 'version identifier controlled' "Deimos" (statically/dynamically linked at compile time, as it is now) OR "Derelict" (dynamically loaded) libsodium binding.
IMHO https://github.com/DerelictOrg/DerelictUtil has this nice feature: Handling of cases where the C-library binary has another (older) version than the API, this binding refers to (1.0.8).
https://derelictorg.github.io/dynstat.html : There are no undefined reference(s) concerning libsodium then, of course, and a developper can/needs to fine-tune/react upon case of missing symbol(s).

Finally, when testing on Windows is done too, D-versioning will "jump on the bandwagon" [== libsodium C-source release version].

Example  ( expected output: Unpredictable sequence of 8 bytes: [?, ?, ?, ?, ?, ?, ?, ?] )
- make shure, You have rdmd installed for this example and access right of app.d includes 'executable'
- change directory to example/source
- Linux (in a shell): $ ./app.d
- Windows  (cmd.exe): $ app.d

or
- setup a DUB project, dub.json: ... "dependencies": { "sodium": "~master" }

license: ISC

repository: tmccombs/sodium

repo_name: tmccombs/sodium


text:
# hubble.gl

This is a proposal to transfer hubble.gl to the Urban Computing Foundation (UCF).

## Project description

Hubble.gl streamlines the creation of high quality 3d video animations within a web browser for applications built with vis.gl visualization libraries, such as deck.gl and kepler.gl. From its inception, hubble.gl’s mission has been to develop deeper integrations with the vis.gl ecosystem so that the thousands of motion designers, engineers, and GIS scientists already using these tools can seamlessly collaborate on presentations and video assets, much like Uber Elevate has done on dozens of occasions, including the Uber Elevate Summit Keynotes in 2018 and 2019.

## Statement on alignment with Foundation charter's mission

The UCF charter's mission statement: "The mission of the Project is to enable widespread adoption and help accelerate development of open source urban computing and a surrounding ecosystem."

The current goals of the project include development of a direct UI integration with kepler.gl and tighter integrations with other vis.gl modules a part of the Urban Computing Foundation (UCF). We’re also looking to expand the number of contributors and users coming from the growing vis.gl community. Integrations are a huge effort to undertake and require two-way changes between libraries. Members of the UCF are interested in encouraging the development of these integrations, but have expressed concerns that without a consolidation of efforts the UCF Technical Steering Committee may hesitate due to its inability to ensure long term alignment with the hubble.gl half of the integration.

Transferring to an open source foundation will bring in strong technical leadership to Hubble.gl and increase the appeal for high effort collaborations between itself and other vis.gl projects.

## Link to current Code of Conduct

- [hubble.gl](https://github.com/uber/hubble.gl/blob/master/CODE_OF_CONDUCT.md)

## Sponsor from TAC

Shan He

## Project license

- `hubble.gl` - MIT license

## Source control

Hubble.gl is in GitHub:

- [hubble.gl](https://github.com/uber/hubble.gl)

## Issue tracker

All issues are currently managed on GitHub:

- [hubble.gl](https://github.com/uber/hubble.gl/issues)

## External dependencies

- `deck.gl`, `luma.gl`, `loaders.gl` (MIT)
- `popmotion` (MIT)
- `downloadjs` (MIT)
- `react` (MIT)
- `webm-writer` (WTFPL)
- `turf.js` (MIT)
- `styled-components` (MIT)

## Release methodology and mechanics

- [hubble.gl developer guidelines](https://github.com/uber/hubble.gl/blob/master/CONTRIBUTING.md)

## Names of initial committers, if different from those submitting proposal

- Chris Gervang (Uber)
- Raymond Wu

## Briefly describe the project's leadership team and decision-making process

- Chris Gervang (Uber) - current tech lead at Uber Elevate

Currently decisions are made by Chris Gervang. PRs are expected to follow [vis.gl tsc guidelines](https://github.com/visgl/tsc/tree/master/developer-process).

## Link to any documented governance practices

None

## Preferred maturity level

At Large stage

## List of project's official communication channels

-  Currently no official channel. We would like to create a channel in the [deck.gl public Slack](https://deckgl.slack.com) since we already unofficially use it.

## Link to project's website

- [hubble.gl](https://hubble.gl)

## Links to social media accounts

None

## Existing financial sponsorship

Uber

## Infrastructure needs or requests

- Domain registration
    + hubble.gl
- Mapbox Access Token
    + for hubble.gl documentation website
- Continuous Integration
    + Travis CI or equivalent

repository: ucfoundation/tac

repo_name: ucfoundation/tac


text:
# PG-SLAM_fpga

This repository contains Xilinx MPSoC FPGA configurations for PG-SLAM (Pose Graph - Simultaneous Localization and Mapping) algorithm. PG-SLAM introduces a pose graph optimization module, as an extension to the KinectFusion pipeline, to help recover the humanoid robot's pose. The original CUDA version  of the ROS-based PG-SLAM is on [this repo](https://github.com/mrsp/slam_stack). Our work implements and evaluates a plethora of MPSoC FPGA designs, exploring a variety of precise and approximate optimizations.

Repository branches:

* sw-only: unoptimized baseline implementation running on ARM with OpenMP.
* fastest_precise: fastest and precise HW implementation which implements the Bilateral Filter, Integration and Fuse Voxelgrids kernels on HW and enables all the precise optimizations.
* C1: approximate HW implementation which achieves the best performance (36.04 fps)
* C2: approximate HW implementation which achieves the best performance with zero untracked frames (28.23 fps)
* datasets: includes three trajectories generated in the lab environment using NAO humanoid robot with an Intel Realsense D455 RGB-D camera

## Notice
Vitis™ Unified Software Platform was used to run our experiments on Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit. If you wish to build and run on an Alveo™ card you must make the necessary changes.

PG-SLAM is dependent on OpenCV and g2o libraries and to ease our development process we used the Ubuntu distribution on the ZCU102. The compilation steps for the host code take place on ZCU102 and we do not use any cross-compilation or Petalinux tools for this. Petalinux tools are used only to build the kernel and the boot image.

### Tools for the build environment
1. [Vitis™ Unified Software Platform 2019.2](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vitis/2019-2.html)
2. [Vitis™ Embedded Platform 2019.2](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-platforms/2019-2.html)
3. PetaLinux 2019.2 (for kernel and boot image)[Link](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2019-2.html)
4. Xilinx Runtime (for software emulation on x86 or Alveo™ cards) - [https://github.com/Xilinx/XRT](https://github.com/Xilinx/XRT)
5. Ubuntu base Root Filesystem [Link](http://cdimage.ubuntu.com/ubuntu-base/releases/).

### Requirements for the embedded platform
The operating system that runs on the the embedded platform must have XRT and OpenCL installed. The XRT must be natively compiled on the Ubuntu distribution for the ZCU102. The Xilinx kernel must be built with the Petalinux tools and have the default modules and drivers enabled. Check this [repository](https://github.com/Xilinx/Vitis_Embedded_Platform_Source) for more information on building the platform, the kernel and the boot image. Please consult Xilinx documentation for more detailed information and instructions on how to run Ubuntu OS on the ZCU102.

You will also need to follow these steps:
* Install [OpenCV](https://github.com/opencv/opencv) and [OpenCV_contrib](https://github.com/opencv/opencv_contrib) (version 3.4.14) following the instructions in this repository.

* Install [g2o](https://github.com/RainerKuemmerle/g2o) library: [20200410_git](https://github.com/RainerKuemmerle/g2o/archive/refs/tags/20200410_git.zip) release.

### Build
There is a Makefile included that automates the build process for the ZCU102 board. It is based on makefiles provided in [Xilinx Vitis Acceleration Examples](https://github.com/Xilinx/Vitis_Accel_Examples/tree/2019.2). You can make changes to the Makefile according to your setup.

Commands to build for ZCU102:
1. `make bin DEVICE=zcu102_base` - Execute this command on the development machine with Vitis Compiler installed, to buld the Hardware accelerators.
2. `make host -j4 NATIVE=yes` - Execute this command on the ZCU102, in the Ubuntu OS with necessary libraries installed, to build the host binaries.

The results are created inside `xclbin` directory. Software binary is named `host` and the hardware binary `<name>.hw.xclbin`.

### Run
For our experiments we use the four living-room trajectories [ICL-NUIM dataset](https://www.doc.ic.ac.uk/~ahanda/VaFRIC/iclnuim.html) and the three trajectories of the datasets branch. We create the `.raw` format using the `scene2raw.cpp` program of the slambench1 repo, but we use floats instead of shorts to save the pixels. Depending on the input trajectory you must provide the necessary arguments. For instance, to run rb.traj0 (using the default parameters) you must type the command:

`./host -i rb_trj0.raw -s 8 -p 4.0,4.0,4.0 -r 1 -c 2 -k 570.342,570.342,319.5,239.5 -a 50 -e 5 -o output.log -x hwKernels.hw.xclbin`

To run the ICL-NUIM trajectories, update camera intrinsics by using `-k 481.2,480,320,240`.

### Get in Touch

If you would like to ask questions, report bugs or collaborate on research projects, please email any of the following:

 - Maria Gkeka (margkeka at uth dot gr)
 - Alexandros Patras (patras at uth dot gr)

For more information for our laboratory visit [https://csl.e-ce.uth.gr](https://csl.e-ce.uth.gr)

## License

[MIT](https://choosealicense.com/licenses/mit/)

We note that we use code from [SLAMBench1](https://github.com/pamela-project/slambench1) and [TooN library](https://github.com/edrosten/TooN) repositories, which each one retains its original license.
* slambench1 copyright MIT
* TooN copyright 2-Clause BSD (The original license file also exists on /lib/TooN)


text:
# Micronaut Security

[![Build Status](https://travis-ci.org/micronaut-projects/micronaut-security.svg?branch=master)](https://travis-ci.org/micronaut-projects/micronaut-security)

 The official Micronaut security solution.

 ## Documentation

 See the [Documentation](https://micronaut-projects.github.io/micronaut-security/latest/guide) for more information.

 [Snapshot Documentation](https://micronaut-projects.github.io/micronaut-security/snapshot/guide).

repository: stepanv/micronaut-security

repo_name: stepanv/micronaut-security


text:
# Buffer-Overflow-ASLR-Bruteforce
Bypassing ASLR by brute force memory address

This is a demo how to bypass ASLR by brute forcing the memory bytes that is changing everytime you run your application. By doing that, you can keep trying all the possible bytes until you hit the right byte to jump to it.

1- Compile the time service c file and run it with your choice of port to listen to. Run it on Ubuntu 32 bit.

2- Run the python file against your ubuntu server and change the IP inside the exploit file to match your time server IP.

Have fun :)


text:
Infinite Gallery Spinner
========================

Android gallery widget which has been modified to run continuously.

Instead of the standard gallery widget which slows down and eventually stops,
this gallery will run continuously until the user interacts with it again. It
can be stopped, but only manually.

Usage
=====

The infinite gallery is provided as a library project, so all you need to do is
reference the library project in your main android project.

In XML:

```xml
<com.scvngr.levelup.views.gallery.Gallery
    android:id="@+id/infinite_gallery"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_gallery"
    android:padding="0dip" />
```

Use an adapter to supply the views for the gallery.

See the Example project in the sample/ directory for usage.

Modified By
===========

* Nate Roy<EMAIL_ADDRESS>* Steve Pomeroy<EMAIL_ADDRESS>
License
-------

Infinite Gallery is available under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).

repository: mitmel/android-left-locked-gallery

repo_name: mitmel/android-left-locked-gallery


text:
# C. SQL 關鍵字

[Table C.1](c.-sql-guan-jian-zi.md#table-c-1-sql-key-words) lists all tokens that are key words in the SQL standard and in PostgreSQL 11devel. Background information can be found in [Section 4.1.1](../the-sql-language/sql-syntax/lexical-structure.md#4-1-1-identifier-he-zi-keyword). \(For space reasons, only the latest two versions of the SQL standard, and SQL-92 for historical comparison, are included. The differences between those and the other intermediate standard versions are small.\)

SQL distinguishes between _reserved_ and _non-reserved_ key words. According to the standard, reserved key words are the only real key words; they are never allowed as identifiers. Non-reserved key words only have a special meaning in particular contexts and can be used as identifiers in other contexts. Most non-reserved key words are actually the names of built-in tables and functions specified by SQL. The concept of non-reserved key words essentially only exists to declare that some predefined meaning is attached to a word in some contexts.

In the PostgreSQL parser life is a bit more complicated. There are several different classes of tokens ranging from those that can never be used as an identifier to those that have absolutely no special status in the parser as compared to an ordinary identifier. \(The latter is usually the case for functions specified by SQL.\) Even reserved key words are not completely reserved in PostgreSQL, but can be used as column labels \(for example, `SELECT 55 AS CHECK`, even though `CHECK` is a reserved key word\).

In [Table C.1](https://www.postgresql.org/docs/devel/static/sql-keywords-appendix.html#KEYWORDS-TABLE) in the column for PostgreSQL we classify as “non-reserved” those key words that are explicitly known to the parser but are allowed as column or table names. Some key words that are otherwise non-reserved cannot be used as function or data type names and are marked accordingly. \(Most of these words represent built-in functions or data types with special syntax. The function or type is still available but it cannot be redefined by the user.\) Labeled “reserved” are those tokens that are not allowed as column or table names. Some reserved key words are allowable as names for functions or data types; this is also shown in the table. If not so marked, a reserved key word is only allowed as an “AS” column label name.

As a general rule, if you get spurious parser errors for commands that contain any of the listed key words as an identifier you should try to quote the identifier to see if the problem goes away.

It is important to understand before studying [Table C.1](https://www.postgresql.org/docs/devel/static/sql-keywords-appendix.html#KEYWORDS-TABLE) that the fact that a key word is not reserved in PostgreSQL does not mean that the feature related to the word is not implemented. Conversely, the presence of a key word does not indicate the existence of a feature.

## **Table C.1. SQL Key Words**

| Key Word | PostgreSQL | SQL:2011 | SQL:2008 | SQL-92 |
| :--- | :--- | :--- | :--- | :--- |
| `A` |  | non-reserved | non-reserved |  |
| `ABORT` | non-reserved |  |  |  |
| `ABS` |  | reserved | reserved |  |
| `ABSENT` |  | non-reserved | non-reserved |  |
| `ABSOLUTE` | non-reserved | non-reserved | non-reserved | reserved |
| `ACCESS` | non-reserved |  |  |  |
| `ACCORDING` |  | non-reserved | non-reserved |  |
| `ACTION` | non-reserved | non-reserved | non-reserved | reserved |
| `ADA` |  | non-reserved | non-reserved | non-reserved |
| `ADD` | non-reserved | non-reserved | non-reserved | reserved |
| `ADMIN` | non-reserved | non-reserved | non-reserved |  |
| `AFTER` | non-reserved | non-reserved | non-reserved |  |
| `AGGREGATE` | non-reserved |  |  |  |
| `ALL` | reserved | reserved | reserved | reserved |
| `ALLOCATE` |  | reserved | reserved | reserved |
| `ALSO` | non-reserved |  |  |  |
| `ALTER` | non-reserved | reserved | reserved | reserved |
| `ALWAYS` | non-reserved | non-reserved | non-reserved |  |
| `ANALYSE` | reserved |  |  |  |
| `ANALYZE` | reserved |  |  |  |
| `AND` | reserved | reserved | reserved | reserved |
| `ANY` | reserved | reserved | reserved | reserved |
| `ARE` |  | reserved | reserved | reserved |
| `ARRAY` | reserved | reserved | reserved |  |
| `ARRAY_AGG` |  | reserved | reserved |  |
| `ARRAY_MAX_CARDINALITY` |  | reserved |  |  |
| `AS` | reserved | reserved | reserved | reserved |
| `ASC` | reserved | non-reserved | non-reserved | reserved |
| `ASENSITIVE` |  | reserved | reserved |  |
| `ASSERTION` | non-reserved | non-reserved | non-reserved | reserved |
| `ASSIGNMENT` | non-reserved | non-reserved | non-reserved |  |
| `ASYMMETRIC` | reserved | reserved | reserved |  |
| `AT` | non-reserved | reserved | reserved | reserved |
| `ATOMIC` |  | reserved | reserved |  |
| `ATTACH` | non-reserved |  |  |  |
| `ATTRIBUTE` | non-reserved | non-reserved | non-reserved |  |
| `ATTRIBUTES` |  | non-reserved | non-reserved |  |
| `AUTHORIZATION` | reserved \(can be function or type\) | reserved | reserved | reserved |
| `AVG` |  | reserved | reserved | reserved |
| `BACKWARD` | non-reserved |  |  |  |
| `BASE64` |  | non-reserved | non-reserved |  |
| `BEFORE` | non-reserved | non-reserved | non-reserved |  |
| `BEGIN` | non-reserved | reserved | reserved | reserved |
| `BEGIN_FRAME` |  | reserved |  |  |
| `BEGIN_PARTITION` |  | reserved |  |  |
| `BERNOULLI` |  | non-reserved | non-reserved |  |
| `BETWEEN` | non-reserved \(cannot be function or type\) | reserved | reserved | reserved |
| `BIGINT` | non-reserved \(cannot be function or type\) | reserved | reserved |  |
| `BINARY` | reserved \(can be function or type\) | reserved | reserved |  |
| `BIT` | non-reserved \(cannot be function or type\) |  |  | reserved |
| `BIT_LENGTH` |  |  |  | reserved |
| `BLOB` |  | reserved | reserved |  |
| `BLOCKED` |  | non-reserved | non-reserved |  |
| `BOM` |  | non-reserved | non-reserved |  |
| `BOOLEAN` | non-reserved \(cannot be function or type\) | reserved | reserved |  |
| `BOTH` | reserved | reserved | reserved | reserved |
| `BREADTH` |  | non-reserved | non-reserved |  |
| `BY` | non-reserved | reserved | reserved | reserved |

| `C` |  | non-reserved | non-reserved | non-reserved |
| :--- | :--- | :--- | :--- | :--- |
| `CACHE` | non-reserved |  |  |  |
| `CALL` |  | reserved | reserved |  |
| `CALLED` | non-reserved | reserved | reserved |  |
| `CARDINALITY` |  | reserved | reserved |  |
| `CASCADE` | non-reserved | non-reserved | non-reserved | reserved |
| `CASCADED` | non-reserved | reserved | reserved | reserved |
| `CASE` | reserved | reserved | reserved | reserved |
| `CAST` | reserved | reserved | reserved | reserved |
| `CATALOG` | non-reserved | non-reserved | non-reserved | reserved |
| `CATALOG_NAME` |  | non-reserved | non-reserved | non-reserved |
| `CEIL` |  | reserved | reserved |  |
| `CEILING` |  | reserved | reserved |  |
| `CHAIN` | non-reserved | non-reserved | non-reserved |  |
| `CHAR` | non-reserved \(cannot be function or type\) | reserved | reserved | reserved |
| `CHARACTER` | non-reserved \(cannot be function or type\) | reserved | reserved | reserved |
| `CHARACTERISTICS` | non-reserved | non-reserved | non-reserved |  |
| `CHARACTERS` |  | non-reserved | non-reserved |  |
| `CHARACTER_LENGTH` |  | reserved | reserved | reserved |
| `CHARACTER_SET_CATALOG` |  | non-reserved | non-reserved | non-reserved |
| `CHARACTER_SET_NAME` |  | non-reserved | non-reserved | non-reserved |
| `CHARACTER_SET_SCHEMA` |  | non-reserved | non-reserved | non-reserved |
| `CHAR_LENGTH` |  | reserved | reserved | reserved |
| `CHECK` | reserved | reserved | reserved | reserved |
| `CHECKPOINT` | non-reserved |  |  |  |
| `CLASS` | non-reserved |  |  |  |
| `CLASS_ORIGIN` |  | non-reserved | non-reserved | non-reserved |
| `CLOB` |  | reserved | reserved |  |
| `CLOSE` | non-reserved | reserved | reserved | reserved |
| `CLUSTER` | non-reserved |  |  |  |
| `COALESCE` | non-reserved \(cannot be function or type\) | reserved | reserved | reserved |
| `COBOL` |  | non-reserved | non-reserved | non-reserved |
| `COLLATE` | reserved | reserved | reserved | reserved |
| `COLLATION` | reserved \(can be function or type\) | non-reserved | non-reserved | reserved |
| `COLLATION_CATALOG` |  | non-reserved | non-reserved | non-reserved |
| `COLLATION_NAME` |  | non-reserved | non-reserved | non-reserved |
| `COLLATION_SCHEMA` |  | non-reserved | non-reserved | non-reserved |
| `COLLECT` |  | reserved | reserved |  |
| `COLUMN` | reserved | reserved | reserved | reserved |
| `COLUMNS` | non-reserved | non-reserved | non-reserved |  |
| `COLUMN_NAME` |  | non-reserved | non-reserved | non-reserved |
| `COMMAND_FUNCTION` |  | non-reserved | non-reserved | non-reserved |
| `COMMAND_FUNCTION_CODE` |  | non-reserved | non-reserved |  |
| `COMMENT` | non-reserved |  |  |  |
| `COMMENTS` | non-reserved |  |  |  |
| `COMMIT` | non-reserved | reserved | reserved | reserved |
| `COMMITTED` | non-reserved | non-reserved | non-reserved | non-reserved |
| `CONCURRENTLY` | reserved \(can be function or type\) |  |  |  |
| `CONDITION` |  | reserved | reserved |  |
| `CONDITION_NUMBER` |  | non-reserved | non-reserved | non-reserved |
| `CONFIGURATION` | non-reserved |  |  |  |
| `CONFLICT` | non-reserved |  |  |  |
| `CONNECT` |  | reserved | reserved | reserved |
| `CONNECTION` | non-reserved | non-reserved | non-reserved | reserved |
| `CONNECTION_NAME` |  | non-reserved | non-reserved | non-reserved |
| `CONSTRAINT` | reserved | reserved | reserved | reserved |
| `CONSTRAINTS` | non-reserved | non-reserved | non-reserved | reserved |
| `CONSTRAINT_CATALOG` |  | non-reserved | non-reserved | non-reserved |
| `CONSTRAINT_NAME` |  | non-reserved | non-reserved | non-reserved |
| `CONSTRAINT_SCHEMA` |  | non-reserved | non-reserved | non-reserved |
| `CONSTRUCTOR` |  | non-reserved | non-reserved |  |
| `CONTAINS` |  | reserved | non-reserved |  |
| `CONTENT` | non-reserved | non-reserved | non-reserved |  |
| `CONTINUE` | non-reserved | non-reserved | non-reserved | reserved |
| `CONTROL` |  | non-reserved | non-reserved |  |
| `CONVERSION` | non-reserved |  |  |  |
| `CONVERT` |  | reserved | reserved | reserved |
| `COPY` | non-reserved |  |  |  |
| `CORR` |  | reserved | reserved |  |
| `CORRESPONDING` |  | reserved | reserved | reserved |
| `COST` | non-reserved |  |  |  |
| `COUNT` |  | reserved | reserved | reserved |
| `COVAR_POP` |  | reserved | reserved |  |
| `COVAR_SAMP` |  | reserved | reserved |  |
| `CREATE` | reserved | reserved | reserved | reserved |
| `CROSS` | reserved \(can be function or type\) | reserved | reserved | reserved |
| `CSV` | non-reserved |  |  |  |
| `CUBE` | non-reserved | reserved | reserved |  |
| `CUME_DIST` |  | reserved | reserved |  |
| `CURRENT` | non-reserved | reserved | reserved | reserved |
| `CURRENT_CATALOG` | reserved | reserved | reserved |  |
| `CURRENT_DATE` | reserved | reserved | reserved | reserved |
| `CURRENT_DEFAULT_TRANSFORM_GROUP` |  | reserved | reserved |  |
| `CURRENT_PATH` |  | reserved | reserved |  |
| `CURRENT_ROLE` | reserved | reserved | reserved |  |
| `CURRENT_ROW` |  | reserved |  |  |
| `CURRENT_SCHEMA` | reserved \(can be function or type\) | reserved | reserved |  |
| `CURRENT_TIME` | reserved | reserved | reserved | reserved |
| `CURRENT_TIMESTAMP` | reserved | reserved | reserved | reserved |
| `CURRENT_TRANSFORM_GROUP_FOR_TYPE` |  | reserved | reserved |  |
| `CURRENT_USER` | reserved | reserved | reserved | reserved |
| `CURSOR` | non-reserved | reserved | reserved | reserved |
| `CURSOR_NAME` |  | non-reserved | non-reserved | non-reserved |
| `CYCLE` | non-reserved | reserved | reserved |  |
| `DATA` | non-reserved | non-reserved | non-reserved | non-reserved |

repository: isaackuang/gitbook-docs

repo_name: isaackuang/gitbook-docs


text:
# From v0.1.2:

## Bug Fixes
* Fixes #4.

# From 0.1.1-alpha:

# Major Changes
* Making Compile SDK to 28
* Migrating `AppCompat` usage to `AndroidX`

#### Updated Dependencies
* Gradle wrapper to `5.1.1` from `4.4`
* Kotlin from `1.3.41` to `1.2.50`
* Android Gradle plugin to `3.4.1` from `3.1.3`

repository: naveenchandan/RecyclerView-FastScroller

repo_name: naveenchandan/RecyclerView-FastScroller