text:
# Use static disks to create PVs for stateful services

This topic describes the common scenarios of static disks and how to use static disks to create persistent volumes \(PVs\) for stateful services.

-   A Container Service for Kubernetes \(ACK\) cluster is created. For more information, see [Create a cluster of ACK Managed Edition](/intl.en-US/User Guide for Kubernetes Clusters/Cluster management/Create Kubernetes clusters/Create a cluster of ACK Managed Edition.md).
-   A disk is created. For more information, see [Create a disk](/intl.en-US/Block Storage/Cloud disks/Create a cloud disk/Create a pay-as-you-go disk.md).
-   The cluster is connected through kubectl. For more information, see [Use kubectl to connect to a cluster](/intl.en-US/User Guide for Kubernetes Clusters/Cluster management/Manage and access clusters/Use kubectl to connect to a cluster.md).

Scenarios:

-   Create applications that require high disk I/O and do not require shared data. For example, MySQL, Redis, and other data storage services.
-   Collect logs at high speeds.
-   Store data in a way that is independent of the lifetime of a pod.

Before you use static disks, make sure that you have purchased disks.

To use a static disk, manually create a PV and a persistent volume claim \(PVC\). For more information, see [Use static volumes](/intl.en-US/User Guide for Kubernetes Clusters/Storage management-Flexvolume/Disk volumes/Use static volumes.md).

## Limits

-   Disks provided by Alibaba Cloud cannot be shared. Each disk can be mounted to only one pod at a time.
-   Disks can only be mounted to nodes that are located in the same zone.

## Create a PV

1.  Add the following content to the pv-static.yaml file:

    ```
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: <your-disk-id>
      labels:
        alicloud-pvname: <your-disk-id>
        failure-domain.beta.kubernetes.io/zone: <your-zone>
        failure-domain.beta.kubernetes.io/region: <your-region>
    spec:
      capacity:
        storage: 20Gi
      accessModes:
        - ReadWriteOnce
      flexVolume:
        driver: "alicloud/disk"
        fsType: "ext4"
        options:
          volumeId: "<your-disk-id>"
    ```

    **Note:**

    -   `alicloud-pvname: <your-disk-id>`: the name of the PV. Set the value to the disk ID.
    -   `failure-domain.beta.kubernetes.io/zone: <your-zone>`: the zone where the disk is located. For example, cn-hangzhou-b.
    -   `failure-domain.beta.kubernetes.io/region: <your-region>`: the region where the disk is located. For example, cn-hangzhou.
    If your cluster is deployed across multiple zones, specify the `failure-domain.beta.kubernetes.io/zone` and `failure-domain.beta.kubernetes.io/region` parameters to ensure that your pod is scheduled to the zone where the disk is located.

2.  Run the following command to create a PV:

    ```
    kubectl create -f pv-static.yaml
    ```

Expected results:

In the left-side navigation pane of the details page of the cluster, click **Persistent Volumes**. On the **Persistent Volumes** tab, view the newly created PV.

## Create a PVC

1.  Add the following content to the pvc-static.yaml file:

    ```
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: pvc-disk
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 20Gi
      selector:
        matchLabels:
          alicloud-pvname: <your-disk-id>
    ```

2.  Run the following command to create a PVC:

    ```
    kubectl create -f pvc-static.yaml
    ```

Expected results:

In the left-side navigation pane of the details page of the cluster, click **Persistent Volumes**. On the **Persistent Volume Claims** tab, view the newly created PVC.

## Create an application

1.  Add the following content to the static.yaml file:

    ```
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: nginx-static
      labels:
        app: nginx
    spec:
      selector:
        matchLabels:
          app: nginx
      template:
        metadata:
          labels:
            app: nginx
        spec:
          containers:
          - name: nginx
            image: nginx
            volumeMounts:
              - name: disk-pvc
                mountPath: "/data"
          volumes:
            - name: disk-pvc
              persistentVolumeClaim:
                claimName: pvc-disk
    ```

2.  Run the following command to create an application:

    ```
    kubectl create -f static.yaml
    ```

Expected results:

In the left-side navigation pane of the details page of the cluster, click **Workload**. On the **Deployments** tab, view the application.

## Use static disks for persistent storage

1.  Run the following command to query the pod that runs the application:

    ```
    kubectl get pod | grep static
    ```

    The following command output appears:

    ```
    nginx-static-78c7dcb9d7-g****   2/2     Running     0          32s
    ```

2.  Run the following command to check whether a new disk is mounted to the /data path:

    ```
    kubectl exec nginx-static-78c7dcb9d7-g**** df | grep data
    ```

    The following command output appears:

    ```
    /dev/vdf        20511312    45080  20449848   1% /data
    ```

3.  Run the following command to query the files in the /data path:

    ```
    kubectl exec nginx-static-78c7dcb9d7-g**** ls /data
    ```

    The following command output appears:

    ```
    lost+found
    ```

4.  Run the following command to create file static in the /data path:

    ```
    kubectl exec nginx-static-78c7dcb9d7-g**** touch /data/static
    ```

5.  Run the following command to query the files in the /data path:

    ```
    kubectl exec nginx-static-78c7dcb9d7-g**** ls /data
    ```

    The following command output appears:

    ```
    static
    lost+found
    ```

6.  Run the following command to delete pod `nginx-static-78c7dcb9d7-g****`:

    ```
    kubectl delete pod nginx-static-78c7dcb9d7-g****
    ```

    The following command output appears:

    ```
    pod "nginx-static-78c7dcb9d7-g****" deleted
    ```

7.  Open another kubectl CLI and run the following command to query how the pod is deleted and a new pod is created:

    ```
    kubectl get pod -w -l app=nginx
    ```

    The following command output appears:

    ```
    NAME                            READY   STATUS            RESTARTS   AGE
    nginx-static-78c7dcb9d7-g****   2/2     Running           0          50s
    nginx-static-78c7dcb9d7-g****   2/2     Terminating       0          72s
    nginx-static-78c7dcb9d7-h****   0/2     Pending           0          0s
    nginx-static-78c7dcb9d7-h****   0/2     Pending           0          0s
    nginx-static-78c7dcb9d7-h****   0/2     Init:0/1          0          0s
    nginx-static-78c7dcb9d7-g****   0/2     Terminating       0          73s
    nginx-static-78c7dcb9d7-h****   0/2     Init:0/1          0          5s
    nginx-static-78c7dcb9d7-g****   0/2     Terminating       0          78s
    nginx-static-78c7dcb9d7-g****   0/2     Terminating       0          78s
    nginx-static-78c7dcb9d7-h****   0/2     PodInitializing   0          6s
    nginx-static-78c7dcb9d7-h****   2/2     Running           0          8s
    ```

8.  Run the following command to query the new pod:

    ```
    kubectl get pod
    ```

    The following command output appears:

    ```
    NAME                            READY   STATUS      RESTARTS   AGE
    nginx-static-78c7dcb9d7-h****   2/2     Running     0          14s
    ```

9.  Run the following command to verify that file static exists in the /data path. This indicates that data in the static disk is persistently stored.

    ```
    kubectl exec nginx-static-78c7dcb9d7-h6brd ls /data
    ```

    The following command output appears:

    ```
    static
    lost+found
    ```

url: https://raw.githubusercontent.com/gskreddy2432/csk/f0f4b5395e69e3464a131c28cd890e8be1631db7/intl.en-US/Best Practices/Storage/Use static disks to create PVs for stateful services.md


text:
# N-th Power

This kata is from check py.checkio.org

You are given an array with positive numbers and a number N. You should find the N-th power of the element in the array with the index N. If N is outside of the array, then return -1. Don't forget that the first element has the index 0.

Let's look at a few examples:

array = [1, 2, 3, 4] and N = 2, then the result is 3^2 == 9;
array = [1, 2, 3] and N = 3, but N is outside of the array, so the result is -1.

### Solution

function index(array, n){
//your code here

##### Normlly it should work fine but there is smth wrong with codewars and this excercise because it does not recognizes the mulipy mark

    return array.length-1 >= n ? (array[n] \*\* n) : -1;

}

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
<!-- This template is in markdown, not html, so
  it will not render beautifully when you copy and
  paste it into your github.io site, but it will at
  least be published. Next week you'll be creating a
  blog template using HTML and CSS and you'll be able
  to copy and paste the blog posts from week 1 in there
  to make them pretty next week.

  For now, please replace the title, subtitle (if desired),
  and date with the text you would like. Markdown is pretty
  simple, so you can just feel free to type. =) -->

# DBCgit Blog Post
#### "Git 'er Done With Version Control'
#### 9/18/14

+ Version control is one of those things that anybody creating any project from a manuscript, to a computer programer.  Version control has many benifits:
1. You made a mistake and want to rewind back to
2. You lost code and need to revert back to it
3. You have to have multiple versions of code
4. You need to see the 'git diff' in your code
5. You want to track the history of your code
6. want to know who you need to blame

+ Version Control helps us keep track of our development.  It also allows us to revert back to certain dates. It also allows us to have multiple versions of our code

+  it keeps track of the changes we have made and stores it into a repository.  We can keep track of these changes on multiple verions or branches.  If you hate the changes you made or someone else made you can just delete the branch or version of the code.  It's a great way to organize and try to protect yourself from completlty screwing up a project

+ "But version control systems such as Git keep track of the changes you make as you go along and store all of the changes in a repository.  In Git, your repository has a master branch and this is where the latest, properly working version of your code resides. When you want to make a change or add features, Git enables you to copy the code from the master branch and place it on a "new branch."  You then can work on and make changes to this “copy” of the code.  If you screw up or dislike what you have changed or added, you can always throw out this branch and revert back to the previous copy that is still held on the master branch.  But if you do like what you have done and these changes work properly, you can merge this new code back into the master branch.  By "committing" this new version of the master branch, you are saving a new "official" version of your code and updating the master branch. ""

+ This version control and tracking of changes is extremely important when you have more than one person working on the same file/project.  Instead of overwriting one another's changes or having to manually compare and merge changes from one person with those of another, Git takes care of all of this for you.  By creating branches for each person to work on, multiple people can work on the same file/project at the same time and this increases the efficiency and effectiveness of the project team.  Each team member's changes are later merged into a single version and the system highlights conflicts or problems for you and the rest of the team.

+ But Git is software that lives locally on a single person's computer and those files/versions are not accessible by others.  In order for the collaboration described above to work, the repository and each team member's files need to somehow be made remote by uploading them to and storing them in the cloud.  This is where Github comes in.  Github lives remotely, on the Internet, and stores the team's versions in the cloud so they are accessible by each other.  Now the entire team can collectively take advantage of the benefits of version control.


text:
# live-reload

A live reload server & client

## Docs

```
Usage:

  live-reload [<path>...] --port=somePort --host=someHost
              --delay=someDelay
              --key=<path-to-key-file> --cert=<path-to-crt-file>

    Runs a live-reload server on the host and port. It listens to
        changes on one or more paths and sends reload commands to
        any browser connected to it.

    If a delay is set then it will send the command once the
        file has changed and the delay has elapsed. This is
        useful if your changing many files at once and only
        want to reload say 1s after all files have been written
        to disk.

    If both key and cert are set, the server will run on https.

    To connect a browser to a live-reload server simply add
        <script src="//someHost:somePort"></script> to your page
```

## Installation

`npm install @deadb17/live-reload`

## Contributors

 - Raynos
 - DEADB17

## MIT Licenced


text:
# UR5 TCP Webots Controller

