text:
---
hrs_structure:
  division: '1'
  volume: '3'
  title: '11'
  chapter: '157'
  section: 157-32
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0157-0032
    parent: HRS0157
    name: 157-32 Standards to determine minimum prices
weight: 54100
title: Standards to determine minimum prices
full_title: 157-32 Standards to determine minimum prices
---
**§157-32 Standards to determine minimum prices.** (a) As a guide to determining the minimum prices of milk to be paid to producers and producer-distributors, the board shall take into consideration the following items based on the operations of a reasonably efficient producer:

(1) The price to producers necessary to assure the production of an adequate supply of wholesome milk for the market.

(2) The price necessary to return to the producer, the producer's cost of production, plus a fair return on the producer's invested capital, the producer's family labor and the producer's management skills.

(3) The costs incurred in obtaining, feeding, managing and maintaining dairy animals at optimum production capacity.

(4) The prevailing wages and perquisites of employees.

(5) The ordinary fixed charges and operating expenses incident to the ownership, operation and management of the dairy.

(b) In establishing minimum prices for milk under this chapter, the board shall further consider the effect thereof on the consumer. [L 1967, c 260, §21; [HRS §157-32](/title-11/chapter-157/section-157-32/); ree and am L 1972, c 40, pt of §2; gen ch 1985]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Service Handlers
The plugin currently includes handlers for the following types of devices/services:

* [Light](light.md)
* [Switch](switch.md)
* [Window Cover](cover.md)
* [Lock Mechanism](lock.md)
* [Stateless Programmable Switch](action.md) (a.k.a. remote controls / push buttons)
* [Thermostat](climate.md) (also thermostatic radiator valves and other climate devices)
* [Battery Service](battery.md)
* [Basic Sensors](sensors.md), a.o.:
  * Humidity
  * Temperature
  * Light
  * Air Pressure
  * Contact
  * Occupancy
  * Smoke
  * Carbon Monoxide
  * Water Leak
  * Gas

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Change Log

# 1.5.0 (2019-07-14)

- Adding Swift 5 support.

- Adding SPM support.

- Adding support for `.soft`, `.rigid` haptics available in iOS 13.

# 1.4 (2017-10-17)

- Adding Swift 4.2 support.

# 1.3 (2017-10-17)

- Users can now specify a `UIImpactFeedbackStyle` as such.

# 1.2 (2017-09-25)

- Adding the ability to `prepare()` a `UIImpactGenerator`.

# 1.1 (2017-09-08)

- Added the ability to specify which level of `UIImpactFeedbackStyle` you want.

Supporting:
- `.light`
- `.medium`
- `.heavy`

# 1.0 (2016-12-08)

- Initial release.

license: MIT

repository: SupradeepNarayana/FeedbackEffect

repo_name: SupradeepNarayana/FeedbackEffect


text:
Title: Dino Ipsum 91424
Date: 2016-07-18 17:46:46
Category: Dinosaurs

Asteroid of the Day: Cleshir

Named in honor of Clinton B. Ford, secretary of the American Association of Variable Star Observers since 1948 and president in 1961, the year of his retirement from a career in industry. Following this, he took the words of Douglas Adams in The Hitchhiker's Guide to the Galaxy to heart--"With a degree in maths, and another in astrophysics, it was either that or back to the dole queue on Monday"--and moved to Australia, where he spent two years at the Anglo-Australian Observatory. Through Goethe, he was appointed head clergyman at the court of Weimar in 1776. Although both are interested in astrometry and astrophotography, Boeker is also experienced in building observatories and constructing telescope mounts.

In an alternate universe, this asteroid would have annihilated the following dinosaur species:

* Almodaun
* Squrasia
* Toreps
* Atopararlase
* Strerucanesis
* Misakottios
* Inubycosarisia
* Szaureroktoras
* Osonkylusus
* Posorausuntas
* Nunnorule
* Pustrausis
* Euutisarchos
* Nisaultautruryx
* Laphogoses
* Perasiandur
* Lolirisalaulyx
* Szidaurosus
* Cuteshan
* Shomaeonssia


text:
---
layout: post
title: Metis NY Data Science Bootcamp - 3rd Project!
---

###  Helping a Bank in selling its products

Not so simple for a bank to sell a term deposit product to its customers!
Available data are hardly good enough to correctly define the best target customer, but something good can be made to increase
the success rate of the sale campaigns.

