text:
[![Build Status](https://img.shields.io/travis/josegonzalez/cakephp-wysiwyg/master.svg?style=flat-square)](https://travis-ci.org/josegonzalez/cakephp-wysiwyg)
[![Coverage Status](https://img.shields.io/coveralls/josegonzalez/cakephp-wysiwyg.svg?style=flat-square)](https://coveralls.io/r/josegonzalez/cakephp-wysiwyg?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/josegonzalez/cakephp-wysiwyg.svg?style=flat-square)](https://packagist.org/packages/josegonzalez/cakephp-wysiwyg)
[![Latest Stable Version](https://img.shields.io/packagist/v/josegonzalez/cakephp-wysiwyg.svg?style=flat-square)](https://packagist.org/packages/josegonzalez/cakephp-wysiwyg)
[![Documentation Status](https://readthedocs.org/projects/cakephp-wysiwyg/badge/?version=latest&style=flat-square)](https://readthedocs.org/projects/cakephp-wysiwyg/?badge=latest)
[![Gratipay](https://img.shields.io/gratipay/josegonzalez.svg?style=flat-square)](https://gratipay.com/~josegonzalez/)

# Wysiwyg Helpers Plugin 2.0

Include Wysiwyg Editors quickly and easily

## Background

I've been on a small refactoring spree as part of my work on Marcy Avenue. I realize, after years of working with Joomla and Wordpress, that people prefer different WYSIWYG editors. So to alleviate this, I am attempting to build a set of CakePHP helpers for each of the major WYSIWYG editors on the market, and as many small ones as possible.

The plugin also allows you to automatically change from one WYSIWYG Editor to another when using the WysiwygHelper and configuring it in the controller. You may also change the Editor within the view.

## Requirements

* CakePHP 2.x

## Installation

Download the JS distribution of your editor of choice and install it in your js folder.

_[Using [Composer](http://getcomposer.org/)]_

Add the plugin to your project's `composer.json` - something like this:

	{
		"require": {
			"josegonzalez/cakephp-wysiwyg": "dev-master"
		}
	}

Because this plugin has the type `cakephp-plugin` set in it's own `composer.json`, composer knows to install it inside your `/Plugins` directory, rather than in the usual vendors file. It is recommended that you add `/Plugins/Upload` to your .gitignore file. (Why? [read this](http://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).)

_[Manual]_

* Download this: [https://github.com/josegonzalez/cakephp-wysiwyg/zipball/master](https://github.com/josegonzalez/cakephp-wysiwyg/zipball/master)
* Unzip that download.
* Copy the resulting folder to `app/Plugin`
* Rename the folder you just copied to `Wysiwyg`

_[GIT Submodule]_

In your app directory type:

    git submodule add git://github.com/josegonzalez/cakephp-wysiwyg-helper.git Plugin/Wysiwyg
    git submodule init
    git submodule update

_[GIT Clone]_

In your plugin directory type

    git clone git://github.com/josegonzalez/cakephp-wysiwyg-helper.git Wysiwyg

### Enable plugin

In 2.0 you need to enable the plugin your `app/Config/bootstrap.php` file:

    CakePlugin::load('Wysiwyg');

If you are already using `CakePlugin::loadAll();`, then this is not necessary.

## Usage

### Available Helpers

> The default editor is Tinymce

To use any of these helpers, you should create a folder in the `web/js` folder which is named the lowercase version of your editor of choice. This folder should contain the entire distribution of files necessary for your editor to be in use. For example, the `NiceditHelper` requires the `web/js/nicedit/nicEdit.js` and `web/js/nicedit/nicEditorIcons.gif` files.

To configure where these files exist, please see the helper code.

* CKEditor (Wysiwyg.Ck)
* Jwysiwyg (Wysiwyg.Jwysiwyg)
* Markitup (Wysiwyg.Markitup)
* Nicedit (Wysiwyg.Nicedit)
* TinyMCE (Wysiwyg.Tinymce)

### Using the Generic WyswigHelper

Add the following to the controller where you'd like to use your preferred editor. You can omit the parameters if you like, the default editor is `tinymce`:

    public $helpers = array('Wysiwyg.Wysiwyg' => array('editor' => 'Ck'));

Replace your textarea inputs with either of the following:

    echo $this->Wysiwyg->input('ModelName.fieldName', $inputOptions, $helperOptions);
    echo $this->Wysiwyg->textarea('ModelName.fieldName', $inputOptions, $helperOptions);

Array Options for the FormHelper are contained in the second parameter, while the third parameter contains and array of options for the editor

You can also change the editor within the view. Changes come into affect for the proceeding editor:

    $this->Wysiwyg->changeEditor('Nicedit', $helperOptions);

At this point, everything should theoretically work.

### Other Helpers

If hardcoding your editor, you can do the following in your Controller:

    <?php
    class AppController extends Controller {

      public $helpers = array('Wysiwyg.Nicedit');

    }

Then usage in your views is as follows:

    echo $this->Nicedit->input("ModelName.fieldName");

    echo $this->Nicedit->textarea("ModelName.fieldName");

### Settings

Most editors take a javascript object as settings. The WysiwygHelper allows you to specify optional settings in three ways.

#### Special settings

The following are special settings that are used internally by the `Wysiwyg` plugin

- `_buffer`: A boolean for whether we should buffer input transformation js
- `_css`: An array of css files to buffer
- `_cssText`: A text string containing relevant css
- `_editor`: The editor class. Used only when you specify the `Wysiwyg.Wysiwyg` helper
- `_scripts`: An array of scripts to buffer
- `_scriptBlock`: Override which block the scripts will be added to
- `_inline`: Prints js in script block insted of next to input. Default: true

These will be ignored when passing settings onto the wysiwyg javascript you are configuring.

#### Via Controller Setup

This mode results in all non-special settings being set as defaults for every instantiation of the Wysiwyg editor areas.

    <?php
    class AppController extends Controller {
        public $helpers = array(
            'Wysiwyg.Wysiwyg' => array(
                '_editor' => 'Tinymce',
                'theme_advanced_toolbar_align' => 'right',
            )
        );
    }

#### Via ->changeEditor()

The second argument on `Wysiwyg->changeEditor()` can also be used to completely override any already set defaults:

    echo $this->Wysiwyg->changeEditor('Tinymce', $helperOptions);

#### Via ->updateSettings()

A call `->updateSettings()` can be used to completely override any already set defaults:

    echo $this->Wysiwyg->updateSettings($helperOptions);

    echo $this->Tinymce->updateSettings($helperOptions);

You can also retrieve currently set editor settings by calling `->getSettings()`:

    $settings = $this->Wysiwyg->getSettings();

#### Via Helper Call

Both `->input()` and `->textarea()` calls accept a third argument array, `$helperOptions`, which may be used to configure the helper. These are merged onto any defaults that have been specified:

    echo $this->Wysiwyg->input('Post.body', $inputOptions, $helperOptions);

    echo $this->Wysiwyg->textarea('Post.body', $inputOptions, $helperOptions);

## TODO:

* Better code commenting
* Figure out how to include the JS distributions
* Enable file-uploading using whatever is native to the editor
* Refactor where possible
* Create a WysiwygHelper that will auto-create the type of helper you want based upon settings given to the view~~~
* Tests

## License

The MIT License (MIT)

Copyright (c) 2009 Jose Diaz-Gonzalez

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: josegonzalez/cakephp-wysiwyg

extension: markdown

gha_language: PHP

repo_name: josegonzalez/cakephp-wysiwyg


text:
Logging

- [Overview](#overview)
- [Logged Events](#logged-events)
  - [Error Events](#error-events)
  - [Info Events](#info-events)
  - [Debug Events](#debug-events)
  - [Event Fields](#event-fields)
- [Usage](#usage)
- [Framework](#framework)
- [External Configuration](#external-configuration)
- [Custom Configuration](#custom-configuration)
- [Native Support](#native-support)
- [Legacy Support](#legacy-support)
  - [Logrus](#logrus)
  - [Pkg logger](#pkg-logger)

# Overview

Sysl-go comes equipped with flexible, out-of-the-box logging support.
The following sections describe what gets logged and how the logger can be configured and utilised within custom code.

# Logged Events

Sysl-go logs the following major categories and fields:

## Error Events

Sysl-go logs all errors encountered within the running on an application.
Examples include timeout errors, marshalling errors and errors encountered in custom code.

## Info Events

Sysl-go logs all information for the purpose of understanding the state of the application and its requests.
Examples include the server configuration on startup and the state of upstream and downstream requests.

## Debug Events

Sysl-go logs verbose information for the purpose of debugging.
Examples include JWT authorisation failures and request and response payloads (see [External Configuration](#external-configuration) below).

## Event Fields

Sysl-go includes attaches additional field values to some of its logs.
The following notable fields are attached:

| Field | Details |
|---|---|
| `traceid` | HTTP: Identifier retrieved from `RequestID` header or uniqely generated for the purpose of tracing a request. |
| `remote` | HTTP: The remote address of a downstream request. |
| `latency` | The time required to fulfil a request. |

## Errors

Sysl-go logs all errors encountered within the running on an application.

# Usage

Sysl-go utilises the `context.Context` to store the logger for use throughout the application.
Anywhere that a context can be found, a log can be sent to the centralised logger:

```go
import ( "github.com/anz-bank/sysl-go/log" )

log.Info(ctx, "Hello world")
```

In some instances it is desirable to attach additional information to all logs that utilise a given context:

```go
ctx = log.WithStr(ctx, "server_name", "great_pineapple")
log.Info(ctx, "Server started") // Log includes server name
...
ctx = log.WithInt(ctx, "request_id", request.id)
log.Info(ctx, "Request received") // Log includes both server name and request id
```

# Framework

Sysl-go respects that different teams want to use different logging solutions and that Sysl-go shouldn't prevent you from doing as such.
In order to achieve this, the logging framework within Sysl-go is designed around the `log.Logger` interface that acts as a wrapper around concrete logging implementations.

Out-of-the-box Sysl-go supports the following logging implementations:
- [Logrus](https://github.com/sirupsen/logrus)
- [Pkg](https://github.com/anz-bank/pkg/tree/master/log)
- [ZeroPkg](https://github.com/anz-bank/pkg/tree/master/logging)

By default, the [Pkg](https://github.com/anz-bank/pkg/tree/master/log) logger is used within Sysl-go.
To use a different logger or to configure the logger beyond the log level, see [Custom Configuration](#custom-configuration) below.

# External Configuration

Sysl-go applications are configured through an external configuration file.
The logger can be configured to record logs at or above a particular level:

```yaml
library:
  log:
    level: debug # one of error, info, debug
```

Another configurable value provides the ability to log the contents of requests and responses:
```yaml
library:
  log:
    logPayload: true # include payload contents in log messages
```

# Custom Configuration

By default, the [Pkg](https://github.com/anz-bank/pkg/tree/master/log) logger is used within Sysl-go.
To use a different logger or to configure the logger beyond the log level, add a custom `Logger` hook to the `Hooks` structure that builds and returns a customised logger.

The following example demonstrates the use of a customised Logrus logger:

```go
func newAppServer(ctx context.Context) (core.StoppableServer, error) {
	return example.NewServer(ctx,
		func(ctx context.Context, config AppConfig) (*example.ServiceInterface, *core.Hooks, error) {
			return &gateway.ServiceInterface{
					...
				}, &core.Hooks{
				    Logger: func() log.Logger {
                        logger := logrus.New()
                        logger.Formatter = &logrus.JSONFormatter{}
                        return anzlog.NewLogrusLogger(logger)
                    }
                }, nil
		},
	)
}
```

The returned logger will have the log level applied from the [configuration file](#configuration-file) by Sysl-go internally.

# Native Support

Some logging implementations provide their own mechanism to interact with the `context.Context`.
For example, the [Pkg](https://github.com/anz-bank/pkg/tree/master/log) logger can be used directly:

```go
import ( pkglog "github.com/anz-bank/pkg/log" )
ctx = pkglog.With("key", "value").Onto(ctx)
pkglog.Info(ctx, "Hello world")
```

The Sysl-go logging framework understands this and so the implementation works seamlessly whether you access the logger natively or through the wrapper:

```go
import (
    pkglog "github.com/anz-bank/pkg/log"
    "github.com/anz-bank/sysl-go/log"
)
ctx = pkglog.With("key", "value").Onto(ctx) // Put a key/value into the context
pkglog.Info(ctx, "Native") // Native call, includes key/value pair
log.Info(ctx, "Wrapped") // Wrapped call, also includes key/value pair
```

# Legacy Support

Sysl-go has gone through two iterations of logging.
The first iteration enforced the use of [Logrus](https://github.com/sirupsen/logrus).
The second iteration replaced Logrus with the [Pkg](https://github.com/anz-bank/pkg/tree/master/log) logger, providing a hook mechanism to route logs back through Logrus for backwards compatibility.

With the introduction of the new logging framework, backwards compatible support of both Logrus and the Pkg logger is provided seamlessly, however upgrading to the approach described in the [Custom Configuration](#custom-configuration) is recommended:

## Logrus

```go
import (
    "github.com/sirupsen/logrus"
    "github.com/anz-bank/sysl-go/log"
)
ctx := common.LoggerToContext(ctx, logrus.New(), nil) // Put the logger in the context (the legacy approach)
example.NewServer(ctx, ...) // Initialise the server
...
logger := common.GetLoggerFromContext(ctx) // Retrieve the logger from the context
logger.Info(ctx, "Native") // Log natively
log.Info(ctx, "Wrapped") // Log using the wrapper (uses the same Logrus instance)
```

## Pkg logger

```go
import (
    pkglog "github.com/anz-bank/pkg/log"
    "github.com/anz-bank/sysl-go/log"
)
ctx = pkglog.With("key", "value").Onto(ctx) // Initialise the pkg logger (the legacy approach)
example.NewServer(ctx, ...) // Initialise the server
...
pkglog.Info(ctx, "Native")  // Log natively
log.Info(ctx, "Wrapped")  // Log using the wrapper (uses the same pkg values)
```

repository: aries-zhang/sysl-go

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: aries-zhang/sysl-go


text:
# Casbin File Adapter

[![NPM version][npm-image]][npm-url]
[![NPM download][download-image]][download-url]
[![Build Status][ci-image]][ci-url]
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)

[npm-image]: https://img.shields.io/npm/v/casbin-file-adapter.svg
[npm-url]: https://npmjs.org/package/casbin-file-adapter
[download-image]: https://img.shields.io/npm/dm/casbin-file-adapter.svg
[download-url]: https://npmjs.org/package/casbin-file-adapter
[ci-image]: https://github.com/node-casbin/file-adapter/workflows/ci/badge.svg?branch=master
[ci-url]: https://github.com/node-casbin/file-adapter/actions

File Adapter is the file adapter for [Node-Casbin](https://github.com/casbin/node-casbin). It was built into `node-casbin` before version v5.6.1.

With this library, Node-Casbin can load policy from policy file.

## Installation

```bash
yarn add -D casbin-file-adapter

// or

npm install casbin-prisma-adapter --save-dev
```

## Getting Help

- [Node-Casbin](https://github.com/casbin/node-casbin)

## License

This project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.

repository: node-casbin/file-adapter

gha_language: TypeScript

repo_name: node-casbin/file-adapter


text:
# kuberverse

![kuberverse logo](https://raw.githubusercontent.com/arturscheiner/kuberverse/master/logos/kuberverse-logo-h-4096x2304.png)
Hello kubers, welcome to kuberverse repo! This is the place where we publish the files used on our Youtube recording labs!

## Getting Started

Here, you will find instructions on how to get ready with our labs. The labs where written with easy in mind, to help you build and play **kubernetes clusters**. Please, fell free to try them out!!

## System Requirements

### Software

To run the labs you will need to have pre-installed on your computer the latest version of the following softwares:

- [Vagrant](www.vagrantup.com) by Hashicorp
- [Virtualbox](virtualbox.org) by Oracle

### Hardware

The gold rule here is **more is better**. As we will create clusters using virtual machines running on your desk computer or notebook, resources will be needed in the proportion of your use. To be used for study, and using my computer (an old macbook pro late 2012 retina, with a Intel Core i5 processor with 8Gb of memory) as the basis for this labs, I can assure you can run a k8s cluster with 1 master with 2Gb of memory and 2 workers with 1Gb each. This configuration fits almost all of the 6 scenarios of the CKA and the 4 scenarios of CKAD certification exams.

## Available Labs

At this moment we have 3 labs available for you to play with:

1. [The kubeadm Empty Lab](https://github.com/arturscheiner/kuberverse/blob/master/docs/kubeadm/k8s-kubeadm-base.md)
2. [The kubeadm Half Lab](https://github.com/arturscheiner/kuberverse/blob/master/docs/kubeadm/k8s-kubeadm-pre-cni.md)
3. [The kubeadm Full Lab with Calico Flavor](https://github.com/arturscheiner/kuberverse/blob/master/docs/kubeadm/k8s-kubeadm-calico-full-cluster-bootstrap.md)

### The kv-k8s-kubeadm labs

As anounced in *december 03, 2018* by the **kubernetes release team** in the [Kubernetes 1.13 Announcement Blog Post](https://kubernetes.io/blog/2018/12/03/kubernetes-1-13-release-announcement/), **kubeadm** is officialy GA. That means a unified and simplified method to deploy k8s clusters without the need to go manually over the steps of configuring individually each component. The scope of **kubeadm** is to be a toolbox for both admins and automated, higher-level system.

The templates presented here are focused on _local environments_ to be used in a way to help you build k8s clusters with **kubeadm**. Let´s go through the available labs for this scenario.

#### k8s-kubeadm-base - The kubeadm Empty Lab

This is the **empty lab** created for those who wants to install a k8s cluster using the kubeadm method but wish to do almost all the work manually, running the commands necessary to bring the cluster up on a step-by-step way. This template will create the boxes MASTER and WORKERS, with the base recomended OS image (ubuntu 16.04).

##### Use it if: #####

- you're new to kubernetes and wish to start your first cluster running all the commands needed to create your study cluster environment;
- you like to do stuffs manually ir order to have a deeper understanting of what is happening;

#### k8s-kubeadm-pre-cni - The kubeadm Half Lab

This is the **half lab** created for those who wants to install a k8s cluster using the kubeadm method but wish to optimize time. This template installs automatically all the packages upgrades to the base recomended OS image (ubuntu 16.04). This template also installs the packages for docker, kubernetes and all their dependencies. No kubernetes configuration is done here.

##### Use it if: #####

- you have played already with the first template and have "destroyed" your previous cluster using the _vagrant destroy -f_ command;
- you want just to configure kubernetes but do not want to install the packages manually on each MASTER and WORKER of your setup;
- you want to play with _kubeadm init_ on the masters and _kubeadm join_ on the workers;
- you want to choose your networking settings (calico, flannel, etc)

#### k8s-kubeadm-calico-full-cluster-bootstrap - The kubeadm Full Lab with Calico Flavor

This is the **full lab** created for those who wants to install a k8s cluster using the kubeadm method but wish to optimize even more the time. This template installs and bootstraps automatically a full cluster with the **calico** networking interface. This is the full cluster build that I have created to optimize your study time.

##### Use it if: #####

- you want a very, very, very easy way to bring a cluster up and running in a couple of minutes;
- you have studied a lot, the steps involved in the k8s cluster configuration using the kubeadm method;
- you´re curious and wish to put your hands on a cluster without being involved in the configuration steps but wants to play with _kubectl_;
- you´re tired to install and configure all the components necessary to bring a cluster up;
- you wish to get a coffe while the hard work is done automatically for you;

repository: nvnmnhr/kuberverse

repo_name: nvnmnhr/kuberverse


text:
---
title: Chapter 6 - Introduction
---

## Chapter 6 - Case Studies: Where Does the Money Go?

The following case studies all feature organisations who re-use the fiscal data released by governments about where money is spent. They seek to promote better specialist and public understanding of the data and increase participation in the budgeting process.

There are two main sections within this ../chapter:

### Presenting Data to the Public

1. [Grading Government Spending](../chapter6-1): Clearspending, Sunlight Foundation
2. [The Media and Financial Data](../chapter6-2): how do we get this info into the public eye?

### Deciding where the money goes: Participatory Budgeting

1. [Introduction](../chapter6-3)
2. [Mini atlases for participatory budgeting](../chapter6-4): Solo Kota Kita, Indonesia
3. [Citizen Budget](../chapter6-5) - Open North, Canada
4. [Mobile-Enhanced Participatory Budgeting](../chapter6-6) - the World Bank

Next »

license: MIT

branch_name: refs/heads/gh-pages

gha_language: HTML

gha_license_id: MIT


text:
#### Integrations
##### New: Alexa Rank Indicator v2
- Using the Alexa API rank.
- Domains which are not in Alexa DB, are considered "Unknown" instead of "Suspicious".
- If the domain doesn't exist there is an error.
- Default values changed: 1000 for ```Top Domain Threshold``` and unspecified for ```Suspicous Domain Threshold```

v2 (Available from Cortex XSOAR 5.5.0).

repository: demisto/content

gha_language: Python

repo_name: demisto/content


text:
## These procedure steps will be followed on the simulator :-

This Simulator is designed to determine the spot speed of a vehicle.

Step 1:- When the user visits the simulator it will interact with the first page, on top "Aim" will be displayed and below it there are two tabs.

Step 2:- Each tabs have a different heading which is actually a differnt way to determine the spot speed.

Step 3:- When the user clicks on any of them, then it redirect to the respective simulator.

---

<b> Step 3:-  Stopwatch Method :- </b>

Step 3.1:- After landing on this page you will notice a empty box of distance and there will be a speed slider with stopwatch on the right hand side.

Step 3.2:- Fill the distance in the box and set some slider value, the slider is used to increase or decrease the moving speed of a vehicle.

Step 3.3:- The speed v is calculated by a distance/time formulae.

Step 3.4:- Note the speed in the below observation table. The total of 16 readings is to be taken, repeat the above steps until total of 16 readings is not filled. To retake the reading there is a restart button which will be popped out each time after the car reaches the destination.

Step 3.5:- To get the different readings student have to change the distance and  speed each time.

Step 3.6:- When the table 1 is completed then we proceed to the table 2 which is also known as Speed Distribution Table.

Step 3.7:- From the spot speed data of selected sample , frequency distribution table of spot speed is prepared by arranging
the speed groups covering desired speed ranges such as(10-20 kmph, 20-30 kmph, 30-40 kmph) and the number of vehicle in each speed
range.

Step 3.8:- The airthmetic mean of the measured speeds is taken as the average spot speed.

Step 3.9 :- After that click the Make a graph Button.

Step 3.10 :- The graph is plotted with the average value of each speed group of vehicle on the X axis and the percentage
of vehicles in that group on Y axis . The graph is called the frequency distribution graph of spot speeds.

Step 3.11 :- The following graph will have definite peak value of travel speed across the section and this speed is denoted
as 'modal speed'.

Step 3.12 :- It may be inferred that maximum proportion of vehicles in stream prefers to travel at about this modal speed.

Step 3.13 :- At this point the experiment is ended you can get back to previous screen by clicking on back button located at the top of page.

---

<b> Step 4:-   Radar Gun Method:- </b>

Step 4.1:- After landing on this page you will notice a empty box of distance and there will be a speed slider with radar gun screen on the right hand side.

Step 4.2:- Fill the distance in the box and set some slider value, the slider is used to increase or decrease the moving speed of a vehicle.

Step 4.3:- The speed V of a vehicle is calculated with the help of a radar gun which is pointed from the back of a vehicle.

Step 4.4:- Note the speed in the below observation table. The total of 16 readings is to be taken, repeat the above steps until total of 16 readings is not filled. To retake the reading there is a restart button which will be popped out each time after the car reaches the destination.

Step 4.5:- To get the different readings student have to change the distance and  speed each time.

Step 4.6:- When the table 1 is completed then we proceed to the table 2 which is also known as Speed Distribution Table.

Step 4.7:- From the spot speed data of selected sample , frequency distribution table of spot speed is prepared by arranging
the speed groups covering desired speed ranges such as(10-20 kmph, 20-30 kmph, 30-40 kmph) and the number of vehicle in each speed
range.

Step 4.8:- The airthmetic mean of the measured speeds is taken as the average spot speed.

Step 4.9 :- Then after Click the Make a graph Button.

Step 4.10 :- The graph is plotted with the average value of each speed group of vehicle on the X axis and the percentage
of vehicles in that group on Y axis . The graph is called the frequency distribution graph of spot speeds.

Step 4.11 :- The following graph will have defineite peak value of travel speed across the section and this speed is denoted
as 'modal speed'.

Step 4.12 :- It may be inferred that maximum proportion of vehicles in stream prefers to travel at about this modal speed.

Step 4.13 :- At this point the experiment is ended you can get back to previous screen by clicking on back button located at the top of page.

branch_name: refs/heads/main


text:
# import_by_path

Dynamically load a function using dotted-path notation.

This might be useful if the function `path`
is supplied by some means, like a configuration file,
such that the `path`
is not available at the time the code is written.
## usage
```
import_by_path(path)

    Parameters:
        path - a dotted-notation path to a function

    Return:
        a callable

    Notes:
        1. The 'path' is searched relative to PYTHONPATH.
        2. If 'path' is not a string, no function lookup is performed, and
           'path' will be returned unchanged.
        3. If 'path' is incorrect a ModuleNotFoundError or
           AttributeError will be raised.
```

## example
This example is contrived, since there is not a reason to dynamically
load `import_by_path`.
```
>>> from ergaleia import import_by_path

>>> fn = import_by_path('ergaleia.import_by_path.import_by_path')
>>> fn == import_by_path
True

>>> fnp = fn('ergaleia.import_by_path.import_by_path')
>>> fnp == fn == import_by_path
True
```

## warning
It is a **horrible** idea to dynamically load code based on `path` values
from an untrusted source.

**Never** allow users to supply arbitrary values for `path`.

repository: remidinishanth-ntnx/ergaleia

repo_name: remidinishanth-ntnx/ergaleia


text:
* Documentation fixes from pieplu, cheers!

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.1.0                                                   24.01.2017 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Features
--------

* Added support for @script annotations (shout-out to jcfariadias,
  pieplu and Joao Dias).

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.9                                                   16.12.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Features
--------

* Added support for @modifier flag (thanks again, Ryan Potter).

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.8                                                   16.11.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Announcement
------------

* We are actively developing 1.1.0 with support for LESS and Mixin-Defined
  colors, as well as ES 6 syntax and better error handling. Stay tuned!

Features
--------

* Added Config for alternative placeholder services (thanks Ryan Potter).

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.7                                                   30.08.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Features
--------

* Support multiple CSS includes when configured as array of paths.

Bugfixes
--------

* Fix 'false' being print as description if no description is present in the
  DocBlock of the element.

* Fix statically generated placeholder texts printing "undefined" after a
  certain amount of words.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.6                                                   23.08.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Bugfixes
--------

* Fix mixin parsing failing on mixin definitions without parameter list

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.5                                                   23.08.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Bugfixes
--------

* Fix crawler failing on files with Windows line endings

* Fix lipsum quantity not being applied

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.4                                                   17.08.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Thanks for all the positiv feedback and ideas how we could improve this project.
This version includes various small fixes, but mainly:

Bugfixes
--------

* Fix header reflection being positioned absolutely instead of relatively (#1)

* Fix init script not working

* Documentation fixes and typos

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ VERSION 1.0.0                                                   15.08.2016 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

🎉 Here we are. 🚀

We hope you will love it as much as we do and it will change the way you develop styles.

If you also like to hack with us, check out the job offers on http://www.holidaypirates.com/pages/jobs .

```

repository: carlosgarciamar/nucleus

repo_name: carlosgarciamar/nucleus


text:
ansible-role-freesurfer
=======================

An Ansible role to install and manage ANFI (Analysis of Functional NeuroImages)

Description
-----------

"**FreeSurfer** is a brain imaging software package developed by the Athinoula A. Martinos Center for Biomedical Imaging at Massachusetts General Hospital for analyzing magnetic resonance imaging (MRI) scan data.

It is an important tool in functional brain mapping and facilitates the visualization of the functional regions of the highly folded cerebral cortex.

It contains tools to conduct both volume based and surface based analysis, which primarily use the white matter surface. FreeSurfer includes tools for the reconstruction of topologically correct and geometrically accurate models of both the gray/white and pial surfaces, for measuring cortical thickness, surface area and folding, and for computing inter-subject registration based on the pattern of cortical folds. In addition, an automated labeling of 35 non-cortical regions is included in the package."

## Quick start

### Ansible command

```shell
ansible-playbook systems.yml -i inventory/dev --limit workstation-001
```

Resources
---------

-  http://www.freesurfer.net/
-  http://www.freesurfer.net/fswiki/DownloadAndInstall
-  https://en.wikipedia.org/wiki/FreeSurfer

Requirements
------------

### Ubuntu 16.04

On Ubuntu platforms, you may encounter the error "freeview.bin: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory." Freeview will work fine if you install libjpeg62-dev run:

```shell
sudo apt-get install libjpeg62
sudo apt-get install libjpeg62-dev
```

Options
-------

- Matlab (only needed to run FS-FAST, the fMRI analysis stream)

Issues
------

Role Variables
--------------

### roles/freesurfer/defaults/main.yml

```yaml
# file: roles/freesurfer/defaults/main.yml
#
freesurfer_arch : 'amd64'
freesurfer_ver  : 'v6.0.0'
freesurfer_ftp_url: 'ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz'

# FreeSurfer/FS-FAST (and FSL) environment variables

freesurfer_home          : '/usr/local/freesurfer'
freesurfer_fsfast_home   : '/usr/local/freesurfer/fsfast'
freesurfer_output_format : 'nii.gz'
freesurfer_subjects_dir	 : '/usr/local/freesurfer/subjects'
freesurfer_mni_dir		 : '/usr/local/freesurfer/mni'

# testing
freesurfer_users_test_dir: '~/freesurfer/test'
freesurfer_subject_samples: 'sample-001.mgz'
```

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

* [ ansible-role-acemenu ]( https://github.com/cjsteel/ansible-role-acemenu )
* [ ansible-role-ensure_dirs ]( https://github.com/csteel/ansible-role-ensure_dirs )
* [ ansible-role-skel ]( https://github.com/csteel/ansible-role-skel )

### ensure_dirs

#### roles/ansible-role-freesurfer/meta/main.yml

```yaml
---
# file: roles/ansible-role-freesurfer/meta/main.yml in dependant role
dependencies:

- { role: ensure_dirs,
        ensure_dirs_on_remote: "{{ freesurfer_remote_directories_description }}",
        ensure_dirs_on_local : "{{ freesurfer_local_directories_description }}"
  }
```

#### roles/ansible-role-freesurfer/defaults/main.yml example

```yaml
freesurfer_remote_directories_description:

  freesurfer_installation_resources_dir:

    state       : "present"					# absent
    path        : "sys/sw"					# relative to Ansible users home
    owner       : "{{ ansible_ssh_user }}"
    group       : "{{ ansible_ssh_user }}"
    mode        : "0644"

freesurfer_local_directories_description:

  freesurfer_installation_resources_dir:

    state       : "present"					# absent
    path        : "sys/sw/" 				# relative to Ansible users home dir
    owner       : "{{ ansible_ssh_user }}"
    group       : "{{ ansible_ssh_user }}"
    mode        : "0644"
```

## Playbooks

### Role playbook

```shell
cp ..roles/freesurfer/files/freesurfer.yml .
```

Edit:

```shell
nano freesurfer.yml
```

```yaml
---
# file: '{{ ansible_project }}/freesurfer.yml'

- hosts: freesurfer
  become: true
  gather_facts: true
  pre_tasks:

    - set_fact: fact_controller_user="{{ lookup('env','USER') }}"
    - debug: var=fact_controller_user

    - set_fact: fact_controller_home="{{ lookup('env','HOME') }}"
    - debug: var=fact_controller_home

  roles:

    - freesurfer
```

### main playbook

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

```yaml
    - hosts: servers
      roles:
         - { role: cjsteel.ansible-role-freesurfer, x: 42 }
```

License
-------

MIT

Author Information
------------------

Christopher Steel
Systems Administrator
McGill Centre for Integrative Neuroscience
Montreal Neurological Institute
McGill University
3801 University Street
Montréal, QC, Canada H3A 2B4
Tel. No. +1<PHONE_NUMBER>
E-mail<EMAIL_ADDRESS>[MCIN](http://mcin-cnim.ca/), [theneuro.ca](http://theneuro.ca)

repository: cjsteel/ansible-role-freesurfer

repo_name: cjsteel/ansible-role-freesurfer


text:
# Hello Microservice

This repository contains the hello microservice from Udacity's server-side Swift curriculum. The hello microservice is a simple Swift server that exposes two endpoints:

- /
  - returns a basic message
- /secure
  - when provided a valid auth token, returns a "secure" message

To experiment with the endpoints, see the [Lesson 1: Hello Microservice Docs on Apiary](http://docs.l1hello.apiary.io/#).

Also, the hello microservice uses the Swift Package Manager to manage dependencies.

## Swift Dependencies

- Kitura
- HeliumLogger
- Perfect-Crypto

## How to Use

The hello microservice can technically be built to run on macOS or Ubuntu Linux. However, we recommend building for Ubuntu Linux since that will likely be the environment used if you were to deploy the microservice into the cloud. Furthermore, to assure consistency between development and possible deployment environments, Docker is used. Take the following steps to build and run the monolith:

**1] Build the Docker Image**

```bash
docker build -t s3-hello:1.0.0 .
```

**2] Run the Docker Image (start Bash shell)**

```bash
docker run --rm -it -v $(pwd):/app -p 8081:8081 s3-hello:1.0.0 /bin/bash
```

**3] Build the Microservice**

```bash
# assuming you are located at /app
swift build
```

**4] Run the Microservice**

```bash
# assuming you are located at /app
.build/debug/hello
```

**5] Test an Endpoint!**

```bash
curl localhost:8081
```

gha_language: Swift


text:
# MIC
# Language: R
# Input: CSV (abundances)
# Output: CSV (correlations)
# Tested with: PluMA 1.1, R 4.0.0
# Dependency: minerva_1.5.8, Hmisc_4.4.0

PluMA plugin to compute the Maximal Information Coefficient (or MIC, (Reshef, 2011)), which measures
linear and nonlinear correlations between datasets.  In this case the plugin expects
input in CSV format where rows are samples and columns correspond to members of a community,
and entry (i, j) represents the abundance of member j in sample i.

The plugin then computes the MIC between all pairs of members, producing as output a
CSV file where rows and columns represent members and entry (i, j) is the MIC between
member i and member j.


text:
# Change Log (The following content is translated by Google)

`ant-design-vue` strictly follows [Semantic Versioning 2.0.0](http://semver.org/).

#### Release Schedule

- Weekly release: patch version at the end of every week for routine bugfix (anytime for urgent bugfix).
- Monthly release: minor version at the end of every month for new features.
- Major version release is not included in this schedule for breaking change and new features.

---

## 4.0

### 🔥🔥🔥 4.0 official version released 🔥🔥🔥

### Design specification adjustment

- Basic rounded corner adjustment, changed from unified `2px` to four-level rounded corners, which are `2px` `4px` `6px` `8px` respectively, which are applied to different scenarios, for example, the rounded corners of the default size Button are adjusted to `6px`.
- Main color adjustment, changed from `#1890ff` to `#1677ff`.
- Overall shadow adjustment, from the original three-level shadow adjustment to two levels, which are used for resident page components (such as Card) and interactive feedback (such as Dropdown).
- Adjust the internal spacing of some components.
- Overall de-wireframing.

### Add 5 new components

- Segmented segment controller
- WaterMark watermark
- QrCode QR code
- FloatButton floating button
- Tour roaming guide

### Technical adjustments

- Deprecated less and adopted CSS-in-JS to better support dynamic themes.
  - All less files are removed, and less variables no longer support leaking.
  - css files are no longer included in the product. Since CSS-in-JS supports importing on demand, the original `ant-design-vue/dist/antd.css` has also been removed. If you need to reset some basic styles, please import `ant-design-vue/dist/reset .css`.
  - If you need to reset the style of the component and don't want to introduce `ant-design-vue/dist/reset.css` to pollute the global style, you can try to use [App component](/components/app), to solve the problem that native elements do not have ant-design-vue specification style.
- Removed css variables and dynamic theme schemes built on top of it.
- LocaleProvider has been deprecated in 3.x (use `<ConfigProvider locale />` instead), we have completely removed the related directories `ant-design-vue/es/locale-provider`, `ant- design-vue/lib/locale-provider`.
- `babel-plugin-import` is no longer supported, CSS-in-JS itself has the ability to load on demand, no longer need plug-in support.

#### Component API adjustments

- The classname API of the component popup is unified to `popupClassName`, and similar APIs such as `dropdownClassName` will be replaced.

  - AutoComplete component
  - Cascader component
  - Select component
  - TreeSelect component
  - TimePicker component
  - DatePicker component
  - Mentions component

- The controlled visibility API of the component popup is unified as `open`, and `visible` and other similar APIs will be replaced.
  - Drawer component `visible` becomes `open`.
  - Modal component `visible` becomes `open`.
  - Dropdown component `visible` becomes `open`.
  - Tooltip component `visible` becomes `open`.
  - Tag component `visible` has been removed.
  - Slider component `tooltip` related API converges to `tooltip` property.
  - Table component `filterDropdownVisible` changed to `filterDropdownOpen`.
- `getPopupContainer`: All `getPopupContainer` needs to ensure that the returned div is unique.
- Drawer `style` and `class` are migrated to the Drawer popup area, and the original attributes are replaced by `rootClassName` and `rootStyle`.

#### Component refactoring and removal

- Remove the `locale-provider` directory. `LocaleProvider` has been removed in v4, please use `ConfigProvider` instead.

- Remove `xxxl` breakpoint attribute in grid layout. `xxxl` attribute has been removed in v4, you can use [theme customization](/docs/vue/customize-theme) to modify `screen[XS|SM|MD|LG|XL|XXL]` to modify the break Point value achieved.

- The BackTop component was deprecated in `4.0.0` and moved to the FloatButton floating button. If needed, it can be imported from FloatButton.

### [Upgrade Guide](/docs/vue/migration-v4)

## 3.x

Visit [GitHub](https://github.com/vueComponent/ant-design-vue/blob/3.x/CHANGELOG.zh-CN.md) `3.x` Change Log。

## 2.x

Visit [GitHub](https://github.com/vueComponent/ant-design-vue/blob/2.x/CHANGELOG.zh-CN.md) `2.x` Change Log。

## 1.x

Visit [GitHub](https://github.com/vueComponent/ant-design-vue/blob/1.x/CHANGELOG.en-US.md) to read change logs from `0.x` to `1.x`.

repository: vueComponent/ant-design-vue

gha_language: Vue

gha_license_id: NOASSERTION

repo_name: vueComponent/ant-design-vue


text:
# xkcd
A tiny Python image scraper for [xkcd.com](https://xkcd.com/)

![Arrow](https://imgs.xkcd.com/comics/arrow.png)

xkcd.com is a webcomic of romance, sarcasm, math, and language.

## What's xkcd?

It's not actually an acronym. It's just a word with no phonetic pronunciation -- a treasured and carefully-guarded point in the space of four-character strings.

## What's this script about?

It's just a very simple comic image down loader.

## Here's a sample!

[![Haskell](https://imgs.xkcd.com/comics/haskell.png)](https://xkcd.com/1312/)

[![Perl](https://imgs.xkcd.com/comics/perl_problems.png)](https://xkcd.com/1171/)

repository: baduker/xkcd

repo_name: baduker/xkcd


text:
# VBA-challenge
![Wall Street real stock data analysis](resources/wall_street.jpg)

## **Background**
I was given a set of data containing every stock operation at the NYSE for 3 years and commisioned to write a VBA script that analyzes the data and summarizes it yearly

## **Changelog:**
**03/11/2021**
- Created the repository
- Uploaded all relevant files
- Created the script, testing pending

**03/12/2021**
- Script tested and debugged
- [X] Need to double-check the logic for the array, try to avoid Variant declaration
- New script added, analyzes the biggest delta for stocks yearly

**03/16/2021**
- Added formatting to the readme file
- Fixed the formatting of yearly change data, new format is ##0.00 and should be easier to read
- Added formatting to the final results table
- Added formatting to ticker table, should be easier to read
- [X] Function that cycles through every worksheet so that whole script has to run only once

**03/17/2021**
- Created new functions to clean-up general_flow() so that's easier to integrate the new function that cycles through every worksheet in the book
- Created the for loop that cycles through every worksheet in the book
- Found that a particular ticker has zeros all across the table (data corrupted maybe?), added an exception to avoid overflowing error
- Successfully tested the script on test table
- Test took about 40 minutes to complete, but apparently the data is already sorted by ticker which will allow me to optimize the code and make the script run faster. Will implement a different approach
- alphabetical_testing_unsorted.* are the appropiate files for the unsorted solution
- the new sorted approach provides consistent data and the program completes much faster, I will continue developing that solution
- finished the new script, alphabetical_testing_sorted.* are the appropiate files for the sorted solution
- [X] quality control needed to guarantee that calculations are correct
- [X] implement the solution to the real data

**03/18/2021**

- reviewed the obtained data looking for possible logical mistakes, no errors were found
- implementing the script in multiple_year_stock_data.xlsx
- added a button to run the script
- script implemented on the data
- no errors found
- added multiple_year_stock_data_raw for testing purposes, MAKE A COPY and run the script on the copy
- final commit for the project

repository: JuanjoFernandez/VBA-challenge

repo_name: JuanjoFernandez/VBA-challenge


text:
# Monitoring Stack Deployment Guidelines

[Prometheus Operator](https://github.com/helm/charts/tree/master/stable/prometheus-operator) chart is being use for the monitoring stack deployment.

### Stack Deployment Guidelines

- Create a namespace:

```json
namespace-manifest.json

{
  "kind": "Namespace",
  "apiVersion": "v1",
  "metadata": {
    "name": "monitoring",
    "labels": {
      "name": "monitoring"
    }
  }
}
```
Use the command given below to create the namespace
```bash
$ sudo kubectl apply -f namespace-manifest.json
```

- Create a file to store the values that will override the default values of prometheus operator chart. Description of the variables are given in the Prometheus Operator github page, otherwise go through the github pages of each chart.

```yaml
ask irtiza for correct values
```

Use the command given below to deploy the prometheus operator

`PMS`: Public helm charts monitoring stack
```bash
$ sudo helm install --name=pms  --namespace=monitoring . -f overridden_values.yaml
```

### How to redeploy the monitoring stack

This section will provide guidelines on how to redeploy the monitoring stack

* Delete the monitoring stack deployment using the command given below:
```bash
$ sudo kubectl delete -f monitoringKubeHelmRelease.yaml -n monitoring
```

* Delete the respective CRDS given on [prometheus-operator](https://github.com/helm/charts/tree/master/stable/prometheus-operator) helm chart repository.

* Redeploy the monitoring stack using the command given below:
```bash
$ sudo kubectl apply -f monitoringKubeHelmRelease.yaml -n monitoring
```

* Open the monitoring namespace UI to check whether deployments, pods, services and ingresses are created or not.

* Ingress of Alertmanager, grafana and prometheus must be created.

* Also look at the logs of helm operator.

* Run the command given below to check chart's deployment status, it must be in deployed state:
```bash
$ sudo helm ls --namespace monitoring
```

### Templatizing the chart
To templatize the chart with values use the command given below:

```
$ sudo helm template . -f testing-new-val.yaml > testing-new-val-template.yaml
```
It will use the values given in `testing-new-val.yaml` file to generate `testing-new-val-template.yaml` file

### Issue
In case of any issue go through the guidelines provided on this [link](https://github.com/helm/charts/tree/master/stable/prometheus-operator)

repository: stakater/til

repo_name: stakater/til


text:
# Rapid7VmConsole::HostName

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | The host name (local or FQDN). |
**source** | **String** | The source used to detect the host name. `user` indicates the host name source is user-supplied (e.g. in a site target definition). | [optional]

repository: ewb-infosec/vm-console-client-ruby

repo_name: ewb-infosec/vm-console-client-ruby


text:
![](https://i.imgur.com/L7moBQT.png)

# Part Designer

This is a free online CAD tool to create custom LEGO® Technic compatible construction parts for 3D printing.

Features
- Assemble a custom part from basic blocks: Pin Hole, Axle Hole, Pin, Axle, Solid
- Save your model as an STL file
- Catalog of existing LEGO® parts
- Customize measurements to get a perfect fit
- Create a sharable link of your part

# Local setup and development

You need to have [TypeScript](https://www.typescriptlang.org/) installed.
In the project root, run `tsc`.
This should run without errors and create the file `app.js`.

You need a webserver that locally serves the files from the project directory.
If you have python installed, you can call `python3 -m http.server`.
It will tell you the port, for example 8000, and you can visit http://localhost:8000 in your browser.
Alternatively, you can install [http-server](https://www.npmjs.com/package/http-server), which will also create a server in port 8000.

If you work on the code, run `tsc --watch`, which will recompile everytime you change a source file.

repository: pkasperski/partdesigner

repo_name: pkasperski/partdesigner


text:
# 8044s21
Simulations and visualizations for 8.044, spring 21 edition

## Hard-disk simulations

We follow Werener Krauth's "Statistical Mechanics and Computations" algorithm to directly solve the exact dynamics of the spheres through an event-driven algorithm: namely, we exactly solve Newton's laws of motion for all particles until the next collision, between disks or betwen a disk and a wall happens. We then interpolate the result to sample the dynamics at regular time points to contrstruct a movie.

## Phase space integration

We illustrate the notion of phase space by solving for the motion of the classical harmonic oscillator and comparing its motion in real and phase space.


text:
# Generate the figures for the inter-region latency on Azure in the Domino paper

Follow the following the steps:

## Download trace files

cd $GOPATH/src/domino/trace/azure/fig

curl -JLO https://rgw.cs.uwaterloo.ca/BERNARD-domino/trace-azure-globe-6dc-24h-202005170045-202005180045.tar.gz

tar -xvzf trace-azure-globe-6dc-24h-202005170045-202005180045.tar.gz

The trace files will be under the folder trace-azure-globe-6dc-24h-202005170045-202005180045

## Generate the heatmap figures about network roundtrip delays

cd $GOPATH/src/domino/trace/azure/fig

./gen-fig-heatmap.py

The heatmap figures will be pdf files in the folder trace-azure-globe-6dc-24h-202005170045-202005180045

## Generate the box-and-whisker figure about network roundtrip delays

cd $GOPATH/src/domino/trace/azure/fig

./gen-fig-box.py

A pdf file eastus2-westus2-dist.pdf will be generated in the current folder

## Generate the figure about the correct prediction rate for request arrival time at replicas

cd $GOPATH/src/domino/trace/azure/fig

./gen-arrivaltime-predictrate-eastus2.sh
(This would take some time to complete.)

./gen-fig-predict-arrivaltime.py

A pdf file eastus2-westus2-arrivaltime-predictrate.pdf will be generated in the current folder

## Generate arrival-time prediction stats

cd $GOPATH/src/domino/trace/azure/fig

./gen-arrivaltime-globe.sh
(This would take some time to complete.)

./gen-arrivaltime-table.py

Several .csv files are will be generated in folder arrivaltime-globe

repository: gitferry/domino

repo_name: gitferry/domino


text:
# Contributor's glossary of Elektra

- **Change Tracking**:
  mechanism to detect changes that were made to keys in between `kdbGet` and `kdbSet` calls

repository: ElektraInitiative/libelektra

gha_language: C

repo_name: ElektraInitiative/libelektra


text:
![tensorx](tensorx.png?raw=true "TensorX")
-----------------
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![Docs](https://readthedocs.org/projects/tensorx/badge/?version=latest)](http://tensorx.readthedocs.io/en/latest/?badge=latest)

**TensorX** is an free and open-source minimalistic high-level library to build, train, and run neural network models in [TensorFlow](https://github.com/tensorflow/tensorflow).
This library aims to provide simple, extensible, and modular components, without unnecessary levels of abstraction or verbose.

You can read the **documentation** on [tensorx.readthedocs.io](http://tensorx.readthedocs.io/en/latest/?badge=latest).

## Development

Both this library and its documentation are a work in progress, any input is welcome.
You can follow the project on [Github](https://github.com/davidenunes/tensorx) and read its
documentation on [ReadTheDocs](http://tensorx.readthedocs.io/en/latest/?badge=latest). I’m focusing
on features I myself use in my research, so I’ll add components as I need them.
If more people get interested in the project, I’ll create some contribution guidelines.

## Installation
TensorX is compatible with **Python 3.5+**. You can install it directly from this repository using `pip` as follows:

``` bash
sudo pip3 install --upgrade git+https://github.com/davidenunes/tensorx.git
```

This will install the `tensorx` module along with all the required dependencies. If you wish to install a particular version of
`tensorflow` (or build it from source) you can either install it first, or install `tensorx` with the ``--no-dependencies``
switch and install `tensorflow` afterwards. Instructions on how to install TensorFlow
can be found [here](<https://www.tensorflow.org/install/>).

**virtualenv**: much like tensorflow, virtualenv is recommended to install tensorx in its own environment to avoid interfering with system-wide packages.

## Getting Started
Coming soon.
```python
import tensorx as tx
```

## Philosophy

* **Consistent API**: simple intuitive API focused on modular neural networks with multiple layers.

* **Pragmatic Code**: verbose-free code is more readable, reproducible,
  and easier to debug and experiment with. Make it easy to use for
  common use cases.

* **Transparency**: the main goal is not to replace the use of
  TensorFlow or hide it behind abstractions, but to complement it with
  easy-to-use modular API to create and manipulate tensors.

* **Focus**: this is not a library to create every single "Deep
  Learning" model one might read about. Its about taking advantage of
  TensorFlow flexibility while compensating for some of its
  shortcomings.

## Author
* **[Davide Nunes](https://github.com/davidenunes)**: get in touch [@davidelnunes](https://twitter.com/davidelnunes)

## License

[Apache License 2.0](LICENSE)

repository: nininininini/tensorx

repo_name: nininininini/tensorx


text:
![AWS Elastic Compute Cloud](https://i.imgur.com/9awJmtb.png) <img src="https://i.imgur.com/Zjwx7ca.png" height="100" title="AWS Lambda" />

EC2 Lambda
======

Introductory / Overview lecture on the Amazon Lambda service.

## Video Link

[![EC2 Lambda Lecture](https://i.imgur.com/DO4JBkm.png)](https://acloud.guru/course/aws-certified-solutions-architect-associate/learn/ec2/lambda/watch)

*Note - You will need an [acloud.guru](acloud.guru) account.*

## Cloud History (in 2 minutes)

![2 minute history of cloud](https://i.imgur.com/ljKuvQk.png)

* Developers hate hardware
* We have spent the last few decades building layers of abstraction over
  layers of abstractions to isolate ourselves from having to deal with
  hardware directly
* Prior 2006 this really meant `Data Centers`
  * Put all the hardware in one physical location and have someone else deal with it
  * But this wasn't easy -- you still had to use the phone to get someone to
    to provision the machines
* And then in 2006 EC2 is launched and `Infrastructure As A Service (IAAS)` is born
  * Still there are issues -- you are still dealing with virtual (and/or physical) machines
  * You still have to manage the operating system (windows / linux)
* Elastic Bean Stalk soon followed and `Platform As A Service (PAAS)` is born
  * Essentially, you upload your code, and Amazon handles the machine and operating
    system provisioning
  * Same problem as IAAS only now there is a third party
* And then came Containers-- aka docker
  * That's another topic (to be discussed later)
  * There are still worries -- ie you still have to worry about keeping your containers running
* 2015 Lambda is born and Serverless computing is born
  * No more worries-- you don't have to worry about Infrastructure, Platforms or Containers

## What is Lambda?

Formal Definition:  _AWS Lambda is a compute service where you can upload your code and create a Lambda function.
It takes care of provisioning and managing the servers that you use to run the code. You don't have to worry about
operating systems, patching, scaling, etc. You can use Lambda in the following ways._

* _As an event-driven compute service where AWS Lambda runs your code in response to events. These events could be
  changes to data in an Amazon S3 bucket or an Amazon DynamoDB table._

* _As a compute service to run your code in response to HTTP requests using Amazon API Gateway or API calls made using
  AWS SDKs._

### What does this mean?

* Data Centres
* Hardware
* Assembly Code / Protocols
* High Level Language
* Operating Systems
* Application Layer / AWS APIs

### What Languages are supported?

* Node.js
* Java
* Python
* C#

### How is Lambda Priced?

* First 1 million requests are free. $0.20 per 1 million requests thereafter
* Duration
  * Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded
    up to the nearest 100ms. The price depends on the amount of memory you allocate to your function. You ar charged
    $0.00001667 for every GB-second used

### Why Is Lambda Cool?

* No servers
* Continous scaling
* Super cheap

## Exam Tips

What did we learn?

* Lambda scales out (not up) automatically
* Lambda functions are independent, 1 event = 1 function
* Lambda is serverless
* Know what services are serverless
  * S3, API Gateway, Lambda, DynamoDB ... etc.
  * EC2 is not serverless
* Lambda can trigger other lambda functions, 1 event can = x functions if functions trigger other functions
* Architectures can get extremely complicated, AWS X-ray allows you to debug what is happening
* Lambda can do things globally, you can use it to back up S3 buckets to other S3 buckets etc
* Know your triggers
  * API Gateway
  * Alexa Skill Kit
  * CloudFront
  * CloudWatch Events
  * CloudWatch Logs
  * DynamoDB
  * S3
  * SNS
  * Kinesis
* Know what languages are supported
* Lambda supports a maximum duration of 5 minutes

### Review Questions

1.  What is scaling up?
2.  What is scaling out?
3.  How can Lambda functions be used to service HTTP requests?
4.  If a million users hit an API Gatway configured to call Lambda how many functions are invoked?
5.  What languages are supported?
6.  What is the maximum duration threshold of a Lambda function call?
7.
8.  What are some examples of serverless AWS services?
9.  What are some of examples of `server based` AWS services?

### Answers

1.  Increasing instance resources
2.  More instances
3.  Via API Gateway
4.  million
5.  Node.js, Java, Python, C#
6.  5 mins
7.  API Gateway, IoT, Alexa Skill Kit, CloudFront, CloudWatch Events, CloudWatch Logs, DynamoDB, S3, SNS, Kinesis
8.  API Gateway, CloudFront, CloudWatch
9.  EC2, Auto Scaling, EFS

##

**[Previous Lab/Lecture](ec2-efs-lab.md) | [AWS (Root)](../readme.adoc) | [Next Lab/Lecture](ec2-serverless-webpage-lab.md)**

repository: bradyhouse/house

gha_language: JavaScript

repo_name: bradyhouse/house


text:
move.it
4th Workshop made by Rocketseat.

  Techs   |
  Project   |
  Install   |
  How to contribute   |
  License

## :rocket: Technologies

This project has these technologies:

- [ReactJS](https://reactjs.org/)
- [Typescript](https://www.typescriptlang.org/)
- [Next.JS](https://nextjs.org/)

Extras:

- Softwares
  - [VSCode](https://code.visualstudio.com/)

## Project

**move.it** is a project created by Rocketseat for the 4th code Workshop, basically consists of a
plataform that mixes the Pomodoro technique with some exercises.

## :memo: License

This project is under the MIT license.

---

Done with 💜 and dedication by **Douglas Rodrigues**

repository: Zy-on/moveit

repo_name: Zy-on/moveit


text:
### Mosquitto + Authentication in a Docker image.
🦟 HTTP Authentication ready to use for Mosquitto as Docker image.

> MQTT and Websocket is ready to use 💪

### Environment Variables

By default:

1. `auth_opt_http_ip` is equal to `<IP_ADDRESS>`, you can change it with `HTTP_IP` ENV variable.
2. `auth_opt_http_port` is equal to `80`, you can change it with `HTTP_PORT`.
3. `auth_opt_http_hostname` is equal to `localhost`, you can change it with `HTTP_HOSTNAME`.

Other parameters in Mosquitto configuration file:

```
auth_opt_http_getuser_uri /mqtt/auth
auth_opt_http_superuser_uri /mqtt/superuser
auth_opt_http_aclcheck_uri /mqtt/acl
```

### Docker

```bash
$ docker pull ahmdrz/mosquitto:latest
$ docker run -p 9001:9001 -p 1883:1883 ahmdrz/mosquitto:latest
```

You can mount `/var/lib/mosquitto/` to persist Mosquitto data.

repository: ahmdrz/docker-mosquitto-http-auth

repo_name: ahmdrz/docker-mosquitto-http-auth


text:
# 11 Window Top-N

![Twitter Badge](https://img.shields.io/badge/Flink%20Version-1.13%2B-lightgrey)

> :bulb: This example will show how to calculate the Top 3 suppliers who have the highest sales for every tumbling 5 minutes window.

The source table (`orders`) is backed by the [`faker` connector](https://flink-packages.org/packages/flink-faker), which continuously generates rows in memory based on Java Faker expressions.

In our previous recipes we've shown how you can [aggregate time series data](../01_group_by_window/01_group_by_window_tvf.md) using the `TUMBLE` function and also how you can get continuous [Top-N results](../05_top_n/05_top_n.md).
In this recipe, you will use the `Window Top-N` [feature](https://ci.apache.org/projects/flink/flink-docs-stable/docs/dev/table/sql/queries/window-topn/) to display the top 3 suppliers with the highest sales every 5 minutes.

The difference between the regular Top-N and this Window Top-N, is that Window Top-N only emits final results, which is the total top N records at the end of the window.

```sql
CREATE TABLE orders (
    bidtime TIMESTAMP(3),
    price DOUBLE,
    item STRING,
    supplier STRING,
    WATERMARK FOR bidtime AS bidtime - INTERVAL '5' SECONDS
) WITH (
  'connector' = 'faker',
  'fields.bidtime.expression' = '#{date.past ''30'',''SECONDS''}',
  'fields.price.expression' = '#{Number.randomDouble ''2'',''1'',''150''}',
  'fields.item.expression' = '#{Commerce.productName}',
  'fields.supplier.expression' = '#{regexify ''(Alice|Bob|Carol|Alex|Joe|James|Jane|Jack)''}',
  'rows-per-second' = '100'
);

SELECT *
    FROM (
        SELECT *, ROW_NUMBER() OVER (PARTITION BY window_start, window_end ORDER BY price DESC) as rownum
        FROM (
            SELECT window_start, window_end, supplier, SUM(price) as price, COUNT(*) as cnt
            FROM TABLE(
                TUMBLE(TABLE orders, DESCRIPTOR(bidtime), INTERVAL '10' MINUTES))
            GROUP BY window_start, window_end, supplier
        )
    ) WHERE rownum <= 3;
```

## Example Output

![11_window_top_n](11_window_top_n.png)

repository: martinzsir/flink-sql-cookbook

repo_name: martinzsir/flink-sql-cookbook


text:
# Post Page

## Posts are Loading Correctly

* Links from subforum pages work and post details are loaded

Location: **`images/gifs/post/load.gif`**

![Post info loading GIF](images/gifs/post/load.gif)

## Comments Section

* If there are no comments, show a message
* You cannot comment when not logged in
* When logged in, add a section to the bottom of the page to add a comment
* When a comment is submitted, it is added to the comment section of the page
* The user cannot submit a comment when no text has been entered
* The comment count is updated correctly

Location: **`images/gifs/post/comment.gif`**

![Comments section GIF](images/gifs/post/comment.gif)

## Post Voting

* The vote count is displayed in the top right of a post
* There is a button to upvote and a button to downvote a post
* If a user is not logged in, then vote buttons are greyed out and not clickable
* If a user is logged in, the vote buttons are clickable
* The vote count updates properly

Location: **`images/gifs/post/vote.gif`**

![Post voting GIF](images/gifs/post/vote.gif)

repository: joealden/corum-docs

repo_name: joealden/corum-docs


text:
---
layout: post
title: November 7th - Partnership with God in Prayer
categories: [Verse of the Day]
alias: [/VerseOfTheDay/2008/11/07/]
---

_Psalm 138:3
In the day when I cried Thou answerest me, and strengthenest me with
strength in my soul._

It's almost the end of the week. Physically, you are probably tired
and in need of some strength. We are told that when we call upon God,
He will answer and strengthen us. Have you ever experienced the
prayers of someone else praying for you, and you felt stronger? Would
you take just a minute to pray for someone else in your life this
morning that might be weary?

 --

Jesus Every Day is a ministry of Rodgers Baptist Church in Garland, Texas.


text:
<img src="https://raw.githubusercontent.com/marckunze/rancor/master/public/images/logo_cbg_150x150.png">

# rancor
The Ranked Choice voting tool. Because sometimes you need the computer to help make these kinds of decisions for you.

A project for City College of San Francisco (CCSF) CS 177 (Software Engineering).

## Full Documentation
See the [Wiki](https://github.com/marckunze/rancor/wiki) for the full documentation, including getting started, the functional spec, and other information.

## Communication
* Google Group: [ranked-chooser-ccsf-cs177](groups.google.com/forum/#!forum/ranked-chooser-ccsf-cs177)
* Oh, and we've got issues , [GitHub Issues](https://github.com/marckunze/rancor/issues), but who doesn't

## What does it do?
Resolves the restaurant choice dilemma. Create a poll, invite who you need to pick. They vote, you go to figure out lunch without spending all morning on it. Then it solves what bar to go at the end of the day.

## Build & run
To build and run a local copy

```
$ git clone git@github.com:marckunze/rancor.git
$ cd rancor
$ bundle install
$ rackup
```
## Data definition
Polls and data are structured as below.

![rancor-erd-2014-12-14](https://cloud.githubusercontent.com/assets/1037136/5431373/847cc8f4-83dc-11e4-8022-785042604b7b.png)

## Bugs and feedback
* For bugs, questions, feedback, and discussion please use the [GitHub Issues](https://github.com/marckunze/rancor/issues)

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

repository: marckunze/rancor

gha_language: Ruby

repo_name: marckunze/rancor


text:
# d3-occ
[D3](https://d3js.org/) Presentation for [Operation Code & Coffee](https://www.meetup.com/Operation-Code-San-Antonio/)

See the presentation at https://www.youtube.com/watch?v=kz4OCMzkEnY

Find me online at http://davgarcia.com and http://iconbuildings.com

# D3 Examples
http://www.nytimes.com/interactive/2013/05/25/sunday-review/corporate-taxes.html

http://www.nytimes.com/interactive/2012/08/11/sunday-review/drought-history.html

http://www.nytimes.com/interactive/2013/02/19/movies/awardsseason/oscar-trailers.html

http://christophermanning.org/projects/building-cubic-hamiltonian-graphs-from-lcf-notation

# Suggested Reading
[Mike Bostock's blog](https://bost.ocks.org/mike/)

[Mike Bostock's extensive example code](https://bl.ocks.org/mbostock)

[Article on joining data](https://bost.ocks.org/mike/join/)

[D3 tutorial](http://alignedleft.com/projects/2014/easy-as-pi/)

[Alignleft's eBook](http://chimera.labs.oreilly.com/books/1230000000345)

*Note on the eBook - it was written for D3 v3 instead of v4, so some of the syntax will be unfamiliar. The concepts it goes over though are still applicable.*


text:
---
author: Matt Oswalt
comments: true
date: 2013-04-29 16:16:00+00:00
layout: post
slug: igp-route-multipathing
title: IGP Route Multipathing
wordpress_id: 3626
categories:
- Networking
tags:
- cef
- ecmp
- igp
- ip cef
- ospf
---

In preparation for an upcoming post, I was reminded about a commonly referred to feature in most IGPs - the concept of Equal-Cost Multipath, or simply ECMP. This is the idea that multiple routes with the same cost to a remote network should get placed in the routing table alongside each other and packets should load-balance over them to use the additional available paths. After all, it's the same cost, so why not?

ECMP isn't really talked about with EIGRP, since the metric is more complicated and routes with equal metric rarely happen, even if they are physically similar. This is a big reason why EIGRP provides a variance parameter, allowing you to define a metric that is "good enough" to be viewed as equal and able to be load-balanced on.

Due to a specific failure I will be going over in a future post, I was forced to think about exactly what type of load balancing was used. In my CCNA/CCNP studies I was led to believe this was simply round-robin - each packet gets a new link, so they're all used equally. But is this actually the case?

I put this GNS3 topology together so we could explore the way that changes to an example OSPF topology will influence the routing table, and more specifically, point out how the default multipathing features in a Cisco router will impact our traffic flow during reconvergence:

[![screen1]({{ site.url }}assets/2013/04/screen12.png)]({{ site.url }}assets/2013/04/screen12.png)

The goal is to cause certain failures within the environment and observe the impact to traffic destined from R1 to the loopback address of <IP_ADDRESS>, advertised from R4 over two equal-cost paths. I put two switches in between the R2/R3 pair and R4 so that I could break connectivity between these routers without causing link-down events (I'll just delete the link between the switches). The reason for avoiding link-down events for this post is that OSPF routers that detect a link failure on an interface will typically originate a new Router LSA for itself that leaves out the corresponding transit network:

      LS age: 1205
      Options: (No TOS-capability, DC)
      LS Type: Router Links
      Link State ID: <IP_ADDRESS>
      Advertising Router: <IP_ADDRESS>
      LS Seq Number: 80000009
      Checksum: 0x3365
      Length: 60
      Number of Links: 3

        Link connected to: a Stub Network
         (Link ID) Network/subnet number: <IP_ADDRESS>
         (Link Data) Network Mask: <IP_ADDRESS>
          Number of TOS metrics: 0
           TOS 0 Metrics: 1

        Link connected to: a Transit Network
         (Link ID) Designated Router address: <IP_ADDRESS>
         (Link Data) Router Interface address: <IP_ADDRESS>
          Number of TOS metrics: 0
           TOS 0 Metrics: 1

        Link connected to: a Stub Network
         (Link ID) Network/subnet number: <IP_ADDRESS>
         (Link Data) Network Mask: <IP_ADDRESS>
          Number of TOS metrics: 0
           TOS 0 Metrics: 1

This LSA lists the <IP_ADDRESS> network as a stub network, whereas it would normally be a transit network if there was connectivity to another subnet. This LSA would make it's way back to R1 within a few seconds, meaning the network would reconverge on the working link quickly. So I'm using switches in this topology to help me cause indirect failures.

"Why all these extra steps to produce more downtime?" you say. It's true, most point-to-point connections between two routers don't involve a few dumb switches. However, with the advent of [virtual routing](https://keepingitclassless.net/2013/04/virtual-routing-part-1-csr-1000v-first-glance/), the likelihood of failures not causing link-down events is actually significantly higher. This is a way for me to simulate this behavior in GNS3.

So, while the quick reconvergence that this provides is nice, but the cause doesn't properly show the behavior that might be produced in a virtual routing environment, where failures may not cause link-down events, which would normally cause relatively quick reconvergence.
The normal routing table on R1 (all links and OSPF neighbor relationships up) is as expected:

    R1#show ip route ospf
         <IP_ADDRESS>/32 is subnetted, 1 subnets
    O       <IP_ADDRESS> [110/3] via <IP_ADDRESS>, 00:29:28, FastEthernet1/0
                       [110/3] via <IP_ADDRESS>, 00:29:28, FastEthernet0/0
         <IP_ADDRESS>/24 is subnetted, 4 subnets
    O       <IP_ADDRESS> [110/2] via <IP_ADDRESS>, 00:29:28, FastEthernet0/0
    O       <IP_ADDRESS> [110/2] via <IP_ADDRESS>, 00:29:28, FastEthernet1/0

Take a look at the LSA shown above. Normally both transit networks would be contained there and produce the routing table shown right above. When I delete the link in between the two switches that provide connectivity between R2 and R4, a large amount of downtime is experienced - roughly 40 seconds or more of dropped packets.

    R1#ping <IP_ADDRESS> repeat 100000

    Type escape sequence to abort.
    Sending 100000, 100-byte ICMP Echos to <IP_ADDRESS>, timeout is 2 seconds:
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!....................!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Success rate is 94 percent (380/401), round-trip min/avg/max = 16/40/76 ms

This is a worst-case scenario. Like I mentioned before, if you have redundant paths in a physical network, a link-down event will usually cause OSPF to send out new LSAs right away, causing only a few pings to get dropped. However, we have two paths in the routing table already! Why wouldn't we just use the working redundant path? Or worst case scenario, why wouldn't we just drop every other ping, since we're load balancing?

I'm belaboring the point a little bit but only because the current introductory to moderate-level curricula regarding routing, especially in Cisco circles create the assumption that load-balancing is just round robin, when in reality it's not, and I want to be clear on the details concerning this problem. Let's first identify why we have the 40+ second downtime. This is the amount of time it takes for an OSPF neighbor to get recognized as "down" (Dead timer). What this means is that the reconvergence that takes place will only happen after the OSPF neighbor is viewed as "down", which is when those LSAs will get aged out. However, this would imply that the router is ONLY using that particular route (and not the equal cost path). So how exactly is ECMP load balancing?

## Load Balancing Post-IGP

Keep in mind - the role of an IGP doesn't *really* include load balancing. OSPF will learn link-states, feed them to the Djikstra algorithm, and the routes will get placed into the RIB as a result. It is up to the routing protocol to place routes into the routing table based on the decision points specific to each protocol. Sometimes this means that multiple routes will get placed, because features like ECMP are pretty common in most routing protocols.Then, the vendor's implementation of the RIB will make decisions based on their own specific implementations.

There are a few IETF documents that discuss L3 load balancing, such as [RFC 2991 - Multipath Issues in Multicast and Unicast Next-Hop Selection](http://tools.ietf.org/html/rfc2991) or [RFC 2992 - Analysis of an Equal Cost Multipath Algorithm](http://tools.ietf.org/html/rfc2992). This are generally accepted informational analyses (not standards) that talk a little bit about how these tasks are commonly accomplished, but they are not standards that vendors must follow. IGPs like OSPF are standards-based but the standards can't dictate how each vendor utilizes the data that these protocols provide.

In Cisco, load balancing on an L3 basis is very closely tied to hardware forwarding, like Route Caching and Cisco Express Forwarding. The explanatory article on Cisco's site called "[How does load balancing work?](http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094820.shtml)" makes it pretty clear how Cisco platforms do it. Packets that require process switching are load balanced in a much more round-robin style, whereas routing done via hardware like in IP CEF will take the approach of load balancing "flows" of traffic, rather than packets, which in this case is just identified as per-destination. Very similar to a port-channel, there's a property in each packet (destination IP address) that is used to identify which link should be used, and if that property does not change, then the other link is not used. Nothing we're not used to thinking about in a typical 802.3ad scenario.

Don't just take my word for it. Try disabling all forms of fast switching (CEF and otherwise) on a Cisco router and/or it's relevant interfaces - you get this wonky behavior (I again disconnect the link in the middle of the ping to simulate a failure):

    R1(config)#no ip cef
    R1(config)#int range Fa0/0 , Fa1/0
    R1(config-if)#no ip route-cache cef
    R1(config-if)#no ip route-cache
    R1(config-if)#end
    R1#ping <IP_ADDRESS> rep 10000
    Type escape sequence to abort.
    Sending 10000, 100-byte ICMP Echos to <IP_ADDRESS>, timeout is 2 seconds:
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!.!.!.!.!.!.!.!.!.!.!.!.!
    .!.!.!.!.!.!.!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
    Success rate is 92 percent (256/278), round-trip min/avg/max = 8/39/72 ms
    R1#

Here, it's obvious that there is pure round-robin style load balancing - when the failure occurs from me disconnecting a link, every other packet gets dropped while OSPF reconverges.

## Conclusion

The routing protocols may be standards-based, but the implementation of the RIB (or FIB) is up to the vendor. Load balancing is **influenced** by the routing protocol, but it is **performed** by the forwarding plane, so the rules may be different between vendor platforms. Kudos to Cisco on this one for providing a document that clearly states why the load balancing operates the way that it does, and for making that document easy to find with a basic Google search.


text:
---
title: "Questions for Mark - Lead Developer"
description: "Questions for Mark - Lead Developer"
lead: "Questions for Mark - Lead Developer."
date: 2020-10-06T08:49:31+00:00
lastmod: 2020-10-06T08:49:31+00:00
draft: false
images: []
menu:
  doks:
    parent: "scratch-pad"
weight: 630
toc: true
---

## Questions for Mark

### Invitation Questions
1.	Meeting now that I’ve joined TE
2.	Learning more about your daily routine/hassles/etc.
3.	High-ish level review of the platform from a Sr. Dev’s perspective

### Additional Questions
- Who are the current developers?
- semi-technical IT admins, on the banking/lending side
    - mortgage banks, are not very complicated or that technical
    - unaware of how to use APIs and customize the data being sent
    - singlular endpoints that take over core actions and then the other actions
    - loan attributes: and all aspects of that data, data is not really high level notation
    - oauth 2.0 security
        - create contacts and not update exisiting ones
        - store creds, they are their own identity providers within the application
    - they have to create maps to our data _(encompass: loan officer documentation and approval loan data - differs than banks)_
    - `ccffirst_name` they need to map that to their `First Name`
        - anything more complex than that, would be complicated for them
    - contact surveys, point in time details
        - send contact, get an ID, and then get a return
    - growing list of application developers, they want to extend these ideas, blend application portal, lead providers (real web developers)
        - company uses TE as a marketing tool
        - rarely taking our data, but doing something with their data with our platform; to make more sense of it
        - LOS data: 1yr after call;
        - campaign builders -> journey based (already basic rule based)
        - quarterly hackathons, to scrape the email data to see if the email is opened
        - opening to incoming lead sources (biggger effort)
        - "opportunities tracker", scans data for pricing data, and can send informative alerts (like you can save X per month)
            - sales boomering, they directly connect to credit bureaus, listing homes, building that integration

- Who do you want them to be?
- What painpoints might they have?
- What are their goals?
- How do they use our data?
- What data do we allow them to use?

## Examples
- https://github.com/raml-apis/Zillow/blob/master/api.raml

repository: batmanwgd/concepta

repo_name: batmanwgd/concepta


text:
---
published: true
title: Power of Bower Installer
layout: post
---
I like Bower, simply because it does away with visiting individual sites to download latest java scripts. It's been used mostly for java scripts though it is very generic and can handle any package. Bower is a fine package manager but it has its short comings. The main pain point for me is that it downloads the whole distribution with many files which are not needed for the project. That's the reason most people dont check-in the bower_components in their repositories.

This is where Bower Installer comes to rescue. I came across this project around a month back and was really excited to use in my projects.

Before Bower Installer, my bower.json used to look like this.

~~~ json
{
  "name": "explore-bower",
  "version": "0.0.1",
  "dependencies": {
    "backbone": "latest",
    "requirejs": "2.1.1",
    "jquery": "2.1.4",
    "bootstrap": "~3.3.5"
  }
~~~

After Bower Installer, I had to make some changes to my bower.json

~~~ json
{
  "name": "explore-bower",
  "version": "0.0.1",
  "dependencies": {
    "backbone": "latest",
    "requirejs": "2.1.1",
    "jquery": "2.1.4",
    "bootstrap": "~3.3.5"
  },
  "install": {
    "path" : {
      "css": "src/main/webapp/css",
      "js": "src/main/webapp/js"
    },
    "sources" : {
      "backbone" : [
        "bower_components/backbone/backbone.js",
        "bower_components/backbone/backbone-min.js"
      ],
      "bootstrap" : [
        "bower_components/bootstrap/dist/css/bootstrap.css",
        "bower_components/bootstrap/dist/css/bootstrap.min.css",
        "bower_components/bootstrap/dist/js/bootstrap.js"
      ]
    }
  }
}
~~~

- `install` is the new section for bower installer
- with `path` you can define the destination folder individually for css and js folder.
- even without `sources` section, bower installer can move the main files from bower componets to your defined destination folder, but with `sources` section you get greater control of what and how many files you want to move to your destination folder

Result: I found a very clean way to selectively choose the files that I need and move into my projects.

~~~ bash
src
└── main
    └── webapp
        ├── css
        │   └── bootstrap
        │       ├── bootstrap.css
        │       └── bootstrap.min.css
        └── js
            ├── backbone
            │   ├── backbone-min.js
            │   └── backbone.js
            ├── bootstrap
            │   └── bootstrap.js
            ├── jquery
            │   └── jquery.js
            ├── requirejs
            │   └── require.js
            └── underscore
                └── underscore.js
~~~

The documentation of this project is very good, for complete reference and usage:

https://github.com/blittle/bower-installer

gha_language: CSS


text:
# Windows Network Situational Awareness Commands

## PowerView Situational Awareness

*PowerView is a PowerShell tool to gain network situational awareness on Windows domains. It contains a set of pure-PowerShell replacements for various windows "net *" commands, which utilize PowerShell AD hooks and underlying Win32 API functions to perform useful Windows domain functionality.*

*It also implements various useful metafunctions, including some custom-written user-hunting functions which will identify where on the network specific users are logged into. It can also check which machines on the domain the current user has local administrator access on. Several functions for the enumeration and abuse of domain trusts also exist. See function descriptions for appropriate usage and available options. For detailed output of underlying functionality, pass the -Verbose or -Debug flags.*

*For functions that enumerate multiple machines, pass the -Verbose flag to get a progress status as each host is enumerated. Most of the "meta" functions accept an array of hosts from the pipeline.*[^1]

!!! note
    All command can be run via PowerPick to increase your OPSEC. Reducing your
    forensic artifact impact. *Allowing the execution of Powershell functionality without the use of Powershell.exe. Primarily this project uses.NET assemblies/libraries to start execution of the Powershell scripts*[^2]

### Get computers in LDAP search base and show the DNS name and OS only

```powershell
Get-DomainComputer -searchbase "LDAP://OU=place,OU=thing,DC=domain,DC=loves,DC=com" --Properties dnshostname,operatingsystem
```

### Computers with OS matching 2008, with a OU of intrest

```powershell
Get-DomainComputer -searchbase "LDAP://OU=place,OU=thing,DC=domain,DC=loves,DC=com" -OperatingSystem *2008*
```

### Computers in LDAP search base and pipe host names of intrest to Get-NetSession

```powershell
powerpick Get-DomainComputer -SearchBase "LDAP://OU=place,OU=thing,DC=domain,DC=loves,DC=com" | where-object {$_.dnshostname -like "*HOST-NAME*"} | Get-NetSession
```

### Remote Desktop Users for a machine for just medium intg RDP

```powershell
Get-NetLocalGroupMember HOST-NAME -GroupName "Remote Desktop Users"
```

### Admins for a machine for just medium intg RDP

```powershell
Get-NetLocalGroupMember HOST-NAME
```

### Corelate GPOs to domain system

```powershell
Get-NetOU -GPLink "{45172B9C-749A-479A-A9C7-4F85083CD517}" | % { Get-DomainComputer -ADSPath $_.distinguishedname -Properties dnshostname}
```

### Find all computers and pipe into local admins of machines

```powershell
Get-DomainComputer -searchbase "LDAP://OU=Location Location,OU=SOME,DC=am,DC=somthing,DC=com" -Properties name FindOne | Get-NetLocalGroupMember -Method API -Properties ComputerName,GroupName,MemberName| FT -Wrap
```

### Find all computer objects / systems that have a GPO applied

```powershell
Get-DomainOU -GPLink "{A8E139C2-8A5C-455B-905F-FF509D112E8C}" | % { Get-DomainComputer -ADSPath $_.distinguishedname -Properties dnshostname}
```

### Find all accounts with admin count set / DC sync

```powershell
Get-DomainUser -admincount -Properties samaccountname
```

### Check if user has rights to DC sync with the PDC

```powershell
Get-ObjectACL "DC=testlab,DC=local" -ResolveGUIDs | ? {
    ($_.ActiveDirectoryRights -match 'GenericAll') -or ($_.ObjectAceType -match 'Replication-Get')
}
```

### Pull all email's from user object of a certain OU and output to file for download

```powershell
get-domainuser -searchbase "LDAP://OU=place,OU=thing,DC=domain,DC=loves,DC=com" -properties cn,mail,userprincipalname,extensionattribute10,msrtcsip-primaryuseraddress | out-file -encoding ASCII C:\Windows\Tasks\contacts.txt
```

[^1]: https://github.com/PowerShellMafia/PowerSploit/tree/master/Recon#powerview
[^2]: https://github.com/PowerShellEmpire/PowerTools/tree/master/PowerPick

repository: dekoder/operator-up

repo_name: dekoder/operator-up