text:
# react-native-keyboard-aware-view

[![npm version](https://badge.fury.io/js/react-native-keyboard-aware-view.svg)](http://badge.fury.io/js/react-native)
[![NPM](https://nodei.co/npm/react-native-keyboard-aware-view.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/react-native-keyboard-aware-view/)

A simple React Native View component that resizes composite children views inside itself when the keyboard appears. You can implement your own ScrollView, ListView, Multiple Views etc... inside the View and set your own view to 'flex: 1'.

For the screen below demonstration, the ``<TextInput>`` automatically jumping according to ``<ScrollView>`` scroll is NOT related to this library. It is related to my own implementation of ``<CTextInput>``, which is another story & beyond the scope of this plugin.

The problem this plugin aims to solve is to offer easy approach to adjust the view height when keyboard shows / hides. So that you could see the view at the bottom of the screen always sticking above the keyboard. You want to implement a sticky Whatsapp-like message text input box? Set your Chat scrollview to flex: 1, and set your message box view below the scrollview, and then wrap them both inside ``<KeyboardAwareView>``. Here you go. You have implemented a sticky message box view in iOS with no effort at all!

![Demo screen](https://dl.dropboxusercontent.com/u/11386030/out.gif)

### Note: this view only affects iOS. Although still parsable in Android environment, it is treated as an ordinary ``<View>`` with "flex: 1" bootstrapped.

Tested: it only affects iOS since Android version of React Native lacks support of this callback, by v0.17:

    DeviceEventEmitter.addListener('keyboardWillShow', this.onKeyboardWillShow.bind(this))
    DeviceEventEmitter.addListener('keyboardWillHide', this.onKeyboardWillHide.bind(this))

I believe this callback feature will not be landed in the future Android version of React Native. But anyway, Android version has its very own native handling for the keyboards without coding, so this lack is somehow acceptable.

## Installation
You can install this component through ``npm``:

```shell
npm i react-native-keyboard-aware-view --save
```

## Usage
Import ``react-native-keyboard-aware-view`` and wrap your content inside
it:

```js
import { KeyboardAwareView } from 'react-native-keyboard-aware-view'
```

### Animated keyboard aware view:
```usage
<KeyboardAwareView animated={true}>
	...
</KeyboardAwareView>
```

### Instant (non-animated) keyboard aware view:
```usage
<KeyboardAwareView animated={false}>
	...
</KeyboardAwareView>
```

### 0.0.8 Updates - Android fix - optionally do not force dismiss keyboard when KeyboardAwareView layout changes:
After adopting this plugin, when your Android app needs to undergo indeterminate layout changes THAT would affect the layout of ```<KeyboardAwareView>```, the keyboard would be dismissed. If you do not want the keyboard to be dismissed by this behaviour you just have to set this parameter to true:
```usage
<KeyboardAwareView doNotForceDismissKeyboardWhenLayoutChanges={true}>
	...
</KeyboardAwareView>
```

### An Example snippet from one of my projects:
```jsx
  render() {
    return (
        <View style={{flex: 1}}>
          <KeyboardAwareView animated={true}>
            <View style={[styles.bg]}>
              <ScrollView
                  ref={(view) => {this.scrollView = view; }}
                  style={[{flex: 1, alignSelf: 'stretch'}, this.props.style]}
                  keyboardShouldPersistTaps={true}
                  automaticallyAdjustContentInsets={false}
                  onScroll={this.onScroll.bind(this)}
                  scrollEventThrottle={200}
                  onLayout={(e) => {var {x, y, width, height} = e.nativeEvent.layout; console.log(height); }}>
                <View style={{height: 34}} />
                <CTextInput scrollView={this.getScrollView()} placeholder="登記名稱"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電郵"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電話"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="登記名稱"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電郵"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電話"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="登記名稱"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電郵"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電話"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="登記名稱"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電郵"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電話"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="登記名稱"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電郵"/>
                <CTextInput scrollView={this.getScrollView()} placeholder="電話"/>
                <View style={{height: 46}} />
                <Text>或以Facebook登記</Text>
                <Image source={GLOBAL.IMAGE.icon_facebook} style={{width: 50, height: 50}} />
              </ScrollView>
            </View>
            <TouchableOpacity style={{height: 50, backgroundColor: 'transparent', alignItems: 'center', justifyContent: 'center', alignSelf: 'stretch'}}>

              <Text style={{fontSize: 20, color: '#FFFFFF'}}>提交</Text>
              <CTextInput scrollView={this.getScrollView()} placeholder="電話"/>
            </TouchableOpacity>
          </KeyboardAwareView>
        </View>
    );
  }
```

### A Easier Example:
```jsx
  render() {
    return (
        <View style={{flex: 1}}>
          <KeyboardAwareView animated={true}>
            <View style={{flex: 1}}>
              <ScrollView style={{flex: 1}}>
	              <Text style={{fontSize: 20, color: '#FFFFFF'}}>A</Text>
	              <Text style={{fontSize: 20, color: '#FFFFFF'}}>B</Text>
	              <Text style={{fontSize: 20, color: '#FFFFFF'}}>C</Text>
	              <Text style={{fontSize: 20, color: '#FFFFFF'}}>D</Text>
              </ScrollView>
            </View>
            <TouchableOpacity style={{height: 50, backgroundColor: 'transparent', alignItems: 'center', justifyContent: 'center', alignSelf: 'stretch'}}>
              <Text style={{fontSize: 20, color: '#FFFFFF'}}>Submit</Text>
            </TouchableOpacity>
          </KeyboardAwareView>
        </View>
    );
  }
```

## License

MIT.

repository: mikach/react-native-keyboard-aware-view

repo_name: mikach/react-native-keyboard-aware-view


text:
## Table of Contents

- Create a Criteria
- Using the Criteria in a Controller
- Using the RequestCriteria
-
### Create a Criteria

#### Using the command

```terminal
php artisan make:criteria My
```

Criteria are a way to change the repository of the query by applying specific conditions according to your needs. You can add multiple Criteria in your repository.

```php

use BrianFaust\Repository\Contracts\RepositoryInterface;
use BrianFaust\Repository\Contracts\CriteriaInterface;

class MyCriteria implements CriteriaInterface {

    public function apply($model, RepositoryInterface $repository)
    {
        $model = $model->where('user_id','=', Auth::user()->id );
        return $model;
    }
}
```

### Using the Criteria in a Controller

```php

namespace App\Http\Controllers;

use App\PostRepository;

class PostsController extends BaseController {

    /**
     * @var PostRepository
     */
    protected $repository;

    public function __construct(PostRepository $repository){
        $this->repository = $repository;
    }

    public function index()
    {
        $this->repository->pushCriteria(new MyCriteria1());
        $this->repository->pushCriteria(MyCriteria2::class);
        $posts = $this->repository->all();
        ...
    }

}
```

Getting results from Criteria

```php
$posts = $this->repository->getByCriteria(new MyCriteria());
```

Setting the default Criteria in Repository

```php
use BrianFaust\Repository\Eloquent\BaseRepository;

class PostRepository extends BaseRepository {

    public function boot(){
        $this->pushCriteria(new MyCriteria());
        // or
        $this->pushCriteria(AnotherCriteria::class);
        ...
    }

    function model(){
       return "App\\Post";
    }
}
```

### Skip criteria defined in the repository

Use `skipCriteria` before any other chaining method

```php
$posts = $this->repository->skipCriteria()->all();
```

### Popping criteria

Use `popCriteria` to remove a criteria

```php
$this->repository->popCriteria(new Criteria1());
// or
$this->repository->popCriteria(Criteria1::class);
```

### Using the RequestCriteria

RequestCriteria is a standard Criteria implementation. It enables filters to perform in the repository from parameters sent in the request.

You can perform a dynamic search, filter the data and customize the queries.

To use the Criteria in your repository, you can add a new criteria in the boot method of your repository, or directly use in your controller, in order to filter out only a few requests.

####Enabling in your Repository

```php
use BrianFaust\Repository\Eloquent\BaseRepository;
use BrianFaust\Repository\Criteria\RequestCriteria;

class PostRepository extends BaseRepository {

    /**
     * @var array
     */
    protected $fieldSearchable = [
        'name',
        'email'
    ];

    public function boot(){
        $this->pushCriteria(app('BrianFaust\Repository\Criteria\RequestCriteria'));
        ...
    }

    function model(){
       return "App\\Post";
    }
}
```

Remember, you need to define which fields from the model can be searchable.

In your repository set **$fieldSearchable** with the name of the fields to be searchable or a relation to fields.

```php
protected $fieldSearchable = [
    'name',
    'email',
    'product.name'
];
```

You can set the type of condition which will be used to perform the query, the default condition is "**=**"

```php
protected $fieldSearchable = [
    'name'=>'like',
    'email', // Default Condition "="
    'your_field'=>'condition'
];
```

####Enabling in your Controller

```php
    public function index()
    {
        $this->repository->pushCriteria(app('BrianFaust\Repository\Criteria\RequestCriteria'));
        $posts = $this->repository->all();
        ...
    }
```

#### Example the Criteria

Request all data without filter by request

`http://local.dev/users`

```json
[
    {
        "id": 1,
        "name": "John Doe",
        "email"<EMAIL_ADDRESS>        "created_at": "-0001-11-30 00:00:00",
        "updated_at": "-0001-11-30 00:00:00"
    },
    {
        "id": 2,
        "name": "Lorem Ipsum",
        "email"<EMAIL_ADDRESS>        "created_at": "-0001-11-30 00:00:00",
        "updated_at": "-0001-11-30 00:00:00"
    },
    {
        "id": 3,
        "name": "Laravel",
        "email"<EMAIL_ADDRESS>        "created_at": "-0001-11-30 00:00:00",
        "updated_at": "-0001-11-30 00:00:00"
    }
]
```

Conducting research in the repository

`http://local.dev/users?search=John%20Doe`

or

`http://local.dev/users?search=John&searchFields=name:like`

or

`http://local.dev/users?search=john@gmail.com&searchFields=email:=`

or

`http://local.dev/users?search=name:John<EMAIL_ADDRESS>
or

`http://local.dev/users?search=name:John;email:john@gmail.com&searchFields=name:like;email:=`

```json
[
    {
        "id": 1,
        "name": "John Doe",
        "email"<EMAIL_ADDRESS>        "created_at": "-0001-11-30 00:00:00",
        "updated_at": "-0001-11-30 00:00:00"
    }
]
```

Filtering fields

`http://local.dev/users?filter=id;name`

```json
[
    {
        "id": 1,
        "name": "John Doe"
    },
    {
        "id": 2,
        "name": "Lorem Ipsum"
    },
    {
        "id": 3,
        "name": "Laravel"
    }
]
```

Sorting the results

`http://local.dev/users?filter=id;name&orderBy=id&sortedBy=desc`

```json
[
    {
        "id": 3,
        "name": "Laravel"
    },
    {
        "id": 2,
        "name": "Lorem Ipsum"
    },
    {
        "id": 1,
        "name": "John Doe"
    }
]
```

Sorting through related tables

`http://local.dev/users?orderBy=posts|title&sortedBy=desc`

Query will have something like this

```sql
...
INNER JOIN posts ON users.post_id = posts.id
...
ORDER BY title
...
```

`http://local.dev/users?orderBy=posts:custom_id|posts.title&sortedBy=desc`

Query will have something like this

```sql
...
INNER JOIN posts ON users.custom_id = posts.id
...
ORDER BY posts.title
...
```

Add relationship

`http://local.dev/users?with=groups`

####Overwrite params name

You can change the name of the parameters in the configuration file **config/repository.php**

license: MIT

repository: forked-repo/Laravel-Repository

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: forked-repo/Laravel-Repository


text:
---
path: "/running-nifi-in-docker"
date: "2018-05-24T16:23:55.962Z"
title: "NiFi in docker with persistant workflow"
tags: [docker, nifi]
draft: false
---

I recently had to spin up a NiFi container in docker and wanted to create a default state with a template and workflow
already present.

This post talks you through how to setup a Nifi docker container and automate the inclusion of a custom processor `.nar` file, an existing `template.xml` and a `workflow` in a running state.

This process is not too well documented by Apache so I hope someone finds this useful!

## Containerisation

A recent project required our team to collaborate on a proof of concept solution which included a web interface, a NiFi workflow and an Elastic backend.

To avoid each developer having to install and build the tools from scratch we opted to `docker-compose` the whole solution. Docker compose allows us to create a series of Docker containers which can easily talk to each other.

## Docker &amp NiFi

Apache has an official [docker image](https://hub.docker.com/r/apache/nifi/) for NiFi; you can use docker to run this image with a dockerfile like this.

```docker
FROM apache/nifi:latest

EXPOSE 8080
```

You can now run the image and access the NiFi Web interface on [localhost:8080](http://localhost:8080). This is great except docker containers are designed to be ephemeral and we don't want to have to manually add our template each time we run the container so we need a way to add our templates and state to the container.

## Adding a custom processor

To add a processor to NiFi you simply need to copy the `.nar` file into the correct location inside the container and run it.

The processors in NiFi live in `/opt/nifi/nifi-1.6.0/lib/` so you can use the docker `COPY` command to copy your processor in. The `dockerfile` below assumes that the processor is in the same folder as your `dockerfile`

```docker
FROM apache/nifi:latest

COPY our_processor.nar /opt/nifi/nifi-1.6.0/lib/

EXPOSE 8080
```

## Adding a template

The process for adding a template is the same as adding a processor but with different filetypes and locations.

```docker
FROM apache/nifi:latest

COPY our_process.nar /opt/nifi/nifi-1.6.0/lib/

COPY our_workflow.xml /opt/nifi/nifi-1.6.0/conf/templates

EXPOSE 8080
```

If you now run your container you should be able to use the NiFi web interface to add a new template and your template should be available to choose. This now means we can use our processor but we still have to use the web interface to get our container into a state where the NiFi workflow is running. We should automate that!

## Automating the workflow

To automate the process of adding a template through the web interface and starting the process we must first start our container and manually get it to the state we want it to be when we start it later on.

```bash
docker build -t nifitest .
docker run -p 8080:8080 -d nifitest
```

You should now be able to load the web interface and add the template we added earlier; we can then click `play` to get our workflow running.

Now it's in a running state we need to copy that state out somehow, this is the bit which isn't documented too well! The state of the NiFi is stored in `flow.xml.gz` which lives in `/opt/nifi/nifi-1.6.0/conf/`.

To copy that file out of the container we can start an interactive `bash` by first listing the `container_id` and then running the following commands:

```bash
docker ps -a
docker exec -it <container_id> /bin/bash/
```

This will put us into the container, we can then run the following command to copy out the `flow.xml.gz`

```bash
docker cp <container_id>:/opt/nifi/nifi-1.6.0/conf/flow.xml.gz flow.xml.gz
```

We now have a copy of our NiFi state. Next we need to use that state when we run our container. To do this we can use `COPY` again to copy the file back in each time we start the container.

> NOTE: COPY always copies as root so the user the container runs as (nifi:nifi) won't have access to the file once we copy the file in. We can run a `--chown` at the same time to give ownership to the `nifi` user.

```docker
FROM apache/nifi:latest

COPY our_process.nar /opt/nifi/nifi-1.6.0/lib/

COPY our_workflow.xml /opt/nifi/nifi-1.6.0/conf/templates

COPY --chown=nifi:nifi flow.xml.gz /opt/nifi/nifi-1.6.0/conf/

EXPOSE 8080
```

## Summary

We now have a container which has a custom processor, our template available and the template loaded into the workflow and started.

This makes it as simple as `docker run <image>` when another team member wants to run the NiFi instance.

repository: dougajmcdonald/mercury

gha_language: JavaScript

gha_license_id: MIT

repo_name: dougajmcdonald/mercury


text:
name: Beast Sense
level: 2
school: divination

# Beast Sense
_2nd-level divination_

**Casting Time:** 1 action
**Range:** Touch
**Components:** S
**Duration:** Concentration, up to 1 hour

You touch a willing beast. For the duration of the spell, you can use your action to see through the beast’s eyes and hear what it hears, and continue to do so until you use your action to return to your normal senses.

repository: Wwbrett/D-D

path: /spells/beast sense.md

filename: beast sense.md

repo_name: Wwbrett/D-D


text:
# Intro to R
## Jan 11th, 2018

- You can run R on the command line, _**not as efficient**_

- **Script**: A list of instructions (in order for the computer to **execute**; a "script" that our computer should follow.

## Using R Studio

- Type your script into the **Script pane**
  - Press cmd + enter
  - Code will execute

## R Syntax

- Comments are created by pressing the # button
- "print" command in R will print out text
- Example:
 ```
 print("Hello world")
 ```
 Will print: Hello world

- You need to add the () and "" to be able to print successfully
  - If you don't add these in your code you will get an error message, these are known as _**bugs**_ in code.

## Bugs in Programming
- Syntax Error
  - An error in the use of the R language. A problem with how you said something.
  - Interpreter will error at the site of the problem.

- Logical Error
  - An error in the algorithm you used. A problem with what you said
  - Interpreter will error, but possibly __**after**__ the problem.

- Semantic error
  - An error in your approach to solve a problem.
  - Interpreter will not error, but will not do what you want.

## Variables

- Variables: A label that refers to a **value** (data)
- Example:
```
my.num <- 201
```
- my.num is the variable, 201 is the value.
- Once we have a variable, we can use that label to **refer** to a value
  - When a label is on the _**left**_, it means the _**variable**_
  - When a label is on the  _**right**_, it means the _**value**_

## Data Types
- **Numeric Data**: Used to store numbers (whole or decimal). Default computational data type.
  - Example:
  ```
  x <- 3
  y <- 1
  z <- x + y
  ```
- **Character Data**: Used to store _**strings**_ of characters. Written in single or double quotes.
  - Example:
  ```
  my.name <- "Muhammad"
  ```
- **Logical (Boolean Data)**: Used to store "yes or no" data: TRUE or FALSE
  - Example:
  ```
  is.lunch.time <- TRUE # Not the string "TRUE"
  is.monday <- FALSE
  ```
- We can apply boolean values to **logical data** like & (and), | (or), ! (not)

## Functions
- **Function**: A named sequence of instructions (lines of code). We **call** a function to do those steps.

```
paste function: paste("Hello", "World") # Will print Hello world

round function: round(5/7) # Will round to nearest .01
```

- May **return** a value (the "output"). This value must be _stored in a variable_ for the machine to use later.

## Writing functions
By writing our own functions we can:
- Easily reuse algorithms
- Debug one piece of a program at a time
- Abstract an algorithm to focus on the bigger picture

General Syntax:
```
FunctionName <- function(name) {

  # body: instructions (code) go here

}

SayHello <- function(name) {

  greeting <- paste("hello", name)

  print(greeting)

}

SayHello("Muhammad")
```


text:
+++
date = "2016-05-04T12:14:21-07:00"
type = "talk"
title = "A DevOps State of Mind with Docker and Kubernetes"
+++

**Abstract:**
Rapid innovation, changing business landscapes, and new IT demands force businesses to make changes quickly. The DevOps approach is a way to increase business agility through collaboration, communication, and integration across different teams in the IT organization. In this presentation, you’ll learn about:

The acceleration of Application Delivery for the Business with DevOps

The transformation of IT to a DevOps, Microservices, and Container based Cloud Architecture

How DevOps practices can operate in a Docker and Kubernetes, enabled environment.

Docker, Kubernetes and DevOps, used together, can reduce software delivery cycle times, drive automation, and increase efficiency.

How other organizations are using DevOps and how to replicate their success

Join Chris Van Tuin, Chief Technologist, West at Red Hat, as he walks through how DevOps can accelerate application delivery for the Business.

**Speaker:**
Chris Van Tuin, Chief Technologist for the Western US at Red Hat, has over 20 years of experience in IT and Software. Since joining Red Hat in 2005, Chris has been architecting solutions for strategic customers and partners with a focus on emerging technologies including IaaS, PaaS, and DevOps. He started his career at Intel in IT and Managed Hosting followed by leadership roles in services and sales engineering at Loudcloud and Linux startups. Chris holds a Bachelors of Electrical Engineering from Georgia Institute of Technology.

repository: joelaha/devopsdays-web

repo_name: joelaha/devopsdays-web


text:
This is the matlab script code for oriented occlusion boundary detection task on BSDSownership/NYUv2-OR/iBims-1 dataset and tests successfuly on Matlab2016b. You can use it to evaluate and visulize the oriented occlusion boundary detection results. The code is originally developed by Guoxia Wang and Peng Wang and offered in https://github.com/GuoxiaWang/DOOBNet/tree/master/doobscripts.

# installation

Unzip the evaluation_code.zip in this directory.

# Evaluation

There are two main interfaces:
*  `EvaluateOcc.m`
   This script perform the evaluation.
   In this script, you need to set following variables:
   ```
   oriGtPath          it specifies the directory that contains mat files of test images.
   oriResPath         it specifies the root directory of prediction results.
   testIdsFilename    the relative or absolute path of test ids file.
   opt.method_folder  the folder name in oriResPath.
   opt.model_name     the folder name in opt.method_folder that contains mat files of your methods prediction.
   ...
   ...                you can see the other variables in EvaluateOcc.m
   ```
   ```shell
   # evaluate on metrics
   cd evaluation/
   matlab -nodisplay
   run EvaluateOcc.m
   ```
   The orientation occlusion estimation metrics are showed under 'Orientation PR'.

   The occlusion probability maps after NMS are stored in dir opt.method_folder/test_epoch_dataset/images/.

*  `OccCompCurvesPlot.m`
   This script plots multi algorithms occlusion boundary Precision-Recall curves, oriented occlusion boundary Precision-Recall curves, oriented occlusion boundary Accuracy-Recall curves.
   In this script, you need to set following vairables:
   ```
   algs        N x 1 cell, each element is pridiction path
   nms         N x 1 cell, each element is algorithm name which will be present at legend
   export_dir  the directory that you want to save the plots
   ```
   ```shell
   # plot performance curves
   cd evaluation/
   matlab -nodisplay
   run OccCompCurvesPlot.m
   ```
   Figures are stored in export_dir in the code. To plot comparision curves on BSDSownership, download results of other methods [here](https://1drv.ms/u/s!AhUxUphMG7I4jZNaP0oxM8MqJImW9Q?e=vwhcfP).

   N.B. It's recommended to run under matlab command mode (matlab -nodisplay) to avoid possible matlab crash.

# Visualization

The visualization script supports 3 type figures: original image, ground truth oriented occlusion boundary map with arrow and corresponding prediction map.

*  `PlotAll.m` is the main point. You need to set following variables:
   ```
   img_dir            the original images directory.
   gt_mat_dir         the ground truth annotation directory.
   res_mat_dir        the prediction directory, which contans .mat files
   export_dir         the directory that you want to save the print eps figure
   test_ids_filename  the relative or absolute path of test ids file.
   ```
   ```shell
   # plot figures
   cd visualization/
   matlab -nodisplay
   run PlotAll.m.
   ```
   Figures are stored in export_dir in the code.

   N.B. It's recommended to run under matlab command mode (matlab -nodisplay) to avoid possible matlab crash.

# Issues

*  If you meet the error about edgesNmsMex or correspondPixels, you can download [edge box](https://github.com/pdollar/edges) and add the path to matlab path or copy edgesNmsMex.mexa64 and correspondPixels.mexa64 from `edges/private` folder to `common` folder. If you can not run, please recompile the edgesNmsMex and correspondPixels according the README.
*  If you meet the error about convConst or gradientMex, you can download [piotr's toolbox](https://github.com/pdollar/toolbox) and add the path to matlab path or copy convConst.mexa64 and gradientMex.mexa64 from `piotr_toolbox/channels/private` folder to `common` folder. If you can not run, please get more information from author's website.


text:
Move.it

NLW#04 React - An application to exercise and stretch the body 💪

# How to use

To start your Next.js website:

```
# Clone this repository
$ https://github.com/VictorMenegazzo/moveit.git

# Install dependencies
$ yarn install

# Start the project
$ yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

# License
This project is under the MIT license.

---
 Made with 💙 by Victor Menegazzo 👋

repository: VictorMenegazzo/moveit

repo_name: VictorMenegazzo/moveit


text:
---
hrs_structure:
  division: '1'
  volume: '2'
  title: '9'
  chapter: 103D
  section: 103D-107
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0103D-0107
    parent: HRS0103D
    name: 103D-107 Compliance audit unit; establishment and purpose
weight: 66040
title: Compliance audit unit; establishment and purpose
full_title: 103D-107 Compliance audit unit; establishment and purpose
---
**[§103D-107] Compliance audit unit; establishment and purpose.** There is established a compliance audit unit within the office of the auditor. The purpose of this unit shall be to:

(1) Periodically review and audit procurement practices within government to ensure compliance with this chapter and all applicable rules; and

(2) Advocate competition, fairness, and accountability in the procurement process.

Reports made by this unit shall be a matter of public record. This unit shall utilize as part of the review process, a review of records and activities specifically for trends and patterns of occurrence. [L Sp 1993, c 8, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# **Employee Manager** [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

By Sally Alvarenga

---

## Description

In this application I created a content management systems (CMS), without starter code, that will allow a user to view and manage a database of employees and their respective roles inside a company. My application is a command-line application that uses Node.js, Inquirer, and MySQL.

My application is able to accept user input to determine if they want to; view all departments, view all roles, view all employees, add a department, add a role, add an employee, and update an employee role. Each of these options render various tables or inquire prompts that adds or updates the desired information in the database.

The following video shows an example of my application being used from the command line:

[![A video thumbnail shows the command-line employee management application with a play button overlaying the view.](./assets/videoThumbnail.png)](https://drive.google.com/file/d/1DZ5ITuCVmlOKO75TgvER0EVzzPgfbjz3/view?usp=sharing)

Table of Contents

Installation

Usage

License

Tests

Questions

---

## Installation

Run and install the database in the schema by running the following in the terminal:

```md
mysql -u root -p
password:
source schema.sql
```

Run and install npm packages and seeds by running the following in the terminal:

```md
npm install
npm run seeds
```

## Usage

Type into the terminal:

```md
To start application: node index.js
Use the arrows to scroll and make selections.
To exit the application: control + C
```

## License

Distributed under the MIT License

    Copyright (c) 2021 Sally Alvarenga

## Tests

Testing and Debugging has already been done by the developer and but feedback will be appreciated for further development.

---

## Questions

For further questions and inquiries please feel free send me an email or a direct message on GitHub

Sally Alvarenga -<EMAIL_ADDRESS>
GitHub Profile: [@salvarenga74](https://github.com/salvarenga74)

branch_name: refs/heads/main


text:
# Install klot.io on Raspberry Pi's

During installation, a lot of services and devices need to initialize and connect. Your network state will eventually be consistent. So, if something doesn't work, wait a few minutes and try again.

(I'll be working on smoothing everything out, so expect the setup to get smoother over time.)

## Easiest setup

### Requirements

- Two or more Raspberry Pi's. Tested with [3B+](https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/) Pi's, but it may work on other models.
  - If you want to do more stuff, use 3 or 4.
- Two or more SD cards (one per Pi).
  - I'm fond of [Samsung's EVO Select 32Gb](https://www.samsung.com/us/computing/memory-storage/memory-cards/microsdhc-evo-select-memory-card-w--adapter-32gb--2017-model--mb-me32ga-am/) cards but use whatever you like. I'm not an expert in which cards perform best.
- A local computer from which you can burn SD cards, access websites, and manage your local network.
- An ethernet connection available for connecting your Raspberry Pi's to your local network.
  - The ethernet connection is for setup only.
  - Connecting one Pi at a time is fine.
- Your local network has DHCP and you plan to use it.
- (Optional) You know how to reserve IP addresses on your network.

### Burn klot.io to SD cards

1. On your local workstation, download [pi-0.3.img.zip](https://klot-io.sfo2.cdn.digitaloceanspaces.com/pi-0.3.img.zip).
2. Burn this image to each of your SD cards.

### Add Raspberry Pi master node to your network

1. Insert an SD card into a Pi.
2. Wire to your network (ethernet cable).
3. Power up.
4. Wait a few minutes or so as the Pi's OS expands the klot.io filesystem.
5. Get impatient and go to [http://klot-io.local/](http://klot-io.local/) anyway, understanding that it might not come up right away or might be persnickety.

   ![login](img/login.png)
6. Log in with the password 'kloudofthings'. This logs you in to your new Pi master node.

 When you're done, it should look similar to the following image.

![config](img/config.png)

- **password**: Set a new password that's at least 8 characters. This password will set access for both the GUI/API you're using and the pi account on the Pi.
- **ssh**: Decide whether to enable SSH or leave it disabled.  It's up to you, and you can change later by accessing this admin page again.
- **interface**: Choose wired or wireless for your local network.
- **country**: If using wireless, your WiFi's country.
- **ssid**: If using wireless, your WiFi network's name.
- **psk**: If using wireless, your WiFi's password.
- **role**: Use 'master' for this first one.
- **cluster**: Give your cluster a name, lowercase, no spaces. (I should have something check that and password too). This will be prepended to the name of the admin page going forward, too.

1. Click **Configure**. The admin page's URL changes to <cluster>-klot-io.local.
2. When prompted, log in with your new password.
3. Wait for **Status - Initializing** at the top of the page to change to **Status - Master**. This'll take several minutes; might want to get a sandwich.

![status](img/status.png)

To access the admin page from now on, use <cluster>-klot-io.local. This is the hostname of the master node. This page is your home base for the Kubernetes cluster.

Note: You might want to go to your router and reserve the IP address for the master node. This will prevent the IP from changing. Mine doesn't seem to need it but I don't know every router.

### Join workers

0. Wait for **Status - Master** on your admin page at <cluster>-klot-io.local.
1. Plug another SD card with the klot.io image into another Pi.
2. Wire to your network (ethernet cable). If your master node is set to use WiFi, it's okay to unplug the master Pi from the ethernet first.
3. Power up.
4. From <cluster>-klot-io.local, select the **Nodes** tab.
5. Wait for a node called 'klot-io' to appear.  That's your new node.

   ![join worker node](img/join.png)
6. Wait for your master node to have the status 'Ready'. Not sure why that status and the other aren't in sync. You'll want to wait a few minutes as the hard drive reconfigures and the Pi reboots; it'll be be persnickety otherwise.
7. Choose how you want to configure the worker node.
   7a. To have it join as a worker with the same settings as the master, give it a name and click **Join**.
   7b. Or, to have it join as a worker with different settings, click its name. This opens a new Config page on its own site. Refer to the previous section for an explanation of each field.
8. On the master node's admin page, wait 20 seconds or so. The new worker node will appear on the **Nodes** tab as (name)-<cluster>-klot-io.local.
9. If you've switched from wired to wireless, the new node may hang as 'NotReady'.  Give it a minute and then power cycle the worker.
10. Repeat these steps for as many workers as you want. Do one at a time. Make sure each name is unique (ya, I should probably write something to check this too).

When you're done, your master and worker nodes will all appear on the **Nodes** tab with the 'Ready' status.

![nodes](img/nodes.png)

Congrats!  You have a Kubernetes cluster running on your Raspberry Pi's!

Next steps: Hit up [Apps](Apps.md) for what's next.

To see what this system can do, check out [GUI](GUI.md).

## More secure setup

This is a little more involved but more secure.

Note: The more secure setup works on Mac only for now. Happy to do Windows and Linux (which might already work as is?) when I have the chance.

### Requirements

Same as above:

- Two or more Raspberry Pi's. Tested with [3B+](https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/) Pi's, but it may work on other models.
  - If you want to do more stuff, use 3 or 4.
- Two or more SD cards (one per Pi).
  - I'm fond of [Samsung's EVO Select 32Gb](https://www.samsung.com/us/computing/memory-storage/memory-cards/microsdhc-evo-select-memory-card-w--adapter-32gb--2017-model--mb-me32ga-am/) cards but use whatever you like. I'm not an expert in which cards perform best.
- A local computer from which you can burn SD cards, access websites, and manage your local network.
- An ethernet connection available for connecting your Raspberry Pi's to your local network.
  - The ethernet connection is for setup only.
  - Connecting one Pi at a time is fine.
- Your local network has DHCP and you plan to use it.
- (Optional) You know how to reserve IP addresses on your network.

New requirements:

- docker installed on your workstation.
- docker-compose installed on your workstation.
- You know your way around Docker and a command line in general.

### Burn klot.io and Docker to SD cards

Basically, you can run the Docker GUI locally and burn your settings right onto the cards before putting them into the Pi's.

1. On your local workstation, download [pi-0.3.img.zip](https://klot-io.sfo2.cdn.digitaloceanspaces.com/pi-0.3.img.zip).
2. Burn this image to each of your SD cards.
3. Pop the SD card out after burning and pop it back in.
4. Enable the cross compiler with `make cross`. This allows ARM (Raspberry Pi processor) images to run on Docker.
5. Type `make config` in this repo and go to http://<IP_ADDRESS>:8084 when docker compose is up.
6. Configure the first SD card as the master.
7. Press `Ctrl-C` to exit.
8. Run `make clean` to ensure there are no residual Docker images running.
9. Repeat for each worker SD card. Make sure you eject each SD from the Mac.
10. Put the cards in the Pi's and boot up.
11. After a few minutes, go to http://<cluster>-klot-io.local where <cluster> is the cluster you configured.

Check out [Apps](Apps.md) and [GUI](GUI.md) for more.

## H@X0rs ONLY setup

![Cool Folks Zone - Keep Out](https://66.media.tumblr.com/e78e21d4fc54414762f10870c3ad28d1/tumblr_n3kwswb9FS1qgoq0ro1_500.png)

The config files to set up the Pi's are basic YAML. Normally they're in the `/opt/klot-io/config/` directory, but if you put files in the `/boot/klot-io/config/` directory, the Pi's will automatically copy and implement them.

That's all the above process is doing. It's mounting the `/boot/klot-io/config/` inside the API container as `/opt/klot-io/config/`. So when it saves the config to `/opt/klot-io/config/` it ends up on `/boot/klot-io/config/`, which is copied over when the Pi starts up.

Here's the different files:

`account.yaml` - Controls the Pi and GUI/API account

```yaml
password: # used for the Pi user account and GUI/API login
ssh:      # enabled|disabled
```

`network.yaml` - Controls the Pi's network connection for Kubernetes

```yaml
interface: # eth0 - wired | wlan0 - wireless
country:   # country code for wireless settings, eg. US
ssid:      # WiFi SSID to connect to
psk:       # WiFi password to connect with (leave blank for none)
```

`kubernetes.yaml` - Controls the Pi's role in Kubernetes

```yaml
role:      # master|worker|reset - completely resets Kubernetes via kubeadm reset
cluster:   # name of the cluster
name:      # name of the node (worker only)
```

1. On your local workstation, download [pi-0.3.img.zip](https://klot-io.sfo2.cdn.digitaloceanspaces.com/pi-0.3.img.zip).
2. Burn this image to each of your SD cards.
3. Pop the SD card out after burning and pop it back in.
4. Create the three YAML files shown above in `/Volumes/boot/klot-io/config`.
   - Make sure you use the same password for each.
   - The Kubernetes token the workers use for joining is derived from this password.
5. Repeat for each Pi. Most likely, the `account.yaml` and `network.yaml` files will be identical for each Pi. The `kubernetes.yaml` files will be slightly different for each Pi.
   - Have one and only one node with the 'role' set to 'master'.
   - 'cluster' name needs to be the same on each node.
   - Worker 'name' names each need to be different.

## SSD setup

This is how to boot off of an SSD hard drive for installation. I put this here because I'll forget otherwise.

### Requirements

- A hard drive like [this](https://www.amazon.com/gp/product/B073H552FK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1).

### Burn klot.io to SSD

1. On your local workstation, download [pi-0.3.img.zip](https://klot-io.sfo2.cdn.digitaloceanspaces.com/pi-0.3.img.zip).
2. Burn this image to each of your SSD.
3. (Optional - set kubernetes to 'reset' for now, just safer) `make config`.
4. Boot the Pi with the SSD attached (no SD card).
5. `sudo lsblk` to determine the partition (usually sda).
6. `sudo fdisk /dev/sda` to repartition.
7. `p` to copy start of sda2.
8. `d` and accept default to delete the 2 partition (it's ok).
9. `n` new primary (default), `2` (default) paste the start, and all the way to the end (default), `n` to not remove signature.
10. `w` to write.
11. `sudo shutdown -r now` to reboot.
12. `sudo resize2fs /dev/sda2` to resize. (takes a bit btw)
13. Now have it join the cluster through the Master's GUI

repository: klot-io/pi-setup

gha_language: CSS

repo_name: klot-io/pi-setup


text:
---
layout: post
date:   2017-01-05 08:00:00 +1200

title: "Bootstrap 4 Cookbook"
imgurl: https://images-na.ssl-images-amazon.com/images/I/5159HcAMLrL._SL200_.jpg
amazonid: 178588929X
author: Snigdhendu Bikas Bhaumik
press: Packt Publishing
pubdate: 2017-01-05
pagesize: 317
rating: 0
download-link: http://www1.zippyshare.com/v/mZ1hORkd/file.html
download-format: PDF (convert), EPUB, MOBI
download-size: 2.7

tag-press: Packtpub
tags:  Packtpub Bootstrap CSS HTML
---

***Over 75 recipes to help you build elegant and responsive web applications with Bootstrap 4***

### About This Book

- Build intuitive user interfaces that are mobile-ready with the latest features offered by Bootstrap 4
- Packed with easy-to-follow recipes on building responsive web pages with Bootstrap 4 that can be applied to a web project of your choice
- Harness, integrate, and extend the capabilities of Bootstrap 4 to create an enhanced user experience

### Who This Book Is For

If you are a web designer or a developer who is familiar with the basics of Bootstrap and now want to build highly responsive and professional web pages using Bootstrap 4, this cookbook will get you up and running quickly. Familiarity with the fundamentals of HTML, CSS and jQuery, and some experience of incorporating JavaScript plugins is assumed.

### What you will learn

- Create stunning UIs using Bootstrap's responsive CSS classes and objects
Design layouts with responsive, offsetting, nesting columns of the grid system
- Customize themes using the latest Bootstrap 4 components
- Use the development and customization environment to create applications with AngularJS using Bootstrap 4
- Develop an ASP.Net web application with Bootstrap 4
- Get a deep understanding of Bootstrap 4

### In Detail

Bootstrap, one of the most complete frameworks, is perfectly built to design elegant, powerful, and responsive interfaces for professional-level web pages. It supports responsive design by dynamically adjusting your web page layout.

This book is a collection of techniques showing you how to use all the latest features of Bootstrap to build compelling UIs. The book starts off by showing you how you can leverage the latest core features of Bootstrap 4 to create stunning web pages and responsive media. You will gradually move on to extending Bootstrap 4 with the help of plugins to build highly customized and powerful UIs.

Finally, you'll see how bootstrap can be integrated with some of the most popular frameworks such as Angular and ASP.Net MVC to build web applications with stunning interfaces. You will discover several techniques that can be applied to your own web projects to build sleek, beautiful UIs and customize them. By the end of this book, you will know how to leverage, extend, and integrate bootstrap to achieve optimal results for your web projects.

### Table of Contents

Chapter 1. Installing Bootstrap 4 and Comparing Its Versions
Chapter 2. Layout Like a Boss with the Grid System
Chapter 3. Power Up with the Media Object, Text, Images, and Tables
Chapter 4. Diving Deep into Bootstrap 4 Components
Chapter 5. Menus and Navigations
Chapter 6. Extending Bootstrap 4
Chapter 7. Make Your Own jQuery Plugins in Bootstrap 4
Chapter 8. Bootstrap 4 Flexbox and Layouts
Chapter 9. Workflow Boosters
Chapter 10. Creating a Blog with Jekyll and Bootstrap 4
Chapter 11. Bootstrap 4 with ASP.NET Core
Chapter 12. Integrating Bootstrap 4 with React and Angular

### Book Details

Title: Bootstrap 4 Cookbook
Author: Snigdhendu Bikas Bhaumik
Length: 317 pages
Edition: 1
Language: English
Publisher: Packt Publishing
Publication Date: 2017-01-05
ISBN-10: 178588929X
ISBN-13:<PHONE_NUMBER>295

extension: markdown


text:
# My personal dotfiles

The aim of this project is to provide minimalistic yet powerful and convenient default configuration files.

## shell

Configuration files for zsh and bash are available.

Easiest way to implement:

```shell
cd ~
git clone git@github.com:haukurh/.dotfiles.git
# bash
mv .bashrc .bashrc.bak && ln -s .dotfiles/.bashrc .
# zsh
mv .zshrc .zshrc.bak && ln -s .dotfiles/.zshrc .
```

## git config

Some useful git configuration can be included in `~/.gitconfig`

```ini
[user]
name = <YOUR NAME>
email = <YOUR EMAIL>
signingkey = <YOUR GPG KEY ID>

[include]
path = ~/.dotfiles/gitconfig

[includeIf "gitdir:~/src/work/"]
path = ~/.gitconfig-work

[includeIf "gitdir:~/src/projects/"]
path = ~/.gitconfig-personal

[commit]
gpgsign = true

[tag]
gpgsign = true
```

With these includeIf statements we can have custom settings based on folders,
this can be useful if you use have different git email for work vs. personal for example.

This config suggest that you use GPG to sign your commits. If you're not already doing so you
read up on it in the GitHub documentation.

Sources:

- [GitHub Docs: Managing commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification)

## ssh config

Here are some suggested SSH setting the aim of which is to give you an even better experience when working with SSH.

```
Host *
	ServerAliveInterval 90
	ControlPath ~/.ssh/connections/%r@%h:%p
	ControlMaster auto
	ControlPersist 120
	IgnoreUnknown UseKeychain
	UseKeychain yes
```

If we break them down quickly:

- `ServerAliveInterval` will set a timeout on the connection in seconds.
- `ControlPath`, `ControlMaster` and `ControlPersist` is an fantastic mechanism which allows us to reuse an already
established connection, meaning the following connections will be quicker to establish. After all connections have been
disconnected the control connection will die after 120 seconds.
- `IgnoreUnknown` allows us to specify options, which aren't available on all platforms, without causing a failure.
- `UseKeychain` is available on macOS and allows you to use the keychain to keep track of passphrases.

In order to make this work you'll have to create the folder which we use to keep track of our multiplexed connections.
Which you can do with this command.

```shell
mkdir -p ~/.ssh/connections
```

I would recommend to read the manual `man ssh_config` for a better explanation on these options.

## macOS terminal

iTerm2 and oh-my-zsh are boring...

Why not simply configure terminal to pretty and familiar?

You can import the Terminal.terminal profile into the macOS terminal

![Screenshot of terminal](assets/terminal.png)

_I mean do you see that pink highlighting_ 👆


text:
# PostfixTCP Transport Map GeoIP Relay (Go version)

This is a Go version port from my previous [python program](https://github.com/alantang888/other_program_script/tree/master/PostfixTCP%20transport%20map%20GeoIP%20relay).

This tools is use MX record's IP and GeoIP database to determine use which regional relay server to delivery email to destination.

Postfix use TCP transport map connect to this program.

License:

This product includes GeoLite2 data created by MaxMind, available from
http://www.maxmind.com.


text:
# reducer-pipe [![npm package][npm-badge]][npm] [![Travis][build-badge]][build] [![Coveralls][coverage-badge]][coverage]

[build-badge]: https://img.shields.io/travis/bydooweedoo/reducer-pipe/master.svg?style=flat-square
[build]: https://travis-ci.org/bydooweedoo/reducer-pipe

[coverage-badge]: https://img.shields.io/codecov/c/github/bydooweedoo/reducer-pipe.svg?style=flat-square
[coverage]: https://codecov.io/github/bydooweedoo/reducer-pipe

[npm-badge]: https://img.shields.io/npm/v/reducer-pipe.svg?style=flat-square
[npm]: https://www.npmjs.org/package/reducer-pipe

`reducer-pipe` helps you to pipe `redux` reducers with given state and action, passing previously returned state to next reducer, then keep last updated state.

## Getting started

Install `reducer-pipe` using [npm](https://www.npmjs.org/):

```shell
npm install reducer-pipe --save
```

Then using ES6

```js
import { increment, decrement } from './my-reducers';
import reducerPipe from 'reducer-pipe';

export default reducerPipe([
  increment,
  decrement,
]);
```

Using ES5

```js
var myReducers = require('./my-reducers');
var reducerPipe = require('reducer-pipe');

module.exports = reducerPipe([
  myReducers.increment,
  myReducers.decrement,
]);
```

## Usage

You can rewrite this:
```js
const reducer = (state, action) => {
  if (!state) state = initialState;
  switch (action.type) {
    case 'ADD':
    case 'INCREMENT':
      return incrementReducer(state, action);
    case 'SUBTRACT':
    case 'DECREMENT':
      return decrementReducer(state, action);
    default:
      return state;
  }
};

reducer({counter: 0}, {type: 'INCREMENT'}); //=> {counter: 1}
```

To this:
```js
import reducerPipe from 'reducer-pipe';

const reducer = reducerPipe([
  (state/*, action*/) => (state ? state : initialState),
  incrementReducer,
  decrementReducer,
]);

reducer({counter: 0}, {type: 'INCREMENT'}); //=> {counter: 1}
```

> _See also_ `reducer-chain` in order to chain given reducers with same given state and action.

## Examples

* [counter](./examples/counter)

## Explanation

Take this code:
```js
const reducer = reducerPipe([
  initial, // returns initial state if given state is null, else returns given state
  increment, // increments counter in state copy if action is INCREMENT, else returns given state
  decrement, // decrements counter in state copy if action is DECREMENT, else returns given state
]);
```

When we call:
```js
reducer(null, {type: 'INCREMENT'}); // default compare set to `reducerPipe.compare.withInitial`
```

It will execute:
```js
// We pass given state and action to our first reducer in list, which is `initial`
initial(null, {type: 'INCREMENT'}) //=> returns initial state {counter: 0}
compare(null, {counter: 0}) //=> Previous state is null, returns {counter: 0}

// now we will pass previously returned state by compare
increment({counter: 0}, {type: 'INCREMENT'}) //=> Increment counter by 1, returns {counter: 1}
compare({counter: 0}, {counter: 1}) //=> Current state differs from previous, returns {counter: 1}

// now we will pass previously returned state by compare
decrement({counter: 1}, {type: 'INCREMENT'}) //=> Nothing happens, returns given state {counter: 1}
compare({counter: 1}, {counter: 1}) //=> Both state are the same object, returns {counter: 1}
```

Pipe:
```js
reducer(state, action) => updatedState
  initial(state, action) => newState
    compare(state, newState) => newState
  increment(newState, action) => updatedState
    compare(newState, updatedState) => updatedState
  decrement(updatedState, action) => updatedState
    compare(updatedState, updatedState) => updatedState
```

Chain:
```js
reducer(state, action) => updatedState
  initial(state, action) => newState
  increment(state, action) => updatedState
  decrement(state, action) => state
  compare(state, newState) => newState
  compare(newState, updatedState) => updatedState
  compare(updatedState, state) => updatedState
```

## Compare signature

```js
initialize(initialState) => iterator(previousState, currentState) => nextState
```

* `initialState` is corresponding to the state passed to the high order reducer.
* `previousState` is corresponding to the previously returned state. Defaults to `initialState`.
* `currentState` is corresponding to the state returned by the reducer at the current index in the list.
* `nextState` is corresponding to the state you want to keep.
* `initialize` will be called everytime once with the given state from the high order reducer.
It must returns an iterator function for comparing previous and current state, and return the prefered one.
* `iterator` will be called on each reducer result (passed as `currentState`). It must compare with `previousState` (defaults to `initialState`) and
return the state you want to keep next.

_Note_: Please note that `initiaze` is called before calling any reducer.
Then reducer are called one by one in given order, and `iterator` is called after each `reducer`.

## Available compare functions

`reducer-pipe` built in with 4 different compare functions available under `reducerPipe.compare`:

| Name | Signature | Equals |
| ---- | --------- | ------ |
| `withInitial` (default) | `(initialState) => (previousState, currentState) => nextState` | `R.equals(initialState, currentState)` |
| `withInitialCustomEquals` | `(customEquals) => (initialState) => (previousState, currentState) => nextState` | `customEquals(initialState, currentState)` |
| `withPrevious` | `(initialState) => (previousState, currentState) => nextState` | `R.equals(previousState, currentState)` |
| `withPreviousCustomEquals` | `(customEquals) => (initialState) => (previousState, currentState) => nextState` | `customEquals(previousState, currentState)` |

## Compare usage

With `immutable`:
```js
// ./immutableReducerPipe.js
import Immutable from 'immutable';
import reducerPipe from 'reducer-pipe';

export default reducerPipe(
  reducerPipe.compare.withPreviousCustomEquals(Immutable.is)
);
```
```js
// ./index.js
import Immutable from 'immutable';
import { reducer1, reducer2 } from './reducers';
import immutableReducerPipe from './immutableReducerPipe';

const initialState = Immutable.Map({counter: 0});

export default immutableReducerPipe([
  (state/*, action*/) => (state ? state : initialState),
  reducer1,
  reducer2,
]);
```

With custom compare:
```js
import reducerPipe from 'reducer-pipe';
import {reducer1, reducer2} from './reducers';

const customCompare = initialState => (previousState, currentState) => (
  currentState !== null &&
  currentState !== initialState ?
  currentState : previousState
);

const initialState = Object.freeze({counter: 0});

export default reducerPipe(customCompare, [
  (state/*, action*/) => (state ? state : initialState),
  reducer1,
  reducer2,
]);
```

## Links

* `renum` is a small library to create enum using frozen objects in javascript from multiple sources.
* `reducer-chain` helps you to chain `redux` reducers with given state and action, then keep last updated state.
* `reducer-sandbox` helps you to reuse your reducers in different place without conflict them.

repository: bydooweedoo/reducer-pipe

repo_name: bydooweedoo/reducer-pipe


text:
# wavepot editor

### rationale

- we don't need 95% of the features out-of-the-shelf editors provide
- instead, we have special needs that would be a pain to implement on top of other editors
- we need it to be fast, *really fast*. speed over features.

### goals

- clean
- speed
- simplicity
- minimum gc
- minimum set of features, only what we need
- always operate at worst-case and optimize for that, unexpected slowdowns are not acceptable

### features

by order of importance:

- shortcut keys
- syntax highlighting
- inline error display
- multiline tab/untab
- multiline code move
- split views
- autoindent
- autocomplete
- pluggable visual feedback (for example, a `Math.sin()` call could display a dedicated oscilloscope)
- pluggable ui controls (when over a call, could display a knob, slider, or selecting a number then holding mousedown and moving up/down it could alter the number)
- ?

### license MIT

repository: fourks/editor

repo_name: fourks/editor


text:
## Tests

To execute the tests, install `mocha ` and run the following in the root of
the project:

    npm install -g mocha
    mocha test --recursive

It's important to run mocha with the `--recursive` flag, as most tests are
located in nested folders.

## Code coverage

To test code coverage of the tests, install `istanbul` and run it:

    npm install -g istanbul
    istanbul cover _mocha -- test --recursive

Note the underscore before mocha, and the `--` surrounded by spaces after _mocha.
See also https://github.com/gotwarlost/istanbul/issues/44.

To see the results, open the generated report in your browser:

    ./coverage/lcov-report/index.html

## Test plan

### Sense

Sense all types of documents/files and check that returned results are correct

### Validator

TODO:

### CCDA Parser

Parse valid CCDA from XML file and run it through validator

### CMS Parser

Parse valid CMS from text file and run it through validator

### CCDA r1 Parser

TODO:

### CCDA Generator

TODO:

Parse CCDA file -> BB JSON -> Generate CCDA XML file - > Parse CCDA file -> BB JSON #2 - > Generate CCDA XML file #2

BB JSON should be equal BB JSON #2
Generated CCDA XML file should be equal Generated CCDA XML file #2

repository: mariaro/blue-button

repo_name: mariaro/blue-button


text:
---
layout: default
---

# 1997-08-12 - Re: 5881.html

## Header Data

From: Ray Arachelian<EMAIL_ADDRESS>To: Damaged Justice<EMAIL_ADDRESS>Message Hash: 6318d94a69ff34e16f67645b328df41ee0a8770dcbd3f120cadbf10bbf854ef2

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-08-12 16:06:32 UTC

Raw Date: Wed, 13 Aug 1997 00:06:32 +0800

## Raw message

```
{% raw  %}From: Ray Arachelian<EMAIL_ADDRESS>Date: Wed, 13 Aug 1997 00:06:32 +0800
To: Damaged Justice<EMAIL_ADDRESS>Subject: Re: 5881.html
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Tue, 12 Aug 1997, Damaged Justice wrote:

>    "There was no mention on the Web site that you have to be of age,"
>    Nixon said. "It's safe to say that any establishment in the state of
>    Missouri [that similarly served drinks to minors] would lose their
>    license."

 :)

*Burp!*  Thash wuzzz... somes good beeeer dere i had *hick*  wheresszssz
the oththterrr sixzzpak  *burp* gimnme morrrr...

=====================================Kaos=Keraunos=Kybernetos==============
.+.^.+.|  Ray Arachelian    |Prying open my 3rd eye.  So good to see |./|\.
<EMAIL_ADDRESS>once again. I thought you were      |/\|/\
<--*-->| ------------------ |hiding, and you thought that I had run  |\/|\/
../|\..| "A toast to Odin,  |away chasing the tail of dogma. I opened|.\|/.
.+.v.+.|God of screwdrivers"|my eye and there we were....            |.....
======================= http://www.sundernet.com ==========================

{% endraw %}
```

## Thread

+ Return to [August 1997](/archive/1997/08)

+ Return to "[Damaged Justice <frogfarm@yakko.cs.wmich.edu>](/authors/damaged_justice_frogfarm_at_yakko_cs_wmich_edu_)"
+ Return to "[Ray Arachelian <sunder@brainlink.com>](/authors/ray_arachelian_sunder_at_brainlink_com_)"

+ 1997-08-12 (Tue, 12 Aug 1997 19:27:43 +0800) - [5881.html](/archive/1997/08/da0f304d627c1a7a3c8caa99c34f2dff68123db8b449315d3ac10965e434fed9) - _Damaged Justice<EMAIL_ADDRESS>  + 1997-08-12 (Wed, 13 Aug 1997 00:06:32 +0800) - Re: 5881.html - _Ray Arachelian<EMAIL_ADDRESS>


text:
# Common

This is a collection of libraries containing common, non-proprietary logic and utilities for use in many kinds of projects.

## Common.Calendar

### Calendar

This class contains basic calendar manipulation functions, like counting of days and adjusting weekend holidays to either Friday or Monday.

### UnitedStatesCalendar

This class inherits from `Calendar` and contains calculations for U.S. holidays (e.g., Easter, Thanksgiving, etc.).

---

## Common.Data

### SqlFor

This class is a factory for constructing T-SQL `FOR` clauses for temporal table queries.

### SqlOrderBy

This class is a factory for creating T-SQL `ORDER BY` clauses.

### SqlWhere

This class is a fluent-like factory for creating T-SQL `WHERE` clauses.

---

## Common.Maths

### Calculate

This class contains common calculations, such as Age, IsPrime, etc.

### Probability

This class represents the liklihood of an event and contains static functions for independent, mutually exclusive, non-mutually exclusive, and conditional probabilities.

---

## Common.PersonBuilder

This is a collection of fluent-like classes that generate random people for testing purposes.

### Examples

```
[Fact]
public void BuildRandomFemale()
{
    Person person = new PersonBuilder()
        .WithAge(24)
        .WithGender(Gender.Female)
        .WithName(includeMiddleName: true)
        .WithRaces(minimum: 1, maximum: 2)
        .WithEthnicity(PersonBuilder.Constants.Ethnicity.NOT_HISPANIC)
        .Build();

    Assert.Equal<int>(24, person.Age);
    Assert.Equal(Gender.Female, person.Gender);
    Assert.NotNull(person.Name.FirstName);
    Assert.NotNull(person.Name.LastName);
    Assert.NotNull(person.Name.MiddleInitial);
    Assert.NotNull(person.Name.MiddleName);
    Assert.Equal(PersonBuilder.Constants.Ethnicity.NOT_HISPANIC, person.Ethnicity);
    Assert.True(person.Races.Count() >= 1 && person.Races.Count() <= 2);
}
```

---

## Common.Transformations

### TransformDateTime

This class provides static functions for moving a DateTime object from its current value to either the start or end of that same day, preserving the "kind" of date in the process.

These are quite useful for CRUD operations and also ensuring that you're capturing all instances within a range measured by dates (set the start of the range to StartOfDay and the end of the range to EndOfDay to ensure inclusive capture).

See the unit tests for examples of usage.

### TransformRawText

This class provides static functions for raw text manipulation (e.g., mail merge). The `Transform` functions are useful for merging templates, dictionaries, and regular expressions into desired outputs.

Regular expressions are provided for data tags, curly braces, square brackets, and pound signs, but any regular expression can be provided. The `indexOfGroupWithKey` is useful when providing custom regular expressions.

A couple of additional functions are provided for common string manipulation, including `ConvertNewLinesAndTabsToSpaces` and `CondenseSpacingAndTrim`.

The `Transform` function allows for recursive processing, so it's possible to replace tags with text containing other tags; it will process the text until no tags remain or until the `maxRecursiveIterations` has been met. This argument is intended to prevent infinite loops.

This class also contains a couple of common string manipulation functions, such as a function to remove newline characters and one to condense spacing within a string.

#### Example
```
string firstName = "Kitty";
string text = "<html><body><p>Hello #FirstName#!</p></body></html>";
string expected = $"<html><body><p>Hello {firstName}!</p></body></html>";

// The dictionary keys are case insensitive.
var dictionary = new Dictionary<string, string> { { "firstname", firstName } };

var output = TransformRawText.Transform(template: text,
	keyValuePairs: dictionary,
	regularExpression: POUND_EXPRESSION,
	indexOfGroupWithKey: 1);

Assert.Equal(expected, output);

// This line and the Tranform() function above are equivalent.
output = TransformRawText.TransformPounds(text, dictionary);

Assert.Equal(expected, output);
```

See the unit test project for additional examples of usage.

### TransformDollarsByFrequency

This class converts dollar amounts to other dollar amounts based on frequency (e.g., weekly to monthly, annually to hourly, etc.)

See the unit tests for examples of usage; every possible conversion is tested.

### UnitedStatesPhoneNumberFormatter

This class is a custom formatter for U.S. phone numbers.

For traditional formatting, use the "F" format (this is the default). For digits only, use "N." To include the U.S. country code, use "I." To use dots instead of dashses, use "dots," and use "IDots" for country code plus dots.

#### Examples
```
string phone;
phone = string.Format(new UnitedStatesPhoneFormatter(), "{0}", "1234567890"); //<PHONE_NUMBER>
phone = string.Format(new UnitedStatesPhoneFormatter(), "{0:F}", "1234567890"); //<PHONE_NUMBER>
phone = string.Format(new UnitedStatesPhoneFormatter(), "{0:N}", "1234567890"); //<PHONE_NUMBER>
phone = string.Format(new UnitedStatesPhoneFormatter(), "{0:dots}", "1234567890"); //<PHONE_NUMBER>
phone = string.Format(new UnitedStatesPhoneFormatter(), "{0:I}", "1234567890"); // +1<PHONE_NUMBER>
phone = string.Format(new UnitedStatesPhoneFormatter(), "{0:Idots}", "1234567890"); // +1.123.456.7890
```

### SocialSecurityNumberFormatter

This class is a custom formatter for Social Security Numbers.

For traditional formatting, use the "F" format (this is the default). For digits only, use "N," and for dots instead of dashes, use "dots."

#### Examples
```
string ssn;
ssn = string.Format(new SocialSecurityNumberFormatter(), "{0}", "123456789"); // 123-45-6789
ssn = string.Format(new SocialSecurityNumberFormatter(), "{0:F}", "123456789"); // 123-45-6789
ssn = string.Format(new SocialSecurityNumberFormatter(), "{0:N}", "123456789"); // 123456789
ssn = string.Format(new SocialSecurityNumberFormatter(), "{0:dots}", "123456789"); // 123.45.6789
```

---

## Common.Validators

### EmailAddress

This class validates an email address.

Some relevant references:

[List of valid and invalid email addresses](http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses)

[Wikipedia](https://en.wikipedia.org/wiki/Email_address)

[w3.org](https://www.w3.org/Protocols/rfc822/3_Lexical.html)

[Microsoft](https://blogs.msdn.microsoft.com/testing123/2009/02/06/email-address-test-cases/)

### SocialSecurityNumber

This class validates a Social Security Number. The `IsValidStructure` function validates the structure of the SSN and the `IsValid` function validates that the SSN is valid.

[ssa.gov](https://www.ssa.gov/employer/stateweb.htm)

### UnitedStatesPhoneNumber

The `IsValidStructure` in this class validates a 10 or 11 digit U.S. phone number.

---

## FindTextCli

This is a console application that searches for regular expression matches within then content of files in a directory; See the `/FindTextCli/README.md.`

repository: kitdotnet/Common

repo_name: kitdotnet/Common


text:
# NotifyPropertyChangedGenerator
Roslyn Analyzer/Generator for avoid boring boilerplate INotifyPropertyChanged implementation.

Installation
---
You can donwload from NuGet, [NotifyPropertyChangedGenerator](http://www.nuget.org/packages/NotifyPropertyChangedGenerator).

* PM> Install-Package NotifyPropertyChangedGenerator

Supports platforms are all and all .NET Framework(3.5 supports!) but requires Visual Studio 2015.

What is this?
---
* Super lightweight to write INotifyPropertyChanged
* Keeping code clean in view
* Being strong in a change
* POMO(Plain Old MVVM Object), you don't need inherit base class

![](Img1.jpg)

Static analyzed. `NotifyAttribute` to class or `NotifyAttribute` to property, Roslyn Analyzer checks are all target properties implemented(generated) Notify property. If not, output compiler error.

If set `NotifyAttribute` to class, target properties are all property. You can ignore set `NonNotifyAttribute` to nontarget property. If set `NotifyAttribute` only to property, its target property is opt-in.

![](Img2.jpg)

Press `Ctrl+.`(Lightbulb QuickFix), preview the change.

![](Img3.jpg)

The modified class is clean, noisy boilerplate codes are lower in the code, not around a property.

Configuration
---
Default naming rule of backing field is plain lowerCase. If you want to change _lowerCase, configure `NotifyAttribute.cs`'s interface for example to LeadingUnserscore is here.

```csharp
[Conditional("NEVER_USED_AT_RUNTIME")]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
internal sealed class NotifyAttribute : Attribute,
    // option, you can customize naming convention rule
    NotifyAttribute.ILeadingUnderscore
{
    // naming convention markers
    internal interface IPlain { }
    internal interface ILeadingUnderscore { }
    internal interface ITrailingUnderscore { }

    /// <summary>
    /// No option.
    /// </summary>
    public NotifyAttribute() { }

    /// <summary>
    /// Specify options.
    /// </summary>
    /// <param name="compareMethod">Comppare kind for raise property changed.</param>
    public NotifyAttribute(NotifyCompareMethod compareMethod) { }
}
```

What is different with Code Snippet?
---
Code snippet is easy to write but difficult to read. Generated code is very noisy because code snippet does not support that generate to separating.

What is different with PostSharp or Fody?
---
There are easy to write and easy to read but difficult to build and debug. NotifyPropertyChangedGenerator is only simple compile time analyze/generator and fully Visual Studio integrated.

repository: qipa/NotifyPropertyChangedGenerator

repo_name: qipa/NotifyPropertyChangedGenerator


text:
These are files that are used (or at least could be used) as part of the automated tests for SolrMarc.  Some have been moved here as a placeholder for files that didn't belong at the top level of this repository, but they _could_ be used in automated tests.

The textfile  	indextest.txt  is the driver for the class ParameterizedIndexTest.  That test reads this file, extracts the lines defining the input, the index specification and expected output for those inputs.   It then builds the specified indexer method, send the specified MARC record to that method, and then compares the output produced to the expected value. You can optionally specify readerProperties to pass to the MARC reader, to control how it operates.

The format of the file is as follows (note blank lines are ignored, and lines starting with # are comments)

    readerProps: marc.permissive=true, marc.to_utf_8=true, marc.unicode_normalize=false
    record: u4.mrc(u4)
    indexSpec: 245a
    #The princes of Ha\u0300-tie\u0302n (1682-1867) /
    expect: The princes of Hà-tiên (1682-1867) /

repository: solrmarc/solrmarc

gha_language: mIRC Script

repo_name: solrmarc/solrmarc


text:
## PROBLEM STATEMENT
### Given a string S, consisting only of ‘0’ and ‘1’, and also you are given an integer k. You are asked to find the sum of all unique substrings (in decimal notation) of length k in the string, such that string S is the repetition of these substrings.

Task:
You don't need to read or print anything. Your task is to complete the function unique_substring_sum() which takes the binary string S as first parameter and k as the second parameter and returns the sum of unique substring (In decimal notation).If the string S can’t be split into substrings of length k without leaving any characters in the string return -1.

Expected Time Complexity:  O(n)
Expected Space Complexity: O(n)

Constraints:
1 <= length of string <= 1000
k will not exceed 20

path: /STL/Unique substrings 2/Readme.md


text:
3/29/2019

## Last Week's Accomplishments

We are using node-git now since it is much lighter and is better suited to cross-platform development. Projects can now be setup by a github url from the plugin itself.

## This Week's Plan

Create a view to warp to different branches, add a way to exlude files from merging when fast forwarding.

repository: koreanwglasses/rcos-status-updates

repo_name: koreanwglasses/rcos-status-updates


text:
# stocklab
In tasks such as financial data analysis, we need to retrieve data from a very large pool.
One could collect all the potentially useful data first, and then perform the analysis logic.
However, the completeness of data at hand poses limits on the potential of the research.

At a personal pet project scale, it is somewhat difficult to gather every possible piece of data
due to its amount, the awkward APIs, and the scattered nature of information from different sources.
Stocklab is a framework to defer the data retrieval until the analysis logic needs it.

All of the data accessable on the internet can be indexed as stocklab's `DataIdentifier`.
By using DataIdentifier as a proxy of the real data handle,
one can assume that all of the data are virtually available at hand when programming the analysis logic.
The missing data will then be retrieved during the executing of the analysis logic.
Thus crawler routines and analysis logics can be nicely decoupled.

## Usage
An (arguably) minimal example can be found [here](tests/demo).
To run the demo:
```
python demo.py
```
If you run this twice, you'll see that the crawler logs only appear on the first run.
The second run will not trigger data retrival because the all data were available in the database.

This framework has been used to build another real-world application,
see [stocklab-twse](https://github.com/hchsiao/stocklab-twse) for a more practical demo.

## Configuration
| Name | Description |
|------|-------------|
| `config_name` | A human-friendly identifier. Currently not used. |
| `force_offline` | `CrawlerTrigger` will not trigger crawler actions. |
| `root_dir` | Root path to all runtime generated files. |
| `log_level` | See [Logging Levels](https://docs.python.org/3/library/logging.html#levels). |
| `database` | See [Database configuration](#database-configuration). |

### Database configuration
TODO
```
database:
  type: sqlite
  filename: db.sqlite
```

## API documentation
See [this](https://hchsiao.github.io/stocklab/).

## Specification
Conceptually, a data analysis system consists of the data and the analysis logic.
As mentioned, DataIdentifier is used as the access key to data.
Analysis logics are also represented with DataIdentifier in the sense that the results of analysis are also data.

### DataIdentifier

#### Expression
Here's the BNF grammar of the expression of a `DataIdentifier`.
```
<data-identifier> ::= <data-identifier> <seperator1> <field> | <node-name>
<field>           ::= <field-name> <seperator2> <field-value>
<node-name>       ::= <node-name> <character2> | <character1>
<field-name>      ::= <field-name> <character2> | <character1>
<field-value>     ::= <field-value> <character2> | <character2>
<seperator1>      ::= "."
<seperator2>      ::= ":"
<character1>      ::= [a-zA-Z]
<character2>      ::= [a-zA-Z0-9_]
```

#### Nodes and Fields
From the definition, a DataIdentifier consists of exactly one node and zero or more fields.
Fields act like function arguments.
At the interface, nodes act like functions in functional programming:
evaluating a DataIdentifier is a mapping process from a field tuple to some constant.
The following is the example a DataIdentifier may be:
```
ClosePrice.stock:2330.date:20201201
```

The correct outcome of an evaluation of DataIdentifier should be a unique constant (pure function).
Hence, the following example is a violation of this intent:
```
ClosePrice.stock:2330.date:today
```

Even if we never implement impure evaluation deliberately,
it's hard to guarentee the pure function property since crawlers rely on side-effects to load data.
Another possible impureness is that, nodes are also responsible for database management.
If the during the evaluation a node detects that it may not be able to deliver the very constant (e.g. database temporarily unavailable),
an exception should be raised.

#### Alternative Syntax
For convinence, `ClosePrice.stock:2330.date:20201201` can also be written in Python as:
```
from stocklab import DataIdentifier as DI
DI('ClosePrice')(stock=2330, date=20201201)
```

This syntax for a DataIdentifier will not made portable across languages.

repository: hchsiao/stocklab

repo_name: hchsiao/stocklab


text:
# Python Abstraction

# Note: There is no copy/paste information in this example

What is abstraction in a nutshell?

    Anywhere on the internet, you can find many explanation about abstraction. But I will explain in heremy understanding with the simplest explanation;

    1.) Group things which are similar.
    2.) Grab same functionality together.
    3.) Seperate individual properties.

Why do we need this?

    To prevent code complexity, better grabbing similar features together.

For example;

    Let's think that we sell 2 Devices; Laptop and Mobile

    Laptop has 5% tax amount and mobile has 8% tax amount.
    After these tax amount, they also have a common 3% tax amount.

        So we can group their commons together such as 3% and seperate their individual
    tax prices into sub-classes/functions()

Let's check into the code.

Note = If no common functionality, so it is an Interface !


text:
Serendipity Identity Server

### Misc
#### Specify frontend base URL
To set a fixed base URL for frontend requests use the following environment value (this is highly recommended in
production):

```
# Specify base URL for Keycloak (optional, default is retrieved from request)
KEYCLOAK_FRONTEND_URL=http://<IP_ADDRESS>:30002/auth
```

**Note:** I could not find this environment variable mentioned in the Keycloak documentation. It is mentioned in the
Keycloak Docker Hub [readme](https://hub.docker.com/r/jboss/keycloak/).

repository: Robinyo/serendipity

gha_language: TypeScript

repo_name: Robinyo/serendipity


text:
# DrDiagnostic - Deathrun mod support

Useful tool for collecting statistics data from deathrun server.
Reads games_mp.log (where deathrun mod writes tons of statistics information about players, game & maps) and create 'readable' file with this statistics

Parameters:
-verbose
-inputLogFile="C:\callofduty4\Mods\deathrun\games_mp.log"
-outputLogFile="C:\callofduty4\Mods\deathrun\statistics.log"

Developed around 2014-07-09.


text:
# Setup
Run this to set up all my defaults:
```bash
cd ~
mkdir ~/GitHub
git clone https://github.com/sorahavok/bash.git ~/GitHub/bash
sudo chmod +x ~/GitHub/bash/personal-setup.sh
sudo ~/GitHub/bash/personal-setup.sh
```

## Personal Setup (Current Content)
```bash
#!/bin/sh
DB_TYPE=false
GRPC_TYPE=false
while getopts ":dg" opt; do
    case $opt in
        d)
            DB_TYPE=true
            echo "-d was triggered!" >&2
            ;;
        g)
            GRPC_TYPE=true
            echo "-g was triggered!" >&2
            ;;
        \?)
            echo "Invalid option: -$OPTARG" >&2
            ;;
    esac
done
echo "Flags:DB_TYPE(-d)=$DB_TYPE,GRPC_TYPE(-g)=$GRPC_TYPE"

# Install the basics
sudo apt install git vim python3-pip
pip3 install --upgrade pip

# Get some random python libs TODO: put these behind flags
pip3 install urllib3
pip3 install plotly

# Get an awesome .vimrc from GitHub
if [ -f /root/.vim_runtime ]; then
    git clone https://github.com/amix/vimrc.git ~/.vim_runtime
    sh ~/.vim_runtime/install_awesome_vimrc.sh
fi

# Install mongo and set up database folder if -d flag is set
if $DB_TYPE; then
    echo "Setting up DB" >&2
    pip3 install pymongo
    sudo apt install mongodb
    sudo mkdir /data/db
    sudo chown $USER -R /data/
fi

# Grab gRPC for protobufs and servers if -g flag is set
if $GRPC_TYPE; then
    echo "Setting up gRpC" >&2
    sudo pip3 install grpcio
    sudo pip3 install grpcio-tools
fi

## install zsh and replace bash with it
if [ ! -f /bin/zsh ]; then
    echo "Didn't find /bin/zsh, Installing it now" >&2
    sudo apt install zsh
    chsh -s `which zsh` # Change shell to wherever zsh was put
    cp ~/GitHub/bash/.zsh* ~/ # moving .zshrc and alias
    echo "Exiting old shell, up arrow will not work because history is reset"
    exec zsh -l # Kill current process and start zsh (Thanks http://unix.stackexchange.com/questions/22721/completely-restart-bash)
fi
```

repository: sorahavok/bash

repo_name: sorahavok/bash


text:
+++
title = "Intrinsic functions"
weight = 110
home_region = "eu-west-1"
aliases = [
    "/every-day-use/900-multi-org-usage.html",
]
+++
---

## Intrinsic Functions

There is a built in intrinsic function ${AWS::PuppetAccountId} that you can use anywhere within your manifest file.
When your manifest file being expanded the string ${AWS::PuppetAccountId} will be replace with the value of the account
id.  This allows you avoid hard coding the account id of the hub account.

  <figure>
   {{< highlight js >}}
accounts:
  - account_id: "${AWS::PuppetAccountId}"
    name: "puppet-account"
    default_region: "eu-west-1"
    regions_enabled:
      - "eu-west-1"
      - "eu-west-2"
    tags:
      - "type:prod"
      - "partition:eu"
   {{< / highlight >}}
  </figure>

You can specify your own functions within a file named intrinsic-functions.properties within the root of your
ServiceCatalogPuppet repository.  Within this you can specify name value pairs:

  <figure>
   {{< highlight ini >}}
SecurityToolingAccountId=012345678910
   {{< / highlight >}}
    </figure>

You can then use these within your manifest file anywhere using ${Custom::<THE_NAME_YOU_SPECIFIED>}:

  <figure>
   {{< highlight js >}}
accounts:
  - account_id: "${Custom::SecurityToolingAccountId}"
    name: "puppet-account"
    default_region: "eu-west-1"
    regions_enabled:
      - "eu-west-1"
      - "eu-west-2"
    tags:
      - "type:prod"
      - "partition:eu"
   {{< / highlight >}}
  </figure>

To improve readability we recommend you use the functions to set global parameters and use YAML alias and anchors to
reduce the size and complexity of your expanded manifest file by removing duplication.

If you want to specify different values for different installs you can override values in an
intrinsic-functions-0123456789010.properties file.  In this example when the manifest file is expanded in account
0123456789010 any values in intrinsic-functions-0123456789010.properties will override values set in the
intrinsic-functions.properties file.


text:
# Diporotheca rhizophila C.C. Gordon & C.G. Shaw, 1961 SPECIES

#### Status
ACCEPTED

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

#### Published in
Mycologia 52(2): 331 (1961)

#### Original name
Diporotheca rhizophila C.C. Gordon & C.G. Shaw, 1961

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
layout: post
title: "Hello, Magic the Gathering!"
description: ""
category:
tags: [tabletop, mtg, twitch]
---

One of the great things about working at Twitch is the vast and diverse pool of nerd culture to tap in. This week my teammates taught me how to play **Magic the Gathering** and I participated in my first Magic draft!

Unlike constructed play that requires you to build a deck ahead of time, during a Magic draft you build your deck together with others. Each person gets 3 booster packs. For this draft we used 2 Hour of Devastation boosters and 1 Amonkhet booster.  Repeat this process until all boosters and all cards have been passed around.

Scarab God!

Picking the right cards is important as you'll select a subset of the cards you draft to build a deck to play against others. Normally you pick the best card in the pack you open and build a deck around that. Lucky me, I had a Scarab God in my first booster! And even luckier, I had a coworker tell me to pick it. From there you try to pick cards of the same element, although I always recommend picking shiny cards because they are cool!

I'm hooked! And looking forward to more opportunities to pick shiny cards!

gha_license_id: NOASSERTION


text:
<!--- 0. Title -->
<!-- This document is auto-generated using markdown fragments and the model-builder -->
<!-- To make changes to this doc, please change the fragments instead of modifying this doc directly -->
# SSD-ResNet34 BFloat16 training - Advanced Instructions

<!-- 10. Description -->
This document has advanced instructions for running SSD-ResNet34 BFloat16
training, which provides more control over the individual parameters that
are used. For more information on using [`/benchmarks/launch_benchmark.py`](/benchmarks/launch_benchmark.py),
see the [launch benchmark documentation](/docs/general/tensorflow/LaunchBenchmark.md).

Prior to using these instructions, please follow the setup instructions from
the model's [README](README.md) and/or the
[AI Kit documentation](/docs/general/tensorflow/AIKit.md) to get your environment
setup (if running on bare metal) and download the dataset, pretrained model, etc.
If you are using AI Kit, please exclude the `--docker-image` flag from the
commands below, since you will be running the the TensorFlow conda environment
instead of docker.

<!-- 55. Docker arg -->
Any of the `launch_benchmark.py` commands below can be run on bare metal by
removing the `--docker-image` arg. Ensure that you have all of the
[required prerequisites installed](README.md#run-the-model) in your environment
before running without the docker container.

If you are new to docker and are running into issues with the container,
see [this document](/docs/general/docker.md) for troubleshooting tips.

<!-- 50. Launch benchmark instructions -->
Once your environment is setup, navigate to the `benchmarks` directory of
the model zoo and set environment variables pointing to the directory for the
coco training dataset (or validation dataset for evaluation mode),
TensorFlow models repo, and an output directory where log files will be written.

```
# cd to the benchmarks directory in the model zoo
cd benchmarks

export TF_MODELS_DIR=<path to the clone of the TensorFlow models repo>
export DATASET_DIR=<path to the COCO dataset directory>
export OUTPUT_DIR=<directory where the log file will be written>
```

To do a demo run to test performance by training the model for a limited
number of steps, use the command below. The `DATASET_DIR` should be pointing to
the COCO training dataset directory. You can change the number of training
steps or number of MPI processes to run multiple instances. If you want
checkpoint files to be saved, specify the `--checkpoint <directory path>`
flag for the location where files will be written.
> Note: for best performance, use the same value for the arguments num-cores and num-intra-thread as follows:
>   For single instance run (mpi_num_processes=1): the value is equal to number of logical cores per socket.
>   For multi-instance run (mpi_num_processes > 1): the value is equal to (#_of_logical_cores_per_socket - 2).
>   If the `--num-cores` or `--num-intra-threads` args are not specified, these args will be calculated based on
>   the number of logical cores on your system.

```bash
python launch_benchmark.py \
    --data-location ${DATASET_DIR} \
    --model-source-dir ${TF_MODELS_DIR} \
    --model-name ssd-resnet34 \
    --framework tensorflow \
    --precision bfloat16 \
    --mode training \
    --num-train-steps 100 \
    --num-cores 52 \
    --num-inter-threads 1 \
    --num-intra-threads 52 \
    --batch-size=100 \
    --weight_decay=1e-4 \
    --num_warmup_batches=20 \
    --mpi_num_processes=1 \
    --mpi_num_processes_per_socket=1 \
    --output-dir ${OUTPUT_DIR} \
    --docker-image intel/intel-optimized-tensorflow:latest
```

To run training and achieve convergence, download the backbone model from the links below,
then use the command below:
  https://storage.googleapis.com/intel-optimized-tensorflow/models/ssd-backbone/checkpoint
  https://storage.googleapis.com/intel-optimized-tensorflow/models/ssd-backbone/model.ckpt-28152.data-00000-of-00001
  https://storage.googleapis.com/intel-optimized-tensorflow/models/ssd-backbone/model.ckpt-28152.index
  https://storage.googleapis.com/intel-optimized-tensorflow/models/ssd-backbone/model.ckpt-28152.meta

Place the above files in one directory, and pass that location below as --backbone-model.
The `DATASET_DIR` should be pointing to the COCO training dataset directory. To prevent
conficts with checkpoint files generated by previous model runs, use an empty `OUTPUT_DIR`.
```bash
python launch_benchmark.py \
    --data-location ${DATASET_DIR} \
    --model-source-dir ${TF_MODELS_DIR} \
    --model-name ssd-resnet34 \
    --framework tensorflow \
    --precision bfloat16 \
    --mode training \
    --num-cores 50 \
    --num-inter-threads 1 \
    --num-intra-threads 50 \
    --batch-size=100 \
    --mpi_num_processes=4 \
    --mpi_num_processes_per_socket=1 \
    --epochs=60 \
    --checkpoint <path to output_train_directory> \
    --backbone-model <path to resnet34_backbone_trained_model> \
    --output-dir ${OUTPUT_DIR} \
    --docker-image intel/intel-optimized-tensorflow:latest
```

To run in eval mode (to check accuracy) if checkpoints are available.

repository: IntelAI/models

gha_language: Python

repo_name: IntelAI/models


text:
# Microglossum hookeri (Cooke) Sacc., 1884 SPECIES

#### Status
SYNONYM

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

#### Published in
Syll. fung. (Abellini) 8: 39 (1889)

#### Original name
Geoglossum hookeri Cooke, 1875

### Remarks
null

path: /life/Fungi/Ascomycota/Leotiomycetes/Helotiales/Geoglossaceae/Geoglossum/Geoglossum hookeri/ Syn. Microglossum hookeri/README.md


text:
MNNBFSL
=======

Mada Namae no Nai BrainFuck fu Stack Language

## Stack
MNNBFSL interpreter has 2 stacks, a data stack and a return stack.

## Commands
There are 9 commands and 1 debug command.

|character|meaning|
|---------|-------|
|"|duplicate a value on the top of the data stack|
|+|increment a value on the top of the data stack|
|-|decrement a value on the top of the data stack|
|>|pop a value from the data stack and push the value to the return stack|
|<|pop a value from the return stack and push the value to the data stack|
|[|push a program counter to the return stack|
|]|pop a value from the data stack, if the value is 0, pop a value from the return stack; otherwise, pop a value from the return stack and set the value to the program counter|
|.|pop a value from the data stack and write to stdout|
|,|read 1 byte from stdin, push the byte to the data stack, and push 1 to the data stack. if the end of stdin, push 0 to the data stack|
|s|print the data stack and the return stack to stderr (for debugging)|
|others|no operations|

license: Unlicense

repository: yshl/MNNBFSL

repo_name: yshl/MNNBFSL


text:
# CapsNet-Keras

The original paper: [Sara Sabour, Nicholas Frosst, Geoffrey E Hinton. Dynamic Routing Between Capsules. NIPS 2017](https://arxiv.org/abs/1710.09829)

# Capsule Neural Networks for Text Classification

This is part of my master thesis at the University of Bonn.

## Requirements
- [Keras](https://github.com/fchollet/keras)
- matplotlib


text:
---
layout: post
title:  "Ramp Stage"
date:   2015-10-09 15:39:40
preview: /assets/rampStageSmall.png
vimeoId: 235858755
---

{% include vimeoPlayer.html id=page.vimeoId %}

__My team designed and prototyped the stage in the above video__

Alice Sheppard is a wheelchair dancer and she came to Olin with an unusual challenge. Could we make her a stage that would enable her to showcase the unique beauty of wheelchair dancing. Also, could we do it __in three weeks__?

![Picture 1]({{"/assets/rampFab1.png"|absolute_url}})

![Picture 1]({{"/assets/rampFab2.png"|absolute_url}})

![Picture 1]({{"/assets/rampFab3.png"|absolute_url}})

We quickly learned as much as we could from interviewing Alice and conducting co-designs to explore her vision of the ideal stage. Next, we physically prototyped ramps in order to get her feedback on key parameters like slope, friction, length, and awesomeness. After __many rounds of prototypes__ (and a few all-nighters), we ultimately arrived at a stage that looks like this:

![Picture 1]({{"/assets/rampLarge.jpg"|absolute_url}})

### Process

Because we wanted to "skin" the surface of the stage with flattenable plywood sheets, we were constrained in the shapes that we could create. After talking with some math professors, it turns out the surfaces we were looking for are described as having zero Gaussian curvature. To design these special surfaces, I __taught myself Rhino__ (a computer aided design software) with a powerful mathematic plug-in called Grasshopper. Using these tools __we found a shape that met the constraints from Alice, math, and fabrication.__

The stage we ultimately created was a huge success: Alice loved it, and she immediately began choreography of her latest piece, Descent, that is currently being performed around the world.

![Picture 1]({{"/assets/rampPaper.jpg"|absolute_url}})

![Picture 1]({{"/assets/rampBuilding.jpg"|absolute_url}})

[Read about the full process and see more intermediate designs here](http://aplusa.org/projects/ramp-alice-sheppard/)

repository: vishalbelsare/portfolio

branch_name: refs/heads/gh-pages

repo_name: vishalbelsare/portfolio


text:
Privacy Policy
==============
**OpenHUD does not store any of your data. Period.**

It physically can't, there's nowhere to store it. It doesn't even have a server database to store it. Take a look at the code, and see for yourself: the only outbound communication is with the HUD modules you decide to use.

So even if Mike Postle asked nicely to see your data, there'd be nothing to show him.

HUD modules, however, may potentially store your data or do whatever with it. As an extensible platform, we have no control over it. Make sure you trust the modules you use, and be extra careful with closed-source modules.

About These Terms
-----------------
These terms may be modified to, for example, reflect changes in the code. You should look at the terms regularly. We'll post notice of modifications to these terms on this page. Changes will not apply retroactively and will become effective no sooner than fourteen days after they are posted. If you do not agree to the modified terms, you should stop using OpenHUD.

repository: OpenHUD/openhud

repo_name: OpenHUD/openhud


text:
`http_basic_auth_file`
----------

**Type:** `string`

**Value:** `<file-url>`

**Example:** `"http_basic_auth_file": "/data/hustmqha/conf/htpasswd"`

**Parent:** None

Path of key file used by `http_basic_auth_module`. The username and password are stored as plain text in key file, for example:

    jobs:p@ssword

[Previous](genconf.md)

[Home](../../index.md)

repository: jobs-github/hustngx

repo_name: jobs-github/hustngx


text:
# go-listener

Build go projects automatically when files get modified

## Install

```go
    go get -u github.com/viknesh-nm/go-listener
```

## Usage

- Update `PATH` with `GOPATH/bin`

    ```
    Usage:
        go-listener [flags]

    Flags:
        -b, --build            build only mode that generates the binary file
        -c, --command string   extra additional commands that needs to be run
        -h, --help             help for go-listener
        -n, --name string      name of the project
        -p, --path string      directory to be watch
    ```

repository: VarthanV/go-listener

repo_name: VarthanV/go-listener


text:
## Installation instructions

Copy over the 2 folders, PCA9957 and VEML3328 into you arduino library folder, and then open the arduino sketch `cls.ino` and use it as needed

For up to date for VEML3328, check out the actual repo https://github.com/RutheniumVI/VEML3328

repository: MacRover/Rover

repo_name: MacRover/Rover


text:
# tibetanDiffUI
tibetan diff ui (char diff)

![tibetanDiff-demo](https://raw.githubusercontent.com/karmapa/tibetanDiffUI/master/assets/img/tibetanDiff-demo.png)
##Usage
####build environment
```
npm install
```

####pack
It will pack js files in "src" and export to "dist" folder.
```
npm install webpack --global
webpack
```

####webpack-dev-server
demo at http://localhost:8080
```
npm start
```

repository: karmapa/tibetanDiffUI

repo_name: karmapa/tibetanDiffUI


text:
# @chakra-ui/next-js

## 2.0.1

### Patch Changes

- [#7329](https://github.com/chakra-ui/chakra-ui/pull/7329)
  [`b2b5d3545`](https://github.com/chakra-ui/chakra-ui/commit/b2b5d35452bf8a7a6ed16fba0f76e1037ce9986d)
  Thanks [@segunadebayo](https://github.com/segunadebayo)! - Introducing a new
  Next.js integration package that provides a smoother experience when using
  Chakra UI in your Next.js 13 apps.

  This package provides 2 main features:

  - **CacheProvider**: This component composes the Emotion.js' cache provider
    with the `useServerInsertedHTML` hook from `next/navigation`.

    This is necessary to ensure that computed styles are included in the initial
    server payload (during streaming).

    The `use client` directive is still required to be added to the top of the
    page-related file. This is a limitation of CSS-in-JS libraries and Emotion
    for now.

    > Note: Make sure to include the `<head>` tag in your layout component
    > otherwise it will not work.

    ```jsx live=false
    // app/layout.tsx
    "use client"
    import { CacheProvider } from "@chakra-ui/next-js"
    import { ChakraProvider } from "@chakra-ui/react"

    export default function RootLayout({
      children,
    }: {
      children: React.ReactNode,
    }) {
      return (
        <html lang="en">
          <head />
          <body>
            <CacheProvider>
              <ChakraProvider>{children}</ChakraProvider>
            </CacheProvider>
          </body>
        </html>
      )
    }
    ```

  - **Link**: This component combines the functionality of the Next.js `Link`
    and Chakra UI `Link` components.

  ```jsx live=false
  // app/page.tsx
  "use client"
  import { Link } from "@chakra-ui/next-js"

  export default function Page() {
    return (
      <Link href="/about" color="blue.400" _hover={{ color: "blue.500" }}>
        About
      </Link>
    )
  }
  ```

  > Support for `next/image` coming soon!

repository: kendaganio/chakra-ui

repo_name: kendaganio/chakra-ui