Check ["mcnulty_deliverables" folder](https://github.com/marcolunardi/metis/tree/master/mcnulty_deliverables) into my Metis repository to see my findings!

Analysis results are summarized into the D3 PDF file.

Analysis Tools: Machine Learning Algorithms, Supervised Learning, Cross Validation

path: /_posts/2015-5-15-Third NY Bootcamp Project.md

filename: 2015-5-15-Third NY Bootcamp Project.md


text:
# PHP Application Hooks

## Introduction

PHP Application Hooks is a lightweight standalone package that lets you control when and where specific blocks of code can be executed within your application.

## Installation

install via composer with `composer require "jenryollivierre/php-application-hooks": "2.0.*"` or simply download from [github](https://github.com/JenryOllivierre/PHP-Application-Hooks)

## How To Use

Get things started by creating an instance that can be accessed globally.

```php
<?php

use JenryOllivierre\Hooks\Hooks;

$hooks = new Hooks;
```

Then, at the point in your application where you will want 3rd party apps to be able to do something, you call on either of the following methods.

- `$hooks->applyActions($name, $arguments)`
- `$hooks->applyFilters($name, $value, $arguments)`

## Actions

We use actions when we want an action/task to be carried out. To let 3rd party apps be able to carry out actions at a specific point in your application, you call on the `$hooks->applyActions()` method, which takes 3 arguments.

- string $name :: the name to identify the action by. This should be unique.
- array $arguments :: an array of arguments that you want to pass to 3rd party apps hooking into your action.
- bool $return :: whether to return the contents of the action. This defaults to false as actions in general are not meant to return anything.

#### Example of Actions

```php
<?php

// The point in our application where we want to allow 3rd party apps to do something.

// Example - Let's allow 3rd party apps to do anything they want before a post is deleted
$postId = getPostId();
$canDelete = canPostBeDeleted($postId);
$hooks->applyActions('before_post_delete', [$postId, $canDelete]);
```

Now, for the 3rd party apps to hook into the action of your application, they would call on the global $hook instance and call on the `addAction()` method.

```php
<?php

// Example in the 3rd party app - Let's clean up the database before we delete the post
$hooks->addAction('before_post_delete', [new Post, 'cleanUpDatabase'], 10);
```

The `addAction()` method takes 4 parameters.

- string $name :: the name of the action to hook into.
- callable $callback :: Closures | function name | array of a class instance and its method
- int $priority :: defaults to 100. Higher number priority actions are ran latest.
- int $arguments :: the number of arguments to pass to the $callback. By default, this passes all arguments. If the main application passed an array of 5 arguments to the action, the 3rd party app can state 2 to only get the first 2 parameters.

To resolve the example above, the given callback to use was Post::cleanUpDatabase(). It would work like this:

```php
<?php

class Post
{
    /**
     * @param int $postId
     * @param bool $canDelete
     * @return void
     */
    public function cleanUpDatabase($postId, $canDelete)
    {
        // Do stuff
    }
}
```

## Filters

We use filters when we want to filter a value. To let filters be carried out at a specific point in your application, you call on the `$hooks->applyFilters()` method, which takes 3 arguments.

- string $name :: the name to identify the filter by. This should be unique.
- mixed $value :: the value that is to be filtered.
- array $arguments :: an array of arguments that you want to pass to 3rd party apps hooking into your filter.

** Note that the $value parameter will also be passed to the $arguments as the first parameter. So technically, everything in the $arguments array will be passed to 3rd party apps as the 2nd parameter onwards.

#### Example of Filters

```php
<?php

// Example of code in our application
// Let's allow 3rd party apps to determine if the post should be deleted

$postId = getPostId();
if ($hooks->applyFilters('user_can_delete_post', false, [$postId])) {
    deletePost($postId);
}
```

Now, for 3rd party apps to hook into our filter, they would call on the global $hook instance and call on the `addFilter()` method.

```php
<?php

// Example in our 3rd party app - Let's check to see if the post should be allowed to be deleted

// Closure Example
$hooks->addFilter('user_can_delete_post', function ($value, $postId) {
    // The value to filter is always the first parameter passed to your callback
    // Any other parameters passed through the 'applyFilters()' method will be available in the order they were passed to the array
    $post = getPost($postId);
    $user = getCurrentUser();

    if ($user->id === $post->author) {
        return true;
    }

    // Tip:: Always return the original value if your conditionals doesn't match
    return $value;
});

// Function name example
$hooks->addFilter('user_can_delete_post', 'someFunctionName', 10, 2);

function someFunctionName($value, $postId)
{
    $post = getPost($postId);
    $user = getCurrentUser();

    if ($user->id === $post->author->id) {
        return true;
    }

    return $value;
}

// Class instance example
$hooks->addFilter('user_can_delete_post', [Post, 'userCanDeletePost'], 10, 1);

// In our Post class
class Post
{
    public function userCanDeletePost($canDelete)
    {
        if (getCurrentUser() === 'super_admin') {
            return true;
        }

        return $canDelete;
    }
}
```

The `addFilter()` method takes 4 parameters.

- string $name :: the name of the filter to hook into.
- callable $callback :: Closures | function name | array of a class instance and its method
- int $priority :: defaults to 100. Higher number priority filters are ran latest.
- int $arguments :: the number of arguments to pass to the $callback. By default, this passes all arguments.

 You simply extend the 'JenryOllivierre\Hooks\HooksFoundation' class and then define your own methods. For example:

```php
<?php

namespace MyNameSpace\Task;

use JenryOllivierre\Hooks\HooksFoundation;

class AppHooks extends HooksFoundation implements Filterable, Actionable
{
    use HasActions;
    use HasFilters;
}
```

Or rolling your own:

```php
<?php

namespace MyNameSpace\Task;

use JenryOllivierre\Hooks\HooksFoundation;

class Hooks extends HooksFoundation
{
    /**
     * Add a task hook.
     *
     * @param string $name
     * @param callable $callback
     * @param int $priority
     * @param int $params
     * @return void
     */
    public function addAppTask(string $name, callable $callback, int $priority = 100, int $params = 0)
    {
        $this->storeHook('app_tasks', $name, $callback, $priority, $params);
    }

     /**
     * Apply all the callbacks that was added to a specific task.
     *
     * @since 1.0
     * @param string $name
     * @param array $args
     * @param bool $return
     * @return mixed|void
     */
    public function applyAppTasks(string $name, array $args, bool $return = false)
    {
        return $this->resolveTasks('app_tasks', $name, $args, $return);
    }
}
```

The HooksFoundation class has a lot of useful methods to allow you to fully extend and make your own hooks class. They are:

```php
    /**
     * Add a hook.
     * @param string $type
     * @param string $name
     * @param callable $callback
     * @param int $priority
     * @param int $params
     * @return void
     */
    protected function storeHook(string $type, $name, callable $callback, int $priority = 100, int $params = 1);

    /**
     * Resolve all the values for a given hook.
     * @since 1.0
     * @param string $hookType
     * @param string $name
     * @param mixed $value
     * @param array $args
     * @return mixed
     */
    protected function resolveValues(string $hookType, string $name, $value, array $args = []);

    /**
     * Resolve all the tasks for a given hook.
     * @since 1.0
     * @param string $hookType
     * @param string $name
     * @param array $args
     * @param bool $return
     * @return void
     */
    protected function resolveTasks(string $hookType, string $name, array $args = [], bool $return = false);

    /**
     * Check if anything have been added to a particular hook type.
     * @since 1.0
     * @param string $type
     * @return bool
     */
    protected function hookTypeExists(string $type);

    /**
     * Check if there has been anything set for a specific hook, for a
     * particular hook type.
     * @since 1.0
     * @param string $hookType
     * @param string $name
     * @return bool
     */
    protected function hookExistsByType(string $hookType, string $name);

    /**
     * Get everything that has been added to a specific hook type.
     * @since 1.0
     * @param string $type
     * @return array
     */
    protected function getAllHooksByType(string $type);

    /**
     * Remove all hooks from a hook type.
     * @since 1.0
     * @param string $type
     * @return void
     */
    protected function removeAllHooksFromType(string $type)

    /**
     * Get everything that have been added to a specific hook, for a
     * particular hook type.
     * @since 1.0
     * @param string $type
     * @param string $name
     * @return array
     */
    protected function getHookByType(string $type, string $name);

    /**
     * Remove a hook type.
     * @since 1.0
     * @param string $type
     * @return void
     */
    protected function removeHookType(string $type);

    /**
     * Remove a specific hook for a particular hook type.
     * @since 1.0
     * @param string $hookType
     * @param string $name
     * @return void
     */
    protected function removeHookByType(string $hookType, string $name);
```

## Security Vulnerability

If you discover any security vulnerability, please email Jenry Ollivierre at [jenry<EMAIL_ADDRESS>
## License

PHP Application Hooks is open source software licensed under the [MIT License](https://opensource.org/licenses/MIT)

repository: JenryOllivierre/PHP-Application-Hooks

repo_name: JenryOllivierre/PHP-Application-Hooks


text:
# System

An static class responsible of timely frame rendering, updates, and handling pointer and keyboard events.

## Usage

```js
const { System } = require('@rsthn/cherry');
```

```js
import { System } from '@rsthn/cherry';
```

```js
const System = require('@rsthn/cherry/system');
```

# Constants

The following constants can be accessed directly using the `System` object (i.e. `System.EVT_KEY_UP`).

## Keyboard Action Codes

Keyboard action codes are passed in parameter `action` to `onKeyboardEvent` when a keyboard event occurs.

- `EVT_KEY_DOWN`
- `EVT_KEY_UP`

## Pointer Action Codes

Pointer action codes are passed in parameter `action` to `onPointerEvent` when a mouse / touch / pointer event occurs.

- `EVT_POINTER_DOWN`
- `EVT_POINTER_UP`
- `EVT_POINTER_MOVE`
- `EVT_POINTER_DRAG_START`
- `EVT_POINTER_DRAG_MOVE`
- `EVT_POINTER_DRAG_STOP`

## Display Orientations

Passed as `orientation` property in the `options` object to System.init(). Specifies the desired device orientation. Note that on every orientation change, the `onCanvasResized` event will be triggered.

|Constant|Description
|----|-----------
|`DEFAULT`|Keep whatever orientation the user has, never rotate the canvas.
|`LANDSCAPE`|Force landscape orientation, will rotate the canvas when portrait is detected to ensure that `screenWidth` > `screenHeight`.
|`PORTRAIT`|Force portrait orientation, will rotate the canvas when landscape is detected to ensure that  `screenWidth` < `screenHeight`.
|`AUTOMATIC`|Detect either orientation and rotate the canvas accordingly.

# Properties

### `screenWidth`: int, `screenHeight`: int
Screen resolution, obtained automatically when the system is initialized.

### `orientation`: int
Current screen orientation, available right before `onCanvasResized` is triggered. See [Display Orientations](#display-orientations) for possible values.

### `initialMatrix`: [Matrix](matrix.md)
Initial transformation matrix. When rendering, instead of calling `loadIdentity` on the canvas set this matrix to whatever initial transformation you need, because `System` does some transformations first.

### `displayBuffer`: [Canvas](canvas.md)
Display buffer for the renderer, this is the primary output canvas.

### `tempDisplayBuffer`: [Canvas](canvas.md)
Small (320x240) temporal display buffer, used for off-render of certain small elements and image pre-loading.

### `keyState`: Map<int,bool> union { `time`: int, `shift`: bool, `ctrl`: bool, `alt`: bool, `keyCode`: int }
Map with the status of all keys and additional details of the currently fired keyboard event, such as the time, shift-key status, ctrl-key status, alt-key status and the keyCode of the event.

### `pointerState`: Map<int, PointerState>
Current status of all pointers. The PointerState object has the following properties:

|Property|Description
|--------|-----------
|`id`: int|The integer ID of the pointer. Usually 1 if using only a mouse, or can be any other number in multitouch environments.
|`isActive`: bool|Indicates if the pointer is down (true) or up (false).
|`isDragging`: bool|Indicates if a dragging operation is in place.
|`sx`: float|Start X value obtained the instant the pointer was held down.
|`sy`: float|Start Y value obtained the instant the pointer was held down.
|`x`: float|Current pointer X value.
|`y`: float|Current pointer Y value.
|`dx`: float|Delta X value for the current dragging operation.
|`dy`: float|Delta Y value for the current dragging operation.
|`button`: int|Indicates which button was pressed. For touch down or left-click the value is 1, for middle-button 2 and right-click 3.

### `timeScale`: float
System's time scale, the frame delta is multiplied by this value before each system cycle, can be used to simulate slow-motion or high-speed when desired.

### `fixedFrameInterval`: float
Fixed frame interval in milliseconds, when set to non-zero value the frame delta will always be set to this value, regardless of the system rendering speed.

### `frameDelta`: float
Last frame delta time in seconds.

### `frameDeltaMillis`: int
Last frame delta time in milliseconds.

### `frameTime`: float
Logical system time in seconds, increased by `frameDelta` on each update cycle.

### `frameNumber`: int
Current frame number.

# Methods

### void **`init`** (`options`: Object)
Initializes the system with the specified configuration options.

|Property Name|Description|Default Value
|-------------|-----------|-------------
|`background`|Background color of the canvas.|`#000`
|`fps`|Maximum number of frames per second (FPS) the system should target.|`60`
|`minFps`|Minimum number of FPS the system is allowed to reach, when an FPS lower that this value is detected the system will ensure a fixed time step of 1000/minFps is used.|`15`
|`antialias`|Indicates if antialias should be enabled on the system's displayBuffer.|`true`
|`screenWidth`|When not-null and not-zero specifies the target screen width desired. If a larger or smaller width is detected on the client, the system will scale it appropriately such that you can always assume your width is `screenWidth`.|`null`
|`screenHeight`|Same as above, but for height.|`null`
|`orientation`|Specifies the target screen orientation. See available [orientation constants](#display-orientations) for details.|`System.DEFAULT`
|`fullscreen`|When `true` the system will use the `screen` object of the browser to size the canvas. When `false` it will use the `window` object's inner bounds.|`false`

### float **`now`** (`asSeconds`: bool = false)
Returns the current time in milliseconds or seconds if `asSeconds` is set to `true`.

### float **`time`** ()
Returns the current logical time in seconds (same as reading `System.frameTime` directly).

### void **`start`** ()
Starts the system and enables rendering and updates.

### void **`stop`** ()
Stops the system by disabling both rendering and updates.

### void **`pause`** ()
Disables updates, but continues to render.

### void **`resume`** ()
Resumes updates if previously stopped with `pause()`.

### [Linkable](linkable.md) **`updateQueueAdd`** (`handler`: Object)
Adds the specified handler to the update queue. Must have the method **update (deltaTime: int)**. Returns a Linkable object which can be used to quickly remove the handler later using `updateQueueRemove`.

### void **`updateQueueRemove`**: (`handler`: Object)
Searches for the specified handler object and removes it from the update queue.

### void **`updateQueueRemove`**: (`link`: [Linkable](linkable.md))
Removes the specified handler from the update queue given its Linkable object (which was returned by `updateQueueAdd`).

### [Linkable](linkable.md) **`drawQueueAdd`** (`handler`: Object)
Adds the specified handler to the draw queue. Must have method **draw (canvas: [Canvas](canvas.md))**.

### void **`drawQueueRemove`**  (`handler`: Object)
Searches for the specified handler object and removes it from the draw queue.

### void **`drawQueueRemove`**  (`link`: [Linkable](linkable.md))
Removes the specified handler from the draw queue given its Linkable object (which was returned by `drawQueueAdd`).

### Object **`queueAdd`** (`handler`: Object)
Adds the specified handler to the update and draw queues. Must have both **update (deltaTime: int)** and **draw (canvas: [Canvas](canvas.md))** methods. Returns the handler object.

### void **`queueRemove`** (`handler`: Object)
Searched for the specified handler in the draw and update queues and removes it.

### void **`interpolate`** (`src`: Map<string, float>, `dst`: Map<string, float>, `duration`: Map<string, float>, `easing`: Map<string, function>, `callback`: function (data: Object, isFinished: bool))

Interpolates numeric values between two objects (`src` and `dst`) using the specified `duration` and `easing` function. On each interpolation step the `callback` will be executed with the `data` object having the interpolated properties (keys obtained from union of `src` and `dst`).

### hookable void **`onCanvasResized`** (`screenWidth`: int, `screenHeight`: int)
Event triggered when the canvas was resized by the system. Use the `System.orientation` property to retrieve the display orientation.

### hookable void **`onKeyboardEvent`** (`action`: int, `keyCode`: int, `keys`: &System.keyState)
Event triggered when a keyboard event is detected by the system, `action` is one of the [Keyboard Action Codes](#keyboard-action-codes) constants, `keyCode` is one of the [KeyCodes](keycodes.md) constants and `keys` a reference to `System.keyState`.

### void **`onPointerEvent`** (`action`, `pointer`, `pointers`)
Event triggered when a pointer event is detected by the system, `action` is one of the [Pointer Action Codes](#pointer-action-codes) constants, `pointer` contains the pointer state, and `pointers` a reference to `System.pointerState`.

repository: rsthn/cherryjs

gha_language: JavaScript

gha_license_id: MIT

repo_name: rsthn/cherryjs


text:
[![DOI](https://zenodo.org/badge/370368563.svg)](https://zenodo.org/badge/latestdoi/370368563)

# ***Whale GPS tracking***

This repository is part of the Medium post: https://towardsdatascience.com/stop-detection-in-blue-whales-gps-tracking-movingpandas-0-6-55a4b893a592

The final map animation of the whale tracks and the stop's duration here: https://bryanvallejo16.github.io/stop-detection-whale-tracking/

# ***DEMO***
![whale-demo](gif/whale_tracks2.gif)

## ***Details about the dataset***

The dataset was published in Movebank. The details here: https://www.movebank.org/cms/webapp?gwt_fragment=page=studies,path=study943824007

repository: Eloypripan/ballenas

branch_name: refs/heads/main

repo_name: Eloypripan/ballenas


text:
# Project T Final: Using Kernels
With a slidedeck, a coding assignment with several jupyter notebooks, and a quiz, this repo is a full assignment designed such that students that complete it have will full mastery over using kernels in many different contexts.
## Learning Objectives
* On a theoretical level, students should understand why lifting data is important.
* Students should understand how kernels connect to ridge regression. The notes and the kernel ridge regression problem go in depth here.
* Students should see how kernels connect to SVM's. The notes provide ample explanation, and the coding assignment goes in depth into using kernels for SVM's and exploring the different decision boundaries kernels produce.
* Understand RBF kernels, and visually see how gamma affects them. The kernel PCA problem introduces students to this idea in the assignment and allows them to play with different gamma values. The quiz goes in depth into how the gamma parameter effects visualization and the theoretical backing is provided in the notes.
* Understand polynomial kernels, and how they are able to optimize on lifting. This is seen in the kernel perceptron example very clearly.
* Understand how to use unique kernel functions on unusual data types. The string kernels problem introduces the student to this concept, and provides the background to read multiple different papers in string kernels for bioinformatics. All of which will be understandable after completing the problem.
* Understand how to introduce our own kernel functions and apply them using SVM for classification and visualization of the decision boundary. The string kernel problem as well as a problem in the quiz will benefit the students understanding here.
* Understand when our algorithm may benefit from kernelization, which is done both in the quiz and multiple assignment questions.

## Navigating this Directory
📦kernels-final-project
 ┣ 📂final_kernels_project_blank - coding assignment problems (jupyter notebooks)
 ┃ ┣📜prob1.ipynb
 ┃ ┣📜prob2.ipynb
 ┃ ┣📜prob3.ipynb
 ┃ ┣📜prob4.ipynb
 ┃ ┗📜prob5.ipynb
 ┣ 📂final_kernels_project_solutions - assignment solutions (jupyter notebooks)
 ┃ ┣📜prob1-sols.ipynb
 ┃ ┣📜prob2-sols.ipynb
 ┃ ┣📜prob3-sols.ipynb
 ┃ ┣📜prob4-sols.ipynb
 ┃ ┗📜prob5-sols.ipynb
 ┣ 📜final_kernels_slidedeck.pdf - slidedeck for lecture
 ┣ 📜final_kernels_quiz.pdf - quiz for testing understanding
 ┗ 📜final_kernels_notes.pdf - detailed latex notes

repository: mjayasur/kernels-final-project

repo_name: mjayasur/kernels-final-project


text:
# dokku-daemon [![Travis branch](https://img.shields.io/travis/dokku/dokku-daemon/master.svg?style=flat-square)](https://travis-ci.org/dokku/dokku-daemon)

A daemon wrapper around [Dokku](https://github.com/dokku/dokku)

## Requirements

A VM running Ubuntu 14.04 x64 or later with Dokku v0.4.9 or above installed

## Installing

As a user with access to `sudo`:

    git clone https://github.com/dokku/dokku-daemon
    cd dokku-daemon
    sudo make install

## Debian Notes

As a user with access to `sudo`:

    git clone https://github.com/dokku/dokku-daemon
    cd dokku-daemon
    sudo apt-get install socat
    sudo make install

## Specifications

* Daemon listens on a UNIX domain socket (by default created at `/var/run/dokku-daemon/dokku-daemon.sock`)
* Commands issued to the daemon take the same form as those used with `dokku` on the command-line
* Command names are validated before execution
* Responses are sent as line-delimited JSON
* No authentication layer (local/container connections only)
* Multiple client connections are supported but only one command will be processed at a given time

Example command and response:

    < apps:create demo-app
    > {"ok":true,"output":"Creating demo-app... done"}

## Development

A development environment can be started with the provided Vagrantfile. To start the box and run the test suite:

    # on development machine
    vagrant up
    vagrant ssh

    # over vagrant ssh session
    cd /dokku-daemon
    make test

The executable and init scripts are symlinked to their respective directories rather than copied. To test using Systemd, start Vagrant with environment variable `BOX_NAME` set to `bento/ubuntu-15.04`.

## License

[MIT License](LICENSE.txt)

repository: trevormerritt/dokku-daemon

gha_language: Shell

repo_name: trevormerritt/dokku-daemon


text:
# aspnet-core-signalr-stock-ticker

Clone of basic [Stock Ticker sample](https://github.com/SignalR/SignalR-StockTicker) adapted for ASP.NET Core 2.1 SignalR and React.js

How to start:

1. Web API App

- Open WebApp solution in Visual Studio.
- Start WebApp by selecting WebApp profile in launch settings and pressing F5
- In opened browser window type URL: http://localhost:5000/api/stocktable/allstocks
- Check JSON data in response

2. Web UI on React
- Open web-ui folder in Visual Studio Code
- In terminal window type: npm install
- To start web-ui type: npm start
- Navigate to http://localhost:3000

![Sapmle](https://github.com/afedyanin/aspnet-core-signalr-stock-ticker/blob/master/sample.png)


text:
---
layout: user-documentation
title: Network Entities
name: network-entities
---

## Introduction

Interfaces owned by a workgroup may be organized under a **network
entity**. Network entities are collections of network interfaces which
are owned by a single network, and when used together, may provide
redundant connectivity to a network. Entities are organized into a
hierarchy based on their relationship to the oess controlled network
and may be searched for by name when provisioning and using the entity
explorer.

## Entity Explorer

Navigate to the Entity Explorer using the Explore link in the
navbar. The left most navigation menu will show the top level entites
available to users; Click these to view their details and their child
entities. The primary content will show the contacts responsible for
managing the selected entity and any details about the entity that
have been provided. Use the search bar at the top of the page to
quickly navigate the hierarchy when the entity you're searching for is
already known.

## Create and Manage a Network Entity

Using the entity explorer navigate to the entity under which you wish
your new entity to be organized. Assuming you have the proper
permissions the `Add Entity` button will be displayed. Click this
button and complete the provided form. Afer the form has been
submitted the new entity will be available. _Note: It is not currently
possible for an entity to be organized under multiple entities without
help from a system administrator._

To modify an entity, if you have the proper permissions the `Edit
Entity` button will be displayed. Click this button and complete the
provided form. Afer the form has been submitted, changes to the entity
will be made.

## Associate Interfaces with an Entity

To associate an interface with an entity create or modify an existing
Interface ACL under the Workgroup page. Under the entity option, use
the entity name you wish to associate with the (interface, vlan)
pair. After saving the ACL, whenever the Entity is used in
provisioning, the associated interface will be auto-selected and the
associated VLANs will be available for selection.

repository: GlobalNOC/OESS

repo_name: GlobalNOC/OESS


text:
# AxisArrays.jl

[![][action-img]][action-url]
[![][pkgeval-img]][pkgeval-url]
[![][codecov-img]][codecov-url]

This package for the Julia language provides an array type (the `AxisArray`) that knows about its dimension names and axis values.
This allows for indexing by name without incurring any runtime overhead.
This permits one to implement algorithms that are oblivious to the storage order of the underlying arrays.
AxisArrays can also be indexed by the values along their axes, allowing column names or interval selections.

In contrast to similar approaches in [Images.jl](https://github.com/timholy/Images.jl) and [NamedArrays.jl](https://github.com/davidavdav/NamedArrays), this allows for type-stable selection of dimensions and compile-time axis lookup.  It is also better suited for regularly sampled axes, like samples over time.

Collaboration is welcome! This is still a work-in-progress. See [the roadmap](https://github.com/JuliaArrays/AxisArrays.jl/issues/7) for the project's current direction.

### Note about `Axis{}` and keywords

An `AxisArray` stores an object of type `Axis{:name}` for each dimension,
containing both the name (a `Symbol`) and the "axis values" (an `AbstractVector`).
These types are what made compile-time lookup possible.
Instead of providing them explicitly, it is now possible to use keyword arguments
for both construction and indexing:

```julia
V = AxisArray(rand(10); row='a':'j')  # AxisArray(rand(10), Axis{:row}('a':'j'))
V[row='c'] == V[Axis{:row}('c')] == V[row=3] == V[3]
```

### Note about `axes()` and `indices()`

The function `AxisArrays.axes` returns the tuple of such `Axis` objects.
Since Julia version 0.7, `Base.axes(V) == (1:10,)` gives instead the range of possible
ordinary integer indices. (This was called `Base.indices`.) Since both names are exported,
this collision results in a warning if you try to use `axes` without qualification:

```julia
julia> axes([1,2])
WARNING: both AxisArrays and Base export "axes"; uses of it in module Main must be qualified
ERROR: UndefVarError: axes not defined
```

Packages that are upgrading to support Julia 0.7+ should:

* Replace all uses of the `axes` function with the fully-qualified `AxisArrays.axes`
* Replace all uses of the deprecated `indices` function with the un-qualified `axes`
* Immediately after `using AxisArrays`, add `const axes = Base.axes`

In the future, AxisArrays will be looking for a new name for its functionality.
This will allow you to use the idiomatic `Base` name and offers an easy upgrade
path to whatever the new name will be.

## Example of currently-implemented behavior:

```julia
julia> using Pkg; pkg"add AxisArrays Unitful"
julia> using AxisArrays, Unitful, Random

julia> fs = 40000; # Generate a 40kHz noisy signal, with spike-like stuff added for testing
julia> import Unitful: s, ms, µs
julia> rng = Random.MersenneTwister(123); # Seed a random number generator for repeatable examples
julia> y = randn(rng, 60*fs+1)*3;
julia> for spk = (sin.(0.8:0.2:8.6) .* [0:0.01:.1; .15:.1:.95; 1:-.05:.05] .* 50,
                  sin.(0.8:0.4:8.6) .* [0:0.02:.1; .15:.1:1; 1:-.2:.1] .*  For example, we can specify
indices in *any* order, just so long as we annotate them with the axis name:

```julia
julia> A[time=4] # or A[Axis{:time}(4)]
1-dimensional AxisArray{Float64,1,...} with axes:
    :chan, Symbol[:c1, :c2]
And data, a 2-element Array{Float64,1}:
 1.37825
 2.75649

julia> A[chan = :c2, time = 1:5] # or A[Axis{:chan}(:c2), Axis{:time}(1:5)]
1-dimensional AxisArray{Float64,1,...} with axes:
    :time, 0.0 s:2.5e-5 s:0.0001 s
And data, a 5-element Array{Float64,1}:
  7.14161
 12.2891
  6.85591
  2.75649
 -2.38007
```

We can also index by the *values* of each axis using an `Interval` type that
selects all values between two endpoints `a .. b` or the axis values directly.
Notice that the returned AxisArray still has axis information itself... and it
still has the correct time information for those datapoints!

```julia
julia> A[40µs .. 220µs, :c1]
1-dimensional AxisArray{Float64,1,...} with axes:
    :time, 5.0e-5 s:2.5e-5 s:0.0002 s
And data, a 7-element Array{Float64,1}:
  3.42795
  1.37825
 -1.19004
 -1.99414
  2.9429
 -0.226449
  0.821446

julia> AxisArrays.axes(ans, 1)
AxisArrays.Axis{:time,StepRangeLen{Quantity{Float64, Dimensions:{𝐓}, Units:{s}},Base.TwicePrecision{Quantity{Float64, Dimensions:{𝐓}, Units:{s}}},Base.TwicePrecision{Quantity{Float64, Dimensions:{𝐓}, Units:{s}}}}}(5.0e-5 s:2.5e-5 s:0.0002 s)
```

You can also index by a single value using `atvalue(t)`.
This function is not needed for categorical axes like `:chan` here,
as `:c1` is a `Symbol` which can't be confused with an integer index.

Using `atvalue()` will drop a dimension (like using a single integer).
Indexing with an `Interval(lo, hi)` type retains dimensions, even
when the ends of the interval are equal (like using a range `1:1`):

```julia
julia> A[atvalue(2.5e-5s), :c1]
6.14453912336772

julia> A[2.5e-5s..2.5e-5s, :c1]
1-dimensional AxisArray{Float64,1,...} with axes:
    :time, 2.5e-5 s:2.5e-5 s:2.5e-5 s
And data, a 1-element Array{Float64,1}:
 6.14454
```

You can even index by multiple values by broadcasting `atvalue` over an array:

```julia
julia> A[atvalue.([2.5e-5s, 75.0µs])]
2-dimensional AxisArray{Float64,2,...} with axes:
    :time, Quantity{Float64, Dimensions:{𝐓}, Units:{s}}[2.5e-5 s, 7.5e-5 s]
    :chan, Symbol[:c1, :c2]
And data, a 2×2 Array{Float64,2}:
 6.14454  12.2891
 1.37825   2.75649
```

Sometimes, though, what we're really interested in is a window of time about a
specific index. One of the operations above (looking for values in the window from 40µs
to 220µs) might be more clearly expressed as a symmetrical window about a
specific index where we know something interesting happened. To represent this,
we use the `atindex` function:

```julia
julia> A[atindex(-90µs .. 90µs, 5), :c2]
1-dimensional AxisArray{Float64,1,...} with axes:
    :time_sub, -7.5e-5 s:2.5e-5 s:7.500000000000002e-5 s
And data, a 7-element Array{Float64,1}:
  6.85591
  2.75649
 -2.38007
 -3.98828
  5.88581
 -0.452898
  1.64289
```

Note that the returned AxisArray has its time axis shifted to represent the
interval about the given index!  This simple concept can be extended to some
very powerful behaviors.  The returned AxisArray's columns specify each repetition of the
interval, and each datapoint in the column represents a timepoint within that
interval, adjusted by the time of the theshold crossing. The best part here
is that the returned matrix knows precisely where its data came from, and has
labeled its dimensions appropriately. Not only is there the proper time
base for each waveform, but we also have recorded the event times as the axis
across the columns.

## Indexing

Two main types of Axes supported by default include:

* Categorical axis -- These are vectors of labels, normally symbols or
  strings. Elements or slices can be selected by elements or vectors
  of elements.

* Dimensional axis -- These are sorted vectors or iterators that can
  be selected by `Intervals`. These are commonly used for sequences of
  times or date-times. For regular sample rates, ranges can be used.

Here is an example with a Dimensional axis representing a time
sequence along rows and a Categorical axis of symbols for column
headers.

```julia
B = AxisArray(reshape(1:15, 5, 3), .1:.1:0.5, [:a, :b, :c])
B[row = (0.2..0.4)] # restrict the AxisArray along the time axis
B[0.0..0.3, [:a, :c]]   # select an interval and two of the columns
```

User-defined axis types can be added along with custom indexing
behaviors.

### Example: compute the intensity-weighted mean along the z axis
```julia
B = AxisArray(randn(100,100,100), :x, :y, :z)
Itotal = sumz = 0.0
for iter in CartesianIndices(Base.axes(B))  # traverses in storage order for cache efficiency
    global Itotal, sumz
    I = B[iter]  # intensity in a single voxel
    Itotal += I
    sumz += I * iter[axisdim(B, Axis{:z})]  # axisdim "looks up" the z dimension
end
meanz = sumz/Itotal
```

The intention is that all of these operations are just as efficient as they would be if you used traditional position-based indexing with all the inherent assumptions about the storage order of `B`.

<!-- badges -->

[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/A/AxisArrays.svg
[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html

[action-img]: https://github.com/JuliaArrays/AxisArrays.jl/workflows/Unit%20test/badge.svg
[action-url]: https://github.com/JuliaArrays/AxisArrays.jl/actions

[codecov-img]: https://codecov.io/github/JuliaArrays/AxisArrays.jl/coverage.svg?branch=master
[codecov-url]: https://codecov.io/gh/JuliaArrays/AxisArrays.jl

gha_language: Julia

gha_license_id: NOASSERTION


text:
# Change Log
All notable changes to this project will be documented in this file using [Semantic Versioning](http://semver.org/).

## [0.3.0] - 2019-02-26
### Features
- [Scheduled Query Execution](https://github.com/lumoslabs/aleph/issues/42)
- Fixed s3 location for latest result (useful for GoogleSheet integration)

### Fixed
- Fix roles and tag dirty aware comparators on the Query model

## [0.2.0] - 2017-09-12
### Features
- [Surface Running Queries](https://github.com/lumoslabs/aleph/issues/45)
- [Site wide, saved filter for schema](https://github.com/lumoslabs/aleph/issues/38)

### Fixed
- [Use trusty for travis](https://github.com/lumoslabs/aleph/issues/67)
- [Display 24-hour format](https://github.com/lumoslabs/aleph/issues/53)
- [Schema search should be able to handle numbers](https://github.com/lumoslabs/aleph/issues/59)
- [Clean up /tmp result files when query fails](https://github.com/lumoslabs/aleph/issues/37)
- [Increase schema query reties](https://github.com/lumoslabs/aleph/issues/64)

## [0.1.0] - 2017-04-27
### Features
- [Auto-complete on dot](https://github.com/lumoslabs/aleph/issues/48)

### Fixed
- [change retry configuration for schema query](https://github.com/lumoslabs/aleph/issues/46)

## [0.0.6] - 2016-12-21
### Features
- [Clone query](https://github.com/lumoslabs/aleph/issues/27)

### Fixed
- [AWS region configurable](https://github.com/lumoslabs/aleph/issues/32)
- [Search issues on the schema page](https://github.com/lumoslabs/aleph/issues/24)
- [Query REPL minor UI issue](https://github.com/lumoslabs/aleph/issues/22)

## [0.0.5] - 2016-09-26
### Features
- [Link to specific result / single result page](https://github.com/lumoslabs/aleph/issues/12)
- [Use shift enter as hotkey to run queries in REPL](https://github.com/lumoslabs/aleph/issues/16)

### Fixed
- [Alerts searching bug](https://github.com/lumoslabs/aleph/issues/15)
- [Alerts sorting bug](https://github.com/lumoslabs/aleph/issues/13)
- [Query saving after REPL closes issue](https://github.com/lumoslabs/aleph/issues/14)

## [0.0.4] - 2016-07-12
### Fixed
- Saving QueryRoles bug
- Streamline sign out page

repository: dollschasingmen/aleph

repo_name: dollschasingmen/aleph


text:
bitpay/magento-plugin
=====================

# Build Status

[![Build Status](https://travis-ci.org/bitpay/magento-plugin.svg?branch=master)](https://travis-ci.org/bitpay/magento-plugin)

# Description

Bitcoin is a powerful new peer-to-peer platform for the next generation of financial technology. The decentralized nature of the Bitcoin network allows for a highly resilient value transfer infrastructure, and this allows merchants to gain greater profits.

This is because there are little to no fees for transferring Bitcoins from one person to another. Unlike other payment methods, Bitcoin payments cannot be reversed, so once you are paid you can ship! No waiting days for a payment to clear.

# Requirements

* [Magento CE](http://magento.com/resources/system-requirements) <IP_ADDRESS> or higher. Older versions might work, however this plugin has been validated to work against the <IP_ADDRESS> Community Edition release.
* [GMP](http://us2.php.net/gmp) or [BC Math](http://us2.php.net/manual/en/book.bc.php) PHP extensions.  GMP is preferred for performance reasons but you may have to install this as most servers do not come with it installed by default.  BC Math is commonly installed however and the plugin will fall back to this method if GMP is not found.
* [OpenSSL](http://us2.php.net/openssl) Must be compiled with PHP and is used for certain cryptographic operations.
* [PHP](http://us2.php.net/downloads.php) 5.4 or higher. This plugin will not work on PHP 5.3 and below.

# Upgrade From Plugin Version 1.x to 2.x

***Very Important:*** You must complete remove any previous versions of the Bitpay Magento plugin before installing this new updated version. The plugin has been completely re-written to work with BitPay's new cryptographically secure RESTful API and will conflict with any previous plugin versions which use the old API.  To help you remove the old plugin files from your system, we have created a convenient shell script for Unix/Linux/Mac OS systems which will scan your webserver for these older files and delete them.  You may also remove these files by hand of course and the complete list of the files can be found in the source of the script for your convenience.  You can download this delete script here:  [scripts/delete.sh](https://github.com/bitpay/magento-plugin/blob/master/scripts/delete.sh).

To use this script, simply download to your server and execute the script from a shell.  You may have to mark the script executable before first use.

```sh
chmod +x delete.sh
./delete.sh
```

# Installation

## Magento Connect Manager

Goto [http://www.magentocommerce.com/magento-connect/bitpay-payment-method.html](http://www.magentocommerce.com/magento-connect/bitpay-payment-method.html) and click the *Install Now* link which will give you the *Extension Key* needed for the next step.

Once you have the key, log into you Magento Store's Admin Panel and navigate to **System > Magento Connect > Magento Connect Manager**.

***NOTE:*** It may ask you to log in again using the same credentials that you use to log into the Admin Panel.

All you need to do is paste the extension key and click on the *Install* button.

***WARNING:*** It is good practice to backup your database before installing extensions. Please make sure you Create Backups.

## Download

Visit the [Releases](https://github.com/bitpay/magento-plugin/releases) page of this repository and download the latest version. Once this is done, you can just unzip the contents and use any method you want to put them on your server. The contents will mirror the Magento directory structure.

***NOTE:*** These files can also up uploaded using the *Magento Connect Manager* that comes with your Magento Store

***WARNING:*** It is good practice to backup your database before installing extensions. Please make sure you Create Backups.

## modman

Using [modman](https://github.com/colinmollenhour/modman) you can install the BitPay Magento Plugin. Once you have modman installed, run `modman init` if you have not already done so. Next just run `modman clone https://github.com/bitpay/magento-plugin.git` in the root of the Magento installation. In this case it is `/var/www/magento`.

# Configuration

Configuration can be done using the Administrator section of your Megento store. Once Logged in, you will find the configuration settings under **System > Configuration > Sales > Payment Methods**.

![BitPay Magento Settings](https://raw.githubusercontent.com/bitpay/magento-plugin/master/docs/MagentoSettings.png "BitPay Megento Settings")

Here your will need to create a [pairing code](https://bitpay.com/api-tokens) using your BitPay merchant account. Once you have a Pairing Code, put the code in the Pairing Code field. This will take care of the rest for you.

***NOTE:*** Pairing Codes are only valid for a short period of time. If it expires before you get to use it, you can always create a new one an use the new one.

***NOTE:*** You will only need to do this once since each time you do this, the extension will generate public and private keys that are used to identify you when using the API.

You are also able to configure how BitPay's IPN (Instant Payment Notifications) changes the order in your Magento store.

![BitPay Invoice Settings](https://raw.githubusercontent.com/bitpay/magento-plugin/master/docs/MagentoInvoiceSettings.png "BitPay Invoice Settings")

# Usage

Once enabled, your customers will be given the option to pay with Bitcoins. Once they checkout they are redirected to a full screen BitPay invoice to pay for the order.

As a merchant, the orders in your Magento store can be treated as any other order. You may need to adjust the Invoice Settings depending on your order fulfillment.

# Support

## BitPay Support

* [GitHub Issues](https://github.com/bitpay/magento-plugin/issues)
  * Open an issue if you are having issues with this plugin.
* [Support](https://support.bitpay.com)
  * BitPay merchant support documentation

## Magento Support

* [Homepage](http://magento.com)
* [Documentation](http://docs.magentocommerce.com)
* [Community Edition Support Forums](https://www.magentocommerce.com/support/ce/)

# Troubleshooting

1. Ensure a valid SSL certificate is installed on your server. Also ensure your root CA cert is updated. If your CA cert is not current, you will see curl SSL verification errors.
2. Verify that your web server is not blocking POSTs from servers it may not recognize. Double check this on your firewall as well, if one is being used.
3. Check the `payment_bitpay.log` file for any errors during BitPay payment attempts. If you contact BitPay support, they will ask to see the log file to help diagnose the problem.  The log file will be found inside your Magento's `var/log/` directory. ***NOTE:*** You will need to enable the debugging setting for the extension to output information into the log file.
4. Check the version of this plugin against the official plugin repository to ensure you are using the latest version. Your issue might have been addressed in a newer version! See the [Releases](https://github.com/bitpay/magento-plugin/releases) page or the Magento Connect store for the latest version.
5. If all else fails, send an email describing your issue **in detail** to<EMAIL_ADDRESS>
***TIP:*** When contacting support it will help us is you provide:

* Magento CE Version (Found at the bottom page in the Administration section)
* Other extensions you have installed
  * Some extensions do not play nice
* Configuration settings for the extension (Most merchants take screen grabs)
* Any log files that will help
  * web server error logs
  * enabled debugging for this extension and send us `var/log/payment_bitpay.log`
* Screen grabs of error message if applicable.

# Contribute

For developers wanting to contribute to this project, it is assumed you have a stable Magento environment to work with, and are familiar with developing for Magento. You will need to clone this repository or fork and clone the repository you created.

Once you have cloned the repository, you will need to run [composer install](https://getcomposer.org/doc/00-intro.md#using-composer). Using and setting up composer is outside the scope, however you will find the documentation on their site comprehensive.  You can then run the ``scripts/package`` script to create a distribution files which you can find in ``build/dist``. This is the file that you can upload to your server to unzip or do with what you will.

If you encounter any issues or implement any updates or changes, please open an [issue](https://github.com/bitpay/magento-plugin/issues) or submit a Pull Request.

***NOTE:*** The ``scripts/package`` file contains some configuration settings that will need to change for different releases. If you are using this script to build files that are for distribution, these will need to be updated.

# License

The MIT License (MIT)

Copyright (c) 2011-2014 BitPay, Inc.

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

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

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: samuelbohler/magento-plugin

repo_name: samuelbohler/magento-plugin


text:
---
title: "DLS Basics: Optimization Algorithms"
excerpt_separator: "<!--more-->"
categories:
  - python
  - data science
tags:
  - deeplearning.ai
  - neural networks
  -
---

It is always needed in real world practice to find out human level performance on both train set and dev set when data mismatch occurs because both data sets are from different distributions. In such data mismatch situation, the human-level performance on data from train set is no longer representative for human-level performance on the data from dev set.

# training and testing on different distributions

cat app example

- large dataset from irrelevant source vs. small dataset from relevant source

option 1:
- put both datasets together and randomly shuffle into train dev test split
- advantage: training, dev, test sets all come from same distribution
- disadvantage: dev set will come from a different distribution than the one you actually care about

option 2:
- split train to have both sources (reserve half of smaller for dev and test total)
- have dev and test sets only from the relevant dataset
- advantage: aiming target where you want it to be
- disadvantage - training distribution different from dev and test set distributions

option 2 has better performance in the long term

# bias and variance with mismatched data distributions

suppose we have 1% training error and 10% dev error.

- if dev data came from the same distribution as training, there is a large variance problem. algorithm is not generalizing well from training set.
- if dev data comes from different distriution, we cannot safely make this conclusion. eg maybe it's doing just fine on the dev set, but the dev set is harder to make predictions on

workaround: the training-dev set
- just as dev and test sets will have the same distribution, the training set and training-dev set will have the same distribution
- look at the error on both the train-dev and dev sets

two scenarios:

- variance problem: 1% training error, 9% train-dev error, and 10% dev error. train-dev comes from the same distribution as train.
- data mismatch problem: 1% training error, 1.5% train-dev error, and 10% dev error. data mismatch problem, since dev comes from different distribution than train.

you get an idea of the issues in performance:
- human level error
- training set error
- training-dev error
- dev set error
- test error

gives rise to:
- avoidable bias
- variance
- data mismatch
- degree of overfitting to the dev set

What about this?
| error        | Are           | Cool  |
| ------------- |-------------| -----|
| human      | right-aligned | $1600 |
| examples trained on      | centered      |   $12 |
| examples not trained on | are neat      |    $1 |

# addressing data mismatch
- carry out manual error analysis to try to understand difference between training and dev/test sets
  - eg: analyze examples to figure out how your dev set is different than your train set
- when you have insight into the nature of your dev set errors or insight into how the dev set is different or more difficult than your training set, try to find ways to make your training data more similar
  - artificial data synthesis (eg clean audio + car noise)
  - if you have 10000 hours of clean audio and only 1 hour of car noise, you may be tempted to loop the 1 hour 10000 times, but the algorithm may overfit to this small subset of "car noise" space

url: https://raw.githubusercontent.com/jydiw/deeplearning.ai/9b825dc9351ac611f354139dae596d1c0a1f3834/drafts/3-2-2-mismatched training and devtest sets copy.md


text:
# CODE OF CONDUCT

## Table of Contents

<!-- TOC -->
- [CODE OF CONDUCT](#code-of-conduct)
  - [Table of Contents](#table-of-contents)
  - [Code of Conduct](#code-of-conduct-1)
  - [Extended Code of Conduct](#extended-code-of-conduct)
  - [Culture](#culture)
    - [Free Speech and Order](#free-speech-and-order)
    - [⚖ *Polite behavior explained](#-polite-behavior-explained)
    - [*Welcoming behavior explained](#welcoming-behavior-explained)
    - [*Sharing and collaboration explained](#sharing-and-collaboration-explained)
    - [*Intellectual Humility Explained](#intellectual-humility-explained)
    - [⚙ Operating Rules](#-operating-rules)
    - [🎟 Membership](#-membership)
      - [Member introductions](#member-introductions)
      - [Meetup Townhall Introduction Template](#meetup-townhall-introduction-template)
<!-- /TOC -->
## Code of Conduct

📜 Our Code of Conduct is the [Berlin Code of Conduct](https://berlincodeofconduct.org)

Furthermore, we have extended it to suit the needs of our community, as seen below.

These apply for our meetings and open source initatives.

We will review this beginning of every Meetup and meeting.

## Extended Code of Conduct

🧭 **Our Community’s Goal**: build the Ethereum community and provide a space where people can learn by doing.
🔑 **Prerequisite**: you abide by our code of conduct and culture detailed below.
🎟 **Membership**: contingent on having **weekly active works** within the Ethereum community and related technologies.

🛠 We are action-oriented. The best time to start is now. Welcome!

## Culture

🏗 We have a culture of:
1. Intellectual curiosity, especially hands-on learning
2. Calculated risk-taking with a supportive environment
3. Experimentation and iteration
4. Failing fast and failing often
5. Paying it forward and helping others
6. Collaboration and sharing without blocking others
7. A sense of wonder and focus.
8.
9. Have fun and have a sense of humor
10. Resilience, since technology has booms and bust cycle
11. Polite and welcoming behavior
12.
Silver rule: “Do not do unto others as you would not have them do unto you”
Golden rule: “Treat others as you would like others to treat you”.

### *Welcoming behavior explained

Create a respectful environment where people want to come, stay, and participate for the long term.

### *Sharing and collaboration explained

**Silver rule of sharing**: “Share your stuff now, unless you want to have no help when you really are in trouble”.
Basically, you get what you give.
Build your social capital.
If we all give more than we get, our community will grow and benefit everyone.

### *Intellectual Humility Explained

Not everyone knows everything.
Just because you know X, does not mean you know Y.
Don’t put people down for asking questions, even basic ones.
See Dunning Kruger effect.

### ⚙ Operating Rules

1.
2. Respect each other. Talk to each other the way you would in real life or being recorded.
3. Allow others the time to speak.
4. Bring what you have done in the community this week.
5. Do the assignment if one was assigned.
6. NO talking about price.
7. NO talking about the value of Ethereum or Bitcoin.
We are focused on building things, not being bogged down in arguments of value. If you have questions, comments or concerns add ONLY new ideas or questions to this document here.

### 🎟 Membership

**Membership** is based on having weekly **active works** within the Ethereum community and related technologies.

Some examples works/contributions for membership:
1. Code: personal or open-source
2. Learning about Ethereum and then applying this learning in a concrete form
3. Content generation
4. Evangelism
5. Meme building
6. Presentation of topic related to the ecosystem.
7. Trading your own accounts in DeFi
8. Active interaction with tools based on Ethereum and related communities not mentioned here.

#### Member introductions

Our goal is to build rapport, get to the agenda AND finish on time.

1. Keep to 30 seconds MAX.
2. Only those who did something in the community may introduce themselves.
3. ALL introductions will happen in the chat upon entering video chat to keep things moving along.

#### Meetup Townhall Introduction Template

When the meetup starts, please write your introduction in the chatbox. That way everyone can refer to it later if needed.

Hi, my name is [NAME]
I did [X THING IN COMMUNITY THIS WEEK]
My background is in [BREIFLY DESCRIBE BACKGROUND]
My skills are in [DESCRIBE SKILLS]
I can help with [THING]
I need help with [THING]
I would like to learn [TOPIC]
Next week I will do [X THING]
A fun fact about me is [FUN FACT]

Once your introduction is written, you can quickly introduce yourself with your name and fun fact, so the team can match a name to a face.


text:
[![CircleCI](https://circleci.com/gh/ReachFive/identity-ios-sdk/tree/master.svg?style=svg)](https://circleci.com/gh/ReachFive/identity-ios-sdk/tree/master)
[![Download](https://img.shields.io/cocoapods/v/IdentitySdkCore.svg?style=flat) ](https://cocoapods.org/pods/IdentitySdkCore)

# ReachFive Identity iOS SDK

## Cocoapods pods

- [IdentitySdkCore](https://cocoapods.org/pods/IdentitySdkCore)
- [IdentitySdkWebView](https://cocoapods.org/pods/IdentitySdkWebView)
- [IdentitySdkFacebook](https://cocoapods.org/pods/IdentitySdkFacebook)
- [IdentitySdkGoogle](https://cocoapods.org/pods/IdentitySdkGoogle)

## Installation

Refer to the [public documentation](https://developer.reachfive.com/sdk-ios/index.html) to install the SDKs and to initialize your ReachFive client.

## Demo application

In addition to the libraries, we provide in the `Sandbox` directory a simple iOS application which integrates the ReachFive SDKs.

Install [Cocoapods](https://cocoapods.org).

```sh
sudo gem install cocoapods

cd Sandbox
pod install

open Sandbox.xcworkspace

pod update
```

### Configure the Sandbox

#### Configure your account

On https://developer.apple.com/account, create an Identifier for an App ID.
Choose a `bundle ID`.

To use the full extent of the Sandbox app features, select the `Associated Domains` and `Sign In with Apple` capabilities.

On XCode, connect your account.

In the navigator area, select `Sandbox` at the root, then in the editor area, in `Targets` select `Sandbox` (which should be selected by default) then "Signing & Capabilities".

Fill in your `bundle ID`.
Add the `Associated Domains` and `Sign In with Apple` capabilities.

Configure the associated domains as explained below.

##### Configure the associated domains
In Domains, enter `webcredentials:domain`.

The domain must be the same as in the `SdkConfig`, so for example `webcredentials:integ-sandbox-squad2.reach5.dev`.

If you use a private web server, which is unreachable from the public internet, you can also enable the alternate mode feature by appending `?mode=<alternate mode>`.

So for example `webcredentials:integ-sandbox-squad2.reach5.dev?mode=developer`

cf. https://developer.apple.com/documentation/xcode/supporting-associated-domains

#### Connect to your backend
You also need to set the ReachFive client configuration within the SDK as below:

```
SdkConfig(
  domain: "my-reachfive-url",
  clientId: "my-reachfive-client-id"
)
```

For example:
```
SdkConfig(
    domain: "integ-sandbox-squad2.reach5.dev",
    clientId: "zhU43aRKZtzps551nvOM"
)
```

By default, the URL scheme follows this pattern: `reachfive-${clientId}://callback`.
You can also specify it manually.

#### Configure your backend

The client that you just referenced must be a `First-party client` with `Token Endpoint Authentication Method` at `None`.

You must have the scheme registered in `Allowed Callback URLs`.

You should also enforce PKCE and enable Refresh Tokens.

If you want to use Passkeys, you must have the `Webauthn` feature activated on your account, and add your domain in `Allowed Origins` like this: `https://integ-sandbox-squad2.reach5.dev`.

Note the `https://` here that was not present in the `SdkConfig`.

#### Run Sandbox on a real device
To run your app on a device and not just the simulator (to use Passkeys for example), you need to enable "Developer Mode".

On iPhone, iPad, go to Settings > Privacy & Security > Developer Mode.

On a Mac, run in your terminal:
```shell
swcutil developer-mode -e true
```

## Documentation

You'll find the documentation of the methods exposed on https://developer.reachfive.com/sdk-ios/index.html.

## Changelog

Please refer to [changelog](CHANGELOG.md) to see the descriptions of each release.

## License

MIT © [ReachFive](https://reachfive.co/)

repository: ReachFive/identity-ios-sdk

gha_language: Swift

repo_name: ReachFive/identity-ios-sdk


text:
Ti=Accounts Receivable

1.sec=All accounts receivable of each Acquired Company, whether or not reflected on the {_Interim_Balance_Sheet}, represent valid obligations arising from sales actually made or services actually performed in the {_Ordinary_Course_of_Business}.

2.sec=The accounts receivable of each Acquired Company are current and collectible net of the reserve shown on the {_Interim_Balance_Sheet} (which reserve is adequate and calculated consistent with past practice in the preparation of the {_Financial_Statements}).

3.sec=Subject to such reserve, each of the accounts receivable either has been or will be collected in full, without any setoff, expense, or other reduction, within 90 days after the day on which it first becomes due and payable.

4.sec=There is no contest, claim, defense, or right of setoff, other than returns in the {_Ordinary_Course_of_Business}, with respect to any account receivable.

5.sec= {DL.Rep.Seller.AccountsReceivable.Xref} lists and sets forth the aging of all accounts receivable as of the {_Interim_Balance_Sheet} Date.

=[G/Z/para/s5]

repository: CommonAccord/Cmacc-Org

gha_language: CSS

repo_name: CommonAccord/Cmacc-Org


text:
RESTful Antioch
==================

Base url: `https://alexandria.huygens.knaw.nl`

Create a resource
-----------------
```
/resources (POST)
Authorization: auth-token-1234                      # Some token identifying 'nederlab'

{
    "resource": {
        "id": "some-uuid-1",
        "ref": "http://nederlab.nl/titles/some-uuid-1",
        "createdBy": "root",                        # root  when unspecified, may be overridden (unchecked)
        "createdOn": "2015-02-17 07:48:50+01:00"    # now() when unspecified, may be overridden (RFC-3339)
    }
}
```

```
=> 201 (Created)
Location: https://alexandria.huygens.knaw.nl/resources/some-uuid-1
```

Get a resource
--------------
```html
/resources/some-uuid-1 (GET)
Authorization: auth-token-1234
```

```
=> 200 (Ok)

{
    "resource": {
        "id": "some-uuid-1",
        "ref": "http://meertens.knaw.nl/titles/some-uuid-1",
        "annotations": [],
        "createdBy": "root",
        "createdOn": "2015-02-17 07:48:50+01:00"
    }
}
```

Add an annotation
-----------------
```
/resources/some-uuid-1/annotations (POST)
Authorization: auth-token-1234

{
    "annotation": {
        "type": "emotion",
        "uuid": "happy",
        "createdBy": "nederlab-user-1"
    }
}
```

```
=> 201 (Created)
Location: https://alexandria.huygens.knaw.nl/annotations/anno-id-1
```

Get a specific annotation
-------------------------
```
/annotations/anno-id-1 (GET)
Authorization: auth-token-1234
```

```
=> 200 (Ok)

{
    "annotation": {
        "type": "emotion",
        "uuid": "happy",
        "annotations": [],
        "createdBy": "nederlab-user-1",
        "createdOn": "2015-02-17 07:56:04+01:00"
    }
}
```

Get annotations on specific resource
------------------------------------
```
/resources/some-uuid-1/annotations (GET)
Authorization: auth-token-1234
```

```
=> 200 (Ok)

{
    "annotations": [
        {
            "type": "emotion",
            "uuid": "happy",
            "annotations": [],
            "createdBy": "nederlab-user-1",
            "createdOn": "2015-02-17 07:48:50+01:00"
        }
    ]
}
```

Add another annotation
----------------------
```
/resouces/some-uuid-1/annotations (POST)
Authorization: auth-token-1234

{
    "annotation": {
        "type": "emotion",
        "uuid": "cheerful"
    }
}
```

```
=> 201 (Created)
Location: https://alexandria.huygens.knaw.nl/annotations/anno-id-2
```

Get annotations on `some-uuid-1` again
------------------------------------
```
/resources/some-uuid-1/annotations (GET)
Authorization: auth-token-1234
```

```
=> 200 (Ok)

{
	"annotations": [
		{
		    "type": "emotion",
		    "uuid": "happy",
			"annotations": [],
			"createdBy": "nederlab-user-1",
			"createdOn": "2015-02-17 07:48:50+01:00"
		},
		{
		    "type": "emotion",
		    "uuid": "cheerful",
			"annotations": [],
			"createdBy": "root",
			"createdOn": "2015-02-17 08:11:24+01:00"
		}
	]
}
```

Get resource `some-uuid-1` again
--------------------------------
```
/resources/some-uuid-1 (GET)
Authorization: auth-token-1234
```

```
=> 200 (Ok)

{
    "id": "some-uuid-1",
    "ref": "http://meertens.knaw.nl/titles/some-uuid-1",
    "annotations": [
        {
            "type": "emotion",
            "uuid": "happy",
            "annotations": [],
            "createdBy": "nederlab-user-1",
            "createdOn": "2015-02-17 07:48:50+01:00"
        },
        {
            "type": "emotion",
            "uuid": "cheerful",
            "annotations": [],
            "createdBy": "root",
            "createdOn": "2015-02-17 08:11:24+01:00"
        }
    ],
    "createdBy": "nederlab-user-1",
    "createdOn": "2015-02-17 07:48:50+01:00",
    "updatedOn": "2015-02-17 08:11:24+01:00"
}
```

repository: HuygensING/antioch

repo_name: HuygensING/antioch


text:
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: "Tomtom Search Api"
summary: "Search is a RESTful API designed for developers allowing single-line fuzzy search for addresses and POIs. Search assigns a latitude/longitude to a specific address, cross street, geographic feature, or point of interest (POI)."
authors: []
tags: []
categories: []
date: 2020-10-30T23:44:06+03:00

# Optional external URL for project (replaces project detail page).
external_link: ""

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Custom links (optional).
#   Uncomment and edit lines below to show custom links.
# links:
# - name: Follow
#   url: https://twitter.com
#   icon_pack: fab
#   icon: twitter

url_code: ""
url_pdf: ""
url_slides: ""
url_video: ""

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides: ""
---

https://developer.tomtom.com/search-api

TomTom has a broad list of location technology products. One major group is the search product unit responsible for providing online search services on the top of maps data.

I've been working on the search product unit to provide extended search APIs to the customers. Those APIs cover a list of different capabilities, including parking space availability, fuel prices, electric vehicle charging station availability, and rich data services. All of these products are available worldwide via highly available, distributed, resilient cloud deployments located on multiple geographical regions to serve low latency APIs to the customers. These services are being used by cars and Azure maps back end and developers who have acquired the developer API key via the TomTom developer portal.

I developed four new microservices from scratch and was responsible for the products from end to end—starting from software design to final deployment including on-call duty. I've made a remarkable impact on the cost optimization of the cloud environment without sacrificing service availability.


text:
# common

![Version: 10.3.1](https://img.shields.io/badge/Version-10.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Bedag's common Helm chart to use for creating other Helm charts

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| SRE |<EMAIL_ADDRESS>|  |

## Source Code

* <https://github.com/bedag/helm-charts/tree/master/charts/common>

# Major Changes

Major Changes to functions are documented with the version affected. **Before upgrading the dependency version, check this section out!**

| **Change** | **Chart Version** | **Description** | **Commits/PRs** |
| :----------- | :---------------- | :--------------------- | :-------------- |
|logPersistence removed|8.0.0|Removes logPersistence functionality as it can be achieved with volumeMounts & extraVolumeClaimTemplates and is buggy anyway.|https://github.com/bedag/helm-charts/pull/68|
|networkpolicy template changes|9.0.0|add possibility to define more than one Port in networkpolicy|https://github.com/bedag/helm-charts/pull/70|
|networkpolicy template changes|10.0.0|add possibility to create multiple networkpolicies|https://github.com/bedag/helm-charts/pull/77|

# Values by Component

## Ingress

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| ingress.annotations | object | `{"nginx.ingress.kubernetes.io/ssl-redirect":"true"}` | annotations is a dictionary for defining ingress controller specific annotations |
| ingress.deploy | bool | `false` | deploy has to be set to true for rendering to be applied |
| ingress.ingressClassName | string | `""` | ingressClassName, defines the class of the ingress controller. |
| ingress.rules | list | `[{"host":"myapp.cluster.local","http":{"paths":[{"backend":{"serviceNameSuffix":"component-1","servicePort":"http"},"path":"/","pathType":"ImplementationSpecific"}]}}]` | rules is a list of host rules used to configure the Ingress |
| ingress.rules[0] | object | `{"host":"myapp.cluster.local","http":{"paths":[{"backend":{"serviceNameSuffix":"component-1","servicePort":"http"},"path":"/","pathType":"ImplementationSpecific"}]}}` | host is the URL which ingress is listening |
| ingress.rules[0].http | object | `{"paths":[{"backend":{"serviceNameSuffix":"component-1","servicePort":"http"},"path":"/","pathType":"ImplementationSpecific"}]}` | http is a list of http selectors pointing to backends |
| ingress.rules[0].http.paths | list | `[{"backend":{"serviceNameSuffix":"component-1","servicePort":"http"},"path":"/","pathType":"ImplementationSpecific"}]` | paths is a list of paths that map requests to backends |
| ingress.rules[0].http.paths[0] | object | `{"backend":{"serviceNameSuffix":"component-1","servicePort":"http"},"path":"/","pathType":"ImplementationSpecific"}` | backend defines the referenced service endpoint to which the traffic will be forwarded to |
| ingress.rules[0].http.paths[0].backend.serviceNameSuffix | string | `"component-1"` | serviceNameSuffix describes the suffix of the serviceName |
| ingress.rules[0].http.paths[0].backend.servicePort | string | `"http"` | servicePort describes the port where the service is listening at (can be either a string or a number) |
| ingress.rules[0].http.paths[0].path | string | `"/"` | path which ingress is listening |
| ingress.rules[0].http.paths[0].pathType | string | `"ImplementationSpecific"` | pathType Each path in an Ingress is required to have a corresponding path type. Comment out for using default ("ImplementationSpecific") |
| ingress.tls.existing.secret | string | `""` | name of an existing secret with tls.crt & tls.key content |
| ingress.tls.provided.cert | string | `""` | If SSL is terminated on ingress and you have a generated (preferrably CERT-001) certificate/key Has to be base64 encoded and should be encrypted in the ejson vault Add Variable to your CI/CD Settings "SKIP_DECRYPT" with value "" that it doesnt decrypt the cert and fails. |
| ingress.tls.provided.key | string | `""` | The key must not have a passphrase |
| ingress.tls.self | object | `{"alternativeDnsNames":[],"commonName":"*.cluster.local","ipAddresses":[],"validityDuration":365}` | depending on the type you have further configuration options: |
| ingress.tls.self.alternativeDnsNames | list | `[]` | alternativeDnsNames is an optional list of DNS names to add in the Subject Alternative Names (SAN) sectiom |
| ingress.tls.self.commonName | string | `"*.cluster.local"` | commonName of the certificate (mandatory) |
| ingress.tls.self.ipAddresses | list | `[]` | ipAddresses is an optional list of IP addresses to add in the Subject Alternative Names (SAN) section |
| ingress.tls.self.validityDuration | int | `365` | validityDuration defines how long the certificate is valid (in days) |

## ServiceMonitor

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| servicemonitor.basicAuth | object | `{"enabled":false,"existingSecret":"","newSecret":{},"passwordKey":"password","userKey":"username"}` | basicAuth is a dictionary for defining values for setting up basic Authentication |
| servicemonitor.basicAuth.enabled | bool | `false` | enabled when set to 'true', adds basic authentication to all endpoints |
| servicemonitor.basicAuth.existingSecret | string | `""` | existingSecret if not empty (""), points to an existing secret (matching name of the resource) |
| servicemonitor.basicAuth.newSecret | object | `{}` | newSecret is a dictionary for defining key/value pairs to be stored in a new secret (See `values.yaml`) |
| servicemonitor.basicAuth.passwordKey | string | `"password"` | passwordKey is the default key to grab the password in the secret |
| servicemonitor.basicAuth.userKey | string | `"username"` | userKey is the default key to grab the username in the secret |
| servicemonitor.deploy | bool | `false` | deploy has to be set to true for rendering to be applied |
| servicemonitor.endpoints | object | `{}` |  |

repository: brjos/helm-charts

repo_name: brjos/helm-charts


text:
# Change Log
All notable changes to the "rcs" extension will be documented in this file.

## [Unreleased]

## [0.0.2] - 2018-01-04

* Initial release
* List files locked by the user
* List files locked by other users
* Show changes as compared to the head.
* Commit changes
* Automatically prevent edits to locked files and offer to unlock them

## [0.0.3] - 2018-01-04

* Updated readme and documentation

repository: nmsantron/vs-code-rcs

repo_name: nmsantron/vs-code-rcs


text:
---
layout: post
title: Network Centrality and Robustness
---
## Introduction
A system is robust if the failure of some components doesn't affect its function. As network engineers, we face various types of network
failures like link, node failures all the time.

Generally, we use various Network modeling tools like Cariden(WAE), WANDL, etc. to model failures and see how the network reacts
under a given failure condition. The components which are in play are:

1. Type and Number of failures. Type: Link, Node. Number of Failures: Single or Double.
2. Routing protocols running on top of the network and there reaction to the failure. Example: RSVP-TE, Pure IGP, SR-TE etc.
3. Network flows and their volume.
4. Network Topology.

In this blog post, we will focus purely on #4 Network topology and certain characteristics of topology, which may make them more
robust than other topologies.

## Key Idea
The network topology may have some critical nodes. If we can identify them and take them out of the service, they will significantly
impact the functionality of the network. For example, in the case of a Hub and Spoke topology, if a Hub is out of service, it affects
all the spokes vs. a spoke out of service. We can make this hub and spoke topology more robust if we have multiple hubs, which means
we don't have a single node that is the most critical.

So this brings the question: How do we identify important nodes in a topology? This brings to our next topic i.e. Centrality measures.

## Centrality Measures

The importance of a node or link is identified by computing its centrality. The higher the score, the more critical is the node. There
are several ways to compute Centrality:

1. Degree
2. Closeness
3. Betweenness

For our example, we will follow the below sample topology. The graph computed is a directed graph with weight=1. In reality,
weights will be different based on the IGP cost representing latency, but I have skipped that detail here.

![Sample Topology](/images/post7/backbone_topo.png "Topology")

### Degree
As we know, the degree of a node is the number of nodes it's connected to. The intuition here is that if a node is connected to a lot of
other nodes, then it must be an important node.

If we look at the degree distribution of our sample topology, there are 10 nodes with degree 2 and 8 nodes with degree 3. Below is a
histogram of that.

```python
degree_sequence = [G.degree(n) for n in G.nodes]
from collections import Counter
degree_counts = Counter(degree_sequence)

fig, ax = plt.subplots(figsize=(15,6))
plt.title('Degree Distribution', fontsize=16)
plt.xlabel('Degree', fontsize=16)
plt.ylabel('Count', fontsize=16)
plt.bar(range(len(degree_counts)), list(degree_counts.values()), width=.5,align='center',)
_ = plt.xticks(range(len(degree_counts)), list(degree_counts.keys()))
```

![Degree Distribution](/images/post7/degree_distribution.png "Degree Distribution")

### Closeness
Another way to measure the centrality of a node is by determining how close it is to other nodes. This can be computed by summing the
distances from the node to all others. If the distances are short on average, their sum is a smaller number, and we can say that
the node has high centrality.

Closeness centrality is defined by

$$
g_{i} = \frac{1}{\sum_{j\neq i}l_{ij}}
$$

where $l_{ij}$ is the distance from i to j and the sum runs over all the nodes.

If we look at the Closeness centrality of our sample topology, seems like DFW1, DFW2 and DEN2 are the top three. Below is a
histogram of that.

![Closeness Centrality](/images/post7/closeness_centrality.png "Closeness Centrality")

### Betweenness
The general idea here is that a node is more central, the more often its involved. The simplest way to calculate is to calculate
the shortest path from each node to every other node. The centrality is computed by counting how many times a node shows up in
those shortest paths. The higher the count of node, the more traffic it controls.

$$
b_{i} = \sum_{h\neq j \neq i}\frac{\sigma_{hj}(i)}{\sigma_{hj}}
$$

```python
bc = nx.betweenness_centrality(G)
fig, ax = plt.subplots(figsize=(18,8))
plt.title('Betweenness Centrality', fontsize=16)
plt.xlabel('Nodes', fontsize=16)
plt.ylabel('Betweenness Centrality', fontsize=16)
plt.bar(range(len(bc)), list(bc.values()),align='center')
_ = plt.xticks(range(len(bc)), list(bc.keys()))
```

In case of betweenness centrality, dfw1 and dfw2 stand out the most.

![Betweenness Centrality](/images/post7/betweenness_centrality.png "Betweenness Centrality")

## Robustness
The standard way to check the robustness is by seeing how connected the graph is when we start removing the nodes. Removal of nodes
can be either random or systematic. To estimate the disruption following a node removal, we compute the relative
size of the giant component i.e. ratio of the number of nodes in the giant component to the number of nodes initially present in the network.

Assuming a connected graph, when we start initially, the whole graph is one giant component. If removing a subset of nodes does
not break the graph into two disconnected graphs, then the proportion of the nodes in the giant component gets reduced by the number of removed nodes.
If, however, the node removal breaks the network into two or more connected graphs, the size of the giant
component may drop substantially.

Testing the robustness of the sample topology by removing 2 nodes with highest degree.

```python
N = G.number_of_nodes()   # No. of nodes are 18
number_of_steps = 8       # How many iterations we want to perform.
M = N // number_of_steps  # M = 2 here. This means we will take two nodes at a time.

num_nodes_removed = range(0, N, M) # Number of nodes to be removed.
C = G.copy()                       # Make a copy of the graph
targeted_attack_core_proportions = [] #list to capture the results
for nodes_removed in num_nodes_removed: #Let's iterate over the nodes
    # Measure the relative size of the network core
    core = next(nx.connected_components(C)) #Compute the connected component
    core_proportion = len(core) / N         #Core_proportion
    targeted_attack_core_proportions.append(core_proportion)

    # If there are more than M nodes, select top M nodes and remove them
    if C.number_of_nodes() > M:          #if the number of nodes left is greater than 2
        nodes_sorted_by_degree = sorted(C.nodes, key=C.degree, reverse=True) #Get the highest degree nodes
        nodes_to_remove = nodes_sorted_by_degree[:M] # Get two nodes
        C.remove_nodes_from(nodes_to_remove)         # Remove the nodes

fig, ax = plt.subplots(figsize=(15,6))
plt.title('Targeted attack', fontsize=16)
plt.xlabel('Number of nodes removed',fontsize=16)
plt.ylabel('Proportion of nodes in core',fontsize=16)
plt.plot(num_nodes_removed, targeted_attack_core_proportions, marker='o')
```

What we observe is that once we removed two nodes in the first iteration, the proportion of the nodes left in the giant are around 72%

![Targeted_attack](/images/post7/targeted_attack.png "Targeted Attack")

After removing `sea2` and `lax1` we see that the left side of the graph is isolated.

![Removed_Nodes](/images/post7/removed_nodes.png "Removed Nodes")

### Summary
We looked at various centrality measures and then looked at application of degree centrality to check the robustness of the graph.

In large networks, it is necessary to use statistical tools to analyze the global features of the network. These tools can also help
in comparing various topologies. I hope you get something useful out of this post.


text:
# My-Camera-app

This is a camera app built by using Browser API and Document Object Model(DOM)

[www.WebcamX.com](https://bhardwajpriyam9.github.io/My-Camera-app/)

## Screenshots

![cam1](https://user-images.githubusercontent.com/65944388/122665293-01dd2f00-d1c4-11eb-80b5-1dabda6d4ff7.PNG)

![cam2](https://user-images.githubusercontent.com/65944388/124276855-fa256f00-db61-11eb-87e6-88625ccc89f1.PNG)

![Cam3](https://user-images.githubusercontent.com/65944388/124276898-07daf480-db62-11eb-8f84-e6170acd3424.PNG)

## Tech/Frameworks used
This application was built with:

- [Vanilla JS](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
- [Browser API](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Introduction)
- [VS Code](https://code.visualstudio.com/docs)

## Installation

**Prerequisite** - Install VS-Code on your device or any other code editor of your choice.
Fork the project & fire up a terminal to enter the following command:
```
$ git clone git@github.com:<username>/My-Camera-app.git

```
cd into the project folder using:
```
$ cd ./My-Camera-app/
```
To open the project in Visual Studio Code, enter:
```
$ code .
```
This will open up the project directory in your vs code.

Finally, run the project via live server or opening index.html directly in browser.

## How to use?

- Click 🔴 button to record your Videos.
- Click ⚪ button to capture your photos.
- Apply filters to your photos.
- Use zoom-in and zoom-out buttons.
- You can also click on the "Gallery" Button to download your photos and videos.

## Licence

This project is licensed under the terms of the MIT license.


text:
### Life, the Universe, and Everything

Your program is to use the brute-force approach in order to *find the Answer to Life, the Universe, and Everything*. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.

**Example**

Input:
1
2
88
42
99

Output:
1
2
88

repository: liupangzi/codekata

repo_name: liupangzi/codekata


text:
#To build the code :
mkdir build

cd ./build

cmake ..

make

#How to run the code :

cd ./build

./ceres_customBundle -input ../data/problem-.....txt

#see more detail settings by :
./ceres_customBundle -help

BUG!!!

Please comment this code line out

/home/phillweston/git-repository/slambook/ch10/ceres_custombundle/ceresBundle.cpp:17:14: error:
      no member named 'num_linear_solver_threads' in 'ceres::Solver::Options'
    options->num_linear_solver_threads = params.num_threads;

    ~~~~~~~  ^
1 error generated.
    ~~~~~~~

repository: Phillweston/slambook

repo_name: Phillweston/slambook


text:
# Container design

OASIS service is a micro service based on OSRM core.

For how to preprocess OASIS data and deploy service, please go to [`here`](../docker-orchestration/osrm-api-oasisd/README.md).

repository: qingyel/osrm-backend

repo_name: qingyel/osrm-backend


text:
![ExpressJS 4 Starter](https://github.com/aredo/express4-bootstrap-starter/raw/master/public/apple-touch-icon-144-precomposed.png)

ExpressJS 4 Starter
==========================
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/aredo/express4-bootstrap-starter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Lightweight Bootstrap NodeJS Apps Build Using ExpressJS 4, MongoDB/Mongoose, Authentication with Passport.js, Jade and GruntJS as Task Automation

[![Build Status](https://travis-ci.org/aredo/express4-bootstrap-starter.svg?branch=master)](https://travis-ci.org/aredo/express4-bootstrap-starter)
[![Dependencies Status](https://david-dm.org/aredo/express4-bootstrap-starter.png)](https://david-dm.org/aredo/express4-bootstrap-starter)
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)

## Install

### Prerequisites
- Node.js - Download and Install Node.js with [NVM](https://github.com/creationix/nvm) (Node Version Manager) - Simple bash script to manage multiple active node.js versions.
- MongoDB - Download and Install [MongoDB](http://www.mongodb.org/) - Make sure it's running on the default port.

### Tool Prerequisites

- [NPM](https://npmjs.org) - Node.js package manager, should be installed when you install node.js. NPM (Node Package Manager) will look at the [package.json](https://github.com/jpotts18/mean-stack-relational/blob/master/package.json) file in the root of the project and download all of the necessary dependencies and put them in a folder called ```node_modules```
- [Genghis](http://genghisapp.com/) - The single-file MongoDB admin app

### Javascript Tools Used
- [Grunt](http://gruntjs.com/) - In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. After you've configured it, a Grunt can do most of that mundane work for you—and your team—with basically zero effort.

**NOTE:**
After installing  Node.js and MongoDB server has running, then its time to run your server (this app!).

```
  $   git clone git@github.com:aredo/express4-bootstrap-starter.git       \
  &&  cd express4-bootstrap-starter                                       \
  &&  npm install                                                         \
  &&  cp app/config/config.example.js app/config/config.js                \
  &&  grunt                                                               \
  &&  open http://localhost:3001/
```

Then visit [http://localhost:3001/](http://localhost:3001/) (if not taken automatically)

### NPM Modules Used
- [Express](http://expressjs.com/) - Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.
- [Passport](http://passportjs.org/) - Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more.
- [Mongoose](mongoosejs.com/docs/api.html) - Elegant [MongoDB](http://www.mongodb.org/) object modeling for **Node.JS**. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.
- [LESS.JS](http://lesscss.org/) - Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.

### Directory structure

```
-app/
  |__config/
  |__controllers/
  |__helper
  |__models/
  |__mailer/
  |__views/
  |__routes

-public/
  |__css (all files will generate from Grunt)
  |__js
  |__less
  |__fonts
  |__img
  favicon.ico
-Grunfile.coffee
```

# Troubleshooting

During install some of you may encounter some issues feel free to contact me [@hengkiardo](http://twitter.com/hengkiardo) or submit [issue](https://github.com/aredo/express4-bootstrap-starter/issues). via the repository issue tracker or the links provided below. I am also available on twitter [@hengkiardo](http://twitter.com/hengkiardo).