text:
# Rando-PHP

[![Testing RandoPHP](https://img.shields.io/github/actions/workflow/status/hi-folks/rando-php/php.yml?branch=master&label=Test%20RANDO-PHP&style=for-the-badge)](https://github.com/Hi-Folks/rando-php/actions)
[![GitHub last commit](https://img.shields.io/github/last-commit/hi-folks/rando-php?style=for-the-badge)](https://github.com/Hi-Folks/rando-php/commits/master)
[![GitHub Release Date](https://img.shields.io/github/release-date/hi-folks/rando-php?style=for-the-badge)](https://github.com/Hi-Folks/rando-php/releases/)
![Packagist PHP Version Support](https://img.shields.io/packagist/dependency-v/hi-folks/rando-php/php?style=for-the-badge)

![RandoPHP](rando-php.png)

RandoPHP is a PHP open-source package for random stuff. With this package you can:
- **Draw**: Extract random items (sample) from an array. This is useful when you want to "draw" some numbers or items;
- **Generate**: useful for create random items/sequences:
   - *item* like integer, byte, boolean, float, lat/long coordinates, char (numeric, alphabetic, alphanumeric);
   - *sequences* like an array of integers or chars;

With the fluent interface, you can control some things like:
- minimum and maximum value you want to create;
- how many items you want to create;
- for sequences if you want or not duplicates ([1,5,3,1,1], 1 is duplicate or [1,6,5,3,8], no duplicates);
- And other stuff, see the documentation for more options.

## Table of contents

- [Installation](#installation)
- [Usage, how to generate:](#usage)
  - [Random char](#generate-char)
  - [Random boolean](#generate-boolean)
  - [Random float](#generate-a-float)
  - [Random integer](#generate-an-integer)
  - [Random Bytes](#generate-bytes)
  - [Random Date](#generate-a-date)
  - [Random Sequences](#generate-sequences)
  - [Random Chars](#random-chars)
- [Usage, how to extract random values from array/list](#draw-random-stuff)

## Installation

You can install the package via composer:

```bash
composer require hi-folks/rando-php
```

## Usage
To import the right class:
```php
use HiFolks\RandoPhp\Randomize;
```

### Generate Char

Sometimes you want to obtain a random char, for example, a numeric char:

```php
Randomize::char()->numeric()->generate();
```
Or you might want an alphabetic char:

```php
Randomize::char()->alpha()->generate();
```

You can even do both!
```php
Randomize::char()->alphanumeric()->generate();
```

You can generate a lower case char:
```php
Randomize::char()->alpha()->lower()->generate();
```
You can generate an upper case char:
```php
Randomize::char()->alpha()->upper()->generate();
```

You can generate a special character.
A special character is one of '!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~':
```php
Randomize::char()->specialCharacters()->generate();
```

### Generate Boolean

Sometimes you want to obtain a random boolean `true` or `false` (flip a coin):

``` php
$randomBool = Randomize::boolean()->generate();
```
### Generate a Float

Sometimes you want to obtain a random float (default min-max range of 0.0 - 1.0). For example, you want to generate a random temperature for a day:

```php
$randomFloat = Randomize::float()->generate();
```

Or you can set the min-max range of 0 - 90, which is equivalent to ->min(0)->max(90)

```php
$randomFloat = Randomize::float()->min(0)->max(90)->generate();
```

### Generate an Integer

Sometimes you want to obtain a random integer (min-max range). For example, you want to roll the dice:

``` php
$randomNumber = Randomize::integer()->min(1)->max(6)->generate();
```
The same thing using `range()` method, instead of `min()` and `max()`:

``` php
$randomNumber = Randomize::integer()->range(1,6)->generate();
```

You can use a shortcut helper to generate an integer calling the constructor with min and max parameters:

``` php
$randomNumber = Randomize::integer(1,6)->generate();
```

### Generate bytes
Sometimes you want to obtain some random bytes (hexadecimal). For example, you want to generate a random RGB color (a hex triplet in hexadecimal format):

```php
$randomRGB = Randomize::byte()->length(3)->generate();
```

### Generate a Date
Sometimes you want to obtain a random date. For example, you want to generate a random date:

```php
$randomDate = Randomize::datetime()->generate();
```

By default, a date between the first day of the current year to the last day of the current year.
If you want to define the range, for example, a range of 01 Jan 2020 to 10 Jan 2020, you can use `min()` and `max()` methods:
```php
$randomDate = Randomize::datetime()->min('2020–01–01')->max('2020–01–10')->generate();
```

You can even specify your preferred format for the random date generated, by using the `format()` method:
```php
$randomDate = Randomize::datetime()->format('d-M-Y')->generate();
```
You can use `min()` and `max()` with `format()` method:
```php
$randomDate = Randomize::datetime()->min('2020–01–01')->max('2020–01–10')->format('d-M-Y')->generate();
```
With the latest example, you can obtain something like "05-Jan-2020".

### Generate sequences
Sometimes, you want to obtain some random sequences. For example, you want to roll the dice 15 times:

```php
$randomRolls = Randomize::sequence()->min(1)->max(6)->count(15)->generate();
```

Sometimes you want to obtain some random char sequences. For example, char sequences of length 10:

```php
$randomChars = Randomize::sequence()->chars()->count(10)->generate();
```

Or you might want numeric char sequences.

```php
$randomChars = Randomize::sequence()->chars()->numeric()->count(10)->generate();
```

Or you might want alphabetical char sequences.

```php
$randomChars = Randomize::sequence()->chars()->alpha()->count(10)->generate();
```

Yes, even both.

```php
$randomChars = Randomize::sequence()->chars()->alphanumeric()->count(10)->generate();
```

You want 20 lowercase chars:
```php
Randomize::sequence()->chars()->alphaLowerCase()->count(20)->asString()->generate();
```

You want 20 upper case chars:
```php
Randomize::sequence()->chars()->alphaUpperCase()->count(20)->asString()->generate();
```

Sometimes you want to obtain some random sequences with **no duplicates**. For example, you want to play "Tombola" (extracting numbers from 1 to 90 with NO duplicates):

```php
$randomTombola = Randomize::sequence()->min(1)->max(90)->count(90)->noDuplicates()->generate();
```

Sometimes you want to obtain some random char sequences with **no duplicates**.

```php
$randomChars = Randomize::sequence()->chars()->count(10)->noDuplicates()->generate();
```

Or you might want numeric char sequences with **no duplicates**. For example, char sequences of length 10:

```php
$randomChars = Randomize::sequence()->chars()->numeric()->count(10)->noDuplicates()->generate();
```

Or you might want alphabetical char sequences with **no duplicates**.

```php
$randomChars = Randomize::sequence()->chars()->alpha()->count(10)->noDuplicates()->generate();
```

Yes, even both and with **no duplicates**.

```php
$randomChars = Randomize::sequence()->chars()->alphanumeric()->count(10)->noDuplicates()->generate();
```

### Random String
If you want to generate a random string (alphanumeric, only letters, only numbers, with no duplication, lower case, upper case etc) you can use random chars generation.
To generate a string use `Randomize::chars()`:
```php
$string = Randomize::chars()->generate();
```
The default behavior is:
- 10 chars;
- only letters (a-z);
- lowercase;
- duplication is allowed (the string 'aba' has a duplication for 'a' char).

You can change the default values with some methods and parameters.
Method to set the type of chars (numeric, alpha, alphanumeric...):
- _alpha()_ : 'a-z', 'A-Z';
- _alphanumeric()_ : 'a-z', 'A-Z', '0-9';
- _numeric()_ : '0-9';
- _alphaLowerCase()_ : 'a-z';
- _alphaUpperCase()_ : 'A-Z';
- _specialCharacters()_ : !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

You have also some methods to "control" the output, for example, avoid duplications:
- `unique()`: it generates a string with at most one occurrence per character.

#### String with numeric chars ('0'-'9')
If you want to generate a string with 16 chars, made with numeric chars ('0'-'9'):

```php
$string = Randomize::chars(16)->numeric()->generate();
```
You could obtain something like this '3963233500573002'.

#### String with 20 chars, lower case, just letters, no dups

If you want to obtain a string with 20 chars, lower case and just letters ('a'-'z'), and you want to avoid character duplications ( `alphaLowerCase()` and `unique()` ):
```php
$string = Randomize::chars(20)->alphaLowerCase()->unique()->generate();
```
You could obtain something like this: 'nmbsjhrgdyfxwoltqkzp'.
#### String with 20 chars, letters and special characters

If you want to obtain a string with 20 chars, with letters and special characters:
```php
$string = Randomize::chars(20)->specialCharacters()->alpha()->generate();
```
You could obtain something like this: 'IOgPckeGGifrD%DRy[*!'.

### Draw random stuff
If you have a list of values and you want to extract/select/draw one or more elements,
you could use the `Draw` class instead of `Randomize`.
For using the `Draw` class you need to import it:
```php
use HiFolks\RandoPhp\Draw;
```

#### Suggest which programming language you could use in your next project (random)
```php
use HiFolks\RandoPhp\Draw;

$randomLanguage = Draw::sample(["PHP", "Python", "Golang", "Javascript"])->snap();
var_dump($randomLanguage);
```

#### Suggest which JS framework you could use in your next project (random)
```php
$array=["React.js", "Vue.js", "Svelte.js", "Angular.js" , "Alpine.js", "Vanilla js"];
$randomJs = Draw::sample($array)->extract();
```

#### Extract 3 JS frameworks you could use in your next project
```php
$array=["React.js", "Vue.js", "Svelte.js", "Angular.js" , "Alpine.js", "Vanilla js"];
$randomJs = Draw::sample($array)->count(3)->extract();
```

#### Extract 3 JS frameworks (duplicates allowed)
```php
$array = ["React.js", "Vue.js", "Svelte.js", "Angular.js", "Alpine.js", "Vanilla js"];
$randomJs = Draw::sample($array)->count(3)->allowDuplicates()->extract();
```

### Testing

``` bash
composer test
```

If you want to see some coverage reports you can execute `phpunit` command with `coverage-text` option:

```bash
vendor/bin/phpunit --coverage-text
```

### Warning :warning:

Under the hood, RandoPHP uses some native PHP functions like:
- array_rand(): [PHP Doc for array_rand](https://www.php.net/manual/en/function.array-rand.php);
- random_int(): [PHP Doc for random_int](https://www.php.net/manual/en/function.random-int.php);
- shuffle(): [PHP Doc for shuffle](https://www.php.net/manual/en/function.shuffle);
- random_bytes(): [PHP Doc for random_bytes](https://www.php.net/manual/en/function.random-bytes).

These PHP functions use a pseudo-random number generator that is not suitable for cryptographic purposes.

### Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Submit ideas or feature requests or issues
Take a look if your request is already created https://github.com/Hi-Folks/rando-php/issues
If it is not present, you can create a new one https://github.com/Hi-Folks/rando-php/issues/new

## Credits

- [Roberto Butti](https://github.com/roberto-butti)
- [All Contributors](../../contributors)
- [PHP Package Boilerplate](https://laravelpackageboilerplate.com)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

repository: Hi-Folks/rando-php

gha_language: PHP

repo_name: Hi-Folks/rando-php


text:
ShoutBux
=====================

## Program Prequisites

  * NodeJS
  * ExpressJS
  * MongoDB
  * Redis

## Architecture Diagram

![alt text](https://raw.githubusercontent.com/aubrian-halili/shout-out/development/public/images/Architecture.png "Architecture Diagram")

## API Diagram

![alt text](https://raw.githubusercontent.com/aubrian-halili/shout-out/development/public/images/API.png "API Diagram")

## Installation

```bash
$ git clone https://github.com/aubrian-halili/shout-out.git
$ npm install
```

## Run the Application

```bash
$ npm start
```
Then go to this URL: http://localhost:9000/

## MongoDB Setup
  Update the config file for MongoDB connection which is located in this path:

```bash
$ cd /app_dir/server/config.js
```
  Example values:
```
mongo: {
  uri: 'mongodb://<IP_ADDRESS>:27017/shout-out'
}
```

## Redis Setup
  Update the config file for Redis connection which is located in this path:

```bash
$ cd /app_dir/server/config.js
```
  Example values:
```
redis: {
  host: '<IP_ADDRESS>',
  port: '6379'
}
```

## Features

  * Users can post "shouts".
  * A “shout” should contain 32 chars max.
  * “Shouts” are sorted by date posted/edited.
  * Have a simple login feature.
  * Authorized users can post, edit, delete a “shout” to their own timeline.
  * Users may follow other users. Only users that follow the other can see each others timeline.
  * Timelines should update realtime. (**Note:** Still in development)

## Tests

  To run the test suite, first install the dependencies, then run `npm test`:

```bash
$ npm install
$ npm test
```

## User Account
  Here is the list of Users with username and password:

  A backup of MongoDB Collection is included in this repository. Path for the directory:

```bash
$ cd /app_dir/db-backup
```

| Name              | Username  | Password  |
| ----------------- | --------- | --------- |
| Shelby Purdie     | shelby    | shelby    |
| Gabriele Linares  | gabriele  | gabriele  |
| Martine Ruggeri   | martine   | martine   |
| Elisha Ribeiro    | elisha    | elisha    |
| Emmaline Harms    | emmaline  | emmaline  |
| Shanice Mcnulty   | shanice   | shanice   |
| Alfredo Atkin     | alfredo   | alfredo   |
| Tad Paulk         | tad       | tad       |
| Jerilyn Awong     | jerilyn   | jerilyn   |
| Modesta Juergens  | modesta   | modesta   |

## License

  [MIT](LICENSE)

license: MIT

repository: aubrian-halili/shout-out

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: aubrian-halili/shout-out


text:
# Specification version number

0.2.1

* _status_: current

# Specification name

Header Field Manipulation Test

# Test preconditions

  * An internet connection
  * An ooni-backend providing the http-return-json-headers test helper

For reporting to the backend to work that it is possible for
the probe to establish a connection to the Tor network.

# Expected impact

The ability to determine if HTTP request headers are being manipulated,
inferring the existence of HTTP aware middleboxes.

# Expected inputs

The address of the http-return-json-headers test helper.

## Semantics

A backend must be passed with option -b, e.g.

  ooniprobe manipulation/http_header_field_manipulation -b http://<IP_ADDRESS>

Optionally, a yaml file containing request headers may be supplied with option
-h.

# Test description

It performs HTTP requests with request headers that vary capitalization towards
a backend. If the headers reported by the server differ from the ones we sent,
then we have detected tampering.

If the optional headers yaml file is not supplied, the
headers will be constructed as so:

```
{
  "User-Agent": [random.choice(net.userAgents)],
  "Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"],
  "Accept-Encoding": ["gzip,deflate,sdch"],
  "Accept-Language": ["en-US,en;q=0.8"],
  "Accept-Charset": ["ISO-8859-1,utf-8;q=0.7,*;q=0.3"],
  "Host": [randomStr(15)+'.com']
}
```

The Host header is a random string of 15 characters + .com
The User-Agent header is randomly selected from one of the following:

```
Mozilla/5.0 (iPhone; U; CPU iPhone OS 3 1 2 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Mobile/7D11
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:<IP_ADDRESS>) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729))
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2) Gecko/20100115 Firefox/3.6
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:<IP_ADDRESS>) Gecko/20091221 Firefox/3.5.7
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2) Gecko/20100115 Firefox/3.6
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:<IP_ADDRESS>) Gecko/20091221 Firefox/3.5.7
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
```

A request is then made towards the backend.

We have 5 categories of tampering:

## total

The response is not a json object and therefore we were not
able to reach the ooniprobe test backend

## request_line_capitalization

HTTP Request line (e.x. GET / HTTP/1.1) does not match the capitalization we set.

## header_field_number

The number of headers we sent does not match those the backend received.

## header_name_capitalization

The header field names do not match those that we sent.

## header_field_value

The header field value does not match with the one we transmitted.

# Expected output

## Parent data format

df-001-httpt

## Required output data

In addition to the details provided in the parent data format we add to the
report the key 'tampering', which is a dictionary containing the following keys
that correspond to the categories of tampering we detect as well as the
difference between the sent and received headers represented as a list of the
headers not present in both the sent and received headers.

## Semantics

```
{
  "total":
        "true|false if an invalid response was received from the "
        "backend control server.",

  "request_line_capitalization":
        "true|false if the capitalisation of the request method was normalised.",

  "header_name_capitalization":
        "true|false if the header name capitalisation was normalised.",

  "header_field_value":
        "true|false if the value of the headers received by the backend "
        "does not match the value of the headers sent by the probe.",

  "header_field_number":
        "true|false if the number of headers received different than the "
        "number of headers sent."

  "header_name_diff": [
        "The keys of the headers that differ in the request and the response."
   ]
}
```

## Example output sample

```
{
    "bucket_date": "2015-11-29",
    "data_format_version": "0.2.0",
    "id": "3cd95f57-9930-48b9-90b0-67ed20f3adfe",
    "input": null,
    "options": [],
    "probe_asn": "AS12876",
    "probe_cc": "FR",
    "probe_ip": "<IP_ADDRESS>",
    "report_filename": "2015-11-29/20151129T230014Z-FR-AS12876-http_header_field_manipulation-no_report_id-0.1.0-probe.json",
    "report_id": null,
    "software_name": "ooniprobe",
    "software_version": "1.3.1",
    "backend_version": "1.1.4",
    "input_hashes": [],
    "probe_city": null,
    "test_helpers": {
        "backend": "http://<IP_ADDRESS>:80"
    },
    "test_keys": {
        "agent": "agent",
        "requests": [
            {
                "request": {
                    "body": null,
                    "headers": {
                        "ACCEpT-cHarSET": "ISO-8859-1,utf-8;q=0.7,*;q=0.3",
                        "AccEPT-LAngUAge": "en-US,en;q=0.8",
                        "HOSt": "kFR3mwImawc0ivv.com",
                        "aCCePT": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
                        "acCEpt-encOdING": "gzip,deflate,sdch",
                        "useR-agEnT": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6"
                    },
                    "method": "get",
                    "tor": {
                        "exit_ip": false,
                        "exit_name": false,
                        "is_tor": false
                    },
                    "url": "http://<IP_ADDRESS>:80"
                },
                "response": {
                    "body": "{\"headers_dict\": {\"AccEPT-LAngUAge\": [\"en-US,en;q=0.8\"], \"acCEpt-encOdING\": [\"gzip,deflate,sdch\"], \"HOSt\": [\"kFR3mwImawc0ivv.com\"], \"aCCePT\": [\"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"], \"useR-agEnT\": [\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6\"], \"ACCEpT-cHarSET\": [\"ISO-8859-1,utf-8;q=0.7,*;q=0.3\"], \"Connection\": [\"close\"]}, \"request_line\": \"get / HTTP/1.1\", \"request_headers\": [[\"Connection\", \"close\"], [\"AccEPT-LAngUAge\", \"en-US,en;q=0.8\"], [\"acCEpt-encOdING\", \"gzip,deflate,sdch\"], [\"aCCePT\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"], [\"useR-agEnT\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6\"], [\"ACCEpT-cHarSET\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.3\"], [\"HOSt\", \"kFR3mwImawc0ivv.com\"]]}",
                    "code": 200,
                    "headers": {}
                },
                "response_length": null
            }
        ],
        "socksproxy": null,
        "start_time":<PHONE_NUMBER>.0,
        "tampering": {
            "header_field_name": false,
            "header_field_number": false,
            "header_field_value": false,
            "header_name_capitalization": false,
            "header_name_diff": [],
            "request_line_capitalization": false,
            "total": false
        }
    },
    "test_name": "http_header_field_manipulation",
    "test_runtime": 0.4789488316,
    "test_start_time": "2015-11-29 23:00:14",
    "test_version": "0.1.5"
}
```

# Privacy considerations

If the user is behind a transparent HTTP proxy that sets the X-Forwarded-For
header their IP address will end up being part of the final report.

repository: ooni/spec

repo_name: ooni/spec


text:
# Execution

Within the Prefect engine, there are many ways for users to affect execution.

[[toc]]

## Triggers

Trigger functions decide if a task is ready to run, based on the states of the upstream tasks. Prefect tasks won't run unless their triggers pass.

By default, tasks have an `all_successful` trigger, meaning they won't run unless all upstream tasks were successful. By changing the trigger function, you can control a task's behavior with regard to its upstream tasks. Other triggers include `all_failed`, `any_successful`, `any_failed`, `all_finished` and `manual_only`. These can be used to create tasks that only run when preceding tasks fail, or run no matter what, or never run automatically at all!

Tasks will only evaluate their triggers if all upstream tasks are in `Finished` states. Therefore, the `all_finished` trigger is the same as an `always_run` trigger.

::: tip Use a manual_only trigger to pause a flow
The `manual_only` trigger always puts the task in a `Paused` state, so the flow will never run a `manual_only` task automatically. This allows users to pause a flow mid-run. To resume, put the task in a `Resume` state and set it as one of the run's `start_tasks`. This will treat is as a root task with no upstream tasks, and skip the trigger check entirely.
:::

For example, suppose we want to construct a flow with one root task; if this task
succeeds, we want to run task B.  If instead it fails, we want to run task C.  We
can accomplish this pattern through the use of triggers:

```python
import random

from prefect.triggers import all_successful, all_failed
from prefect import task, Flow

@task(name="Task A")
def task_a():
    if random.random() > 0.5:
        raise ValueError("Non-deterministic error has occured.")

@task(name="Task B", trigger=all_successful)
def task_b():
    # do something interesting
    pass

@task(name="Task C", trigger=all_failed)
def task_c():
    # do something interesting
    pass

with Flow("Trigger example") as flow:
    success = task_b(upstream_tasks=[task_a])
    fail = task_c(upstream_tasks=[task_a])

## note that as written, this flow will fail regardless of the path taken
## because *at least one* terminal task will fail;
## to fix this, we want to set Task B as the "reference task" for the Flow
## so that it's state uniquely determines the overall Flow state
flow.set_reference_tasks([success])

flow.run()
```

## State signals

Prefect does its best to infer the state of a running task. If the `run()` method succeeds, Prefect sets the state to `Success` and records any data that was returned. If the `run()` method raises an error, Prefect sets the state to `Failed` with an appropriate message.

Sometimes, you may want more fine control over a task's state. For example, you may want a task to be skipped or to force a task to retry. In that case, raise the appropriate Prefect `signal`. It will be intercepted and transformed into the appropriate state.

Prefect provides signals for most states, including `RETRY`, `SKIP`, `FAIL`, `SUCCESS`, and `PAUSE`.

```python
from prefect import task
from prefect.engine import signals

def retry_if_negative(x):
    if x < 0:
        raise signals.RETRY()
    else:
        return x
```

Another common use of Prefect signals is when the task in question will be nested under other functions that could trap its normal result or error. In that case, a signal could be used to "bubble up" a desired state change and bypass the normal return mechanism.

## Context

Prefect provides a powerful `Context` object to share information without requiring explicit arguments on a task's `run()` method.

The `Context` can be accessed at any time, and will be pre-populated with information before and during each flow run. For an exhaustive list of values that you can find in context, see the corresponding [API documentation](../../api/latest/utilities/context.html).

```python
@task
def try_unlock():
    if prefect.context.key == 'abc':
        return True
    else:
        raise signals.FAIL()

with Flow('Using Context') as flow:
    try_unlock()

flow.run() # this run fails

with prefect.context(key='abc'):
    flow.run() # this run is successful
```

::: warning Modifying the context
We strongly recommend that users treat the context as read-only. Modifications can have unintended consequences.
:::

repository: romaintha/prefect

repo_name: romaintha/prefect


text:
# Crate and Barrel

You can work by yourself or with a partner.

![](https://raw.githubusercontent.com/zacharski/ml-class/master/labs/pics/CB_N_00370.jpg)

We are going to use the datasets from the Kaggle Competition [Otto Group Product Classification Challenge](https://www.kaggle.com/c/otto-group-product-classification-challenge/data?select=train.csv). You will need to register with Kaggle to get the data. Download both the training and test sets.

The following is the text from that page:

----

The Otto Group is one of the world’s biggest e-commerce companies, with subsidiaries in more than 20 countries, including Crate & Barrel (USA), Otto.de (Germany) and 3 Suisses (France). We are selling millions of products worldwide every day, with several thousand products being added to our product line.

A consistent analysis of the performance of our products is crucial. However, due to our diverse global infrastructure, many identical products get classified differently. Therefore, the quality of our product analysis depends heavily on the ability to accurately cluster similar products. The better the classification, the more insights we can generate about our product range.

![
](https://storage.googleapis.com/kaggle-competitions/kaggle/4280/media/Grafik.jpg)

For this competition, we have provided a dataset with 93 features for more than 200,000 products. The objective is to build a predictive model which is able to distinguish between our main product categories. The winning models will be open sourced.

### Submission

You will submit your solution to Kaggle using the Late Submission button. In your github repository place your code and your Kaggle results (an image is fine). If your code is a Python Jupyter Notebook make sure you have a writeup explaining your solution. If your code is just a source code file, have an additional readme file outlining and discussing your solution.

### XP

XP is based on having a solution that works, how you place in Kaggle, and how you place relative to others in the class. For this project you can work with a partner if you wish. If you do work with a partner, make sure your writeup outlines what each of you contributed to the project.

repository: KELBRENN/ml-class

repo_name: KELBRENN/ml-class


text:
# python_graphs

This package is for computing graph representations of Python programs for
machine learning applications. It includes the following modules:

*   `control_flow` For computing control flow graphs statically from Python
    programs.
*   `data_flow` For computing data flow analyses of Python programs.
*   `program_graph` For computing graphs statically to represent arbitrary
    Python programs or functions.
*   `cyclomatic_complexity` For computing the cyclomatic complexity of a Python function.

## Installation

To install python_graphs with pip, run: `pip install python_graphs`.

To install python_graphs from source, run: `python setup.py develop`.

## Common Tasks

**Generate a control flow graph from a function `fn`:**

```python
from python_graphs import control_flow
graph = control_flow.get_control_flow_graph(fn)
```

**Generate a program graph from a function `fn`:**

```python
from python_graphs import program_graph
graph = program_graph.get_program_graph(fn)
```

**Compute the cyclomatic complexity of a function `fn`:**

```python
from python_graphs import control_flow
from python_graphs import cyclomatic_complexity
graph = control_flow.get_control_flow_graph(fn)
value = cyclomatic_complexity.cyclomatic_complexity(graph)
```

---

This is not an officially supported Google product.

repository: reshinthadithyan/python-graphs

branch_name: refs/heads/main

repo_name: reshinthadithyan/python-graphs


text:
---
layout: post
title: "Bib2vec: An Embedding-based Search System for Bibliographic Information"
date: 2017-10-17 16:33:20
categories: arXiv_CL
tags: arXiv_CL Embedding Prediction Relation
author: Takuma Yoneda, Koki Mori, Makoto Miwa, Yutaka Sasaki
mathjax: true
---

* content
{:toc}

##### Abstract
We propose a novel embedding model that represents relationships among several elements in bibliographic information with high representation ability and flexibility. Based on this model, we present a novel search system that shows the relationships among the elements in the ACL Anthology Reference Corpus. The evaluation results show that our model can achieve a high prediction ability and produce reasonable search results.

##### Abstract (translated by Google)
我们提出了一个新颖的嵌入模型，它代表着书目信息中几个元素之间的关系，具有很高的表示能力和灵活性。在此模型的基础上，我们提出了一个新的搜索系统，显示ACL文集参考语料库中的元素之间的关系。评估结果表明，该模型能够达到较高的预测能力，产生合理的搜索结果。

##### URL
[https://arxiv.org/abs/1706.05122](https://arxiv.org/abs/1706.05122)

##### PDF
[https://arxiv.org/pdf/1706.05122](https://arxiv.org/pdf/1706.05122)


text:
# Employee-Directory

## Description

Employee-directory is a web application built with React. Keep track of the employees in your company. Easily sort employees by their names or age or locate a specific employee by typing in their name.

## Table of Contents

* [Description](#description)
* [Technology](#technology)
* [User Story](#user-story)
* [Installation](#installation)
* [Usage](#usage)
* [License](#license)
* [Contributing](#contributing)
* [Tests](#tests)
* [Questions](#questions)
* [Deployed Application URL](#deployed-application-URL)

## Technology

- REACT
- CSS
- Random User API
- JSX
- React Hooks
- HTML

## User Story

As a user, I want to be able to view my entire employee directory at once so that I have quick access to their information.

## Installation

No installation needed. If cloning repo do an npm install.

## Usage

The deployed application link will take you to the homepage. To start searching for an employee type in the name of the employee in the search field. You can sort the list alphabetically by name or numerically by age.

## License

[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

## Contributing

Please follow standard contributing guidelines.

## Tests

No tests to run.

## Questions

For any questions, please contact kendayao at<EMAIL_ADDRESS>
## Deployed Application URL

Deployed application link: https://kendayao.github.io/Employee-Directory/

Video demo link: https://giphy.com/gifs/JQeJfs1fRChoOrNBL8/fullscreen

license: ISC

repository: kendayao/Employee-Directory

gha_language: JavaScript

repo_name: kendayao/Employee-Directory


text:
# ![icon](winfile.png) Windows File Manager (WinFile)

## Introduction

This is a fork of [Microsoft's Windows File Manager](https://github.com/Microsoft/winfile).  It is a repository to hold changes that can be combined into a single build where the changes may not be welcomed upstream.

Currently this code compiles with Visual C++ 2003 and newer, and supports executing on Windows 2000 and above.  This is chosen as previous versions already distributed a version of File Manager.  For the best experience, compiling with Visual C++ 2008 is recommended, which supports multi-language binaries that can execute (in a single language) on 2000.

## Changes

- Resizable dialogs on all languages

## License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the [MIT](LICENSE) License.

repository: malxau/winfile

gha_license_id: MIT

repo_name: malxau/winfile


text:
---
title: "LSERSA Summer Race Series - Aldershot"
contentType: news
date: "2018-09-02T19:30"
---

The fourth round of the LSERSA 2018 Summer Series was held on Sunday 2nd September at Aldershot. Full results are available on [Ski Results](https://skiresults.co.uk/events/898).

##### Individual Event
* Stella Pople - 1st in Ladies U10
* Phoebe Everest - 2nd in Ladies U10
* Rufus Wontner - 1st in Mens U10
* Joshua Wakeling - 2nd in Mens U18
* Mark Oliver - 2nd in Masters 2

##### Fun Team Event
* Joseph Pannell was a member of the winning team
* Cerys Wakeling and Toby Pople were members of the 2nd-placed team

##### Honorable Mentions
* Ollie Turner-Moore - 4th in Mens U16
* Nigel Hilliard - 4th in Masters 2

Photos in the [gallery](/gallery/2018/180902_LSERSA_4_aldershot).

repository: domwakeling/bowles-website

repo_name: domwakeling/bowles-website


text:
# d3plus-shape

[![NPM Release](http://img.shields.io/npm/v/d3plus-shape.svg?style=flat)](https://www.npmjs.org/package/d3plus-shape) [![Build Status](https://travis-ci.org/d3plus/d3plus-shape.svg?branch=master)](https://travis-ci.org/d3plus/d3plus-shape) [![Dependency Status](http://img.shields.io/david/d3plus/d3plus-shape.svg?style=flat)](https://david-dm.org/d3plus/d3plus-shape) [![Gitter](https://img.shields.io/badge/-chat_on_gitter-brightgreen.svg?style=flat&logo=gitter-white)](https://gitter.im/d3plus/) [![1.0 progress](https://img.shields.io/badge/1.0_progress-88%25-yellowgreen.svg?style=flat)](https://github.com/d3plus/d3plus-shape/projects/1)

Fancy SVG shapes for visualizations

## Installing

If you use NPM, run `npm install d3plus-shape --save`. Otherwise, download the [latest release](https://github.com/d3plus/d3plus-shape/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. You can also load directly from [d3plus.org](https://d3plus.org):

```html
<script src="https://d3plus.org/js/d3plus-shape.v0.16.full.min.js"></script>
```

[width]: 360
[height]: 150

## Drawing Rectangles

Let's say you want to draw 2 rectangles with distinct labels and colors. If you structure your data like this:

```js
var data = [
  {text: "Box #1", width: 200, height: 150, x: 100, y: 75,  color: "cornflowerblue"},
  {text: "Box #2", width: 150, height: 100, x: 285, y: 100, color: "firebrick"}
];
```

It can be passed to the [Rect](http://d3plus.org/docs/#Rect) class like this:

```js
new d3plus.Rect()
  .data(data)
  .fill(function(d) { return d.color; })
  .label(function(d) { return d.text; })
  .render();
```

It even detects that the blue rectangle should have a dark label and the red rectangle's should be light!

*Please note that the x and y positions are relative to the center of the rectangles.*

[](https://d3plus.org/examples/d3plus-shape/getting-started/)

[Click here](https://d3plus.org/examples/d3plus-shape/getting-started/) to view this example live on the web.

### More Examples

 * [Drawing Area Shapes](http://d3plus.org/examples/d3plus-shape/area/)

## API Reference

#####
* [Image](#Image)
* [Area](#Area)
* [Bar](#Bar)
* [Box](#Box)
* [Circle](#Circle)
* [Line](#Line)
* [Path](#Path)
* [Rect](#Rect)
* [Shape](#Shape)
* [Whisker](#Whisker)

#####
* [largestRect](#largestRect) - An angle of zero means that the longer side of the polygon (the width) will be aligned with the x axis. An angle of 90 and/or -90 means that the longer side of the polygon (the width) will be aligned with the y axis. The value can be a number between -90 and 90 specifying the angle of rotation of the polygon, a string which is parsed to a number, or an array of numbers specifying the possible rotations of the polygon.
* [lineIntersection](#lineIntersection) - Finds the intersection point (if there is one) of the lines p1q1 and p2q2.
* [path2polygon](#path2polygon) - Transforms a path string into an Array of points.
* [pointDistance](#pointDistance) - Calculates the pixel distance between two points.
* [pointDistanceSquared](#pointDistanceSquared) - Returns the squared euclidean distance between two points.
* [pointRotate](#pointRotate) - Rotates a point around a given origin.
* [polygonInside](#polygonInside) - Checks if one polygon is inside another polygon.
* [polygonRayCast](#polygonRayCast) - Gives the two closest intersection points between a ray cast from a point inside a polygon. The two points should lie on opposite sides of the origin.
* [polygonRotate](#polygonRotate) - Rotates a point around a given origin.
* [segmentBoxContains](#segmentBoxContains) - Checks whether a point is inside the bounding box of a line segment.
* [segmentsIntersect](#segmentsIntersect) - Checks whether the line segments p1q1 && p2q2 intersect.
* [shapeEdgePoint](#shapeEdgePoint) - Calculates the x/y position of a point at the edge of a shape, from the center of the shape, given a specified pixel distance and radian angle.
* [largestRect](#largestRect) - Simplifies the points of a polygon using both the Ramer-Douglas-Peucker algorithm and basic distance-based simplification. Adapted to an ES6 module from the excellent [Simplify.js](http://mourner.github.io/simplify-js/).

#####
* [LargestRect](#LargestRect) - The returned Object of the largestRect function.

---

#### **Image** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L6)

This is a global class.

* [Image](#Image)
    * [new Image()](#new_Image_new)
    * [.render([*callback*])](#Image.render) ↩
    * [.data([*data*])](#Image.data) ↩
    * [.duration([*ms*])](#Image.duration) ↩
    * [.height([*value*])](#Image.height) ↩
    * [.id([*value*])](#Image.id) ↩
    * [.pointerEvents([*value*])](#Image.pointerEvents) ↩
    * [.select([*selector*])](#Image.select) ↩
    * [.url([*value*])](#Image.url) ↩
    * [.width([*value*])](#Image.width) ↩
    * [.x([*value*])](#Image.x) ↩
    * [.y([*value*])](#Image.y) ↩

# new **Image**()

Creates SVG images based on an array of data.

a sample row of data

```js
var data = {"url": "file.png", "width": "100", "height": "50"};
```
passed to the generator

```js
new Image().data([data]).render();
```
creates the following

```js
<image class="d3plus-Image" opacity="1" href="file.png" width="100" height="50" x="0" y="0"></image>
```
this is shorthand for the following

```js
image().data([data])();
```
which also allows a post-draw callback function

```js
image().data([data])(function() { alert("draw complete!"); })
```

# Image.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L45)

Renders the current Image to the page. If a *callback* is specified, it will be called once the images are done drawing.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

# Image.**data**([*data*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L109)

If *data* is specified, sets the data array to the specified array and returns the current class instance. If *data* is not specified, returns the current data array. An <image> tag will be drawn for each object in the array.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

# Image.**duration**([*ms*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L119)

If *ms* is specified, sets the animation duration to the specified number and returns the current class instance. If *ms* is not specified, returns the current animation duration.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

# Image.**height**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L133)

If *value* is specified, sets the height accessor to the specified function or number and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

```js
function(d) {
  return d.height;
}
```

# Image.**id**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L147)

If *value* is specified, sets the id accessor to the specified function and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

```js
function(d) {
  return d.id;
}
```

# Image.**pointerEvents**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L157)

If *value* is specified, sets the pointer-events accessor to the specified function or string and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

# Image.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L167)

If *selector* is specified, sets the SVG container element to the specified d3 selector or DOM element and returns the current class instance. If *selector* is not specified, returns the current SVG container element.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

# Image.**url**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L181)

If *value* is specified, sets the URL accessor to the specified function and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

```js
function(d) {
  return d.url;
}
```

# Image.**width**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L195)

If *value* is specified, sets the width accessor to the specified function or number and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

```js
function(d) {
  return d.width;
}
```

# Image.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L209)

If *value* is specified, sets the x accessor to the specified function or number and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

```js
function(d) {
  return d.x || 0;
}
```

# Image.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Image.js#L223)

If *value* is specified, sets the y accessor to the specified function or number and returns the current class instance.

This is a static method of [Image](#Image), and is chainable with other methods of this Class.

```js
function(d) {
  return d.y || 0;
}
```

---

#### **Area** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L12)

This is a global class, and extends all of the methods and functionality of [Shape](#Shape).

* [Area](#Area) ⇐ [Shape](#Shape)
    * [new Area()](#new_Area_new)
    * [.render([*callback*])](#Area.render) ↩
    * [.curve([*value*])](#Area.curve) ↩
    * [.defined([*value*])](#Area.defined) ↩
    * [.x([*value*])](#Area.x) ↩
    * [.x0([*value*])](#Area.x0) ↩
    * [.x1([*value*])](#Area.x1) ↩
    * [.y([*value*])](#Area.y) ↩
    * [.y0([*value*])](#Area.y0) ↩
    * [.y1([*value*])](#Area.y1) ↩

# new **Area**()

Creates SVG areas based on an array of data.

# Area.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L113)

Draws the area polygons.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**curve**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L163)

If *value* is specified, sets the area curve to the specified string and returns the current class instance. If *value* is not specified, returns the current area curve.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**defined**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L173)

If *value* is specified, sets the defined accessor to the specified function and returns the current class instance. If *value* is not specified, returns the current defined accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L183)

If *value* is specified, sets the x accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current x accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**x0**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L196)

If *value* is specified, sets the x0 accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current x0 accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**x1**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L209)

If *value* is specified, sets the x1 accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current x1 accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L219)

If *value* is specified, sets the y accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current y accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**y0**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L232)

If *value* is specified, sets the y0 accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current y0 accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

# Area.**y1**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Area.js#L245)

If *value* is specified, sets the y1 accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current y1 accessor.

This is a static method of [Area](#Area), and is chainable with other methods of this Class.

---

#### **Bar** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L5)

This is a global class, and extends all of the methods and functionality of [Shape](#Shape).

* [Bar](#Bar) ⇐ [Shape](#Shape)
    * [new Bar()](#new_Bar_new)
    * [.render([*callback*])](#Bar.render) ↩
    * [.height([*value*])](#Bar.height) ↩
    * [.width([*value*])](#Bar.width) ↩
    * [.x0([*value*])](#Bar.x0) ↩
    * [.x1([*value*])](#Bar.x1) ↩
    * [.y0([*value*])](#Bar.y0) ↩
    * [.y1([*value*])](#Bar.y1) ↩

# new **Bar**()

Creates SVG areas based on an array of data.

# Bar.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L45)

Draws the bars.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

# Bar.**height**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L164)

If *value* is specified, sets the height accessor to the specified function or number and returns the current class instance.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

```js
function(d) {
  return d.height;
}
```

# Bar.**width**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L178)

If *value* is specified, sets the width accessor to the specified function or number and returns the current class instance.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

```js
function(d) {
  return d.width;
}
```

# Bar.**x0**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L188)

If *value* is specified, sets the x0 accessor to the specified function or number and returns the current class instance.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

# Bar.**x1**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L201)

If *value* is specified, sets the x1 accessor to the specified function or number and returns the current class instance.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

# Bar.**y0**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L211)

If *value* is specified, sets the y0 accessor to the specified function or number and returns the current class instance.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

# Bar.**y1**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Bar.js#L224)

If *value* is specified, sets the y1 accessor to the specified function or number and returns the current class instance.

This is a static method of [Bar](#Bar), and is chainable with other methods of this Class.

---

#### **Box** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L13)

This is a global class, and extends all of the methods and functionality of BaseClass.

* [Box](#Box) ⇐ BaseClass
    * [new Box()](#new_Box_new)
    * [.render([*callback*])](#Box.render) ↩
    * [.active([*value*])](#Box.active) ↩
    * [.data([*data*])](#Box.data) ↩
    * [.hover([*value*])](#Box.hover) ↩
    * [.medianConfig([*value*])](#Box.medianConfig) ↩
    * [.orient([*value*])](#Box.orient) ↩
    * [.outlier(_)](#Box.outlier) ↩
    * [.outlierConfig([*value*])](#Box.outlierConfig) ↩
    * [.rectConfig([*value*])](#Box.rectConfig) ↩
    * [.rectWidth([*value*])](#Box.rectWidth) ↩
    * [.select([*selector*])](#Box.select) ↩
    * [.whiskerConfig([*value*])](#Box.whiskerConfig) ↩
    * [.whiskerMode([*value*])](#Box.whiskerMode) ↩
    * [.x([*value*])](#Box.x) ↩
    * [.y([*value*])](#Box.y) ↩

# new **Box**()

Creates SVG box based on an array of data.

# Box.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L62)

Draws the Box.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**active**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L228)

Sets the highlight accessor to the Shape class's active function.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**data**([*data*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L241)

If *data* is specified, sets the data array to the specified array and returns the current class instance. If *data* is not specified, returns the current data array.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L251)

Sets the highlight accessor to the Shape class's hover function.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**medianConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L264)

If *value* is specified, sets the config method for median and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**orient**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L274)

If *value* is specified, sets the orientation to the specified value. If *value* is not specified, returns the current orientation.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**outlier**(_) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L284)

If *value* is specified, sets the outlier accessor to the specified function or string and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**outlierConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L294)

If *value* is specified, sets the config method for each outlier point and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**rectConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L304)

If *value* is specified, sets the config method for rect shape and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**rectWidth**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L318)

If *value* is specified, sets the width accessor to the specified function or number and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

```js
function(d) {
  return d.width;
}
```

# Box.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L328)

If *selector* is specified, sets the SVG container element to the specified d3 selector or DOM element and returns the current class instance. If *selector* is not specified, returns the current SVG container element.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**whiskerConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L338)

If *value* is specified, sets the config method for whisker and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**whiskerMode**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L348)

Determines the value used for each whisker. Can be passed a single value to apply for both whiskers, or an Array of 2 values for the lower and upper whiskers (in that order). Accepted values are `"tukey"`, `"extent"`, or a Number representing a quantile.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

# Box.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L362)

If *value* is specified, sets the x axis to the specified function or number and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

```js
function(d) {
  return d.x;
}
```

# Box.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Box.js#L376)

If *value* is specified, sets the y axis to the specified function or number and returns the current class instance.

This is a static method of [Box](#Box), and is chainable with other methods of this Class.

```js
function(d) {
  return d.y;
}
```

---

#### **Circle** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Circle.js#L5)

This is a global class, and extends all of the methods and functionality of [Shape](#Shape).

* [Circle](#Circle) ⇐ [Shape](#Shape)
    * [new Circle()](#new_Circle_new)
    * [.render([*callback*])](#Circle.render) ↩
    * [.r([*value*])](#Circle.r) ↩

# new **Circle**()

Creates SVG circles based on an array of data.

# Circle.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Circle.js#L47)

Draws the circles.

This is a static method of [Circle](#Circle), and is chainable with other methods of this Class.

# Circle.**r**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Circle.js#L98)

If *value* is specified, sets the radius accessor to the specified function or number and returns the current class instance.

This is a static method of [Circle](#Circle), and is chainable with other methods of this Class.

```js
function(d) {
  return d.r;
}
```

---

#### **Line** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Line.js#L11)

This is a global class, and extends all of the methods and functionality of [Shape](#Shape).

* [Line](#Line) ⇐ [Shape](#Shape)
    * [new Line()](#new_Line_new)
    * [.render([*callback*])](#Line.render) ↩
    * [.curve([*value*])](#Line.curve) ↩
    * [.defined([*value*])](#Line.defined) ↩

# new **Line**()

Creates SVG lines based on an array of data.

# Line.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Line.js#L84)

Draws the lines.

This is a static method of [Line](#Line), and is chainable with other methods of this Class.

# Line.**curve**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Line.js#L153)

If *value* is specified, sets the line curve to the specified string and returns the current class instance. If *value* is not specified, returns the current line curve.

This is a static method of [Line](#Line), and is chainable with other methods of this Class.

# Line.**defined**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Line.js#L163)

If *value* is specified, sets the defined accessor to the specified function and returns the current class instance. If *value* is not specified, returns the current defined accessor.

This is a static method of [Line](#Line), and is chainable with other methods of this Class.

---

#### **Path** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Path.js#L7)

This is a global class, and extends all of the methods and functionality of [Shape](#Shape).

* [Path](#Path) ⇐ [Shape](#Shape)
    * [new Path()](#new_Path_new)
    * [.render([*callback*])](#Path.render) ↩
    * [.d([*value*])](#Path.d) ↩

# new **Path**()

Creates SVG Paths based on an array of data.

# Path.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Path.js#L50)

Draws the paths.

This is a static method of [Path](#Path), and is chainable with other methods of this Class.

# Path.**d**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Path.js#L88)

If *value* is specified, sets the "d" attribute accessor to the specified function or number and returns the current class instance.

This is a static method of [Path](#Path), and is chainable with other methods of this Class.

```js
function(d) {
  return d.path;
}
```

---

#### **Rect** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Rect.js#L5)

This is a global class, and extends all of the methods and functionality of [Shape](#Shape).

* [Rect](#Rect) ⇐ [Shape](#Shape)
    * [new Rect()](#new_Rect_new)
    * [.render([*callback*])](#Rect.render) ↩
    * [.height([*value*])](#Rect.height) ↩
    * [.width([*value*])](#Rect.width) ↩

# new **Rect**()

Creates SVG rectangles based on an array of data. See [this example](https://d3plus.org/examples/d3plus-shape/getting-started/) for help getting started using the rectangle generator.

# Rect.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Rect.js#L32)

Draws the rectangles.

This is a static method of [Rect](#Rect), and is chainable with other methods of this Class.

# Rect.**height**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Rect.js#L97)

If *value* is specified, sets the height accessor to the specified function or number and returns the current class instance.

This is a static method of [Rect](#Rect), and is chainable with other methods of this Class.

```js
function(d) {
  return d.height;
}
```

# Rect.**width**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Rect.js#L111)

If *value* is specified, sets the width accessor to the specified function or number and returns the current class instance.

This is a static method of [Rect](#Rect), and is chainable with other methods of this Class.

```js
function(d) {
  return d.width;
}
```

---

#### **Shape** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L19)

This is a global class, and extends all of the methods and functionality of [BaseClass](https://github.com/d3plus/d3plus-common#BaseClass).

* [Shape](#Shape) ⇐ [BaseClass](https://github.com/d3plus/d3plus-common#BaseClass)
    * [new Shape()](#new_Shape_new)
    * [.render([*callback*])](#Shape.render) ↩
    * [.active([*value*])](#Shape.active) ↩
    * [.activeOpacity(*value*)](#Shape.activeOpacity) ↩
    * [.activeStyle(*value*)](#Shape.activeStyle) ↩
    * [.ariaLabel(*value*)](#Shape.ariaLabel) ↩
    * [.backgroundImage([*value*])](#Shape.backgroundImage) ↩
    * [.data([*data*])](#Shape.data) ↩
    * [.duration([*ms*])](#Shape.duration) ↩
    * [.fill([*value*])](#Shape.fill) ↩
    * [.fillOpacity([*value*])](#Shape.fillOpacity) ↩
    * [.hover([*value*])](#Shape.hover) ↩
    * [.hoverStyle(*value*)](#Shape.hoverStyle) ↩
    * [.hoverOpacity([*value*])](#Shape.hoverOpacity) ↩
    * [.hitArea([*bounds*])](#Shape.hitArea) ↩
    * [.id([*value*])](#Shape.id) ↩
    * [.label([*value*])](#Shape.label) ↩
    * [.labelBounds([*bounds*])](#Shape.labelBounds) ↩
    * [.labelConfig([*value*])](#Shape.labelConfig) ↩
    * [.opacity([*value*])](#Shape.opacity) ↩
    * [.pointerEvents([*value*])](#Shape.pointerEvents) ↩
    * [.role(*value*)](#Shape.role) ↩
    * [.rotate([*value*])](#Shape.rotate) ↩
    * [.rx([*value*])](#Shape.rx) ↩
    * [.ry([*value*])](#Shape.ry) ↩
    * [.scale([*value*])](#Shape.scale) ↩
    * [.select([*selector*])](#Shape.select) ↩
    * [.shapeRendering([*value*])](#Shape.shapeRendering) ↩
    * [.sort([*value*])](#Shape.sort) ↩
    * [.stroke([*value*])](#Shape.stroke) ↩
    * [.strokeDasharray([*value*])](#Shape.strokeDasharray) ↩
    * [.strokeLinecap([*value*])](#Shape.strokeLinecap) ↩
    * [.strokeOpacity([*value*])](#Shape.strokeOpacity) ↩
    * [.strokeWidth([*value*])](#Shape.strokeWidth) ↩
    * [.textAnchor([*value*])](#Shape.textAnchor) ↩
    * [.vectorEffect([*value*])](#Shape.vectorEffect) ↩
    * [.verticalAlign([*value*])](#Shape.verticalAlign) ↩
    * [.x([*value*])](#Shape.x) ↩
    * [.y([*value*])](#Shape.y) ↩

# new **Shape**()

An abstracted class for generating shapes.

# Shape.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L481)

Renders the current Shape to the page. If a *callback* is specified, it will be called once the shapes are done drawing.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**active**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L611)

If *value* is specified, sets the highlight accessor to the specified function and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**activeOpacity**(*value*) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L630)

When shapes are active, this is the opacity of any shape that is not active.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**activeStyle**(*value*) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L640)

The style to apply to active shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**ariaLabel**(*value*) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L650)

If *value* is specified, sets the aria-label attribute to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**backgroundImage**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L662)

If *value* is specified, sets the background-image accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**data**([*data*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L674)

If *data* is specified, sets the data array to the specified array and returns the current class instance. If *data* is not specified, returns the current data array. A shape will be drawn for each object in the array.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**duration**([*ms*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L686)

If *ms* is specified, sets the animation duration to the specified number and returns the current class instance. If *ms* is not specified, returns the current animation duration.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**fill**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L698)

If *value* is specified, sets the fill accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**fillOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L710)

Defines the "fill-opacity" attribute for the shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L722)

If *value* is specified, sets the highlight accessor to the specified function and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**hoverStyle**(*value*) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L741)

The style to apply to hovered shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**hoverOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L751)

If *value* is specified, sets the hover opacity to the specified function and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**hitArea**([*bounds*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L770)

If *bounds* is specified, sets the mouse hit area to the specified function and returns the current class instance. If *bounds* is not specified, returns the current mouse hit area accessor.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

```js
function(d, i, shape) {
  return {
    "width": shape.width,
    "height": shape.height,
    "x": -shape.width / 2,
    "y": -shape.height / 2
  };
}
```

# Shape.**id**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L780)

If *value* is specified, sets the id accessor to the specified function and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**label**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L790)

If *value* is specified, sets the label accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**labelBounds**([*bounds*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L809)

If *bounds* is specified, sets the label bounds to the specified function and returns the current class instance. If *bounds* is not specified, returns the current inner bounds accessor.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

```js
function(d, i, shape) {
  return {
    "width": shape.width,
    "height": shape.height,
    "x": -shape.width / 2,
    "y": -shape.height / 2
  };
}
```

# Shape.**labelConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L819)

A pass-through to the config method of the TextBox class used to create a shape's labels.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**opacity**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L829)

If *value* is specified, sets the opacity accessor to the specified function or number and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**pointerEvents**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L839)

If *value* is specified, sets the pointerEvents accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**role**(*value*) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L849)

If *value* is specified, sets the role attribute to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**rotate**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L861)

If *value* is specified, sets the rotate accessor to the specified function or number and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**rx**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L871)

Defines the "rx" attribute for the shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**ry**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L881)

Defines the "rx" attribute for the shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**scale**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L891)

If *value* is specified, sets the scale accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L901)

If *selector* is specified, sets the SVG container element to the specified d3 selector or DOM element and returns the current class instance. If *selector* is not specified, returns the current SVG container element.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**shapeRendering**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L915)

If *value* is specified, sets the shape-rendering accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

```js
function(d) {
  return d.x;
}
```

# Shape.**sort**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L925)

If *value* is specified, sets the sort comparator to the specified function and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**stroke**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L935)

If *value* is specified, sets the stroke accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**strokeDasharray**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L945)

Defines the "stroke-dasharray" attribute for the shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**strokeLinecap**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L955)

Defines the "stroke-linecap" attribute for the shapes. Accepted values are `"butt"`, `"round"`, and `"square"`.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**strokeOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L965)

Defines the "stroke-opacity" attribute for the shapes.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**strokeWidth**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L975)

If *value* is specified, sets the stroke-width accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**textAnchor**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L985)

If *value* is specified, sets the text-anchor accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**vectorEffect**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L995)

If *value* is specified, sets the vector-effect accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**verticalAlign**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L1005)

If *value* is specified, sets the vertical alignment accessor to the specified function or string and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

# Shape.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L1019)

If *value* is specified, sets the x accessor to the specified function or number and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

```js
function(d) {
  return d.x;
}
```

# Shape.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L1033)

If *value* is specified, sets the y accessor to the specified function or number and returns the current class instance.

This is a static method of [Shape](#Shape), and is chainable with other methods of this Class.

```js
function(d) {
  return d.y;
}
```

---

#### **Whisker** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L12)

This is a global class, and extends all of the methods and functionality of BaseClass.

* [Whisker](#Whisker) ⇐ BaseClass
    * [new Whisker()](#new_Whisker_new)
    * [.render([*callback*])](#Whisker.render) ↩
    * [.active([*value*])](#Whisker.active) ↩
    * [.data([*data*])](#Whisker.data) ↩
    * [.endpoint(_)](#Whisker.endpoint) ↩
    * [.endpointConfig([*value*])](#Whisker.endpointConfig) ↩
    * [.hover([*value*])](#Whisker.hover) ↩
    * [.length([*value*])](#Whisker.length) ↩
    * [.lineConfig([*value*])](#Whisker.lineConfig) ↩
    * [.orient([*value*])](#Whisker.orient) ↩
    * [.select([*selector*])](#Whisker.select) ↩
    * [.x([*value*])](#Whisker.x) ↩
    * [.y([*value*])](#Whisker.y) ↩

# new **Whisker**()

Creates SVG whisker based on an array of data.

# Whisker.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L48)

Draws the whisker.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**active**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L136)

Sets the highlight accessor to the Shape class's active function.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**data**([*data*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L147)

If *data* is specified, sets the data array to the specified array and returns the current class instance. If *data* is not specified, returns the current data array.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**endpoint**(_) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L157)

If *value* is specified, sets the endpoint accessor to the specified function or string and returns the current class instance.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**endpointConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L167)

If *value* is specified, sets the config method for each endpoint and returns the current class instance.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L177)

Sets the highlight accessor to the Shape class's hover function.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**length**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L188)

If *value* is specified, sets the length accessor for whisker and returns the current class instance.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**lineConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L198)

If *value* is specified, sets the config method for line shape and returns the current class instance.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**orient**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L208)

If *value* is specified, sets the orientation to the specified value. If *value* is not specified, returns the current orientation.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L218)

If *selector* is specified, sets the SVG container element to the specified d3 selector or DOM element and returns the current class instance. If *selector* is not specified, returns the current SVG container element.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

# Whisker.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L232)

If *value* is specified, sets the x axis to the specified function or number and returns the current class instance.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

```js
function(d) {
  return d.x;
}
```

# Whisker.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Whisker.js#L246)

If *value* is specified, sets the y axis to the specified function or number and returns the current class instance.

This is a static method of [Whisker](#Whisker), and is chainable with other methods of this Class.

```js
function(d) {
  return d.y;
}
```

---

#### d3plus.**largestRect**(poly, [options]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/largestRect.js#L28)

An angle of zero means that the longer side of the polygon (the width) will be aligned with the x axis. An angle of 90 and/or -90 means that the longer side of the polygon (the width) will be aligned with the y axis. The value can be a number between -90 and 90 specifying the angle of rotation of the polygon, a string which is parsed to a number, or an array of numbers specifying the possible rotations of the polygon.

This is a global function.
**Author**: Daniel Smilkov<EMAIL_ADDRESS>

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| poly | Array |  | An Array of points that represent a polygon. |
| [options] | Object |  | An Object that allows for overriding various parameters of the algorithm. |
| [options.angle] | Number \| String \| Array | d3.range(-90, 95, 5) | The allowed rotations of the final rectangle. |
| [options.aspectRatio] | Number \| String \| Array |  | The ratio between the width and height of the rectangle. The value can be a number, a string which is parsed to a number, or an array of numbers specifying the possible aspect ratios of the final rectangle. |
| [options.maxAspectRatio] | Number | 15 | The maximum aspect ratio (width/height) allowed for the rectangle. This property should only be used if the aspectRatio is not provided. |
| [options.minAspectRatio] | Number | 1 | The minimum aspect ratio (width/height) allowed for the rectangle. This property should only be used if the aspectRatio is not provided. |
| [options.nTries] | Number | 20 | The number of randomly drawn points inside the polygon which the algorithm explores as possible center points of the maximal rectangle. |
| [options.minHeight] | Number | 0 | The minimum height of the rectangle. |
| [options.minWidth] | Number | 0 | The minimum width of the rectangle. |
| [options.tolerance] | Number | 0.02 | The simplification tolerance factor, between 0 and 1. A larger tolerance corresponds to more extensive simplification. |
| [options.origin] | Array |  | The center point of the rectangle. If specified, the rectangle will be fixed at that point, otherwise the algorithm optimizes across all possible points. The given value can be either a two dimensional array specifying the x and y coordinate of the origin or an array of two dimensional points specifying multiple possible center points of the rectangle. |
| [options.cache] | Boolean |  | Whether or not to cache the result, which would be used in subsequent calculations to preserve consistency and speed up calculation time. |

---

#### d3plus.**lineIntersection**(p1, q1, p2, q2) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/lineIntersection.js#L1)

Finds the intersection point (if there is one) of the lines p1q1 and p2q2.

This is a global function.

| Param | Type | Description |
| --- | --- | --- |
| p1 | Array | The first point of the first line segment, which should always be an `[x, y]` formatted Array. |
| q1 | Array | The second point of the first line segment, which should always be an `[x, y]` formatted Array. |
| p2 | Array | The first point of the second line segment, which should always be an `[x, y]` formatted Array. |
| q2 | Array | The second point of the second line segment, which should always be an `[x, y]` formatted Array. |

---

#### d3plus.**path2polygon**(path, [segmentLength]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/path2polygon.js#L6)

Transforms a path string into an Array of points.

This is a global function.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| path | String |  | An SVG string path, commonly the "d" property of a <path> element. |
| [segmentLength] | Number | 20 | The lenght of line segments when converting curves line segments. Higher values lower computation time, but will result in curves that are more rigid. |

---

#### d3plus.**pointDistance**(p1, p2) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/pointDistance.js#L3)

Calculates the pixel distance between two points.

This is a global function.

| Param | Type | Description |
| --- | --- | --- |
| p1 | Array | The first point, which should always be an `[x, y]` formatted Array. |
| p2 | Array | The second point, which should always be an `[x, y]` formatted Array. |

---

#### d3plus.**pointDistanceSquared**(p1, p2) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/pointDistanceSquared.js#L1)

Returns the squared euclidean distance between two points.

This is a global function.

| Param | Type | Description |
| --- | --- | --- |
| p1 | Array | The first point, which should always be an `[x, y]` formatted Array. |
| p2 | Array | The second point, which should always be an `[x, y]` formatted Array. |

---

#### d3plus.**pointRotate**(p, alpha, [origin]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/pointRotate.js#L1)

Rotates a point around a given origin.

This is a global function.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| p | Array |  | The point to be rotated, which should always be an `[x, y]` formatted Array. |
| alpha | Number |  | The angle in radians to rotate. |
| [origin] | Array | [0, 0] | The origin point of the rotation, which should always be an `[x, y]` formatted Array. |

---

#### d3plus.**polygonInside**(polyA, polyB) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/polygonInside.js#L5)

Checks if one polygon is inside another polygon.

This is a global function.

| Param | Type | Description |
| --- | --- | --- |
| polyA | Array | An Array of `[x, y]` points to be used as the inner polygon, checking if it is inside polyA. |
| polyB | Array | An Array of `[x, y]` points to be used as the containing polygon. |

---

#### d3plus.**polygonRayCast**(poly, origin, [alpha]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/polygonRayCast.js#L5)

Gives the two closest intersection points between a ray cast from a point inside a polygon. The two points should lie on opposite sides of the origin.

This is a global function.
**Returns**: Array - An array containing two values, the closest point on the left and the closest point on the right. If either point cannot be found, that value will be `null`.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| poly | Array |  | The polygon to test against, which should be an `[x, y]` formatted Array. |
| origin | Array |  | The origin point of the ray to be cast, which should be an `[x, y]` formatted Array. |
| [alpha] | Number | 0 | The angle in radians of the ray. |

---

#### d3plus.**polygonRotate**(poly, alpha, [origin]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/polygonRotate.js#L3)

Rotates a point around a given origin.

This is a global function.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| poly | Array |  | The polygon to be rotated, which should be an Array of `[x, y]` values. |
| alpha | Number |  | The angle in radians to rotate. |
| [origin] | Array | [0, 0] | The origin point of the rotation, which should be an `[x, y]` formatted Array. |

---

#### d3plus.**segmentBoxContains**(s1, s2, p) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/segmentBoxContains.js#L1)

Checks whether a point is inside the bounding box of a line segment.

This is a global function.

| Param | Type | Description |
| --- | --- | --- |
| s1 | Array | The first point of the line segment to be used for the bounding box, which should always be an `[x, y]` formatted Array. |
| s2 | Array | The second point of the line segment to be used for the bounding box, which should always be an `[x, y]` formatted Array. |
| p | Array | The point to be checked, which should always be an `[x, y]` formatted Array. |

---

#### d3plus.**segmentsIntersect**(p1, q1, p2, q2) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/segmentsIntersect.js#L4)

Checks whether the line segments p1q1 && p2q2 intersect.

This is a global function.

| Param | Type | Description |
| --- | --- | --- |
| p1 | Array | The first point of the first line segment, which should always be an `[x, y]` formatted Array. |
| q1 | Array | The second point of the first line segment, which should always be an `[x, y]` formatted Array. |
| p2 | Array | The first point of the second line segment, which should always be an `[x, y]` formatted Array. |
| q2 | Array | The second point of the second line segment, which should always be an `[x, y]` formatted Array. |

---

#### d3plus.**shapeEdgePoint**(angle, distance) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/shapeEdgePoint.js#L3)

Calculates the x/y position of a point at the edge of a shape, from the center of the shape, given a specified pixel distance and radian angle.

This is a global function.
**Returns**: String - [shape = "circle"] The type of shape, which can be either "circle" or "square".

| Param | Type | Description |
| --- | --- | --- |
| angle | Number | The angle, in radians, of the offset point. |
| distance | Number | The pixel distance away from the origin. |

---

#### d3plus.**largestRect**(poly, [tolerance], [highestQuality]) [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/simplify.js#L112)

Simplifies the points of a polygon using both the Ramer-Douglas-Peucker algorithm and basic distance-based simplification. Adapted to an ES6 module from the excellent [Simplify.js](http://mourner.github.io/simplify-js/).

This is a global function.
**Author**: Vladimir Agafonkin

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| poly | Array |  | An Array of points that represent a polygon. |
| [tolerance] | Number | 1 | Affects the amount of simplification (in the same metric as the point coordinates). |
| [highestQuality] | Boolean | false | Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower. |

---

#### **LargestRect** [<>](https://github.com/d3plus/d3plus-shape/blob/master/src/geom/largestRect.js#L16)

The returned Object of the largestRect function.

This is a global typedef.
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| width | Number | The width of the rectangle |
| height | Number | The height of the rectangle |
| cx | Number | The x coordinate of the rectangle's center |
| cy | Number | The y coordinate of the rectangle's center |
| angle | Number | The rotation angle of the rectangle in degrees. The anchor of rotation is the center point. |
| area | Number | The area of the largest rectangle. |
| points | Array | An array of x/y coordinates for each point in the rectangle, useful for rendering paths. |

---

###### Documentation generated on Fri, 16 Aug 2019 19:43:22 GMT

repository: smartlab-br/smartlab-charts

repo_name: smartlab-br/smartlab-charts


text:
# Streaming decisions with DMN and Kafka

## Description

The code in this repository shows how to stream decision requests via cloud events and evaluate the corresponding decision using the _Kogito Event-Driven Decisions AddOn_. This is based on [this repository](https://github.com/kiegroup/kogito-examples/tree/1.6.x/dmn-event-driven-quarkus).

Using the [Traffic Violation](streaming-dmn-kafka-consumer/src/main/resources/Traffic%20Violation.dmn) decision model as example, producers stream cloud events containing random inputs (`Driver` and `Violation` information) every `x` seconds. The consumer, by its turn, consumes all messages, evaluate and output the decisions made (whether or not the driver should suspended).

## Requirements

- [Java](https://openjdk.java.net/install/) 11 or later
- [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/)

## Running through Docker Compose

Clone this repository via SSH:

```
git clone git@github.com:caponetto/streaming-dmn-kafka.git
```

or via HTTPS:

```
git clone https://github.com/caponetto/streaming-dmn-kafka.git
```

Build the code:

```
cd streaming-dmn-kafka && \
./mvnw clean package -f streaming-dmn-kafka-producer/pom.xml && \
./mvnw clean package -f streaming-dmn-kafka-consumer/pom.xml
```

Start up through Docker Compose:

```
docker-compose up -d
```

Once everything is started up, the components will be available at:

- Producer A: http://localhost:8080
- Producer B: http://localhost:8081
- Consumer: http://localhost:8090
- Kafdrop: http://localhost:9000

**Note**: Producers start to generate messages 20 seconds after starting up so you have time to open all the URLs.

## Example

On the URLs above, you are able to check the messages that the producers are sending and the processed messages that the consumer is receiving.

  Producer A: Generate messages every 5 seconds with random values for Age, Points and Actual Speed.

  Producer B: Generate messages every 10 seconds with random values for Age, Points and Actual Speed.

  Consumer: Stream of evaluated decisions.


text:
This was made with a boilerplate, just to save time

## Intro

The starter kit for website with multipages using Bootstrap 4, Gulp 4, Sass, BrowserSync with minification.

## Getting Started

Below instructions will help you get a copy of the project up and running on your local machine for starting multipage html development.

### Prerequisites

Install gulp globally on your system

```
npm install gulp -g
```

### Cloning

Clone project from github Repository

```
$ git clone https://github.com/PullingStrings/dare-git-repo.git
```

### Installing

Then Install the packages included in *package.json*

```
$ npm install
```

### Build

Build for generating pure css/js/fonts/html files in public folder, which is the one to deploy

```
$ npm run build
```

### Run the project - Live on browser

For live development and run the project in browser

```
$ npm run start
```

## Built With

* [Bootstrap 4](https://getbootstrap.com/)
* [Gulp 4](https://gulpjs.com/)
* [Sass](https://sass-lang.com/)

## Things I would love to have more time to address

- I want to fix the tear drops, and maybe just have them full css
- I would also like to fix the responsiveness, I just need more times.
- Oh, also the overlay on the background images, I need a bit more time to figure out how to place that, was thinking maybe I should just make the pictures darkder with PS but I wanted to push and see if this can either be done with filter or background color overly some how.
- Also one more thing, the checkboxes, I have to figure a way out a why to custom it to my fitting.

repository: PullingStrings/dare-git-repo

repo_name: PullingStrings/dare-git-repo


text:
### Problem Statement
Write a function when calling it, it will return a tuple:

- first value is the name of the distribution,
- second value is the version id of the distribution.

__Hint:__ read the content of `/etc/os-release` for the information.

### Solution
[solution.py](https://github.com/ashwani99/dgplug-python-exercises/blob/master/Problem%208/solution.py)


text:
# PuzzleCylinder
Re-creating The 3D Mode from [Pokemon Puzzle League](https://en.wikipedia.org/wiki/Pok%C3%A9mon_Puzzle_League) in Three JS

## [Click Here To Play The Latest Version](https://jakesiegers.github.io/PuzzleCylinder/)
 [Or, perhaps you'd like to view the dev branch?](https://github.com/JakeSiegers/PuzzleCylinder/tree/dev)

## How to Play
Match blocks in groups of 3 or more vertically or horizontally to destroy blocks and earn points!

The tower slowly moves up, adding more blocks as the game goes on.

You keep playing until you're overrun with blocks, and the tower reaches the top of the cylinder.

### Desktop Controls
* **Arrow Keys** - Move Cursor
* **Spacebar** - Swap Blocks
* **X** - Speeds Up Tower

### Mobile Controls
* **Swipe Left / Right / Up / Down** - Move Cursor
* **Double Tap** - Swap Blocks

![Game Screenshot](readme/2017-02-04 13_18_35-Jake's Puzzle Cylinder.png)

## Setting Up Development Environment
(These are mainly notes for myself, you may not be working in the same environment)
* Clone Repo
* Run `npm install` to get all the required babel binaries
* Set up PHPStorm / WebStorm to auto-compile with babel javascript to dist with "file watchers"

repository: driff/PuzzleCylinder

repo_name: driff/PuzzleCylinder


text:
# Handlebars-Rails

Easily setup and use handlebars.js with rails 3.1

## Rails 3.1 setup
This gem requires the use of rails 3.1 and the use of sprockets for asset packaging.

This gem vendors the latest version of handlebars.js for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use.
You need to add the following line to the file `app/assets/javascripts/application.js`:

    //= require handlebars

### Installation

In your Gemfile, add this line:

  gem "handlebars-rails"

Then run `bundle install`. You're done!

## JavaScript Templates

This gem provides the ability to compile javascript templates using [handlebars templates](https://github.com/wycats/handlebars.js)
and makes them available on the client on a global JST object.

Any file with the extension '.js.hbs' will get compiled using [handlebars templates](https://github.com/wycats/handlebars.js)

example `app/assets/javascripts/hello.js.hbs`:

    Hello {{name}}!

will be compiled and available on the client as JST.hello

    JST.hello({name: "Tammy"});

would render:

    Hello Tammy!

repository: niklas/handlebars-rails

gha_language: Ruby

repo_name: niklas/handlebars-rails