This app runs a simulation on [**Webots**](https://www.cyberbotics.com/) through a TCP port implemented on a C++ app that runs independently of Kinectronics.

If you want to run this sample, you need the Webots' UR5 world and C++ TCP server, they are available [**here**](https://drive.google.com/file/d/1LLr1-JanxOJLp5HQCXxGECTyICSbFZyz/view?usp=sharing).

First thing you need yo do, is load the world in Webots (**UR5_test.wbt**) available in the decompressed **UR5_test** folder. Later, you have to open the solution (**UR5TCPController.sln**) available on the **UR5_test/Controllers/UR5TCPControllers** folder, build it and run it. You could either run directly the executable file. Please **notice** that without doing this first, the Kinectronics' UR5 controlller, won't work.

In this example app, the gestures of the database [DefaultGestureDatabase](https://github.com/JMRMEDEV/Kinectronics/wiki/Gesture-Databases#default-gesture-database) are linked to every defined arm command.

The relationship gesture-drone_command is defined in the following list:

1. **Gesture:** Arms45UpPosition. **Command:** None.

2. **Gesture:** Arms45DownPosition. **Command:** None.

3. **Gesture:** ArmsFrontPosition_L. **Command** None.

4. **Gesture:** ArmsFrontPosition_R. **Command:** moveFront().

5. **Gesture:** ArmsHRectanglePosition_L. **Command:** None.

6. **Gesture:** ArmsHRectanglePosition_R. **Command:** moveHRPosition().

7. **Gesture:** ArmsRectanglePosition_L. **Command:** None.

8. **Gesture:** ArmsRectanglePosition_R. **Command:** None.

9. **Gesture:** ArmsSidePosition_L. **Command:** None.

10. **Gesture:** ArmsSidePosition_R. **Command:** moveRight().

11. **Gesture:** ArmsSquarePosition_L. **Command:** None.

12. **Gesture:** ArmsSquarePosition_R. **Command:** None.

13. **Gesture:** None. **Command:** moveDown().

There is a **secondary controller** that only tracks **left hand state** for openning and closing the **gripper**. If the left hand is **open** so it's the gripper, same for the closed hand.

## Simulation

The simulation is achieved through [**Webots Robot Simulator**](https://www.cyberbotics.com/), an open-source software. According to their developers, **Webots** was built thinking on using the developed controllers on the real robots ([transfer to your own robot](https://cyberbotics.com/doc/guide/transfer-to-your-own-robot)). I guess that so can be achieved with a [plugin](https://cyberbotics.com/doc/guide/controller-plugin#remote-control-plugin). However, such implementation has not yet been developed for this controller. I hope it will in future realeases.

## Warning

Please note that so far, each command should go back to the **down position**. Currently moves from one to another which is not the default are not supported. E.G. from front to right, from HRectangle to front.

## Media

You can find a video of the working app in [**here**](https://youtu.be/QQmS2eV6YIE).

Here is a screenshot of the working app:

repository: JMRMEDEV/KinectronicsApps

repo_name: JMRMEDEV/KinectronicsApps


text:
---
title: flow-chart
---
# flow-chart

> is a collection of [React] components to draw an algorithm, workflow or process diagram

**This package is at an early stage of development, contributions are welcome**.

## Installation

[React] is required as a peer dependency.

```bash
npm i react react-dom flow-chart
```

## Synopsis

Render a flow chart diagram.

```javascript
import React from 'react'
import ReactDOM from 'react-dom'
import FlowChart from 'flow-chart'

const diagram = {
  steps: [
    {
      id: 'a',
      type: 'decision',
      x: 250,
      y: 120,
      width: 100
    },
    {
      id: 'b',
      type: 'process',
      x: 250,
      y: 20
    },
    {
      id: 'c',
      type: 'terminator',
      x: 20,
      y: 20,
      height: 20,
      width: 20
    }

  ]
  style: { backgroundColor: 'azure' },
  height: 800,
  width: 680
}

ReactDOM.render(
  <FlowChart diagram={diagram} editable />,
  document.getElementById('root')
)
```

## License

[MIT](http://g14n.info/mit-license)

[React]: https://facebook.github.io/react/

repository: oneredorange/flow-chart

repo_name: oneredorange/flow-chart


text:
---
title: Ghost Blog Setup and Installation for Beginners
author: Team Koding
date: 2014-01-27
categories: [ghost, nodejs]

videoId: ZIR-4uoRjo0
template: page.toffee
---

# Ghost Blog Setup and Installation for Beginners

In this article we will go over the installation process for the awesome new blogging software, [Ghost](https://ghost.org/). Follow along, or [Try the Koding Demo](https://koding.com/Develop/Teamwork?import=http://goo.gl/Q0jC59) right now!

## What is Ghost?

Ghost is an awesome new blog software written with “Just Blogging” in mind. Think WordPress without the complexity, bringing blogging back to it’s roots, so to say. This is all well and good, but with any product that is so new there is always confusion on how to install, develop, and run it.

So lets try and resolve some of that confusion. Lets go over the simple process of setting up Ghost on [Koding](https://koding.com) so you can learn it, toy with it, develop with it, and create your Ghost blog to be exactly what you want.

## Video of a Ghost (Blog)

And there you have it! With Koding, we have configured a development Ghost server. Best of all, your Koding username domain is accessible to anyone that you share it with, so sharing our work with team members and clients is easy!

## Can I skip steps?

With Koding, of course! If you [Try the Koding Demo](https://koding.com/Develop/Teamwork?import=http://goo.gl/Q0jC59) you can import where we left off in the video, saving you the trouble of downloading and extracting Ghost yourself.

If you use the Teamwork link, make sure to still configure it for your own Koding domain, install the dependencies, and run the server as shown in the video.

This has been a getting started article from [Koding](https://koding.com),
thanks for your time!

repository: bvallelunga/kdlearn

repo_name: bvallelunga/kdlearn


text:
# alfred-chrome-history

Search Chrome history from Alfred and open in browser.

## Features

- Search Chrome history (title and URL)
- Support another Chrome profile

## Installation

Clone and `make dist` or just download [binary releases](https://github.com/pasela/alfred-chrome-history/releases).

```sh
git clone https://github.com/pasela/alfred-chrome-history.git
cd alfred-chrome-history
make dist
open alfred-chrome-history.alfredworkflow
```

## Usage

in Alfred:

```
ch {query}
```

## Use another Chrome profile

1. Open workflow `Chrome History` in Alfred Workflows tab.
2. Open Workflow Configuration dialog by upper right side button.
3. Set `CHROME_PROFILE` variable with your Chrome profile directory name or path such as `Profile 1`.

## License

MIT

## Author

Yuki (a.k.a. pasela)

repository: pasela/alfred-chrome-history

gha_language: Go

gha_license_id: MIT

repo_name: pasela/alfred-chrome-history


text:
# cfn-lambda-s3-bucket-notification-configuration
## Description
The `cfn-lambda-s3-bucket-notification-configuration` function is CloudFormation Custom Lambda that support of create `s3 bucket notification configuration`

See also official documentation.
* https://aws.amazon.com/premiumsupport/knowledge-center/unable-validate-circular-dependency-cloudformation/?nc1=h_ls

## When do you use it
* Declare notifications independently of `AWS::S3::Bucket`

## Caution
The function replace all notifications if you created it.
You must be created notifications with this resource(function) only.

## Deploy
[See here](https://github.com/hixi-hyi/aws-cloudformation-lambda#deploy)

## Usage
```
  S3Bucket:
    Type: AWS::S3::Bucket
  S3BucketPolicy:
    Type: AWS::S3::BucketPolicy
    Properties:
      Bucket: !Ref S3Bucket
      PolicyDocument:
        Statement:
          - Action:
              - "s3:PutBucketNotification"
            Effect: "Allow"
            Resource: !GetAtt S3Bucket.Arn
            Principal:
              AWS: !ImportValue cfn-lambda-s3-bucket-notification-configuration:LambdaRoleArn
  S3BucketNofiticationConfiguration:
    Type: Custom::Lambda
    DependsOn: S3BucketPolicy
    Properties:
      ServiceToken: !ImportValue cfn-lambda-s3-bucket-notification-configuration:LambdaArn
      Bucket: !Ref S3Bucket
      NotificationConfiguration:
        LambdaFunctionConfigurations:
          - Events:
              - s3:ObjectCreated:*
            LambdaFunctionArn: !GetAtt LambdaFunction.Arn
      DeployAlways: !Ref Date
      Policies:
        Deletion:
          - IgnoreError
```

## Parameters
The function implements [s3api put-bucket-notification-configuration](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-notification-configuration.html)

### Bucket
- BucketName
- ***Required:*** Yes
- ***Update requires:*** Replacement

### NotificationConfiguration
- [Docs](https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-notification)
- ***Required:*** Yes
- ***Update requires:*** No interruption

### Policies.Deletion (optional)
- Support values are `IgnoreError` and `Retain`.
  - `IgnoreError`
- ***Required:*** No
- ***Update requires:*** No interruption

## Contributing
[See here](https://github.com/hixi-hyi/aws-cloudformation-lambda#contributing)


text:
---
layout: post
title:  "Add multiple remote git locations"
date:   2018-03-30
tags: [note]
commentIssueId: 75
---

Add multiple remote git locations
* create new ssh by  `ssh-kegen`
* edit `/.ssh/config`
* `git remote add`

## Add multiple remote git locations
```bash
# create new ssh key
$ ssh-keygen -t rsa -C<EMAIL_ADDRESS>-f $HOME/.ssh/yournewsssh

# create new ssh config
$ vi ~/.ssh/config
Host code.aliyun.com
  Hostname code.aliyun.com
  IdentityFile ~/.ssh/yournewsssh
  IdentitiesOnly yes

# add remote alias & push
$ git remote add aliyun git@code.aliyun.com:xxx/xxx.git
$ git push aliyun master
Counting objects: 1546, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1443/1443), done.
Writing objects: 100% (1546/1546), 3.46 MiB | 2.79 MiB/s, done.
Total 1546 (delta 544), reused 947 (delta 37)
remote: Resolving deltas: 100% (544/544), done.
 * [new branch]      master -> master
```

## References

* [pull-push-from-multiple-remote-locations](https://stackoverflow.com/questions/849308/pull-push-from-multiple-remote-locations)
* [specify-private-ssh-key-to-use-when-executing-shell-command](https://stackoverflow.com/questions/4565700/specify-private-ssh-key-to-use-when-executing-shell-command)

repository: zhoukekestar/notes

gha_language: HTML

repo_name: zhoukekestar/notes


text:
# Homework 10: C Extensions

## Protobuf (de)serializer

Complete C Extension `pb.c`:

- Implement `deviceapps_xwrite_pb` which should
    - Accept iterable object with dictionaries and output file path as arguments
    - Write serialized into protobuf gzipped messages to a file
    - Prepend each protobuf message with a header (`pbheader_t`)
    - Return number of written bytes
- Implement `deviceapps_xread_pb` which should
    - Accept input file path as argument
    - Read messages from `deviceapps_xwrite_pb` and convert them back to dictionaries
    - Return generator object with dictionaries
- Write more tests

**Useful links:**

- [Python/C API Reference Manual](https://docs.python.org/3.7/c-api/index.html)
- [Porting guide for Python C Extensions](https://py3c.readthedocs.io/en/latest/reference.html)
- [Implementing a generator/yield in a Python C extension](https://eli.thegreenplace.net/2012/04/05/implementing-a-generatoryield-in-a-python-c-extension)

### Requirements

- Python 3.x

### Install dependencies

Install Python dependencies:

```bash
pip3 install -r requirements.txt
```

Install `protobuf`:

```bash
# macOS
brew install protobuf
# Ubuntu
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
sudo mv protoc3/bin/* /usr/local/bin/
sudo mv protoc3/include/* /usr/local/include/
```

Install `protobuf-c`:

```bash
# Prepare package
git clone https://github.com/protobuf-c/protobuf-c
cd protobuf-c
chmod +x ./autogen.sh

# macOS
brew install autoconf automake libtool pkg-config
# Ubuntu
sudo apt-get update
sudo apt-get install autoconf, automake, libtool

# Fix namespace issue
# https://github.com/protobuf-c/protobuf-c/issues/356#issuecomment-460079949

# Build and install package
./autogen.sh && ./configure && make && make install
```

Generate `deviceapps.pb-c.c` and `deviceapps.pb-c.h` (if you want to create project from scratch):

```bash
cd deviceapps
protoc --c_out=. deviceapps.proto
```

### How to run

```bash
# Install `pb` module
python3 setup.py install
# Run Python shell
python3
```

Run in Docker:

```bash
docker build -t pb .
docker run -it --rm pb
```

Usage:

```python
import pb

file_name = 'test.pb.gz'
deviceapps = [
    {"device": {"type": "idfa", "id": "e7e1a50c0ec2747ca56cd9e1558c0d7c"},
     "lat": 67.7835424444, "lon": -22.8044005471, "apps": [1, 2, 3, 4]},
]

# Write
total_bytes = pb.deviceapps_xwrite_pb(deviceapps, file_name)
print(total_bytes)  # 76
# Read
result = list(pb.deviceapps_xread_pb(file_name))
print(result == deviceapps)  # True
```

### Testing

```bash
python3 -m unittest
```


text:
# Changelog v0.0.1
~~nicolocarpignoli

### What I want to add

- Remove every setInterval interaction between aframe components
- Add an alert also when user has not granted permissions for geolocation (for the current webapp)
- Do not update entity (place) position if there is too much difference between consequential user GPS positions (i.e. gps signal is not so stable, so if position is changing a lot in 1-2 seconds, do not consider that --> this may cause problems if user is in a car or some kind of fast moving transport?)
- Add UX/UI and messages when gps data is not available or there's very poor signal (is there any events for that?)
- try to integrate altitude
- ...

### What I done so far

- Added comments and cleaned code using a more standard formatting and coding practices
- Refactor: merged `gps-camera-position` and `gps-camera-rotation` into one single component, interacting with `gps-entity-place`s using events. `gps-camera-debug` is now an attribute of the `a-scene`
- Updated `a-frame` to 0.9.0 version, adapting code according to this
- Removed unuseful and confusing parts of the code
- Added a better demo
- Enhanced Documentation
- Added an alert message when geolocation is switched off (from Phone Settings)

### About demos..

- show something at user's location
- show something near user's location


text:
## Real-time updates to a web-app using only Python and Postgres

### Requirements

- Rest API - to handle basic CRUD (create, update, delete items)
- Websockets - streams over which, when something changes we can get events with all the information that the UI needs to update itself
- Front-end

### Postgres

- has *pub-sub* built in, using commands
  - `LISTEN` - to receive updates happening on a channel, and
  - `NOTIFY ` - to send a message on a channel
    Alternatively, use the `pg_notify()` function
  - Note that payload sizes are limited to 8k bytes.
- has *json* features built-in, for ex. the `row_to_json()` function
- has *triggers* - defining a function and attaching it to CRUD operations

### Python and Postgres

- Create a Python process to listen to a postgres channel (called 'test' here)

```python
# Subscribe to the Postgres pubsub channel

import select
import psycopg2

conn = psycopg2.connect(user='pypg_user', database='pubsub')
conn.autocommit = True # Enable transaction support

cur = conn.cursor()
cur.execute('LISTEN test;');

while True:
  if select.select([conn], [], [], 5) != ([], [], []):
    conn.poll()
    while conn.notifies:
      notify = conn.notifies.pop(0)
      print notify.payload
```

or, alternatively,

```python
# pypglisten.py
#

import pgpubsub

pubsub_1 = pgpubsub.connect(user='dkhosla',
                          database='default')

pubsub_1.listen('test');

for e in pubsub_1.events():
  print e.payload
```

- Then, from the PSQL prompt, execute a `NOTIFY` command

```sql
psql=# NOTIFY test, 'Hello Python!';
```

### REST APIs

These turn CRUD operations into straightforward `method` calls to endpoints. Consider for example the tasks in a to-do app;

| Action         | Request                 |
| -------------- | ----------------------- |
| Create an item | POST /api/todos/        |
| List all items | GET /api/todos/         |
| List one item  | GET /api/todos/<id>/    |
| Update an item | PUT /api/todos/<id>/    |
| Delete an item | DELETE /api/todos/<id>/ |

To stream changes to an item, we'd have to use `WebSocket`s

### Web Application

repository: dushyantkhosla/dk-ds-notes

repo_name: dushyantkhosla/dk-ds-notes


text:
# Release notes for glub

## Release 0.2.0 - 14th February 2015

### Notes

* clone and list commands now handle pagination properly
* other commands will be updated across the next week

## Release 0.0.2 - 17th April 2013

### Notes

* Now published as a gem
* Now notifies user of command to use to add new repo as a remote

## Release 0.0.1 - 17th April 2013

### Notes

* Initial release
* Can now create a project in Gitlab

repository: RyanMacG/glub

gha_language: Ruby

repo_name: RyanMacG/glub


text:
# AWS-cloudformation-walkthrough
Step by step walkthrough deploying, modifying, deleting, replacing infrastructure.

First steps is creating an AWS resource with the most default options.  Once in that folder you will move through activities to create more complex CloudFormation Templates.

Step 00 - Create a free AWS account and make sure to delete your infrastructure so you do not get charges. Make this a habit every session.

Step 01 - Go the AWS Console.  Go to Services > EC2 > NetWork & Security > Key Pairs and create a key.  Full instructions are at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

Step 02 - Creating a Resource.  Here you will create a VPC with most basic and default options.


text:
---
uid: crmscript_ref_NSSelectionForFind_GetCanSaveAsSelection
title: Bool GetCanSaveAsSelection()
intellisense: NSSelectionForFind.GetCanSaveAsSelection
keywords: NSSelectionForFind, GetCanSaveAsSelection
so.topic: reference
---

# Bool GetCanSaveAsSelection()

Most Find entities support saving the search as a Dynamic Selection: this bool indicates if that is the case

**Returns:** Bool

```crmscript
NSSelectionForFind thing;
Bool canSaveAsSelection  = thing.GetCanSaveAsSelection();
```

repository: stianol/crmscript

branch_name: refs/heads/main

repo_name: stianol/crmscript


text:
---
Title: Roadmap Update and Vlog 10
Description: In this post we have the long awaited Roadmap update to let you all know what's going on and what's coming later. We also have our longest vlog yet: Vlog 10!
Author: Dead Matter Team
Date: 02/06/20
Template: post
---

Hey Survivors,

I’d like to apologize for the time it’s taken to get this update out. We didn’t want to do it without uploading Vlog 10, which demonstrates where the game is currently at. All of us have been working double, even triple time to make sure that this update could get out as fast as possible. We thank you for your support and patience while we worked out some nasty issues that decided to pop up on us last minute :)

Let's get straight addressing the big elephant in the room. There has been some information floating around the internet about how the maps are going to be setup in Dead Matter that we would like to address:

We've heard you all loud and clear, and after consulting with our mapping lead, the primary South Alberta map will be targeted for 16km x 16km. This is the original target size, minus the area that Calgary would've been occupying on the map. To directly address concerns from backers, our map isn't going to be smaller than Skyrim's map, or have “Escape From Tarkov” styled instancing. Our game is, and always will be, an open world survival game.

We originally wanted to downscale South Alberta to 10km x 10km with a separate map of the same size that takes place in a different, unique section of Alberta to add some variety to the game. As a result of slamming the brakes on these changes we will likely have to play with the Zombie AI and add further optimizations as the map grows in size, especially on servers that have a large playercount and require hundreds of active zombies to be present.

Why is Calgary going to be on a separate map?

 We want to have a dense urban environment. We want to represent the size and scale of the city, and do it justice. In order to properly pull off the original vision we had for Calgary, we're going to separate it from the main map.

The Calgary map will feature a new set of factions, a unique set of meta-game events, and of course, plenty of new and unique locations for players to explore. We’re currently targeting 6km x 6km for the Calgary map, but this number may potentially change as our plans for the city become more conclusive.

Players will be able to travel between the two maps (provided someone is hosting servers with a database both server instances are connected to) by walking to the Eastern edge of the South Alberta map to travel to the city. This means there will be a roughly 16km long window for those of you that like to play it safe. There will be a loading screen as you're connecting to a different server, but given how far Calgary is geographically from the Southern Alberta our map takes place in, we feel that it's not too bad of a tradeoff for being able to preserve your character and vehicle across multiple maps.

When transferring to a different map or spawning in for the first time you will be given a set of locations to pick from in order to spawn. When discovering new locations, they will be added to a list of known locations that you can spawn or respawn at. In the event you are transferring between servers your character will incur a calorie and hydration cost when spawning at locations further away from the map border. Stocking up for the journey is recommended.

If you're adventurous, there's also going to be a handful of points scattered across Southern Alberta that you can use to travel to Calgary. These will be known to players, and if you're looking for a fight then this is the potentially lucrative option for you. Plan accordingly.

To address the other elephant in the room, the date for the closed alpha will be moved back to June. We will announce the exact date at the start of that month. We were not planning on pushing back the Closed Alpha again, but we've got some concerns with the Zombie AI, performance and making sure that the build is up to par for a Closed Alpha. That being said, the game is in a very good state for a PreAlpha, and we are extremely confident in the work we’ve put into the game thus far. We have made all necessary improvements to the core mechanics of the game to the point where we have established a solid foundation to move forward into Closed Alpha with.

We've also addressed a lot of our management concerns and now have a much stronger project management structure, as per feedback from many of our backers. This will be it, and we are extremely excited to get additional feedback from our community.

To make up for the extra time we’ve been spending, every backer is going to get a unique backpack variant that can be crafted in-game with some weight reduction benefits. Even your double barrel buddies will be receiving the blueprint for this item.

We would like to apologize for keeping our supporters waiting for so long, but this is the final time that we will be having to do this, and we look forward to an exciting testing period with our backers.

Early Access will be commencing at the start of 2021. If we still have issues being discovered by our backers in the Closed Alpha, we'll be doing our best to work with the community on getting them resolved to ensure a smooth Early Access launch, even if it means taking some extra time. We'll be announcing the exact date of the Steam Early Access launch as we approach the end of the year and can give an accurate estimate based on the Closed Alpha.

If you haven't seen our latest vlog which contains the latest gameplay, then check it out here:

If you want to get in touch, please feel free to hit us up on the forums or our community Discord and we're happy to talk to any of our supporters whenever we're available to do so!

We appreciate the support everyone has given us so far; it's been quite a journey, but we love our backers and are excited to give you guys the game that you've been waiting for!

gha_language: JavaScript


text:
# Redux Observable Backend
Redux-Observable-Backend is a framework of libraries used together to create entirely-Redux backend applications in Node.js.

All the functionality of these services is hidden behind Redux actions so from the perspective of someone consuming this library, you're writing regular JavaScript and all the Redux action happens behind-the-scenes.

## Table of Contents

- [Core](packages/core) - Helpful functions and utilities for any project.
- [Node](packages/node) - Node.js tooling for running a project with command line tasks and ESLint configurations.
- [Redux-Utils](packages/redux-utils) - A set of utility functions for working with Redux and Redux-Observable.
- [WebSocket](packages/websocket) - Building on the [Node](packages/node) package, WebSocket allows configuring WebSocket listeners within the Redux action system to communicate between machines.

## Why Redux?

The action syntax of Redux provides a structure like you'd find in Alan Kay's Message-Oriented Programming. Using Redux and Redux-Observable on the backend provides a completely different development paradigm which is beneficial for asynchronous code structures and microservices.

You can find out more about the message-oriented side of Redux in this Medium article I wrote: https://medium.com/@Sawtaytoes/redux-without-state-15e2f839055c.


text:
# [696. Count Binary Substrings](https://leetcode.com/problems/count-binary-substrings/)

## 题目

Give a string `s`, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively.

Substrings that occur multiple times are counted the number of times they occur.

**Example 1:**

```
Input: "00110011"
Output: 6
Explanation: There are 6 substrings that have equal number of consecutive 1's and 0's: "0011", "01", "1100", "10", "0011", and "01".

Notice that some of these substrings repeat and are counted the number of times they occur.

Also, "00110011" is not a valid substring becauseall the 0's (and 1's) are not grouped together.

```

**Example 2:**

```
Input: "10101"
Output: 4
Explanation: There are 4 substrings: "10", "01", "10", "01" that have equal number of consecutive 1's and 0's.

```

**Note:**

- `s.length` will be between 1 and 50,000.
- `s` will only consist of "0" or "1" characters.

## 题目大意

给定一个字符串 s，计算具有相同数量 0 和 1 的非空（连续）子字符串的数量，并且这些子字符串中的所有 0 和所有 1 都是连续的。重复出现的子串要计算它们出现的次数。

## 解题思路

- 简单题。先分组统计 0 和 1 的个数，例如，`0110001111` 按照 0 和 1 分组统计出来的结果是 [1, 2, 3, 4]。再拼凑结果。相邻 2 组取两者最短的，例如 `0110001111`，凑成的结果应该是 min(1,2)，min(2,3)，min(3,4)，即 `01`，`01`，`10`，`1100`，`0011`，`000111`。时间复杂度 O(n)，空间复杂度 O(1)。

## 代码

```go
package leetcode

func countBinarySubstrings(s string) int {
	last, res := 0, 0
	for i := 0; i < len(s); {
		c, count := s[i], 1
		for i++; i < len(s) && s[i] == c; i++ {
			count++
		}
		res += min(count, last)
		last = count
	}
	return res
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
```

repository: sec-js/LeetCode-Go

repo_name: sec-js/LeetCode-Go


text:
#nfs

####Table of Contents

1. [Overview - What is the nfs module?](#overview)
2. [Module Description - What does this module do?](#module-description)
3. [Setup - The basics of getting started with nfs](#setup)
    * [Simple mount an nfs share](#simple-mount-nfs-share)
    * [NFSv3 server and client] (#nfsv3-server-and-client)
    * [NFSv3 multiple exports, servers and multiple node] (#nfsv3-multiple-exports-servers-and-multiple-node)
    * [NFSv4 Simple example] (#nfsv4-simple-example)
    * [NFSv4 insanely overcomplicated reference] (#nfsv4-insanely-overcomplicated-reference)
    * [A large number of clients] (#a-large-number-of-clients)
4. [Usage - The classes and defined types available for configuration](#usage)
    * [Class: nfs::server](#class-nfsserver)
    * [Defined Type: nfs::server::export](#defined-type-nfsserverexport)
    * [Class: nfs::client](#class-nfsclient)
    * [Defined Type: nfs::client::mount](#defined-type-nfsclientmount)
5. [Requirements](#requirements)
6. [Limitations - OS compatibility, etc.](#limitations)
7. [Contributing to the graphite module](#contributing)

##Overview

This module installs, configures and manages everything on NFS clients and servers.

Github Master: [![Build Status](https://secure.travis-ci.org/echocat/puppet-nfs.png?branch=master)](https://travis-ci.org/echocat/puppet-nfs)

##Module Description

This module can be used to simply mount nfs shares on a client or to configure your nfs servers.
It can make use of storeconfigs on the puppetmaster to get its resources.

##Setup

**What nfs affects:**

* packages/services/configuration files for NFS usage
* can be used with puppet storage

###Simple mount nfs share

This example mounts a nfs share on the client, with NFSv3

```puppet
include '::nfs::client'

::nfs::client::mount { '/mnt/mymountpoint':
  server  => 'nfsserver.my.domain',
  share   => '/share/on/server',
  options => 'rw',
}
```

###NFSv3 server and client

This will export /data/folder on the server and automagically mount it on client.
You need storeconfigs/puppetdb for this to work.

```puppet
node server {
  include nfs::server

  ::nfs::server::export{ '/data_folder':
    ensure  => 'mounted',
    clients => '<IP_ADDRESS>/24(rw,insecure,async,no_root_squash) localhost(rw)'
  }
}
```

By default, mounts are mounted in the same folder on the clients as
they were exported from on the server.

```puppet
node client {
  include '::nfs::client'
  Nfs::Client::Mount <<| |>>
}
```

###NFSv3 multiple exports, servers and multiple node

```puppet
  node server1 {
    include '::nfs::server'
    ::nfs::server::export{
      '/data_folder':
        ensure  => 'mounted',
        clients => '<IP_ADDRESS>/24(rw,insecure,async,no_root_squash) localhost(rw)'
      # exports /homeexport and mounts them om /srv/home on the clients
      '/homeexport':
        ensure  => 'mounted',
        clients => '<IP_ADDRESS>/24(rw,insecure,async,root_squash)',
        mount   => '/srv/home'
    }
  }

  node server2 {
    include '::nfs::server'
    # ensure is passed to mount, which will make the client not mount it
    # the directory automatically, just add it to fstab
    ::nfs::server::export{
      '/media_library':
        ensure  => 'present',
        nfstag     => 'media'
        clients => '<IP_ADDRESS>/24(rw,insecure,async,no_root_squash) localhost(rw)'
    }
  }

  node client {
    include '::nfs::client'
    Nfs::Client::Mount <<| |>>;
  }

  # Using a storeconfig override, to change ensure option, so we mount
  # all shares

  node greedy_client {
    include '::nfs::client'
    Nfs::Client::Mount <<| |>> {
      ensure => 'mounted'
    }
  }

  # only the mount tagged as media
  # also override mount point
  node media_client {
    include '::nfs::client'
    Nfs::Client::Mount <<|nfstag == 'media' |>> {
      ensure => 'mounted',
      mount  => '/import/media'
    }
  }

  # All @@nfs::server::mount storeconfigs can be filtered by parameters
  # Also all parameters can be overridden (not that it's smart to do
  # so).
  # Check out the doc on exported resources for more info:
  # http://docs.puppetlabs.com/guides/exported_resources.html
  node single_server_client {
    include '::nfs::client'
    Nfs::Client::Mount <<| server == 'server1' |>> {
      ensure => 'absent',
    }
  }
```

###NFSv4 Simple example

We use the `$::domain` fact for the Domain setting in `/etc/idmapd.conf`.
For NFSv4 to work this has to be equal on servers and clients
set it manually if unsure.

All nfsv4 exports are bind mounted into `/export/$mount_name`
and mounted on `/srv/$mount_name` on the client.
Both values can be overridden through parameters both globally
and on individual nodes.

```puppet
  node server {
    class { 'nfs::server':
      nfs_v4 = true,
      nfs_v4_export_root_clients =>
        '<IP_ADDRESS>/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)'
    }
    nfs::server::export{ '/data_folder':
      ensure  => 'mounted',
      clients => '<IP_ADDRESS>/24(rw,insecure,no_subtree_check,async,no_root_squash) localhost(rw)'
    }
  }
```

By default, mounts are mounted in the same folder on the clients as
they were exported from on the server

```puppet
node client {
  class { 'nfs::client':
    nfs_v4 = true,
    nfs_v4_export_root_clients =>
      '<IP_ADDRESS>/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)'
  }
  Nfs::Client::Mount <<| |>>;
}
```

We can also mount the NFSv4 Root directly through nfs::client::mount::nfsv4::root.
By default /srv will be used for as mount point, but can be overriden through
the 'mounted' option.

```puppet
node client2 {
  $server = 'server'

  class { '::nfs::client':
    nfs_v4 = true,
  }
  Nfs::Client::Mount::Nfs_v4::Root <<| server == $server |>> {
    mount => "/srv/$server",
  }
}
```

###NFSv4 insanely overcomplicated reference

Just to show you, how complex we can make things ;-)

```puppet
  # and on individual nodes.
  node server {
    class { 'nfs::server':
      nfs_v4              => true,
      # Below are defaults
      nfs_v4_idmap_domain => $::domain,
      nfs_v4_export_root  => '/export',
      # Default access settings of /export root
      nfs_v4_export_root_clients =>
        "*.${::domain}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)"
    }

    nfs::server::export{ '/data_folder':
      # These are the defaults
      ensure  => 'mounted',
      # rbind or bind mounting of folders bindmounted into /export
      # google it
      bind    => 'rbind',
      # everything below here is propogated by to storeconfigs
      # to clients
      #
      # Directory where we want export mounted on client
      mount     => undef,
      remounts  => false,
      atboot    => false,
      #  Don't remove that option, but feel free to add more.
      options   => '_netdev',
      # If set will mount share inside /srv (or overridden mount_root)
      # and then bindmount to another directory elsewhere in the fs -
      # for fanatics.
      bindmount => undef,
      # Used to identify a catalog item for filtering by by
      # storeconfigs, kick ass.
      nfstag     => undef,
      # copied directly into /etc/exports as a string, for simplicity
      clients => '<IP_ADDRESS>/24(rw,insecure,no_subtree_check,async,no_root_squash)'
  }

  node client {
    class { 'nfs::client':
      nfs_v4              => true,
      nfs_v4_idmap_domain => $::domain
      nfs_v4_mount_root   => '/srv',
    }

    # We can as you by now know, override options set on the server
    # on the client node.
    # Be careful. Don't override mount points unless you are sure
    # that only one export will match your filter!

    Nfs::Client::Mount <<| # filter goes here # |>> {
      # Directory where we want export mounted on client
      mount     => undef,
      remounts  => false,
      atboot    => false,
      #  Don't remove that option, but feel free to add more.
      options   => '_netdev',
      # If set will mount share inside /srv (or overridden mount_root)
      # and then bindmount to another directory elsewhere in the fs -
      # for fanatics.
      bindmount => undef,
    }
  }
```

#### A large number of clients
If a server has many clients it's a bit of a mess to put them all in a single 'clients' option for `nfs::server::export`. Instead, you can put them in a array or hash and use the `mk_client_list` function to generate the clients string.

```
$nfs_clients = [
    'common-*.loc.dom',
    'hostb.loc.dom',
    '<IP_ADDRESS>/24']

nfs::server::export { '/data':
    clients => mk_client_list($nfs_clients, {}, "ro"),
    # Which will produce:
    # 'common-*.loc.dom(ro) hostb.loc.dom(ro) <IP_ADDRESS>/24(ro)'
    ...
}
```

In this case mk_client_list generates the string: `

The second option is a hash of client -> options. The third option is the default in case a client doesn't have options specified in the hash. In the above example none of the clients had specific settings, so they were all given the default options of `ro`.
```
$nfs_clients = [
    'common-*.loc.dom',
    'hostb.loc.dom',
    '<IP_ADDRESS>/24']

$nfs_client_options = {
    'hostb.loc.dom'     => 'rw,no_root_squash'}

nfs::server::export {'/data':
    # Use the stdlib keys function to get the array of keys from our hash.
    clients => mk_client_list($nfs_clients, $nfs_client_options, 'ro'),
    # Which will produce:
    # 'common-*.loc.dom(ro) hostb.loc.dom(rw,no_root_squash) <IP_ADDRESS>/24(ro)'
    ...
}
```

You can also give options to each host in a hash, and then use the stdlib keys() function to extract the client array from the hash: `mk_client_list(keys($client_hash), $client_hash, '')`

##Usage

####Class: `nfs::server`

Set up NFS server and exports. NFSv3 and NFSv4 supported.

**Parameters within `nfs::server`:**

#####`nfs_v4` (optional)

NFSv4 support. Will set up automatic bind mounts to export root.
Disabled by default.

#####`nfs_v4_export_root` (optional)

Export root, where we bind mount shares, default /export

#####`nfs_v4_idmap_domain` (optional)

Domain setting for idmapd, must be the same across server
and clients. Default is to use $domain fact.

#####Examples

```puppet
class { '::nfs::server':
  nfs_v4                      => true,
  nfs_v4_export_root_clients  => "*.${::domain}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)",
  # Generally parameters below have sane defaults.
  nfs_v4_export_root          => "/export",
  nfs_v4_idmap_domain         => $::domain,
}
```

####Defined Type: `nfs::server::export`

Set up NFS export on the server (and stores data in configstore)

**Parameters within `nfs::server::export`:**

#####`v3_export_name` (optional)

Default is `$name`. Usally you do not set it explicit.

#####`v4_export_name` (optional)

Default results from `$name`. Usally you do not set it explicit.

#####`ensure` (optional)

Default is 'mounted'

#####`bind` (optional)

Default is 'rbind'.
rbind or bind mounting of folders bindmounted into /export. Google it!

**Following parameteres are propogated by to storeconfigs to clients**

#####`mount` (optional)

Default is undef. This means client mount path is the same as server export path.
Directory where we want export mounted on client

#####`remounts` (optional)

Default is false.

#####`atboot` (optional)

Default is false.

#####`options` (optional)

Default is '_netdev'. Don't remove that option, but feel free to add more.

#####`bindmount` (optional)

Default is undef. If set will mount share inside /srv (or overridden mount_root)
and then bindmount to another directory elsewhere in the fs - for fanatics.

#####`nfstag` (optional)

Default is undef. Used to identify a catalog item for filtering by storeconfigs on clients.

#####`clients` (optional)

Default is 'localhost(ro)'. Copied directly into /etc/exports as a string, for simplicity.

#####`server` (optional)

Default is `$::clientcert`. Used to specify a other ip/name for the client to connect to. Usefull in machines with multiple ip addresses or network interfaces
#####Example

```puppet
::nfs::server::export { '/media_library':
  nfstag  => 'media'
  clients => '<IP_ADDRESS>/24(rw,insecure,async,no_root_squash) localhost(rw)'
}
```

####Class: `nfs::client`

Set up NFS client and mounts. NFSv3 and NFSv4 supported.

**Parameters within `nfs::client`:**

#####`nfs_v4`

NFSv4 support.
Disabled by default.

#####`nfs_v4_mount_root`

Mount root, where we  mount shares, default /srv

#####`nfs_v4_idmap_domain`

Domain setting for idmapd, must be the same across server
and clients. Default is to use $::domain fact.

#####Example

```puppet
class { '::nfs::client':
  nfs_v4              => true,
  # Generally parameters below have sane defaults.
  nfs_v4_mount_root   => '/srv',
  nfs_v4_idmap_domain => $::domain,
}
```

####Defined Type: `nfs::client::mount`

Set up NFS mount on client.

**Parameters within `nfs::client::mount`:**

#####`server`

FQDN or IP of the NFS server.

#####`share`

Name of share to be mounted.

#####`ensure` (optional)

Default is 'mounted'.

#####`mount` (optional)

Default is `$title` of defined type. Defines mountpoint of the share on the client.

#####`remounts` (optional)

Default is false.

#####`atboot` (optional)

Default is false.

#####`options` (optional)

Default is '_netdev'. Don't remove that option, but feel free to add more.

#####`bindmount` (optional)

Default is undef. If set will mount share inside /srv (or overridden mount_root)
and then bindmount to another directory elsewhere in the fs - for fanatics.

#####`nfstag` (optional)

Default is undef. Used to identify a catalog item for filtering by storeconfigs on clients.

#####`owner` (optional)

Default is 'root'. Sets owner of mountpoint directory. This is applied to the directory on every run, which means it is used both on the base mountpoint creation when unmounted, and also once mounted on the target NFS server and thus all servers accessing the same share.

#####`group` (optional)

Default is `root`. Sets group of mountpoint directory. This is applied to the directory on every run, which means it is used both on the base mountpoint creation when unmounted, and also once mounted on the target NFS server and thus all servers accessing the same share.

#####`perm` (optional)

Default is '0755'. Sets mode of mountpoint directory. This has changed from previous versons which used '0777' (world writable). This is applied to the directory on every run, which means it is used both on the base mountpoint creation when unmounted, and also once mounted on the target NFS server and thus all servers accessing the same share.

##Requirements

If you want to have the full potential of this module its recommend to have storeconfigs enabled.

###Modules needed:

* stdlib by puppetlabs
* concat by puppetlabs

###Software versions needed:

* facter > 1.6.2
* puppet > 2.6.2

##Limitations

##Contributing

Echocat modules are open projects. So if you want to make this module even better, you can contribute to this module on [Github](https://github.com/echocat/puppet-nfs).

This module is forked/based on Harald Skoglund<EMAIL_ADDRESS>from https://github.com/haraldsk/puppet-module-nfs/

repository: mousadialo/puppet-config

repo_name: mousadialo/puppet-config


text:
# TypeScript typings for Google Cloud Natural Language API v1
Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.
For detailed description please check [documentation](https://cloud.google.com/natural-language/).

## Installing

Install typings for Google Cloud Natural Language API:
```
npm install @types/gapi.client.language@v1 --save-dev
```

## Usage

You need to initialize Google API client in your code:
```typescript
gapi.load("client", () => {
    // now we can use gapi.client
    // ...
});
```

Then load api client wrapper:
```typescript
gapi.client.load('language', 'v1', () => {
    // now we can use gapi.client.language
    // ...
});
```

Don't forget to authenticate your client before sending any request to resources:
```typescript

// declare client_id registered in Google Developers Console
var client_id = '',
    scope = [
        // Apply machine learning models to reveal the structure and meaning of text
        'https://www.googleapis.com/auth/cloud-language',

        // View and manage your data across Google Cloud Platform services
        'https://www.googleapis.com/auth/cloud-platform',
    ],
    immediate = true;
// ...

gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => {
    if (authResult && !authResult.error) {
        /* handle succesfull authorization */
    } else {
        /* handle authorization error */
    }
});
```

After that you can use Google Cloud Natural Language API resources:

```typescript

/*
Finds named entities (currently proper names and common nouns) in the text
along with entity types, salience, mentions for each entity, and
other properties.
*/
await gapi.client.documents.analyzeEntities({  });

/*
Finds entities, similar to AnalyzeEntities in the text and analyzes
sentiment associated with each entity and its mentions.
*/
await gapi.client.documents.analyzeEntitySentiment({  });

/*
Analyzes the sentiment of the provided text.
*/
await gapi.client.documents.analyzeSentiment({  });

/*
Analyzes the syntax of the text and provides sentence boundaries and
tokenization along with part of speech tags, dependency trees, and other
properties.
*/
await gapi.client.documents.analyzeSyntax({  });

/*
A convenience method that provides all the features that analyzeSentiment,
analyzeEntities, and analyzeSyntax provide in one call.
*/
await gapi.client.documents.annotateText({  });
```


text:
# OpenJS Foundation Cross Project Council Meeting 2020-10-20

## Links

* **Recording**: https://www.youtube.com/watch?v=QDr89HEeYkw
* **GitHub Issue**: https://github.com/openjs-foundation/cross-project-council/issues/666

## Present

* Joe Sepi (@joesepi)
* Michael Dawson (@mhdawson)
* Eemeli Aro (@eemeli)
* Christopher Hiller (@boneskull)
* Robin Ginn (@rginn)
* Sara Chipps (@sarajo)
* Jordan Harband (@ljharb)
* Myles Borins (@MylesBorins)
* Timothy Willison (@timmywil)
* Tobie Langel (@tobie)
* Brian Warner (@brianwarner)
* Anton Molleda (@molant)

## Agenda

### Announcements

* Node.js 15.x release today! 14.x goes LTS next week.
* Upcoming meetings today: Standards & Marketing see calendar.openjsf.org

### Board Meeting Updates

*Extracted from **cross-project-council-agenda** labeled issues and pull requests from the **openjs-foundation org** prior to the meeting.

### openjs-foundation/cross-project-council

* Develop growth plan template [#658](https://github.com/openjs-foundation/cross-project-council/issues/658)

  * Adds Growth plan template
    [#647](https://github.com/openjs-foundation/cross-project-council/pull/647)

* \[WIP\] Proposal to remove the Growth Stage [#650](https://github.com/openjs-foundation/cross-project-council/pull/650)

* Should we have a lightweight mechanism to spin off ad hoc CPC working groups? [#649](https://github.com/openjs-foundation/cross-project-council/issues/649)
  * Discussion around creating issue template.

* Add examples of successful applications [#643](https://github.com/openjs-foundation/cross-project-council/pull/643)
  * Robin, will add another 3
  * Looking at creating web form to booth do initial submission as well as submit one to
    be used as an example

* Provide implementation guidance for DCO/CLA [#632](https://github.com/openjs-foundation/cross-project-council/issues/632)
  * This is the week for Brian to get it done.
  * Hope to have something we can review by the next meeting

* Develop annual review process for projects [#592](https://github.com/openjs-foundation/cross-project-council/issues/592)
  * covered under discussion on growth plans

* Simplify proposal process [#635](https://github.com/openjs-foundation/cross-project-council/issues/635)
  * covered in section below

### Working session on proposal process
* Simplify proposal process [#635](https://github.com/openjs-foundation/cross-project-council/issues/635)
Consensus:
* remove term staging
* Two phases: Incubating; ready for review/approval
* As many PRs as you’d like through incubating, essentially providing snapshots
* PR to move artifacts into place is the “ready for approval” phase
* A desire for a Definition of Done; perhaps checklist

Work on this was done in a shared screen and moved to a PR.

## Q&A, Other

## Upcoming Meetings

* **Calendar**: https://calendar.openjsf.org

Click `+GoogleCalendar` at the bottom right to add to your own Google calendar.

repository: openjs-foundation/cross-project-council

repo_name: openjs-foundation/cross-project-council


text:
deepmerge
=========

> UMD bundle is 567B minified+gzipped

Merge the enumerable attributes of two objects deeply.

[***Check out the changes from version 1.x to 2.0.0***](https://github.com/KyleAMathews/deepmerge/blob/master/changelog.md#200)

For the old array element-merging algorithm, see [the `arrayMerge` option below](#arraymerge).

## Webpack bug

If you have `require('deepmerge')` (as opposed to `import merge from 'deepmerge'`) anywhere in your codebase, Webpack 3 and 4 have a bug that [breaks bundling](https://github.com/webpack/webpack/issues/6584).

If you see `Error: merge is not a function`, add this alias to your Webpack config:

```
alias: {
	deepmerge$: path.resolve(__dirname, 'node_modules/deepmerge/dist/umd.js'),
}
```

example
=======

<!--js
var merge = require('./')
-->

```js
var x = {
	foo: { bar: 3 },
	array: [{
		does: 'work',
		too: [ 1, 2, 3 ]
	}]
}

var y = {
	foo: { baz: 4 },
	quux: 5,
	array: [{
		does: 'work',
		too: [ 4, 5, 6 ]
	}, {
		really: 'yes'
	}]
}

var expected = {
	foo: {
		bar: 3,
		baz: 4
	},
	array: [{
		does: 'work',
		too: [ 1, 2, 3 ]
	}, {
		does: 'work',
		too: [ 4, 5, 6 ]
	}, {
		really: 'yes'
	}],
	quux: 5
}

merge(x, y) // => expected
```

api
=======

CommonJS:
```
var merge = require('deepmerge')
```

ES Modules:
```
import merge from 'deepmerge'
```

merge(x, y, [options])
-----------

Merge two objects `x` and `y` deeply, returning a new merged object with the
elements from both `x` and `y`.

If an element at the same key is present for both `x` and `y`, the value from
`y` will appear in the result.

Merging creates a new object, so that neither `x` or `y` are be modified.

merge.all(arrayOfObjects, [options])
-----------

Merges any number of objects into a single result object.

```js
var x = { foo: { bar: 3 } }
var y = { foo: { baz: 4 } }
var z = { bar: 'yay!' }

var expected = { foo: { bar: 3, baz: 4 }, bar: 'yay!' }

merge.all([x, y, z]) // => expected
```

### options

#### arrayMerge

The merge will also concatenate arrays and merge array values by default.

However, there are nigh-infinite valid ways to merge arrays, and you may want to supply your own.  You can do this by passing an `arrayMerge` function as an option.

The options object will include the default `isMergeableObject` implementation if the top-level consumer didn't pass a custom function in.

```js
function overwriteMerge(destinationArray, sourceArray, options) {
	return sourceArray
}
merge(
	[1, 2, 3],
	[3, 2, 1],
	{ arrayMerge: overwriteMerge }
) // => [3, 2, 1]
```

To prevent arrays from being merged:

```js
const dontMerge = (destination, source) => source
const output = merge({ coolThing: [1,2,3] }, { coolThing: ['a', 'b', 'c'] }, { arrayMerge: dontMerge })
output // => { coolThing: ['a', 'b', 'c'] }
```

To use the old (pre-version-2.0.0) array merging algorithm, pass in this function:

```js
const emptyTarget = value => Array.isArray(value) ? [] : {}
const clone = (value, options) => merge(emptyTarget(value), value, options)

function oldArrayMerge(target, source, options) {
	const destination = target.slice()

	source.forEach(function(e, i) {
		if (typeof destination[i] === 'undefined') {
			const cloneRequested = options.clone !== false
			const shouldClone = cloneRequested && options.isMergeableObject(e)
			destination[i] = shouldClone ? clone(e, options) : e
		} else if (options.isMergeableObject(e)) {
			destination[i] = merge(target[i], e, options)
		} else if (target.indexOf(e) === -1) {
			destination.push(e)
		}
	})
	return destination
}

merge(
	[{ a: true }],
	[{ b: true }, 'ah yup'],
	{ arrayMerge: oldArrayMerge }
) // => [{ a: true, b: true }, 'ah yup']
```

#### isMergeableObject

By default, deepmerge clones every property from almost every kind of object.

You may not want this, if your objects are of special types, and you want to copy the whole object instead of just copying its properties.

You can accomplish this by passing in a function for the `isMergeableObject` option.

If you only want to clone properties of plain objects, and ignore all "special" kinds of instantiated objects, you probably want to drop in [`is-plain-object`](https://github.com/jonschlinkert/is-plain-object).

```js
const isPlainObject = require('is-plain-object')

function SuperSpecial() {
	this.special = 'oh yeah man totally'
}

const instantiatedSpecialObject = new SuperSpecial()

const target = {
	someProperty: {
		cool: 'oh for sure'
	}
}

const source = {
	someProperty: instantiatedSpecialObject
}

const defaultOutput = merge(target, source)

defaultOutput.someProperty.cool // => 'oh for sure'
defaultOutput.someProperty.special // => 'oh yeah man totally'
defaultOutput.someProperty instanceof SuperSpecial // => false

const customMergeOutput = merge(target, source, {
	isMergeableObject: isPlainObject
})

customMergeOutput.someProperty.cool // => undefined
customMergeOutput.someProperty.special // => 'oh yeah man totally'
customMergeOutput.someProperty instanceof SuperSpecial // => true
```

#### clone

*Deprecated.*

Defaults to `true`.

If `clone` is `false` then child objects will be copied directly instead of being cloned.  This was the default behavior before version 2.x.

install
=======

With [npm](http://npmjs.org) do:

```sh
npm install deepmerge
```

Just want to download the file without using any package managers/bundlers?  [Download the UMD version from unpkg.com](https://unpkg.com/deepmerge/dist/umd.js).

test
====

With [npm](http://npmjs.org) do:

```sh
npm test
```

license
=======

MIT

repository: sasaxing/deepmerge

repo_name: sasaxing/deepmerge


text:
# MovioBook ~ Search and Binge Watch Movie Trailers

MovioBook is a React-ReduxJS application that loads data from the [The Movie Database (TMDb)](https://www.themoviedb.org/?language=en)

## GitHub Pages Demo
[movioBook Demo](https://nicmak.github.io/movioBook/)

## Tools that were used to make this application

* [ReactJS](https://facebook.github.io/react/)
* [Create-React-App](https://github.com/facebookincubator/create-react-app)
* [ReduxJS](http://redux.js.org/)
* [React AutoSuggest](https://github.com/moroshko/react-autosuggest)
* [React BootStrap](https://react-bootstrap.github.io/)
* [SASS](http://sass-lang.com/)

## Installation

1. Clone the Repo
2. cd moviobook
3. npm install
4.  npm start

## Author

Nicholas Mak

repository: nicmak/movioBook

repo_name: nicmak/movioBook


text:
# Auto Staging Tower

[![Maintainability](https://api.codeclimate.com/v1/badges/6a32b4e0cf97b4cf635d/maintainability)](https://codeclimate.com/github/auto-staging/tower/maintainability)
[![GoDoc](https://godoc.org/github.com/auto-staging/tower?status.svg)](https://godoc.org/github.com/auto-staging/tower)
[![Go Report Card](https://goreportcard.com/badge/github.com/auto-staging/tower)](https://goreportcard.com/report/github.com/auto-staging/tower)
[![Build Status](https://travis-ci.com/auto-staging/tower.svg?branch=master)](https://travis-ci.com/auto-staging/tower)

> Tower is the central management Lambda function for auto-staging, it is called through the AWS API Gateway.

## [Documentation](https://auto-staging.github.io/tower)

The documentation is available on GitHub pages if you want to access the same information offline, you can find it in the /docs folder or by following this link [Offline documentation (Markdown)](docs/README.md)

## License and Author

Author: Jan Ritter

License: MIT

repository: auto-staging/tower

repo_name: auto-staging/tower


text:
Tool to upload a file to a remote machine.

Handles connectivity drops without having to reupload the whole file.

# Building

The project requires `rustc` and `cargo` to be installed in order to build it.

To build the project, run the following command:

```
cargo build
```

# Streaming a file

To stream a file, first start the receiver server:

```
./target/debug/file-receiver 8080
```

Now, in another terminal window, use the client to upload a file:

```
./target/debug/file-uploader --host <IP_ADDRESS> --port 8080 --limit-rate 1048576 testfile10Mb
```

Replace `testfile10Mb` with the file that you wish to upload. The file received
will have the `.received` suffix appended to its file name. The `--limit-rate`
parameter is optional and restricts the uploading speed to the given number of
bytes per second.

repository: tacgomes/filestreamer-rs

repo_name: tacgomes/filestreamer-rs


text:
# MQTT logger [![Build Status](https://travis-ci.org/MrCrazyID/mqtt_logger.svg?branch=master)](https://travis-ci.org/MrCrazyID/mqtt_logger)

An MQTT logger.

This is still a work in progress.
Check back every 2 minutes to see if it is done jet.

Development branch: [![Build Status](https://travis-ci.org/MrCrazyID/mqtt_logger.svg?branch=devel)](https://travis-ci.org/MrCrazyID/mqtt_logger)

## Dependencies

-   libsqlite3x-devel


text:
[![npm version](https://badge.fury.io/js/%40amplitude%2Fnode.svg)](https://badge.fury.io/js/%40amplitude%2Fnode)

# Official Amplitude SDK for Node.js
This is Amplitude Node.js SDK written in Typescript, the 1st backend SDK for Amplitude. At this moment, we keep it minimal and simple because we want to give more thoughts over different customers' needs. Modularization and flexiblity will be the main priorities for this SDK. We would like to hear your ideas as well on how you plan on using this library!

## Installation and Quick Start
Please visit our :100:[Developer Center](https://developers.amplitude.com/docs/nodejs) for instructions on installing and using our the SDK.

## Check Out the Sub-Packages

In order of what might be good to read to get acquainted with the Node SDK:

- [(`@amplitude/node`)](https://github.com/amplitude/Amplitude-Node/tree/main/packages/node): The core Node SDK and a starting place for logging events in Node.js.
- [(`@amplitude/types`)](https://github.com/amplitude/Amplitude-Node/tree/main/packages/types): Contains our helper types and enums(What an event looks like, what to expect the response to look like). A resource for interfacing with the Node SDK.
- [(`@amplitude/identify`)](https://github.com/amplitude/Amplitude-Node/tree/main/packages/identify): A builder-type class that helps interface with the Identify API and the Node SDK. Use it to compose Identify events for both users and groups.
- [(`@amplitude/identity`)](https://github.com/amplitude/Amplitude-Node/tree/main/packages/identity): A helper class to store the "identity" (device + user ID) of a certain event or client.
- [(`@amplitude/utils`)](https://github.com/amplitude/Amplitude-Node/tree/main/packages/utils): A list of shared (mostly) polymorphic utilities across our javascript-based SDK's.
- [("@amplitude/eslint-config-typescript`)](https://github.com/amplitude/Amplitude-Node/tree/main/packages/eslint-config-typescript): The ESLint configuration shared across our repositories.
## Need Help?
If you have any problems or issues over our SDK, feel free to [create a github issue](https://github.com/amplitude/Amplitude-Node/issues/new) or submit a request on [Amplitude Help](https://help.amplitude.com/hc/en-us/requests/new).

repository: jooohhn/Amplitude-Node

repo_name: jooohhn/Amplitude-Node


text:
### [CVE-2021-22005](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22005)
![](https://img.shields.io/static/v1?label=Product&message=VMware%20vCenter%20Server%2C%20VMware%20Cloud%20Foundation&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=File%20upload%20vulnerability&color=brighgreen)

### Description

The vCenter Server contains an arbitrary file upload vulnerability in the Analytics service. A malicious actor with network access to port 443 on vCenter Server may exploit this issue to execute code on vCenter Server by uploading a specially crafted file.

### POC

#### Reference
- http://packetstormsecurity.com/files/164439/VMware-vCenter-Server-Analytics-CEIP-Service-File-Upload.html
- https://www.vmware.com/security/advisories/VMSA-2021-0020.html

#### Github
- https://github.com/1ZRR4H/CVE-2021-22005
- https://github.com/20142995/pocsuite3
- https://github.com/5gstudent/CVE-2021-22005-
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
- https://github.com/CHYbeta/Vuln100Topics20
- https://github.com/CrackerCat/CVE-2021-22006
- https://github.com/DarkFunct/CVE_Exploits
- https://github.com/Drakfunc/CVE_Exploits
- https://github.com/FDlucifer/firece-fish
- https://github.com/InventorMAO/cve-2021-22005
- https://github.com/Jun-5heng/CVE-2021-22005
- https://github.com/Mr-xn/Penetration_Testing_POC
- https://github.com/RedTeamExp/CVE-2021-22005_PoC
- https://github.com/SYRTI/POC_to_review
- https://github.com/Schira4396/VcenterKiller
- https://github.com/SofianeHamlaoui/Conti-Clear
- https://github.com/TaroballzChen/CVE-2021-22005-metasploit
- https://github.com/TheTh1nk3r/exp_hub
- https://github.com/Threekiii/Awesome-POC
- https://github.com/TiagoSergio/CVE-2021-22005
- https://github.com/Timirepo/CVE_Exploits
- https://github.com/Vulnmachines/VmWare-vCenter-vulnerability
- https://github.com/WhooAmii/POC_to_review
- https://github.com/WingsSec/Meppo
- https://github.com/X1pe0/VMWare-CVE-Check
- https://github.com/Z0fhack/Goby_POC
- https://github.com/aneasystone/github-trending
- https://github.com/chaosec2021/EXP-POC
- https://github.com/chaosec2021/fscan-POC
- https://github.com/czz1233/fscan
- https://github.com/dabaibuai/dabai
- https://github.com/guchangan1/All-Defense-Tool
- https://github.com/hanc00l/some_pocsuite
- https://github.com/izj007/wechat
- https://github.com/k0imet/CVE-POCs
- https://github.com/mamba-2021/EXP-POC
- https://github.com/mamba-2021/fscan-POC
- https://github.com/manas3c/CVE-POC
- https://github.com/nday-ldgz/ZoomEye-dork
- https://github.com/nomi-sec/PoC-in-GitHub
- https://github.com/pen4uin/awesome-vulnerability-research
- https://github.com/pen4uin/vulnerability-research
- https://github.com/pen4uin/vulnerability-research-list
- https://github.com/pisut4152/Sigma-Rule-for-CVE-2021-22005-scanning-activity
- https://github.com/r0ckysec/CVE-2021-22005
- https://github.com/r0eXpeR/supplier
- https://github.com/rwincey/CVE-2021-22005
- https://github.com/shengshengli/fscan-POC
- https://github.com/shmilylty/cve-2021-22005-exp
- https://github.com/soosmile/POC
- https://github.com/taielab/awesome-hacking-lists
- https://github.com/timb-machine-mirrors/CVE-2021-22005
- https://github.com/timb-machine-mirrors/testanull-CVE-2021-22005.py
- https://github.com/trhacknon/Pocingit
- https://github.com/vikerup/Get-vSphereVersion
- https://github.com/viksafe/Get-vSphereVersion
- https://github.com/winterwolf32/CVE-S---Penetration_Testing_POC-
- https://github.com/xuetusummer/Penetration_Testing_POC
- https://github.com/zhangziyang301/All-Defense-Tool

repository: trickest/cve

repo_name: trickest/cve


text:
# **Behavioral Cloning**

---

**Behavioral Cloning Project**

The steps of this project are the following:
* Use the simulator to collect data of good driving behavior
* Build, a convolution neural network in Keras that predicts steering angles from images
* Train and validate the model with a training and validation set
* Test that the model successfully drives around track one without leaving the road

[//]: # (Image References)

[net]: ./examples/model.png "Model Visualization"
[original]: ./examples/original.png "Model Visualization"
[cropped]: ./examples/cropped.png "Model Visualization"
[brightness]: ./examples/random-brightness.png "Model Visualization"
[flipped]: ./examples/flipped.png "Model Visualization"

[image1]: ./examples/placeholder.png "Model Visualization"
[image2]: ./examples/placeholder.png "Grayscaling"
[image3]: ./examples/placeholder_small.png "Recovery Image"
[image4]: ./examples/placeholder_small.png "Recovery Image"
[image5]: ./examples/placeholder_small.png "Recovery Image"
[image6]: ./examples/placeholder_small.png "Normal Image"
[image7]: ./examples/placeholder_small.png "Flipped Image"

---

#### 1. Files

My project includes the following files:
* model.py: contains the code for training and saving the convolution neural network. The file shows the pipeline I used for training and validating the model, and it contains comments to explain how the code works.
* drive.py: for driving the car in autonomous mode
* preprocessing.py: for pre-processing video frames
* model.h5: containing a trained convolution neural network
* writeup.md: summarizing the results

#### 2. Functional code
Using the Udacity provided simulator and my drive.py file, the car can be driven autonomously around the track by executing
```sh
python drive.py model.h5
```

### Model Architecture and Training Strategy

#### Model architecture

As suggested in the Udacity lecture I implemented the NVIDIA CNN model. This CNN was presented in [End to End Learning for Self-Driving Cars](https://images.nvidia.com/content/tegra/automotive/images/2016/solutions/pdf/end-to-end-dl-using-px.pdf)
and is known to be very successful for this task. The table below shows my implementation of this CNN in Keras:

![alt text][net]

The input of this network is an image with a shape of (33, 66, 200). The network itself consists of three 5x5 convolution layers, two 3x3 convolution layers, and three fully converted layers.
As the activation function, I started with `relu`, but later I changed to `elu`. The `elu` activation function has the advantage that it does not have the dying ReLU problem.

Moreover, I played around with Dropout and MaxPooling layers. Unfortunately, the model performance on the track did get worse with these layers. So I excluded them from the network. Instead I used L2 kernel regularizers to reduce overfitting.

The model was trained and validated on different data sets to ensure that the model was not overfitting. The model was tested by running it through the simulator and ensuring that the vehicle could stay on the track.

The model used an adam optimizer and a mean-squared error loss function.

#### Training Process and Creation of Training Data

The image below shows an example input image to the process pipeline:

![alt text][original]

For the training process I had to pre-process this images. First of all, unimportant sections of the image are removed:

![alt text][cropped]

Then the image is converted to YUV colorspace and normalised: `img = img/127.5 - 1`. Finally, the image is resized to a size of (33, 66, 200). This is the suggested image shape for the NVIDIA CNN.

In order to increase the diversity, data augmentation is used. Therefore the brightness of the images is randomly adjusted:

![alt text][brightness]

Besides a lot of straight sections the test track mainly consists of left turn. Thus, the image is flipped in order to artificially create right turns:

![alt text][flipped]

I started to train my model with the data set provided by Udacity. The trained model performed quite well on the test track, but struggled to stay on the lane at some poins.
Thus, I decided to create my own data set.

To capture good driving behavior, I first recorded two laps on track one using center lane driving. Furthermore, I recorded scenes that show what one has to do when the car gets close to the border.
This scenes are essential since without these scenes the model could not learn what do in these situations.

In training mode, the simulator produces three images per frame while recording corresponding to left-, right-, and center-mounted cameras, each giving a different perspective of the track ahead.
I used all of these images.

After the collection process, I had 6301 number of data points. This data set had a lot of straight sections. Thus I randomly removed 75% of all images in straight sections.
Thereby, the data set is reduced to 2356 image frames.

I finally randomly shuffled the data set and put 20% of the data into a validation set.

I used this training data for training the model. The validation set helped determine if the model was over or under fitting.

The following parameters where used during the training process:

* Epochs : 10
* Batch Size: 32
* Regularization Rate: 0.001

Due to the small number of data samples, there was no need to use a GPU. The training process was also fast enough with just a CPU.

The trained model was able to autonomously drive around the test track for several laps. Moreover, it mostly performed quite natural and did not shake around much.

gha_language: Python


text:
# Backup export tool

[![GitHub version](https://badgen.net/github/release/wireapp/backup-export-tool)](https://github.com/wireapp/backup-export-tool/releases)
![CI/CD](https://github.com/wireapp/backup-export-tool/workflows/CI/CD/badge.svg)
![Release Pipeline](https://github.com/wireapp/backup-export-tool/actions/workflows/release.yml/badge.svg)

Tool for generating PDF files from the backup. All backup formats are supported (Desktop, iOS, Android).

Please note that this tool is not for public use, but was rather developed for specific enterprise customers. However, we believe in
open-source world, so if you manage to get it working, feel free to use it.

## Download

The latest stable version of the
tool: [![GitHub version](https://badgen.net/github/release/wireapp/backup-export-tool)](https://github.com/wireapp/backup-export-tool/releases)
. Please use this version as the tag for the docker image - `quay.io/wire/backup-export-tool:<version>`. If you'd like to run the tool on
bare metal, download all assets on the [release page](https://github.com/wireapp/backup-export-tool/releases).

See available docker image tags [here on Quay](https://quay.io/repository/wire/backup-export-tool?tab=tags).

## TL;DR

How to generate PDF files using Desktop (or Web) app backup file

```bash
java -jar backup-export.jar \
  web \
  "mybackup.desktop_wbu" \
  --email<EMAIL_ADDRESS>\
  --password "MyCoolPasswordForWire1"
```

## Execution
There are two ways how to run the tool, using Docker (preferred) or Java.

### Docker
One should use attached [start.sh](start.sh) to run the tool.
Fill variables first.

Following variables are optional:
- `PROXY_URL`, `PROXY_PORT`, `NON_PROXY_HOSTS` - proxy settings, use only if you need it, also
if you specify these values, you must also add `-e USE_PROXY=true` to activate proxy
- `WIRE_API_HOST` - URL to Wire backend, default value is used Wire public cloud
- `BACKUP_PASSWORD` and `BACKUP_USERNAME` - use only if `CLIENT_TYPE` is `ios` or `android`

Example:
```bash
docker run --rm -it \
  -v backups/dejan56.ios_wbu:/app/database-in \
  -v backup-exports/dejan:/app/database-out \
  -e CLIENT_TYPE=ios \
  -e<EMAIL_ADDRESS>\
  -e WIRE_PASSWORD=VerySecretPassword1! \
  -e BACKUP_PASSWORD=Monkey123! \
  -e BACKUP_USERNAME=dejan56 \
  quay.io/wire/backup-export-tool:2.0.0
```

### Bare metal JVM
One needs C library Libsodium installed. To install it, one should use [official documentation](https://libsodium.gitbook.io/doc/),
or to use included binaries.
One should use Java 8 (OpenJDK) to run the tool, but Java 11 (OpenJDK) seems to be working as well.
We observed some problems running the tool under Windows and Oracle JDK, thus OpenJDK is required.

Almost all parameters are set using arguments to the tool, however, in order to use different Wire backend,
one must set environmental variable with backend URL:
```bash
WIRE_API_HOST=<your-wire-backend>
```
For example to set it on unix systems: `export WIRE_API_HOST=https://staging-nginz-https.zinfra.io` for staging.

To create executable `jar` please run `./gradlew shadowJar` which produces `build/libs/backup-export.jar`.

repository: wireapp/backup-export-tool

gha_language: Java

repo_name: wireapp/backup-export-tool


text:
# Getting started

### Initialize Svelte-docs

Just run this command in the directory of your project:

```bash
npm init svelte-docs
```

It will ask you about destination directory for the documents sources. Then it will download template and theme into the specified directory and install required NPM packages.

### Edit your docs

Enter to the created directory, ex.:

```bash
cd docs_srv
```

Then run docs in development mode on the local server:

```bash
npm run dev
```

Point your browser on [http://localhost:5000](http://localhost:5000) to see your docs in action.

Now you can edit files in `src/docs` directory and docs's site in browser will be reloaded on each save.

### Build the documentation site

When your documentation will be ready for production run:

```bash
npm run build
```

All needed files will be builded into the `__DOCS__/build` directory(see [config.pathes](config/pathes)). You can upload it to any service which supports static file serving. Also Svelte-Docs have built-in ability to publish site on Github Pages.


text:
# Readpost [![Build Status](https://img.shields.io/circleci/project/egoist/readpost/master.svg)](https://circleci.com/gh/egoist/readpost/tree/master)

Parse posts that are formated with Yaml and Markdown.

## Installation

```bash
npm install --save readpost
```

## Example

Meta is Yaml, Content is Markdown:

```markdown
title: Hello World
categories:
  - life
  - random
---
Tomorrow is another **day**, oh uptown funk you up.
```

Usage:

```javascript
const readpost = require('readpost');
const post = fs.readFileSync('./post.md', 'utf8');
const data = readpost(post);
// output:
{
  meta: Object,
  content: String
}
```

## License

MIT © [EGOIST](https://github.com/egoist)

repository: egoist/readpost

repo_name: egoist/readpost


text:
# Interceptor Asynchronicity

In honor of one of my favorite bands and album, [The Police](http://en.wikipedia.org/wiki/Synchronicity_(The_Police_album) - [Synchronicity](http://www.youtube.com/watch?v=CMBufJmTTSA), we have some asynchrounous capabilities in ColdBox Interceptors. These features are thanks to the sponsorship of [Guardly](https://www.guardly.com/), Inc, Alert, Connect, Stay Safe. So please make sure to check them out and thank them for sponsoring this great feature set. The core interceptor service and announcement methods have some arguments that can turn asynchronicity on or off and can return a structure of threading data.

```js
any announceInterception(state, interceptData, async, asyncAll, asyncAllJoin, asyncJoinTimeout, asyncPriority);
```

The asynchronous arguments are listed in the table below:

|Argument|Type|Required|Default Value|Description|
|--|--|--|--|--|
|async|boolean|false|false|Threads the interception call so the entire execution chain is ran in a separate thread. Extra arguments that can be used: asyncPriority.|
|asyncAll |boolean |false|false|Mutually exclusive with the async argument. If true, this will execute the interception point but multi-thread each of the CFCs that are listening to the interception point. So if 3 CFCs are listening, then 3 separate threads will be created for each CFC call. By default, the calling thread will wait for all 3 separate threads to finalize in order to continue with the execution. Extra arguments that can be used: *asyncAllJoin*, *asyncTimeout*, *asyncPriority*.|
|asyncAllJoin |boolean |false|true|This flag is used only when combined with the asyncAll argument. If true (default), the calling thread will wait for all intercepted CFC calls to execute. If false, then the calling thread will not join the multi-threaded interception and continue immediate execution while the CFC's continue to execute in the background.|
|asyncPriority |string : *low,normal,high* |false|normal|The thread priority that will be sent to each *cfthread* call that is made by the system.|
|asyncJoinTimeout |numeric|false|0|This argument is only used when using the *asyncAll* and *asyncAllJoin=true* arguments. This argument is the number of milliseconds the calling thread should wait for all the threaded CFC listeners to execute. By default it waits until all threads finalize. |

All asynchronous calls will return a structure of thread information back to you when using the `announceInterception()` method or directly in the interceptor service, the `processState()` method. The structure contains information about all the threads that where created during the call and their respective information like: status, data, errors, monitoring, etc.

```js
threadData = announceInterception(
    state           = "onLogin",
    interceptData   = { user=user },
    asyncAll        = true
);
```

Now that you have seen all asynchronous arguments and their features, let's investigate each use case one by one.


text:
# LAB - Class 15

## Module 3 Final Project: API Server

### Author: Student/Group Name

### Links and Resources

- [submission PR](http://xyz.com)
- [ci/cd](http://xyz.com) (GitHub Actions)
- [back-end server url](http://xyz.com) (when applicable)
- [front-end application](http://xyz.com) (when applicable)

### Setup

- `npm install` - to install required dependencies

#### `.env` requirements (where applicable)

i.e.

- `PORT` - Port Number
- `MONGODB_URI` - URL to the running mongo instance/db
- `SECRET` - for secret for JWT token validation

#### How to initialize/run your application (where applicable)

- e.g. `npm start`

#### Tests

- npm test
- Some test written, but not sure how to test with bearer auth


text:
## Lovely Handmade Sleeves by Joli Originals

<a<EMAIL_ADDRESS>src="/2012/12/10/handmade-by-joli.jpg" alt="Handmade by Joli" width="600" height="600">

A few days ago, I've received [my iPad mini sleeve][] by [Joli Originals][]. The funny thing is that I was almost more excited about my Joli sleeve than my iPad mini !
I'm a huge fan of Joli cases: handmade, done with high quality leather and wool, with a simple and elegant design, they are simply gorgeous!

<a<EMAIL_ADDRESS>src="/2012/12/10/jolicase.jpg" alt="Joli case" width="600" height="450">

Joli sleeves have a huge fan base, and reading [the feedbacks page][] is impressive:

> Today i received my MacBook Pro Retina Sleeve. A very beautiful piece of real
> craftsmanship. The quality of this masterpiece is seldom these days. Thank you
> very much. I can surely recommend your product and fast shipping time. - Arnd

> I just got it! It's absolutely perfect - I love it. Thanks so much - I've been
> showing everyone at work and everyone is "oooh"-ing and "ahh"-ing. You've
> gained a lot of fans at DreamWorks :) - Jon Shih

> I just got my Macbook Case and wanted to say THANK YOU! It is just stunning
> and I'm thrilled with it. Everyone who has seen it has loved it so hopefully
> you should see some more sales from Ireland :-) - Chris

<a<EMAIL_ADDRESS>src="/2012/12/10/thankyoufromjoli.jpg" alt="Thank you from Joli" width="600" height="450">
Personal cards from Joli!  I'm so in love with their products that I show my iPhone and iPad sleeves to everybody around me! You can [buy their product online][] and they ship worldwide. If you buy now, your sleeve will arrive in time for Christmas!

<a<EMAIL_ADDRESS>src="/2012/12/10/rodia-ipad.jpg" alt="Thank you from Joli" width="600" height="450">

<a<EMAIL_ADDRESS>src="/2012/12/10/rodia-ipad2.jpg" alt="Thank you from Joli" width="600" height="800">

My iPad mini, with its sleeve, just the size of an A5 notebook

From jc.

[Joli Originals]: http://twitter.com/jolioriginals
[my iPad mini sleeve]: http://shop.jolioriginals.com/products/ipad
[the feedbacks page]: http://shop.jolioriginals.com/pages/feedbacks
[buy their product online]: http://shop.jolioriginals.com/


text:
# OctopusKit_Android
OctopusKit is a simplicity but graceful solution for invoke RESTful web service APIs,it can help coder develop app based MVC pattern, it can use for big team development; Another benift is that it also can be use to auto generate web service class file if use some M2T tools, save cost and raplidy the app develop progress.
## Usage

It based Volley but also can integreate with other network lib

##Notice

Please check the demo app also the TestCase file, understand the usage then enjoy the way~

## License

OctopusKit is available under the MIT license. See the LICENSE file for more info.


text:
# meson

[![Build Status][travis-badge]][travis][![Dependencies Status][deps-badge]][deps][![Clojars Project][clojars-badge]][clojars][![Clojure version][clojure-v]](project.clj)

*Clojure Client Library for the Mesos HTTP API*

[![][logo]][logo-large]

**meson** *noun*. A functional particle composed of a Mesos deployment and a Mesos HTTP API service bound together by the strongly interacting force of Clojure.

#### Contents

* [About](#about-)
* [Dependencies](#dependencies-)
* [Versions](#versions-)
* [Quick Start](#quick-start-)
* [Documentation](#documentation-)
* [Usage](#usage-)
* [License](#license-)

## About [↟](#contents)

This project is a work in progress.

Meson aims to provide an HTTP-only Clojure client API for Mesos with no
dependencies upon the Mesos Java library nor protobufs, thus making
installation and dependencies much easier to manage.

## Dependencies [↟](#contents)

* Java
* Mesos 1.3+
  * You need a running Mesos deployment
* `lein`

## Versions [↟](#contents)

| Meson Version              | Meson Status | Mesos | Clojure | Java                   |
|----------------------------|--------------|-------|---------|------------------------|
| 0.4.0 (beta)               | future       | ???   | ???     | ???                    |
| 0.3.0 (alpha)              | future       | ???   | ???     | ???                    |
| 0.2.0-SNAPSHOT (prototype) | in progress  | 1.3   | 1.8.0   | 8 (build 1.8.0_91-b14) |
| 0.1.0-SNAPSHOT (prototype) | released     | 1.0   | 1.8.0   | 8 (build 1.8.0_91-b14) |

## Quick Start [↟](#contents)

Meson provides some `lein` commands you can use while developing in the library:

* `lein meson mesos start`
* `lein meson mesos stop`
* `lein meson mesos restart`

These may also be used from the Meson REPL (using the `dev` profile):

```clj
(require '[meson.ops.mesos :as mesos])
(mesos/start-local-docker)
(mesos/stop-local-docker)
(mesos/restart-local-docker)
```

These will start a Docker container running with locahost ports 5050 and 5051
mapped to those of the running Mesos container.

## Documentation [↟](#contents)

Meson API Reference docs are available here:
 * [http://clojusc.github.io/meson/](http://clojusc.github.io/meson/)

## Usage [↟](#contents)

Start up the REPL (and be sure to have a running Mesos deployment), then:

```clj
(require '[clojure.core.async :as async]
         '[clojure.pprint :refer [pprint]]
         '[meson.api.scheduler.core :as scheduler])
(def framework-info {:framework-info
                     {:user "user1"
                      :name "a-framework"}})
(def channel (scheduler/subscribe framework-info))
```

Since `subscribe` was only called with the framework setup info and didn't also
pass a handler function, it will use the default framework handler (basically
just a logging message for each scheduler event). Any real-world Meson
framework will have its own handler and pass it to the `subscribe` function.

Regardless, a channel is returned in both cases, and that can be interacted
with directly in the REPL, for example:

```clj
(def result (async/<!! channel))
(pprint result)
```
Which should give something like:
```clj
{:subscribed
 {:framework-id {:value "6919832b-083e-4db5-89ae-a0d1d222510a-0016"},
  :heartbeat-interval-seconds 15.0,
  :master-info
  {:address {:hostname "0414d10a4f36", :ip "<IP_ADDRESS>", :port 5050},
   :hostname "0414d10a4f36",
   :id "6919832b-083e-4db5-89ae-a0d1d222510a",
   :ip 33558956,
   :pid "master@<IP_ADDRESS>:5050",
   :port 5050,
   :version "1.3.1"}},
 :type :subscribed}
```

## License [↟](#contents)

Copyright © 2016-2017, Clojure-Aided Enrichment Center

Apache License, Version 2.0.

<!-- Named page links below: /-->

[travis]: https://travis-ci.org/clojusc/meson
[travis-badge]: https://travis-ci.org/clojusc/meson.png?branch=master
[deps]: http://jarkeeper.com/clojusc/meson
[deps-badge]: http://jarkeeper.com/clojusc/meson/status.svg
[logo]: resources/images/Meson-nonet-spin-0-250x.png
[logo-large]: resources/images/Meson-nonet-spin-0-1000x.png
[tag-badge]: https://img.shields.io/github/tag/clojusc/meson.svg
[tag]: https://github.com/clojusc/meson/tags
[clojure-v]: https://img.shields.io/badge/clojure-1.8.0-blue.svg
[clojars]: https://clojars.org/meson
[clojars-badge]: https://img.shields.io/clojars/v/meson.svg

repository: cgaustin/meson

repo_name: cgaustin/meson


text:
# Challenge Name:
### Challenge: File mover
# Challenge Description:
I have multiple tools on my machine that save their configuration on xml, txt files
I've got SQL tools that hold snippets to save time typing
I've got Notepad++ macros
I have Chrome bookmarks
I've got powershell scripts
All these tools store their configuration information on files. This means when I make a change to a certain tool (E.g. Update a SQL snippet - then the corresponding configuration file is also updated.)
The Issue:
I need a way to periodically copy these configuration files from multiple folder locations and move them to one location (GoogleDrive, Dropbox or any other cloud storage). This way every time I update my tools, the configuration files are automatically backed up. Now this may also encounter "File already in use" issues
What are the possible solutions to this problem and what language/technology can I use to solve it (edited)