text:
NBA Shot Prediction
================
Ryan Rozema
10 July, 2017

Introduction
============

The dataset that we will be studying shots taken by NBA player Anthony Davis.

This is a relatively large dataset. As stated in the introduction, it has over 120,000 instances but it also has 21 attributes. Because we are only looking at Anthony Davis's shots, we were able to cut the data down to just under 900 instances. Some of the attributes that are in this dataset we won't worry too much about because they aren't as important to predicting a shot in my opinion. Some of the attributes we will be working with are as follows:
1. **Location**: This is a binary attribute that is denoted by n **"A"** for an away game and a **"H"** for a home game.
2. **Final Margin**: This is a continuous attribute that tells us the difference in the score between the home team and the away team.
3. **Shot Number**: This is a continuous attribute that tells us how many shots that player has taken, including the one that they just shot.
4. **Period**: This is a categorical attribute that tells us what period of the game the player was in when they took the shot.
5. **Game Clock**: This is a continuous attribute that tells us how much time was left in the game when the shot was taken.
6. **Shot Clock**: This is a continuous attribute that tells us how much time was left in the current shot clock when the shot was taken.
7. **Shot Distance**: This is a continuious attribute that tels us the distance between the player and the baseket.
8. **Closest Defender Distance**: This is a continuous attribute that tells us the distance between the shooter and the closest defender.
9. **Shot Result - Classifier**: This is a binary attribute that will state whether the shot was made or missed by the player.

Data Preparation
================

This shows all of the summary data points for each column of the data set. This will be useful for quick reference later on in the document.

    ##     GAME_ID                               MATCHUP    LOCATION W
    ##  Min.   :21400001   MAR 04, 2015 - NOP vs. DET: 30   A:455    L:376
    ##  1st Qu.:21400192   DEC 27, 2014 - NOP @ CHI  : 24   H:386    W:465
    ##  Median :21400408   JAN 07, 2015 - NOP @ CHA  : 24
    ##  Mean   :21400412   FEB 02, 2015 - NOP vs. ATL: 23
    ##  3rd Qu.:21400632   FEB 06, 2015 - NOP @ OKC  : 23
    ##  Max.   :21400903   JAN 12, 2015 - NOP @ BOS  : 23
    ##                     (Other)                   :694
    ##   FINAL_MARGIN       SHOT_NUMBER         PERIOD       GAME_CLOCK
    ##  Min.   :-35.0000   Min.   : 1.000   Min.   :1.00   0:00   :  6
    ##  1st Qu.: -8.0000   1st Qu.: 5.000   1st Qu.:1.00   0:03   :  5
    ##  Median :  3.0000   Median : 9.000   Median :2.00   3:51   :  5
    ##  Mean   :  0.9108   Mean   : 9.763   Mean   :2.37   5:42   :  5
    ##  3rd Qu.:  9.0000   3rd Qu.:14.000   3rd Qu.:3.00   7:06   :  5
    ##  Max.   : 48.0000   Max.   :30.000   Max.   :5.00   9:49   :  5
    ##                                                     (Other):810
    ##    SHOT_CLOCK        DRIBBLES        TOUCH_TIME      SHOT_DIST
    ##  Min.   : 0.300   Min.   :0.0000   Min.   :-9.80   Min.   : 0.10
    ##  1st Qu.: 8.375   1st Qu.:0.0000   1st Qu.: 0.80   1st Qu.: 3.90
    ##  Median :11.800   Median :0.0000   Median : 1.10   Median : 8.40
    ##  Mean   :12.202   Mean   :0.5422   Mean   : 1.88   Mean   :10.41
    ##  3rd Qu.:15.300   3rd Qu.:1.0000   3rd Qu.: 2.60   3rd Qu.:17.90
    ##  Max.   :24.000   Max.   :8.0000   Max.   :19.30   Max.   :28.90
    ##  NA's   :33
    ##     PTS_TYPE     SHOT_RESULT         CLOSEST_DEFENDER
    ##  Min.   :2.000   made  :457   Adams, Steven  : 25
    ##  1st Qu.:2.000   missed:384   Monroe, Greg   : 24
    ##  Median :2.000                Chandler, Tyson: 22
    ##  Mean   :2.011                Ibaka, Serge   : 22
    ##  3rd Qu.:2.000                Noah, Joakim   : 19
    ##  Max.   :3.000                Hill, Jordan   : 18
    ##                               (Other)        :711
    ##  CLOSEST_DEFENDER_PLAYER_ID CLOSE_DEF_DIST        FGM
    ##  Min.   :   977             Min.   : 0.000   Min.   :0.0000
    ##  1st Qu.:101162             1st Qu.: 2.100   1st Qu.:0.0000
    ##  Median :201933             Median : 3.400   Median :1.0000
    ##  Mean   :154386             Mean   : 3.739   Mean   :0.5434
    ##  3rd Qu.:202710             3rd Qu.: 5.000   3rd Qu.:1.0000
    ##  Max.   :204060             Max.   :32.400   Max.   :1.0000
    ##
    ##       PTS               player_name    player_id
    ##  Min.   :0.000   anthony davis:841   Min.   :203076
    ##  1st Qu.:0.000   aaron brooks :  0   1st Qu.:203076
    ##  Median :2.000   aaron gordon :  0   Median :203076
    ##  Mean   :1.088   alan anderson:  0   Mean   :203076
    ##  3rd Qu.:2.000   alan crabbe  :  0   3rd Qu.:203076
    ##  Max.   :3.000   alexis ajinca:  0   Max.   :203076
    ##                  (Other)      :  0

Data Visualization
==================

As you can see from the graph below, the distance from the basket plays a large factor in whether Anthony Davis makes a shot or not. It seems to be that when he he is just about 8 feet from the basket, he starts to miss more shots than he makes. This makes sense because he is a 7 feet tall player in the NBA which means that he plays under the basket a lot. ![](README_files/figure-markdown_github-ascii_identifiers/unnamed-chunk-4-1.png)

It looks like the distance from the defender does not make much of a difference for Anthony Davis. Both of the graphs are extremely similar. ![](README_files/figure-markdown_github-ascii_identifiers/unnamed-chunk-5-1.png)

This graph points out that it is more likely that Anthony Davis will make a shot if he takes a shot before between 16 and 24 seconds left on the shot clock. ![](README_files/figure-markdown_github-ascii_identifiers/unnamed-chunk-6-1.png)


text:
---
description: What's in the guide and who is it for?
---

# Introduction

## This is a draft version

This guide is intentionally terse.

The content is condensed primarily from the [online Dart documentation](https://dart.dev/guides). It is structured in a way that is intended for experienced programmers to get hands-on with Dart as quickly as possible without wading through more comprehensive reference material.

The guide begins not with the Dart language but with the structure of Dart application and library packages.

Experienced programmers, particularly those who have had exposure to other object-oriented languages and C-style syntax, should not find much of a struggle with the Dart language. Presenting an overview of packages and package management first allows these programmers to dive into actual Dart development sooner.

license: MIT

repository: subfuzion/terse-guide-to-dart

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: subfuzion/terse-guide-to-dart


text:
# Deploying on AWS

1. Install aws cli tool:
   - If you have already `aws cli` installed and credentials configured, skip to step 2.
   - Otherwise, run `make awscli-install`.
2. Install kops:
   - If you have already `kops` 1.18+ installed, skip to step 3.
   - Otherwise, run `make kops-install`.
3. Edit the file `.env` and rename the `KOPS_CLUSTER_NAME` and `KOPS_STATE_STORE` to your name of choice.

```mk
# ======================== KOPS ========================
KOPS_CLUSTER_NAME=example.k8s.local
KOPS_STATE_STORE=s3://kops-example-com-state-store
```

4. Edit the file `.env` again and choose the size of the cluster, the nodes count, the node size, region, etc:

```mk
AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
AWS_REGION = us-east-1
AWS_NODE_COUNT = 1
AWS_NODE_SIZE = t2.medium
AWS_MASTER_SIZE = t2.small
AWS_EFS_TOKEN = example-efs
```

4. Create the cluster: `make kops-cluster`.
5. The next step consists of building the docker containers used in the project:

- Install docker: `make docker-install`.
- You need a repository to store those images:
  - If you're deploying on the cloud, you will be probably using [docker hub](https://hub.docker.com/) or a similar service.
  - Create an account and put your credentials in the `.env` file like this:
  ```mk
  # Docker hub
  DOCKER_HUB_USR = your_docker_hub_username
  DOCKER_HUB_PWD = your_docker_hub_password
  ```
  - Build and release:
    - `backend`: !todo!
    - `frontend`: !todo!
    - `make consumer-release`
    - `make multiav-release`
    - `make multiav-release-go`

6. Install Helm: `make helm-install`.
7. Init cert manager: `make k8s-init-cert-manager` and couchbase crds: `make k8s-install-couchbase-crds`.
8. Edit the `deployments/saferwall/values.yaml`
   - Set `efs-provisioner.enabled` to true.
   - Set `couchbase-operator.cluster.volumeClaimTemplates.spec.storageClassName` to `default`.
   - If you are interested to see the logs in EFK:
     - Set `elasticsearch.enabled` to true.
     - Set `kibana.enabled` to true.
     - Set `filebeat.enabled` to true.
   - Set `prometheus-operator.enabled` to true if you want to get metrics and:
     - `kops edit cluster`:
       ```yml
       kubelet:
         anonymousAuth: false
         authenticationTokenWebhook: true
         authorizationMode: Webhook
       ```
9. Install helm chart: `make helm-release`.

## Tips for deploying a production cluster

- To have a HA cluster we need at least more than one master and several workers, in different availability zones.
- With multiple master nodes, you will be able both to do graceful (zero-downtime) upgrades and you will be able to survive AZ failures.
- Harden Kubernetes API to be accessible only from alllowed IPs via firewall rules or change the kops cluster config with the `kubernetesApiAccess`.

## Billing Reduction Tips

- Opt for EC2 Spot Instances and reserved instances.
- Support kubernetes cluster with on-demand instances, which can take up the slack in the event of any interruptions to spot instances. This will improve availability and reliability.
- Size of the master node:
  - 1-5 nodes: m3.medium
  - 6-10 nodes: m3.large
  - 11-100 nodes: m3.xlarge
  - 101-250 nodes: m3.2xlarge
  - 251-500 nodes: c4.4xlarge
  - more than 500 nodes: c4.8xlarge

## CPU/MEM usage per service

- The memory and cpu allocation are observed at peak time, it represents the maximum memory/cpu that the engine uses during a file scan. We scanned multiple file format as they could trigger different component of the engine to realistically estime these numbers.
- Some engines like ClamAV have a daemonized version, those are generally faster because the rules are loaded only once.

| Service        | CPU Util | Mem Util | Performance |
| -------------- | :------: | :------: | :---------: |
| AV Avast       |  1 core  |  1260MB  |    Fast     |
| AV Avira       |  1 core  |  200MB   |    Slow     |
| AV Bitdefender |  1 core  |  600MB   |    Slow     |
| AV ClamAV      |  1 core  |  1700MB  |    Fast     |
| AV COMODO      |  1 core  |  300MB   |   Medium    |
| AV DrWeb       | 1.2 core |  580MB   |    Fast     |
| AV ESET        |  1 core  |  220MB   |   Medium    |
| AV FSecure     |  1 core  |  420MB   |    Fast     |
| AV McAfee      |  1 core  |  400MB   |   Medium    |
| AV Sophos      |  1 core  |  300MB   |   Medium    |
| AV Symantec    | 0.4 core |  300MB   |   Medium    |
| AV TrendMicro  |   core   |    MB    |   Medium    |
| AV Windefender |   core   |    MB    |   Medium    |

## Tune Kops max pods

- Kops set the max pods to 150 which is the default value recommanded by Kubernetes.
- However if you're spinning large computer instances, you might hit the max value while you still have enough computer power, if can edit this value by: `kops edit cluster` :

```yaml
spec:
    kubelet:
        maxPods: 200
```
- For more information, check out:
  - https://kubernetes.io/docs/concepts/cluster-administration/networking/#aws-vpc-cni-for-kubernetes
  - https://github.com/awslabs/amazon-eks-ami/blob/master/files/eni-max-pods.txt
  - https://kubernetes.io/docs/setup/best-practices/cluster-large/

## Autoscaling

- Create an instance group for spot instances: `kops create -f build/k8s/spot-ig.yaml`
- Attach required policies to the cluster: `kops edit cluster`
```yaml
    kind: Cluster
    ...
    spec:
      additionalPolicies:
        node: |
          [
            {
            "Effect": "Allow",
            "Action": [
                "autoscaling:DescribeAutoScalingGroups",
                "autoscaling:DescribeAutoScalingInstances",
                "autoscaling:DescribeLaunchConfigurations",
                "autoscaling:SetDesiredCapacity",
                "autoscaling:TerminateInstanceInAutoScalingGroup",
                "autoscaling:DescribeTags"
            ],
            "Resource": "*"
            }
          ]
    ...
```
- Update the cluster to review the changes : `kops update cluster`.
- Add `--yes` to apply the changes: `kops update cluster --yes`.
- Changes may require instances to restart: `kops rolling-update cluster`.

repository: saferwall/saferwall

branch_name: refs/heads/main

gha_language: Go

repo_name: saferwall/saferwall


text:
# How to run your HPC workloads on AWS: a Quickstart

This repository complements the AWS white paper on how to achieve optimal price/performance for your HPC workloads. You can find it here: https://d1.awsstatic.com/HPC2019/Optimal-Price-Performance-for-HPC-Workloads-Aug2019.pdf

The white paper will guide you through the different decision points.

The goal of this repository is to help you to map the decisions you made before to a ParallelCluster configuration that you can use to run your jobs.

**AWS ParallelCluster** is an AWS-supported open source cluster management tool that helps you to deploy and manage High Performance Computing (HPC) clusters in the AWS cloud. Built on the open source CfnCluster project, AWS ParallelCluster enables you to quickly build an HPC compute environment in AWS. It automatically sets up the required compute resources and shared filesystem. You can use AWS ParallelCluster with a variety of batch schedulers, such as AWS Batch, SGE, Torque, and Slurm.

You can find more information here: https://github.com/aws/aws-parallelcluster

**Please remember** that there is no single configuration that can address all the different cases. Feel free to experiment different things until you find the best price/performance for your needs.

## Key decision points
* What instance type do you want to use for your computing nodes?
* What type of storage?
    * do you need a Lustre file system for the scratch area?
    * do you want to use NFS for your home directories?
* Hyperthreading on or off?

## Instructions
* Download this repository on your computer:
    * `$ git clone https://github.com/aws-samples/aws-parallelcluster-price-performance`
* Install ParallelCluster on your computer:
    * open your terminal (I recommend the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) for Microsoft users) and run the following commands to install ParallelCluster:
    * `$ sudo apt update`
    * `$ sudo apt install python-pip`
    * `$ sudo pip install awscli`
    * `$ aws configure` to configure the AWS CLI with your credentials
    * `$ sudo pip install aws-parallelcluster`
* Edit the ParallelCluster config file you have found in this repo:
    * `$ vi config.ini`
    * specify your ssh key name, VPN and subnet for your AWS account
    * uncomment the appropriate rows based on the decisions you have made before
* Now deploy your cluster with these commands:
    * `$ pcluster create -c config.ini mycluster`
* When the deployment is done:
    * connect to the head node: `$ pcluster ssh mycluster -i <your-ssh-key>`
    * install your code in the `\shared` dir (or in another path that is shared on all the computing nodes)
    * run your code using your preferred scheduler commands e.g: `$ qsub helloworld.sh`

**Congratulations!** you have run your first HPC job on AWS :)


text:
# Yarn scripts

This document describes the `yarn` scripts available in the root `package.json` of a project generated with `create-ts-project`, as well as the scripts included in the package templates used by `tsp` (`ts-project-scripts`).

## Root-level scripts

When you create a project with `create-ts-project`, a number of scripts are included in the root-level `package.json` file. You can run these scripts with `yarn [script name]`. The current working directory must be somewhere inside the project.

Most of the root-level scripts are simply shortcuts to run the similarly named script in each package/workspace. For example, the root-level `verify:all` script runs the `verify` script in each package/workspace.

_Each package directory is a yarn workspace. See [yarn config](./configuration#yarn) for more info._

The root-level scripts that simply call the corresponding script in each package/workspace are:

- `lint:all`
- `test:all`
- `clean:all`
- `build:all`
- `verify:all`
- `purge:all`

For details on what each of those scripts does, see [Package-level scripts](#package-level-scripts) below.

_Note: **The corresponding scripts must exist in all packages** or yarn will exit with an error. If you don't want a package-level script to do anything, you can make its value `echo`._

In addition, there are root-level scripts that don't have an equivalent at the package level:

- **`version:all <version>`**

  The version argument should be a valid npm version number like `1.2.3` or `2.0.0-beta.1`.

  This script is helpful when publishing packages to npm. It does three things:

  - Sets the version property in all `package.json` files (including the root) to the specified version.
  - Commits those changes to your repo.
  - Creates a tag in the form: `v1.2.3`.

- **`tsp`**

  A shortcut to run `tsp`. This means in the project root, you can run `yarn tsp <command> [options]` instead of `./node_modules/.bin/tsp <command> [options]`.

## Package-level scripts

All templates include the same set of package-level scripts.

You can run them in two ways, depending on your current working directory. From any directory inside the project, you can use this format:

```bash
yarn workspace my-package test
```

From inside a specific package directory, you can use the shorter form:

```bash
cd ./packages/my-package
yarn test
```

The following scripts do the same thing in every template:

- **`tsp`**

  Runs `tsp` in the context of this package. For example:

  ```bash
  cd ./packages/my-server
  yarn tsp add my-lib
  ```

  Will add a dependency on `my-lib` to `my-server`.

- **`lint`**

  Lints the package with eslint. Warnings will be displayed, but do not cause linting to fail.

  _Because we use eslint rules that perform TypeScript type checks, linting a package that references other packages requires that the packages be built first. See [eslint config](./confiuguration.md#eslint) for more info._

- **`test`**

  Runs all tests in the package with jest. Add the `--coverage` option to generate a test coverage report.

- **`clean`**

  Deletes all build outputs for the package. See [TypeScript config](./configuration#typescript) for more info.

- **`verify`**

  Runs test, clean, build, and lint scripts, as described above. The only difference is that `verify` tells eslint to fail if there are any warnings.

- **`purge`**

  Runs the `clean` script to delete build outputs, and also deletes the package's `node_modules` and `coverage` folders.

The `dev` and `build` scripts are different in each package template, because the appropriate action depends on the type of package.

- **`dev`**

  - **node-server**

    Uses `concurrently` to simultaneously:

    - Build the server in watch mode.

    - Run the server in `nodemon`. `nodemon` restarts `node` on each file change. See the `nodemonConfig` property of `package.json` for the exact config.

  - **node-cli**

    Builds and runs the CLI entry point script. Any parameters passed to dev are forwarded to the CLI.

    ```bash
    # This will pass 'foo --bar baz' to your CLI entry point.
    yarn workspace my-cli dev foo --bar baz
    ```

  - **node-lib**

    Builds the library in watch mode, so it rebuilds on each file change.

    _Note: Libraries are automatically built and watched for changes by the projects that reference them. You won't typically run the `dev` script for a library._

- **`build`**

  - **node-server** - Builds the package.

  - **node-cli** - Builds the package and sets the entry point file to be executable (with `chmod +x`).

  - **node-lib** - Builds the package.

The remaining scripts are the same in all package templates:

## VS Code tasks

All of the root-level yarn scripts are also available as VS Code tasks. When you choose Run Tasks, you will see them listed.

In addition, the `tsp create`, `tsp add` and `tsp remove` commands are also available as tasks. These will prompt you to input package names and provide a drop-down for selecting a template for `tsp create`.

I recommend that you also create a task to run each server in your repo in dev mode. A sample is included in the `./.vscode/tasks.json` file. Uncomment it and simply replace `my-server` with the directory name of your server package.

repository: theoparis/create-ts-project

repo_name: theoparis/create-ts-project


text:
---
layout: default
---

# 1996-05-08 - Re: Is the network layer geodesic?

## Header Data

From: "E. ALLEN SMITH"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 9e92571d206afd9c35ff6d9c0e5ec5539a980f3a96a9f344ba40964dd76ec6a8

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-05-08 07:16:28 UTC

Raw Date: Wed, 8 May 1996 15:16:28 +0800

## Raw message

```
{% raw  %}From: "E. ALLEN SMITH"<EMAIL_ADDRESS>Date: Wed, 8 May 1996 15:16:28 +0800
To<EMAIL_ADDRESS>Subject: Re: Is the network layer geodesic?
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

From<EMAIL_ADDRESS>"Erik E. Fair"  7-MAY-1996 02:06:23.16

>The Internet is amorphous. It ain't a star, exactly, but it still not too
>far from that. However, to get away from this situation into the rich and
>more fully amorphous connectivity we used to take for granted in the UUCP
>network, we're going to have to see a lot more cooperation on the part of
>the small ISPs in agreeing to talk *directly* to each other to exchange
>traffic, and more small exchange points, instead of the small number of
>large ones.

	One thing that may make a difference in this is that the major
providers are getting overloaded. We're currently having problems here (in
terms of slowdowns, failures to connect, et al) because MCI's trunk lines
are majorly overloaded, and that's who _all_ the local ISPs go through. I am
currently attempting to persuade them to at least get contacts with another
ISP (and to serve as a router) in order to speed up local stuff.
	-Allen

{% endraw %}
```

## Thread

+ Return to [May 1996](/archive/1996/05)

+ Return to "["E. ALLEN SMITH" <EALLENSMITH@ocelot.Rutgers.EDU>](/authors/e_allen_smith_eallensmith_at_ocelot_rutgers_edu_)"

+ 1996-05-08 (Wed, 8 May 1996 15:16:28 +0800) - Re: Is the network layer geodesic? - _"E. ALLEN SMITH"<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# Cloud Based Integration & Messaging. Data Processing & Streaming (aka Data Pipeline). Open Data Hub
- [Message Queue in Kubernetes. Event-driven Messaging. Real-Time Data Streaming](#message-queue-in-kubernetes-event-driven-messaging-real-time-data-streaming)
- [Message Brokers](#message-brokers)
    - [ActiveMQ message broker](#activemq-message-broker)
    - [RabbitMQ message broker](#rabbitmq-message-broker)
    - [Redis message broker](#redis-message-broker)
    - [Apache Camel message broker](#apache-camel-message-broker)
        - [Apache Camel K](#apache-camel-k)
    - [KubeMQ message broker](#kubemq-message-broker)
    - [Google Cloud Platform Pub/Sub](#google-cloud-platform-pubsub)
- [Cloud Based Integration. Integration Platform-as-a-Service (iPaaS) solutions](#cloud-based-integration-integration-platform-as-a-service-ipaas-solutions)
    - [Red Hat Fuse and Red Hat Fuse Online](#red-hat-fuse-and-red-hat-fuse-online)
    - [Syndesis open source integration platform](#syndesis-open-source-integration-platform)
- [Debezium open source distributed platform for Change Data Capture (CDC) software design pattern](#debezium-open-source-distributed-platform-for-change-data-capture-cdc-software-design-pattern)
- [Red Hat Integration service registry and Apicurio](#red-hat-integration-service-registry-and-apicurio)
- [Data Processing (aka Streaming Data, Data Pipeline or Big Data Pipeline)](#data-processing-aka-streaming-data-data-pipeline-or-big-data-pipeline)
    - [Apache Kafka](#apache-kafka)
    - [Banzai Cloud Supertubes (Cloud Native Kafka implementation)](#banzai-cloud-supertubes-cloud-native-kafka-implementation)
    - [Confluent Cloud (Apache Kafka Re-engineered for the Cloud)](#confluent-cloud-apache-kafka-re-engineered-for-the-cloud)
        - [KsqlDB](#ksqldb)
    - [Apache Pulsar](#apache-pulsar)
    - [Apache Flink](#apache-flink)
    - [Hazelcast JET](#hazelcast-jet)
- [Red Hat AMQ (ActiveMQ Artemis broker and Apache Kafka)](#red-hat-amq-activemq-artemis-broker-and-apache-kafka)
    - [Red Hat AMQ Broker (ActiveMQ Artemis)](#red-hat-amq-broker-activemq-artemis)
    - [Red Hat AMQ Streams](#red-hat-amq-streams)
- [Open Data Hub AI-as-a-Service (AIaaS) platform](#open-data-hub-ai-as-a-service-aiaas-platform)
- [eBooks](#ebooks)
- [Related](#related)
- [Questions and Answers](#questions-and-answers)

## Message Queue in Kubernetes. Event-driven Messaging. Real-Time Data Streaming
- [Wikipedia: Message Broker](https://en.wikipedia.org/wiki/Message_broker)
- [Wikipedia: Event-driven messaging](https://en.wikipedia.org/wiki/Event-driven_messaging)
- [Wikipedia: Streaming Data](https://en.wikipedia.org/wiki/Streaming_data)
- [nginx.com: Event-Driven Data Management for Microservices 🌟](https://www.nginx.com/blog/event-driven-data-management-microservices/)

## Message Brokers
- [Apache ActiveMQ](https://activemq.apache.org/)
- [Dzone: Introduction to Message Brokers. Part 1: Apache Kafka vs. RabbitMQ](https://dzone.com/articles/introduction-to-message-brokers-part-1-apache-kafk)
- [Dzone: Introduction to Message Brokers. Part 2: ActiveMQ vs. Redis Pub/Sub](https://dzone.com/articles/introduction-to-message-brokers-part-2-activemq-vs)

### ActiveMQ message broker
- [ActiveMQ 5.x "classic"](https://activemq.apache.org/components/classic/)
- [ActiveMQ Artemis](https://activemq.apache.org/components/artemis/) Apache ActiveMQ is a subproject of Apache ActiveMQ. It has been donated to the Apache Software Foundation in 2015. There were lots of changes in project names in the past. The Artemis project first started as JBoss Messaging and got renamed to HornetQ in August 2009.
- [Apache Artemis JMeter](https://github.com/apache/activemq-artemis/tree/master/examples/perf/jmeter) Running the ActiveMQ Artemis JMeter Performance Testing Examples.

### RabbitMQ message broker
- [K8s prevent queue worker Pod from being killed during deployment](https://itnext.io/k8s-prevent-queue-worker-pod-from-being-killed-during-deployment-4252ea7c13f6) How to prevent a Kubernetes (like RabbitMQ) queue worker Pod from being killed during deployment while handling a message?
- [medium.com: **RabbitMQ vs. Kafka**](https://medium.com/better-programming/rabbitmq-vs-kafka-1ef22a041793) An architect’s dilemma

### Redis message broker
- [Redis](https://redis.io/)
- [Redis Pub/sub](https://redis.io/topics/pubsub)

### Apache Camel message broker
- [Apache Camel](https://camel.apache.org/)
- [Quora.com: What's the difference between Apache Camel and Kafka?](https://www.quora.com/Whats-the-difference-between-Apache-Camel-and-Kafka)

#### Apache Camel K
- [Apache Camel K](https://camel.apache.org/camel-k/latest/) is a lightweight cloud-integration platform that runs natively on Kubernetes. Based on the famous Apache Camel, Camel K is designed and optimized for serverless and microservices architectures.
- [developers.redhat.com: Six reasons to love Camel K](https://developers.redhat.com/blog/2020/05/12/six-reasons-to-love-camel-k/)
- [developers.redhat.com: Extending Kafka connectivity with Apache Camel Kafka connectors](https://developers.redhat.com/blog/2020/05/19/extending-kafka-connectivity-with-apache-camel-kafka-connectors/)

### KubeMQ message broker
- [KubeMQ.io: Kubernetes Native Message Queue Broker](https://kubemq.io/)
- [devops.com: Best of 2019: Implementing Message Queue in Kubernetes](https://devops.com/implementing-message-queue-in-kubernetes/)
- [kubemq.io: Kafka VS KubeMQ 🌟](https://kubemq.io/kafka-vs-kubemq/)

### Google Cloud Platform Pub/Sub
- [Google Cloud Platform Pub/Sub](https://cloud.google.com/pubsub/docs/overview)
- [A generic framework of concurrent consumers for Google Cloud Platform Pub/Sub 🌟](https://towardsdatascience.com/a-python-implementation-of-concurrent-consumers-for-google-cloud-platform-pub-sub-991ae8b9841d) An example shows how to publish messages to Pub/Sub and build a service to consume the messages concurrently using the Python multiprocessing module

## Cloud Based Integration. Integration Platform-as-a-Service (iPaaS) solutions
- [Wikipedia: Cloud Based Integration (iPaaS)](https://en.wikipedia.org/wiki/Cloud-based_integration)
- Integration Platform as a Service (iPaaS) is a suite of cloud services enabling development, execution and governance of integration flows connecting any combination of on premises and cloud-based processes, services, applications and data within individual or across multiple organizations.
- Integration platform as a service (iPaaS) is a set of automated tools for connecting software applications that are deployed in different environments. iPaaS is often used by large business-to-business (B2B) enterprises that need to integrate on-premises applications and data with cloud applications and data.
- [blog.axway.com: What is iPaaS?](https://blog.axway.com/hybrid-integration/whats-ipaas)
- [ibm.com: iPaaS (Integration-Platform-as-a-Service)](https://www.ibm.com/cloud/learn/ipaas): iPaaS is a cloud-based solution that simplifies application integration across on-premises and cloud environments, to help you accelerate innovation and lower your integration and operations costs.

### Red Hat Fuse and Red Hat Fuse Online
- [**Red Hat Fuse**](https://www.redhat.com/en/technologies/jboss-middleware/fuse)
- [**Red Hat Fuse Online**](https://www.redhat.com/en/technologies/jboss-middleware/fuse-online)

### Syndesis open source integration platform
- [**Syndesis** open source integration platform](https://syndesis.io/) (OpenSource Project for **Red Hat Fuse Online**)
- [developers.redhat.com: Low-code microservices orchestration with Syndesis](https://developers.redhat.com/blog/2020/03/25/low-code-microservices-orchestration-with-syndesis/)

## Debezium open source distributed platform for Change Data Capture (CDC) software design pattern
- **Change Data Capture**, or **CDC**, is a well-established **software design pattern** for a system that monitors and captures the changes in data so that other software can respond to those changes. CDC captures row-level changes to database tables and passes corresponding change events to a data streaming bus. Applications can read these change event streams and access these change events in the order in which they occurred.
- [**Debezium**:](https://debezium.io/) Stream changes from your database
- [developers.redhat.com: Decoupling microservices with Apache Camel and Debezium](https://developers.redhat.com/blog/2019/11/19/decoupling-microservices-with-apache-camel-and-debezium/)
- [A good explanation of how to avoid distributed transactions using outbox pattern: Transaction Log Tailing With Debezium](https://medium.com/trendyol-tech/transaction-log-tailing-with-debezium-part-1-aeb968d72220)
- [developers.redhat.com: Capture database changes with Debezium Apache Kafka connectors](https://developers.redhat.com/blog/2020/04/14/capture-database-changes-with-debezium-apache-kafka-connectors/)
- [developers.redhat.com: Change data capture for microservices without writing any code](https://developers.redhat.com/blog/2020/05/15/change-data-capture-for-microservices-without-writing-any-code/)
- [debezium.io: Lessons Learned from Running Debezium with PostgreSQL on Amazon RDS](https://debezium.io/blog/2020/02/25/lessons-learned-running-debezium-with-postgresql-on-rds/)
- [info.crunchydata.com: PostgreSQL Change Data Capture With Debezium](https://info.crunchydata.com/blog/postgresql-change-data-capture-with-debezium)

## Red Hat Integration service registry and Apicurio
- [Red Hat Integration service registry](https://developers.redhat.com/blog/2019/12/16/getting-started-with-red-hat-integration-service-registry/)
- [**Apicurio** Registry](https://github.com/apicurio/apicurio-registry) An API/Schema registry - stores APIs and Schemas.

## Data Processing (aka Streaming Data, Data Pipeline or Big Data Pipeline)
- [Awesome Streaming](https://github.com/manuzhang/awesome-streaming) A curated list of awesome [streaming (stream processing)](https://www.oreilly.com/radar/the-world-beyond-batch-streaming-101/) frameworks, applications, readings and other resources.

### Apache Kafka
- [Apache Kafka](https://kafka.apache.org/)
- [developers.redhat.com: how easy to deploy and configure a Kafka Connect on Kubernetes through strimziio operator and use secrets](https://developers.redhat.com/blog/2020/02/14/using-secrets-in-apache-kafka-connect-configuration/)
- [developers.redhat.com: Using secrets in Kafka Connect configuration](https://developers.redhat.com/blog/2020/02/14/using-secrets-in-apache-kafka-connect-configuration/)
- [developers.redhat.com: Capture database changes with Debezium Apache Kafka connectors](https://developers.redhat.com/blog/2020/04/14/capture-database-changes-with-debezium-apache-kafka-connectors/)
- [Awesome Kafka](https://github.com/monksy/awesome-kafka/blob/master/tools.md)
- [Single Message Transformations - The Swiss Army Knife of Kafka Connect](https://www.morling.dev/blog/single-message-transforms-swiss-army-knife-of-kafka-connect/)
- [medium: Logs & Offsets: (Near) Real Time ELT with Apache Kafka + Snowflake](https://medium.com/convoy-tech/logs-offsets-near-real-time-elt-with-apache-kafka-snowflake-473da1e4d776) Replacing Apache Airflow with Debezium.
- [medium: Apache Kafka Startup Guide: System Design Architectures: Notification System, Web Activity Tracker, ELT Pipeline, Storage System 🌟](https://medium.com/swlh/apache-kafka-startup-guide-system-design-architectures-notification-system-web-activity-tracker-6dcaf0cf8a7)
- [medium: Getting Started With Kafka on OpenShift](https://medium.com/swlh/getting-started-with-kafka-on-openshift-c44c0fdec384)

[![airflow vs kafka debezium](images/airflow_vs_debezium.jpg)](https://medium.com/convoy-tech/logs-offsets-near-real-time-elt-with-apache-kafka-snowflake-473da1e4d776)

### Banzai Cloud Supertubes (Cloud Native Kafka implementation)
- [Banzai Cloud](https://banzaicloud.com/)
- [Banzai Kafka Operator](https://github.com/banzaicloud/kafka-operator)
- [The benefits of integrating Apache Kafka with Istio](https://banzaicloud.com/blog/kafka-on-istio-benefits/)

### Confluent Cloud (Apache Kafka Re-engineered for the Cloud)
- [confluent.io](https://www.confluent.io/) The Complete Event Streaming Platform for Apache Kafka.
- Focus on building apps and not managing clusters with a scalable, resilient and secure event streaming platform. Event streaming with Kafka made simple on AWS, Azure and GCP clouds.

#### KsqlDB
- [ksqlDB](https://ksqldb.io/) The event streaming database purpose-built for stream processing applications.
- [Kafka Streams and ksqlDB Compared – How to Choose](https://www.confluent.io/blog/kafka-streams-vs-ksqldb-compared/)

### Apache Pulsar
- [Apache Pulsar](https://pulsar.apache.org/) is an open-source distributed pub-sub messaging system originally created at Yahoo and now part of the Apache Software Foundation
- [Pulsar vs Kafka – Comparison and Myths Explored](https://www.kai-waehner.de/blog/2020/06/09/apache-kafka-versus-apache-pulsar-event-streaming-comparison-features-myths-explored/)

### Apache Flink
- [Apache Flink](https://flink.apache.org/) Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.
- [How to set up Apache Flink on Kubernetes for real time data processing](https://ci.apache.org/projects/flink/flink-docs-stable/ops/deployment/kubernetes.html)

### Hazelcast JET
- [Hazelcast JET](https://jet-start.sh/) Open-Source Distributed Stream Processing
- [devops.com: Hazelcast Simplifies Streaming for Extremely Fast Event Processing in IoT, Edge and Cloud Environments](https://devops.com/hazelcast-simplifies-streaming-for-extremely-fast-event-processing-in-iot-edge-and-cloud-environments/)

## Red Hat AMQ (ActiveMQ Artemis broker and Apache Kafka)
- [**Red Hat AMQ overview**](https://developers.redhat.com/products/amq/overview)
- [Red Hat AMQ](https://www.redhat.com/en/technologies/jboss-middleware/amq) = AMQ Broker (Apache ActiveMQ Artemis) + AMQ Streams (Apache Kafka)

### Red Hat AMQ Broker (ActiveMQ Artemis)
- [Apache ActiveMQ Artemis broker](https://activemq.apache.org/components/artemis/)
- [developers.redhat.com: JDBC Master-Slave Persistence setup with Activemq using Postgresql database](https://developers.redhat.com/blog/2017/10/05/jdbc-master-slave-persistence-setup-activemq-using-postgresql-database)

### Red Hat AMQ Streams
- [Understanding Red Hat AMQ Streams components for OpenShift and Kubernetes 🌟](https://developers.redhat.com/blog/2019/12/04/understanding-red-hat-amq-streams-components-for-openshift-and-kubernetes-part-1/)
- [Red Hat **AMQ streams** (kafka): Simplify Apache Kafka on Red Hat OpenShift](https://www.redhat.com/en/resources/amq-streams-datasheet)
- [Set up **Red Hat AMQ Streams** custom certificates on OpenShift](https://developers.redhat.com/blog/2020/04/01/set-up-red-hat-amq-streams-custom-certificates-on-openshift-update/)
- [speakerdeck.com: Apache Kafka with Red Hat AMQ Streams 🌟](https://speakerdeck.com/mabulgu/apache-kafka-with-red-hat-amq-streams)

[![AMQ in a nutshell](images/AMQ.png)](https://developers.redhat.com/products/amq/overview)

Product|Also Known As|Components|URL
:------|:----|:--------|:----
Red Hat AMQ 6|JBoss AMQ 6|Apache ActiveMQ|[Ref](https://access.redhat.com/documentation/en-us/red_hat_amq/6.3/)
Red Hat AMQ 7|JBoss AMQ 7 (Broker) or Red Hat AMQ 7 Suite|AMQ Broker + AMQ Streams|[Ref](https://access.redhat.com/documentation/en-us/red_hat_amq/6.3/)
Red Hat AMQ 7|JBoss AMQ 7 (Broker) or Red Hat AMQ 7 Suite|JBoss AMQ 7 (Broker) + Apache Kafka|[Ref](https://access.redhat.com/documentation/en-us/red_hat_amq/6.3/)
Red Hat AMQ 7|JBoss AMQ 7 (Broker) or Red Hat AMQ 7 Suite|Apache ActiveMQ Artemis + Apache Kafka|[Ref](https://access.redhat.com/documentation/en-us/red_hat_amq/6.3/)

## Open Data Hub AI-as-a-Service (AIaaS) platform
- [Open Data Hub](https://opendatahub.io/)
- [Open Data Hub 0.6 brings component updates and Kubeflow architecture](https://developers.redhat.com/blog/2020/05/07/open-data-hub-0-6-brings-component-updates-and-kubeflow-architecture/)
- [A development roadmap for Open Data Hub](https://developers.redhat.com/blog/2020/06/22/a-development-roadmap-for-open-data-hub/)

## eBooks
- [O'Really: Streaming data](http://streamingsystems.net/)

## Related
- [Service meshes to the rescue: Load balancing and scaling long-lived connections in Kubernetes](https://learnk8s.io/kubernetes-long-lived-connections)

## Questions and Answers
- [adambien.blog - 75th **airhacks.tv** Questions and Answers: Kafka, JAX-RS, MicroProfile, JSON-B, GSON, JWT, VSC, NetBeans, Java Fullstack](https://adambien.blog/roller/abien/entry/kafka_jax_rs_microprofile_json) "Kafka vs. JAX-RS / RPC, thoughts about APIs, JSON-B vs. GSON, Path.of over Paths.get, Java Records, MicroProfile JWT, beginners vs. expert content, best Java fullstack, code coverage, NetBeans in 2020, Visual Studio Setup for Java, screencast configuration, ReactJS / Angular over JSF?, JSON-P vs. JSON-B, security code scanning"

---

repository: huangyingting/awesome-kubernetes

repo_name: huangyingting/awesome-kubernetes


text:
# USB Joystick using Raspberry Pi Pico and TinyUSB

This based on modifications to the dev_hid_composite example from the
pico-examples repo.

## How to build on a Raspberry Pi

```bash
cd ~/pico
git clone https://github.com/gdsports/xac_joystick_pipico
cd xac_joystick_pipico
mkdir build
cd build
export PICO_SDK_PATH=../../pico-sdk
cmake ..
make -j4
```


text:
# Snake
Use the Makefile to install the requirements and start playing, training or testing in 1D or 2D. The following commands can be used:

* `make install` to install all the requirements for Snake
* `make train` to train the SNN for the in the Makefile specified number of games in 1D
* `make play` to let the bot play for the in the Makefile specified number of games in 1D
* `make play-human` to play Snake in 1D yourself using the arrow keys.
* `make train2D` to train the SNN for the in the Makefile specified number of games in 2D
* `make play2D` to let the bot play for the in the Makefile specified number of games in 2D
* `make play-human2D` to play Snake in 2D yourself using the arrow keys.
* `make test2D` to train the SNN for the in the Makefile specified number of episodes and number of runs in 2D
* `make clean` to delete all pycache and weights (.h5) files.

## Structure of the Spiking Neural Network for 2D
Six input neurons are fully connected to three output neurons. The input is the distance of the first objects in the directions left, forward and right from the current position and the distance from the fruit in all directions.
The output neurons each represent an action (left, forward, right) and the bot chooses the action from the output neuron, which received the most spikes.

repository: iteratec/SNN-traze-Bot

repo_name: iteratec/SNN-traze-Bot


text:
# ConvolutionBackpropData {#openvino_docs_ops_convolution_ConvolutionBackpropData_1}

@sphinxdirective

.. meta::
  :description: Learn about ConvolutionBackpropData-1 - a 1D, 2D or 3D convolution operation, which
                can be performed on input and kernel tensors in OpenVINO.

**Versioned name**: *ConvolutionBackpropData-1*

**Category**: *Convolution*

**Short description**: Computes 1D, 2D or 3D *ConvolutionBackpropData* operation with respect to the input and kernel tensors. Also known as a Transposed Convolution.

**Detailed description**:

ConvolutionBackpropData takes the input tensor, weights tensor and output shape and computes the output tensor of a given shape. The shape of the output can be specified as an input 1D integer tensor explicitly or determined by other attributes implicitly. If output shape is specified as an explicit input, shape of the output exactly matches the specified size and required amount of padding is computed. More thorough explanation can be found in `Transposed Convolutions <https://arxiv.org/abs/1603.07285>`__.

ConvolutionBackpropData accepts the same set of attributes as a regular Convolution operation and additionally ``output_padding`` attribute, but they are interpreted in a "backward way", so they are applied to the output of ConvolutionBackpropData, but not to the input. Refer to a regular :doc:`Convolution <openvino_docs_ops_convolution_Convolution_1>` operation for detailed description of each Convolution attribute.

When output shape is specified as an input tensor ``output_shape`` then it specifies only spatial dimensions. No batch or channel dimension should be passed along with spatial dimensions. If ``output_shape`` is omitted, then ``pads_begin``, ``pads_end`` or ``auto_pad`` are used to determine output spatial shape ``[O_z, O_y, O_x]`` by input spatial shape ``[I_z, I_y, I_x]`` in the following way:

.. code-block:: xml
   :force:

   if auto_pads != None:
       pads_begin[i] = 0
       pads_end[i] = 0

   Y_i = stride[i] * (X_i - 1) + ((K_i - 1) * dilations[i] + 1) - pads_begin[i] - pads_end[i] + output_padding[i]

where ``K_i`` filter kernel dimension along spatial axis ``i``.

If ``output_shape`` is specified, ``pads_begin`` and ``pads_end`` are ignored, and ``auto_pad`` defines how to distribute padding amount around the tensor. In this case pads are determined based on the next formulas to correctly align input and output tensors:

.. code-block:: xml
   :force:

   total_padding[i] = stride[i] * (X_i - 1) + ((K_i - 1) * dilations[i] + 1) - output_shape[i] + output_padding[i]
   if auto_pads != SAME_UPPER:
       pads_begin[i] = total_padding[i] // 2
       pads_end[i] = total_padding[i] - pads_begin[i]
   else:
       pads_end[i] = total_padding[i] // 2
       pads_begin[i] = total_padding[i] - pads_end[i]

**Attributes**

* *strides*

  * **Description**: *strides* has the same definition as *strides* for a regular Convolution but applied in the backward way, for the output tensor.
  * **Range of values**: positive integers
  * **Type**: ``int[]``
  * **Required**: *yes*

* *pads_begin*

  * **Description**: *pads_begin* has the same definition as *pads_begin* for a regular Convolution but applied in the backward way, for the output tensor. May be omitted specified, in which case pads are calculated automatically.
  * **Range of values**: non-negative integers
  * **Type**: ``int[]``
  * **Required**: *yes*
  * **Note**: the attribute is ignored when *auto_pad* attribute is specified.

* *pads_end*

  * **Description**: *pads_end* has the same definition as *pads_end* for a regular Convolution but applied in the backward way, for the output tensor. May be omitted, in which case pads are calculated automatically.
  * **Range of values**: non-negative integers
  * **Type**: ``int[]``
  * **Required**: *yes*
  * **Note**: the attribute is ignored when *auto_pad* attribute is specified.

* *dilations*

  * **Description**: *dilations* has the same definition as *dilations* for a regular Convolution but applied in the backward way, for the output tensor.
  * **Range of values**: positive integers
  * **Type**: ``int[]``
  * **Required**: *yes*

* *auto_pad*

  * **Description**: *auto_pad* has the same definition as *auto_pad* for a regular Convolution but applied in the backward way, for the output tensor.

    * *explicit*: use explicit padding values from ``pads_begin`` and ``pads_end``.
    * *same_upper* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end.
    * *same_lower* the input is padded to match the output size. In case of odd padding value an extra padding is added at the beginning.
    * *valid* - do not use padding.
  * **Type**: ``string``
  * **Default value**: None
  * **Required**: *no*
  * **Note**: *pads_begin* and *pads_end* attributes are ignored when *auto_pad* is specified.

* *output_padding*

  * **Description**: *output_padding* adds additional amount of paddings per each spatial axis in the ``output`` tensor. It unlocks more elements in the output allowing them to be computed. Elements are added at the higher coordinate indices for the spatial dimensions. Number of elements in *output_padding* list matches the number of spatial dimensions in ``data`` and ``output`` tensors.
  * **Range of values**: non-negative integer values
  * **Type**: ``int[]``
  * **Default value**: all zeros
  * **Required**: *no*

**Inputs**:

* **1**: Input tensor of type *T1* and rank 3, 4 or 5. Layout is ``[N, C_INPUT, Z, Y, X]`` (number of batches, number of input channels, spatial axes Z, Y, X). **Required.**
* **2**: Convolution kernel tensor of type *T1* and rank 3, 4 or 5. Layout is ``[C_INPUT, C_OUTPUT, Z, Y, X]`` (number of input channels, number of output channels, spatial axes Z, Y, X). Spatial size of the kernel is derived from the shape of this input and aren't specified by any attribute. **Required.**
* **3**: ``output_shape`` is 1D tensor of type *T2* that specifies spatial shape of the output. If specified, *padding amount* is deduced from relation of input and output spatial shapes according to formulas in the description. If not specified, *output shape* is calculated based on the ``pads_begin`` and ``pads_end`` or completely according to ``auto_pad``. **Optional.**
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:

  * 1D convolution (input tensors rank 3) means that there is only one spatial axis X,
  * 2D convolution (input tensors rank 4) means that there are two spatial axes Y, X,
  * 3D convolution (input tensors rank 5) means that there are three spatial axes Z, Y, X.

**Outputs**:

*   **1**: Output tensor of type *T1* and rank 3, 4 or 5. Layout is ``[N, C_OUTPUT, Z, Y, X]`` (number of batches, number of kernel output channels, spatial axes Z, Y, X).

**Types**:

* *T1*: any numeric type.
* *T2*: any integer type.

repository: openvinotoolkit/openvino

repo_name: openvinotoolkit/openvino


text:
JFXtras-labs
============
_A project for experimenting with new controls and other useful JavaFX extensions_

Building with Gradle
--------------------
* Set your environment variable JAVAFX_HOME to the directory that contains rt/lib/jfxrt.jar.
* cd jfxtras-labs
* gradlew build

## License

JFXtras uses the [new BSD](http://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_.28.22Revised_BSD_License.22.2C_.22New_BSD_License.22.2C_or_.22Modified_BSD_License.22.29) license


text:
# Ruby Basics

The code examples on this page show both the code you enter into the Ruby file, and then immediately below what you'd expect to see when you run it. If you see a line start with this symbol > it means that line is the result of the piece of code above it

## Output
The most basic thing in any programming language is to make it output some information. In Ruby you do this using **puts**, short for put string. It takes whatever you give it and outputs it to the command line.
```ruby
puts "Hello, I'm some Ruby code"
> "Hello, I'm some Ruby code"
```

## Comments
Sometimes you just want to put a note to yourself (or anyone else who reads your code) to explain what something does or why you put it there. Ruby will ignore any line that starts with # even if it contains valid Ruby code

```ruby
# I'm a comment and Ruby will ignore me
# puts "I will also be ignored"
```

## Variables
Storing a value to use it again later is something you need to do all the time when writing code. These stored values are called variables, because their value can vary over time.

To create a variable in Ruby, you choose a name (made up of letters, underscores and numbers, no spaces allowed :P) and use an = sign to assign a value to it. Once you've given your variable a name, you can use it again in your code and it will keep the same value unless you assign it another one.

```ruby
my_value = 2
my_value
> 2

my_value = 2 + 2
my_value
> 4
```

**Important:** *The Ruby interpreter doesn't automatically store values between runs, so as soon as your script finishes running all the variables will be gone (unless you save them to a file, but more on that later...)*

Variables can have any value you choose to give them, but once you've assigned a value they will automatically have a type depending what you assigned.

Some example types:
```ruby
# String
"I'm a string"

# Integer - A whole number
2

# Float - A decimal number
2.75

# Array - a list containing other variables of any type
['apples', 'pears']

# Hash - a set of keys, each with an assoicated variable as the value
{:key => value}
```

Depending on the type of the variable you created, it has different functions and properties you can use to work with it.

### Strings
A String variable is a string of characters of any length from 0 upwards. You can perform basic operations on a string like reversing it, choosing a smaller part of it, or joining it together with other strings.

```ruby
my_string = "hello ruby"

my_string.reverse
> "ybur olleh"

my_string.length
> 10

# Tip: you can put any ruby code inside #{} and Ruby will
# calculate the result and insert it in your string
puts "I say #{my_string}"
> "I say hello ruby"

```

[Everything about strings](http://www.ruby-doc.org/core-2.1.2/String.html)

### Arrays
An Array variable is just a sequential list of other variables, stored under a single variable name. An array can contain any other type of Ruby variable, including other arrays.
```ruby
my_array = ['apples', 'pears', 'oranges']

my_array.reverse
> ['oranges', 'pears', 'apples']

my_array.first
> 'apples'

my_array.last
> 'oranges'

my_array.include?('grapes')
> false
```

To access a value in an existing array, use square brackets and the number of the item you want. Ruby starts counting from 0, so the first item is number 0, the second is 1 etc.

```ruby
my_array = ['apples', 'pears', 'oranges']

my_array[0]
> 'apples'

my_array[2]
> 'oranges'

my_array[2] = 'something else'
my_array
> ['apples', 'pears', 'something else']
```

If you want to output your whole array instead of just a single item, you might find the **inspect** function helpful

```ruby
my_array = ['apples', 'pears', 'oranges']

# without .inspect
puts my_array
> apples
> pears
> oranges

# with .inspect
puts my_array.inspect
> "['apples', 'pears', 'oranges']"
```

[Everything about arrays](http://www.ruby-doc.org/core-2.1.2/Array.html)

### Hashes
A Hash variable is a set of keys, each with a value associated with it. The value can be any type of Ruby variable, including another Hash. Each key can only hold one value - setting the same key twice will replace the old value.
```ruby
my_hash = {:test_key => 'test value'}

my_hash.include?(:test_key)
> true

my_hash.merge({:another_key => 'another value'})
> {:test_key => 'test value', :another_key => 'another value'}

my_hash.keys
> [:test_key]

my_hash.values
> ['test value']
```

To access a value in an existing hash, use square brackets and the name of the key you want

```ruby
my_hash = {:test_key => 'test value', :another_key => 'another value'}

my_hash[:test_key]
> 'test value'

my_hash[:another_key]
> 'another_value'

```

[Everything about hashes](http://www.ruby-doc.org/core-2.1.2/Hash.html)

repository: neukoelln-group/examples

repo_name: neukoelln-group/examples


text:
# Linked Lists

  - Linked Lists : sequence of Nodes that are connected/linked to each other.
  - linked lists are linear data structures.
  - linked lists are dynamic data structures.
  - The most defining feature of a Linked List is that each Node references the next Node in the link.
  - A linked list is made up of a series of nodes.
  - Node :  Nodes are the individual items/links that live in a linked list. Each node contains the data for each link and a reference to the next node.
  - A node only knows about what data it contains, and who its neighbor is.

             * Head Node : The first node in link list.
             * current Node : that is currently being looked at.
             * Next Node : the reference to the next node.

  - There are two types of Linked List :
                                          * Singly : A Singly linked list means that there is only one reference, and
                                                    the reference points to the next node in a linked list.

                                          * Doubly : A Doubly linked list means that there is a reference to both the
                                                     Next and Previous node.

#### Traversal

      In Traversal we are not able to use For loop or forEach because  we will depend on the Next value  in each node to guide us where the next reference is pointing , but it's allow as to use the While loop in this way we will keep check if the next node not null and wen we reach the node that is null a NullReferenceException  gets thrown and our program will crash/end.

[1] -> [2] -> [3] -> null : Singly Linked List  (uni -direction.)
// Doubly Linked List : Bi-directional
// nodes ?
element that has a value + has a next value (pointer) : connection
// set of nodes connected to each other:
one direction  : uni -direction.
{	value: 1,
	next: {
		value: 2,
		next: {
			value: 3,
			next: null
		}
	}
}
// Head: first node
// Tail: last node :::::>>>> (next : null)
—————————————————————————————————————————————
BIG O Notation:
ways to describe the complexity and efficiency of algorithm (without Running it)
time and space complexity;
Time: Traversal
Space: Storage.
O(1) : constant  —> Objects/ Hashmaps
var rawan = {name: 'rawan'};
// add another prop
rawan.email =<EMAIL_ADDRESS>O(n) :Linear -> Linked List
let arr = [1, 2, 3, 4] // searching for 3 : one loop,
1- worst case scenario
2- imagine huge number millions …
O(n log(n)) : logarithmic : divide and conquer : Binary Search Tree.
O(n^2) : two loops inside of each other <<<< —
—————————————————————————————————————————————


text:
Background location updates for Cordova
=================================

A cordova plugin to send periodical location updates to your backend server.  Just add your API endpoint and you're good to go!

Currently only iOS is supported, but an Android version is on the roadmap.

> *Note:* this plugin is **not** intended to send high precision and realtime location updates, but rather coarse estimates. This is useful
> for weather services, geofencing or location based push notifications.

Installation
-------------

Using the Cordova Command line:
```
cordova plugin add https://github.com/Hless/cordova-plugin-location-updates.git
```

Usage
-------------

There are three javascript functions available:

 - .configure(success, fail, options)
 - .start(success, fail)
 - .stop(success,fail)

After the device ready event has been fired you should configure the plugin:
```javascript
var options = {
    url:"http://www.example.com/your/endpoint", // Your API endpoint
    maximumAge: 0, // Time in seconds before location event is considered too old to be sent to server. 0  means no limit
    parameters: {  // Additional parameters (see chapter server side)
        foo: "bar"
    },
    headers: { // Additional headers
        X-foo: "x-bar"
    }
};
cordova.plugins.BLLocationUpdates.configure(onSuccess,onFail,options );
```

If configuring was a success you should start monitoring for Location Updates:
```javascript
var onSuccess = function(){
    cordova.plugins.BLLocationUpdates.start();
});
cordova.plugins.BLLocationUpdates.configure(onSuccess,onFail,options );
```

To stop monitoring :
```javascript
cordova.plugins.BLLocationUpdates.stop();
```

Receiving location updates
======================

Locations will be send to your backend in JSON format. The structure looks as follows:
```json
{
  "location":{
    "altitude":0,
    "horizontalAccuracy":5,
    "latitude":37.69120159,
    "longitude":-122.47024365,
    "verticalAccuracy":-1
  },
  "foo": "bar"
}
```

repository: Hless/cordova-plugin-location-updates

repo_name: Hless/cordova-plugin-location-updates


text:
Transaction Object
==================

An SMTP transaction is valid from MAIL FROM time until RSET or "final-dot".

API
---

* transaction.uuid

A unique UUID for this transaction. Is equal to the connection.uuid + '.N'
where N increments for each transaction on this connection.

* transaction.mail\_from

The value of the MAIL FROM command as an `Address`[1] object.

* transaction.rcpt\_to

An Array of `Address`[1] objects of recipients from the RCPT TO command.

* transaction.message\_stream

A node.js Readable Stream object for the message.

You use it like this:

    transaction.message_stream.pipe(WritableStream, options)

Where WritableStream is a node.js Writable Stream object such as a
net.socket, fs.writableStream, process.stdout/stderr or custom stream.

The options argument should be an object that overrides the following
properties:

    * line_endings (default: "\r\n")
    * dot_stuffing (default: false)
    * ending_dot   (default: false)
    * end          (default: true)
    * buffer_size  (default: 65535)
    * clamd_style  (default: false)

e.g.

    transaction.message_stream.pipe(socket, { dot_stuffing: true, ending_dot: true });

* transaction.data\_bytes

The number of bytes in the email after DATA.

* transaction.add\_data(line)

Adds a line of data to the email. Note this is RAW email - it isn't useful
for adding banners to the email.

* transaction.notes

A safe place to store transaction specific values. See also [haraka-results](https://github.com/haraka/haraka-results) and [haraka-notes](https://github.com/haraka/haraka-notes).

* transaction.add\_leading\_header(key, value)

Adds a header to the top of the header list.  This should only be used in
very specific cases.  Most people will want to use `add_header()` instead.

* transaction.add\_header(key, value)

Adds a header to the email.

* transaction.remove\_header(key)

Deletes a header from the email.

* transaction.header

The header of the email. See `Header Object`.

* transaction.parse\_body = true|false [default: false]

Set to `true` to enable parsing of the mail body. Make sure you set this in
hook\_data or before.

* transaction.body

The body of the email if you set `parse_body` above. See `Body Object`.

* transaction.attachment\_hooks(start)

Sets a callback for when we see an attachment if `parse_body` has been set.

The `start` event will receive `(content_type, filename, body, stream)` as
parameters.

The stream is a `ReadableStream` - see http://nodejs.org/api/stream.html for
details on how this works.

If you set stream.connection then the stream will apply backpressure to the
connection, allowing you to process attachments before the connection has
ended. Here is an example which stores attachments in temporary files using
the `tmp` library from npm and tells us the size of the file:

    exports.hook_data = function (next, connection) {
        // enable mail body parsing
        connection.transaction.parse_body = true;
        connection.transaction.attachment_hooks(
            function (ct, fn, body, stream) {
                start_att(connection, ct, fn, body, stream)
            }
        );
        next();
    }

    function start_att (connection, ct, fn, body, stream) {
        connection.loginfo("Got attachment: " + ct + ", " + fn + " for user id: " + connection.transaction.notes.hubdoc_user.email);
        connection.transaction.notes.attachment_count++;

        stream.connection = connection; // Allow backpressure
        stream.pause();

        var tmp = require('tmp');

        tmp.file(function (err, path, fd) {
            connection.loginfo("Got tempfile: " + path + " (" + fd + ")");
            var ws = fs.createWriteStream(path);
            stream.pipe(ws);
            stream.resume();
            ws.on('close', function () {
                connection.loginfo("End of stream reached");
                fs.fstat(fd, function (err, stats) {
                    connection.loginfo("Got data of length: " + stats.size);
                    // Close the tmp file descriptor
                    fs.close(fd, function(){});
                });
            });
        });
    }

* transaction.discard\_data = true|false [default: false]

Set this flag to true to discard all data as it arrives and not store in
memory or on disk (in the message\_stream property). You can still access
the attachments and body if you set parse\_body to true. This is useful
for systems which do not need the full email, just the attachments or
mail text.

* transaction.set\_banner(text, html)

Sets a banner to be added to the end of the email. If the html part is not
given (optional) then the text part will have each line ending replaced with
`<br/>` when being inserted into HTML parts.

* transaction.add\_body\_filter(ct_match, filter)

Adds a filter to be applied to body parts in the email.  ct\_match should be a
regular expression to match against the full content-type line, or a string to
match at the start, e.g. `/^text\/html/` or `'text/plain'`.  filter will be
called when each body part matching ct_match is complete.  It receives three
parameters, the content-type line, the encoding name, and a buffer with the
full body part.  It should return a buffer with the desired contents of the
body in the same encoding.

* transaction.results

Store results of processing in a structured format. See [docs/Results](http://haraka.github.io/manual/Results.html)

[1]: `Address` objects are address-rfc2821 objects. See https://github.com/haraka/node-address-rfc2821

repository: haraka/Haraka

gha_language: JavaScript

repo_name: haraka/Haraka


text:
#PiOT 101: Introductory Workshop fo the Raspberry Pi + Internet of Things
---

This is a hub for the 101 tutuorial on learning how to get going on a Raspberry Pi and getting it connected to the Internet of Things.

Here you will find code materials for the workshop sectioned in folders inside this repository. You will also find the tutorials [in the wiki](https://github.com/InitialState/piot-101/wiki) of this repo.


text:
# Build ghettoVCB VIB/Offline Bundle

The `build.sh` shell script is used to create both the ghettoVCB VIB and Offline Bundle which is available for download in the [ghettoVCB Releases page](https://github.com/lamw/ghettoVCB/releases). For those interested, you can also use this script to generate your own VIB/Offline Bundled which automatically pulls from the latest ghettoVCB source code.

The build script requires `docker` to be installed and uses the [vibauthor docker](https://hub.docker.com/repository/docker/lamw/vibauthor) container to generate the VIB/Offline Bundle.

Here is an example of running the script:

```code
❯ ./build.sh

Untagged: ghettovcb:latest
Deleted: sha256:af50b3cc12eec9277e04921e556fe6a62c64d9e503d850d7de59a9cf47b401bb
Deleted: sha256:bbf8b88d685825840508451014e38f84e459ffb75e7b2a4e185e7f5c47c7b618
Deleted: sha256:a72afa7385618d5865b88300b1889385b9e6204547bd88c6f719fb15a81217e3
Deleted: sha256:d221fb0ba5af54c0de4d15e2eec3fdafcee97fd895aab6c359372fd76f84b339
Sending build context to Docker daemon  6.656kB
Step 1/8 : FROM lamw/vibauthor
 ---> a673ffe4ba43
Step 2/8 : RUN rpm --rebuilddb
 ---> Using cache
 ---> 753af48ef9af
Step 3/8 : RUN yum clean all
 ---> Using cache
 ---> 689b05a480e2
Step 4/8 : RUN yum update -y nss curl libcurl;yum clean all
 ---> Using cache
 ---> c51671aed6fa
Step 5/8 : COPY create_ghettoVCB_vib.sh create_ghettoVCB_vib.sh
 ---> 7d2e7dffd928
Step 6/8 : RUN chmod +x create_ghettoVCB_vib.sh
 ---> Running in feaffc690f72
Removing intermediate container feaffc690f72
 ---> 25dbc3dee22a
Step 7/8 : RUN /root/create_ghettoVCB_vib.sh
 ---> Running in 9eae129c4da1
Initialized empty Git repository in /root/ghettoVCB/.git/
Successfully created vghetto-ghettoVCB.vib.
Successfully created vghetto-ghettoVCB-offline-bundle.zip.
Removing intermediate container 9eae129c4da1
 ---> ddb549b11636
Step 8/8 : CMD ["/bin/bash"]
 ---> Running in dda3680d7a69
Removing intermediate container dda3680d7a69
 ---> 616ef9508225
Successfully built 616ef9508225
Successfully tagged ghettovcb:latest
```

Upon success, you should have a new directory called `artifacts` which contains both the VIB and Offline Bundle

```code
❯ tree artifacts

artifacts
├── vghetto-ghettoVCB-offline-bundle.zip
└── vghetto-ghettoVCB.vib
```

repository: tssgery/ghettoVCB

repo_name: tssgery/ghettoVCB


text:
---
title: Integrating the Design System into your project
layout: variation
section: getting-started
description: >

  The Design System provides a set of modular HTML, CSS, and JavaScript patterns
  that can be used both collectively and individually. There are several ways to
  integrate it into your project:

  1. [Installing a single component with npm or
  yarn](#installing-a-single-component-with-npm-or-yarn)

  1. [Using the generator](#using-the-generator)

  1. [Using Less](#using-less)

  1. [Downloading the compiled CSS](#downloading-the-compiled-css)

  Our recommended workflow if you are starting a new codebase is to use the
  generator to scaffold out a new Design System project. This allows you to pick
  and choose your modules as well as providing a solid front end build process.

  ## Installing a single component with npm or yarn

  Just want one or two CF components and not the entire framework?

  Simply install and `@import` only the components you need.

  ### Install with yarn or npm

  Pick one:

  ```sh

  yarn add cf-buttons cf-icons

  ```

  or

  ```sh

  npm install cf-buttons cf-icons

  ```

  ### Import CSS

  ```css

  @import (less<EMAIL_ADDRESS>
  @import (less<EMAIL_ADDRESS>

  /* the rest of your stylesheet… */

  ```

  > NOTE: Be sure to run the Less files through
    [Autoprefixer](https://github.com/postcss/autoprefixer),
    or your compiled CSS might not work perfectly in older browsers.

  ### Import JavaScript

  ```js

  import Expandable from '@cfpb/cfpb-expandables/src/Expandable'';

  Expandable.init( document.querySelector( '#container' ) );

  ```

  ## Using the generator

  To use the generator, you will need [Node.js](http://nodejs.org/),

  [Yeoman](http://yeoman.io/), and [Gulp](http://gulpjs.com/).

  ### Installing dependencies

  [Node.js](http://nodejs.org/) can be downloaded and installed directly from
  the Node website, or by using a package manager for your system. At the CFPB
  we use Homebrew. To install the dependencies:

  ```sh

  brew install node  # if installing node with Homebrew

  npm install --global gulp yo generator-cf

  ```

  ### Scaffolding out a project

  To create a new project, create a directory, cd into that directory, and run
  the `yo cf` command:

  ```sh

  mkdir my-awesome-project

  cd my-awesome-project

  yo cf

  ```

  The generator will prompt you to complete information about the project and
  choose the Design System modules you would like to use.

  ### Navigating the project folder

  Once the generator has finished you'll have a folder full of files and
  folders.

  Here's a quick guide on working with these files:

  - Run `npm run build` to process the files in `src` and output them to `dist`.

  - To view your site, go to the dist directory and start a local server: `cd
  dist && python -m SimpleHTTPServer`. You can now navigate to `localhost:8000`
  in your web browser.

  - Edit files within the `src` directory and re-run `npm run build` to view
  changes.

  #### Editing the Less and JS

  The generator has created a starter Less file at `src/static/css/main.less`.

  This file includes all of the necessary imports needed for Capital Framework.

  There is also a starter JavaScript file at `src/static/js/main.js`.

  Both `main.less` and `main.js` are already wired into `Gruntfile.js` (or
  `gulp/tasks/`

  if you selected gulp) so compiling is as easy as running `npm run build`. It
  also

  copies files from `src` into `dist`, which will update what you see at
  `localhost:8000/`.

  ### Theming / Customizing

  You can override component UI colors within
  `src/static/css/cf-theme-overrides.less`.

  This is already set up for you and gets imported by `main.less`.

  If you would like to use your own color palette simply replace the contents of

  `brand-palette.less` with your own color variables,

  then update `cf-theme-overrides.less` by overriding each UI color variable

  with a color from `brand-palette.less` or any color of your choosing.

  The same applies when you need to add custom styles to your project.

  You can add any custom `.less` files to your project that you may need,

  just remember to import them in `main.less` using the correct path.

  ## Using Less

  If you don't want to use the generator,

  you can just download the source files and import them into your project.

  > NOTE: Be sure to run the Less files through
    [Autoprefixer](https://github.com/postcss/autoprefixer),
    or your compiled CSS will
    not work perfectly in older browsers.

  Run `npm install capital-framework`. This will download Capital Framework to
  your

  project's `node_modules` directory. You can then import the framework into

  your application's primary Less file:

  ```css

  @import (less) "node_modules/capital-framework/src/capital-framework.less";

  /* the rest of your stylesheet… */

  ```

  Just want one or two CF components and not the entire framework?

  Simply install and `@import` only the components you need.

  ```sh

  npm install cf-buttons cf-icons

  ```

  ```css

  @import (less) "node_modules/cf-buttons/src/cfpb-buttons.less";

  @import (less) "node_modules/cf-icons/src/cfpb-icons.less";

  /* the rest of your stylesheet… */

  ```

  ## Downloading the compiled CSS

  Capital Framework's compiled CSS can be downloaded here.

  Download it and copy the files found in the `dist/` directory to your project.

  Use standard `<link>` and `<script>` tags.

  ```html

  <!DOCTYPE html>

  <html>

  <head>
      <title>My Awesome Project</title>
      <link rel="stylesheet" href="capital-framework.min.css">
  </head>

  <body>
      <!-- Your project's HTML goes here. -->
      <script src="capital-framework.min.js"></script>
  </body>

  </html>

  ```
last_updated: 2019-09-13T13:48:42.692Z
---

repository: cfpb-sandbox/design-system

gha_language: HTML

repo_name: cfpb-sandbox/design-system


text:
# l2t_ss

## Layer 2 Traceroute Simple Sender
This program sends L2T messages, listens for responses, prints the responses.

It doesn't use many of the attribute and builder methods available in this
library because they're validated and this sender is deliberately unsafe.
It can generate bogus messages, might be useful for fuzzing the L2T service
on a switch.

The minimal valid CLI arguments sends a correctly formatted (but invalid)
message to the target switch:
```
l2t_ss <target-ip>
```

This message consists of a header only and looks like:
```
0x 02 01 00 05 00
   -- -- ----- --
   |  |  |     +---> Attribute Count: 0
   |  |  |
   |  |  +---------> Total Message Length: 5 bytes
   |  |
   |  +------------> Message Version: 1
   |
   +---------------> Message Type: 2 (L2T_REQUEST_SRC)
```

The header values are automatically calculated, but can each be overwritten
with the `-t`, `-l`, `-v` and `-c` options.

Attributes are added with the `-a` option, which takes one of two forms:
```
-a <type>:<string-payload>
-a hexstring
```

The `-a type:<string-payload>` form can be articulated with a type number
(uint8), or a type name (see attribute/attr_common.go). String payloads are
automatically formatted according to the requested type, and attribute
lengths are calculated.

The `-a hexstring` form is correctly formatted when it includes type, length
and payload.

A `SrcMacType` payload containing MAC address FF:FF:FF:FF:FF:FF can be
articulated as:
```
-a 1:ffff.ffff.ffff
-a SrcMacType:ff:ff:ff:ff:ff:ff
-a 0108ffffffffffff
```

Attributes are packed into outgoing messages in the order they're provided
on the CLI.

The `-p` option causes the program to attempt to print the outgoing message.
This may or may not be possible, depending on whether the message is valid.

## Some complete examples:

#### Determine whether VLAN 100 exists on a switch:
```
$ ./l2t_ss -p -t 2 -a 1:ffff.ffff.ffff -a 2:ffff.ffff.ffff -a 3:100 -a 14:<local-ip-address> <target-switch-ip-address>
Sending:  L2T_REQUEST_SRC (2) with 4 attributes (31 bytes)
   1 L2_ATTR_SRC_MAC      ff:ff:ff:ff:ff:ff
   2 L2_ATTR_DST_MAC      ff:ff:ff:ff:ff:ff
   3 L2_ATTR_VLAN         100
  14 L2_ATTR_SRC_IP       <local-ip-address>
Received: L2T_REPLY_SRC (4) with 4 attributes (34 bytes)
   4 L2_ATTR_DEV_NAME     <switch-hostname-string>          <- switch reveals its hostname
   5 L2_ATTR_DEV_TYPE     <switch-platform-string>          <- switch reveals its platform type
   6 L2_ATTR_DEV_IP       <switch-ip-address>               <- this might be a new IP address we didn't know about
  15 L2_ATTR_REPLY_STATUS Source Mac address not found      <- VLAN 100 exists (would be 'Status unknown (3)' otherwise)
```

#### Determine whether MAC address 0011.2233.4455 exists within VLAN 100:
```
$ ./l2t_ss chris$ ./l2t_ss -t 2 -a 1:ffff.ffff.ffff -a 2:0011.2233.4455 -a 3:100 -a <local-ip-address> <target-switch-ip-address>
Received: L2T_REPLY_SRC (4) with 6 attributes (62 bytes)
   4 L2_ATTR_DEV_NAME     <switch-hostname-string>          <- switch reveals its hostname
   5 L2_ATTR_DEV_TYPE     <switch-platform-string>          <- switch reveals its platform type
   6 L2_ATTR_DEV_IP       <switch-ip-address>               <- this might be a new IP address we didn't know about
  13 L2_ATTR_NBR_IP       <neighbor-cdp-mgmt-ip>            <- switch reveals CDP management IP of neighbor switch
  15 L2_ATTR_REPLY_STATUS Status unknown (2)                <- MAC exists (would be 'Source Mac address not found' otherwise)
  16 L2_ATTR_NBR_DEV_ID   <neighbor-switch-name>            <- switch reveals host/domain name of neighbor switch
```

#### Queries of type 1 reveal even more:
```
$ ./l2t_ss chris$ ./l2t_ss -t 1 -a 1:<mac-string> -a 2:<mac-string-again> -a 3:100 -a 14:<IP_ADDRESS> <target-switch-ip-address>
Received: L2T_REPLY_DST (3) with 12 attributes (96 bytes)
4 L2_ATTR_DEV_NAME     <switch-hostname-string>         <- switch reveals its hostname
5 L2_ATTR_DEV_TYPE     <switch-platform-string>         <- switch reveals its platform type
6 L2_ATTR_DEV_IP       <switch-ip-address>              <- this might be a new IP address we didn't know about
7 L2_ATTR_INPORT_NAME  Gi1/2                            <- interface facing toward attr_type 1 MAC address
8 L2_ATTR_OUTPORT_NAME Gi1/2                            <- interface facing toward attr_type 2 MAC address
9 L2_ATTR_INPORT_SPEED 1Gb/s                            <- this is crazy, right?
10 L2_ATTR_OUTPORT_SPEED 1Gb/s                          <- these values don't render if speeds are "auto"
11 L2_ATTR_INPORT_DUPLEX Auto                           <- duplex command wasn't typed in the config
12 L2_ATTR_OUTPORT_DUPLEX Auto                          <- otherwise we'd see 'full' or 'half'
13 L2_ATTR_NBR_IP       <IP_ADDRESS>                   <- neighbor switch IP - we should poke this one next!
15 L2_ATTR_REPLY_STATUS Status unknown (2)              <- still working on all the reply status codes
16 L2_ATTR_NBR_DEV_ID   switch3.company.com             <- the neighbor's hostname
```


text:
# actions-awsnuke

## Synopsis

The `awsnuke` action is a Docker-based [GitHub Action](https://github.com/features/actions) which executes [aws-nuke](https://github.com/rebuy-de/aws-nuke) to clean up (or nuke) an entire AWS account (or group of accounts)

It can be used to cleanup after other actions, or can be run on a schedule, to restore your AWS account to a pristine state.

## Prerequisistes

Although not necessarily required, it is highly recommend to run this action after running the [Configure AWS Credentials](https://github.com/aws-actions/configure-aws-credentials) action

## Usage

This action is intended be run on the `ubuntu-latest` GitHub Action runner.

For example, to run aws-nuke version 2.14.0 with a config file called `nuke.yml` in the root of your repository, you would use:

```yaml
steps:
 - uses: coinmama/actions-awsnuke@v1
   with:
     aws_nuke_version: '2.14.0'
     aws_nuke_config: nuke.yml
```

## Inputs

| Input | Default Value | Description |
|-------|---------------|-------------|
| `aws_nuke_version` | '2.14.0' | The version of aws-nuke to execute. |
| `aws_nuke_config` | None | The path of a configuration file to pass to aws-nuke, relative to the root of your Git repository. |

## Bugs
For bugs in aws-nuke, please report them to the [aws-nuke issue tracker](https://github.com/rebuy-de/aws-nuke/issues).

## License

Copyright 2020 Issac Goldstand<EMAIL_ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

repository: coinmama/actions-awsnuke

repo_name: coinmama/actions-awsnuke


text:
# electron-cfg
[![Build Status](https://travis-ci.org/megahertz/electron-cfg.svg?branch=master)](https://travis-ci.org/megahertz/electron-cfg)
[![npm version](https://badge.fury.io/js/electron-cfg.svg)](https://badge.fury.io/js/electron-cfg)
[![Dependencies status](https://img.shields.io/david/megahertz/electron-cfg)](https://david-dm.org/megahertz/electron-cfg)

## Description

Just a very easy solution for storing settings for an electron
application.

### Key features

 - Settings observer
 - Built-in helper for saving and restoring window state
 - No dependencies

## Installation

Install with [npm](https://npmjs.org/package/electron-cfg):

    npm install --save electron-cfg

## Usage

```js
const config = require('electron-cfg');

const downloadsPath = config.get('downloads.path', process.cwd());

config.observe('album', (current, old) => {
  console.log(`Previous: ${old.name}, current: ${current.name}`);
});

config.set('album', { name, photos: photos.length });
```

### Methods

#### `create(filePath, logger = null)`
Create a new config instance with different file path.

#### `get(key, defaultValue = null): any`

Returns a value associated with the key.

Param         | Type   | Description
--------------|--------|------------
key           | string | Key name, use dot in key to return nested value of some object
defaultValue? | any    | Return this values instead if key not found

#### `set(key, value): electron-cfg`

Sets a value.

#### `has(key): boolean`

Is key exists in the config.

#### `delete(key): electron-cfg`

Removes values associated with the key.

#### `getAll(): Object`

Gets the root object of the config

#### `setAll(data): ElectronCfg`

Sets the root object of the config

#### `file(filePath = null): string`

Gets / Sets config's file path. If relative, it uses `app.getPath('userData')`
to resolve the full path.

#### `observe(key, handler): electron-cfg`
Attaches a handler on keyName property changes. Changes are observable
only in the same process.

Param         | Type                              | Description
--------------|-----------------------------------|------------
key           | string                            | Key name
handler       | (newValue, oldValue, key) => void | Observer

#### `purge(): electron-cfg`

Removes all data from config

#### `logger(logger = console)`

Gets / Sets a logger (object with error, warn and debug methods)

#### `window(options?): WindowManager`

Allow to save/restore window size and position. See next section for details

 Param                    | Type             | Description
--------------------------|------------------|------------
 options = {              | object           |
 -- name: 'main'          | string           | Useful when store settings of multiple windows
 -- saveFullscreen: true  | boolean          | Whether to restore fullscreen state
 -- saveMaximize: true    | boolean          | Whether to restore maximized state
 }                        |                  |

#### `resolveUserDataPath(filePath, appName?)`

Return file path relative to userData directory, similar to

```path.join(app.getPath('userData'), filePath)```

If appName is set, electron-cfg uses its own code to find userData directory
for appName without calling app.getPath. Can be helpful in dev environment
when app.getPath('userData') resolves an incorrect path.

### Save/restore window state

```js
const { BrowserWindow } = require('electron');
const cfg = require('electron-cfg');

function createWindow() {
  const winCfg = cfg.window();
  const window = new BrowserWindow({
    width: 800,  // default, optional
    height: 600, // default, optional
    ...winCfg.options(),
  });
  winCfg.assign(window);
  return window;
}
```

or it can be simplified using the `create` shortcut:

```js
const cfg = require('electron-cfg');

function createWindow() {
  return cfg.window().create({ width: 800, height: 600 });
}
```

Remarks:
 - Don't set `useContentSize` to true at creating BrowserWindow instance because
   it changes how to calculate window size.
 - Don't call `cfg.window()` before the ready event is fired.

#### WindowManager methods
  - **create(options): BrowserWindow** - shortcut (see example above)
  - **assign(window: BrowserWindow)** - start handling size/position change
  - **options(): Rectangle | object** - get options for BrowserWindow
    constructor
  - **unassign()** - stop handling size/position change

## Related project

Here is a few alternatives which you can try:
 - [electron-json-config](https://github.com/de-luca/electron-json-config)
 - [electron-config](https://github.com/sindresorhus/electron-config)
 - [electron-settings](https://github.com/nathanbuchar/electron-settings)

A lot of code of Saving/restoring window state is based on
[electron-window-state](https://github.com/mawie81/electron-window-state)

## License

Licensed under MIT.

repository: megahertz/electron-cfg

repo_name: megahertz/electron-cfg


text:
# UnityOscSample
OSC Sample for Unity & VVVV

## Require
- VVVV
- Unity2018.2.21f1 or later

## Usage
- Open vvvv/OscTest.v4p
- Open Assts/Scenes/SamplesScene.unity
- Play Scene
- Push **SendBang** in OscTest.v4p
- Display OSC Message in Console

## reference

Base OSC Libraries
https://github.com/nobnak/unity-osc
https://github.com/keijiro/unity-osc


text:
<!-- .slide: data-background="./Images/header.svg" data-background-repeat="none" data-background-size="40% 40%" data-background-position="center 10%" class="header" -->
# FEW 1.2 - Lesson 13 - Present your Work!

<!-- Put a link to the slides so that students can find them -->

<!-- ➡ [**Slides**](/Syllabus-Template/Slides/Lesson1.html ':ignore') -->

<!-- > -->

## Why should present your work?

In a job environment you will be expected to show what you are working on. Your team needs to know, they want to know, and they want to support your work. Your work also supports their work!

<!-- > -->

## Learning Objectives

1. Describe your work
1. Use techniques to give valuable feedback

<!--  -->

## Term feedback survey

https://www.surveymonkey.com/r/term2coursefeedback

<!-- > -->

## Giving Feedback

The best way to improve your work is through feedback from your peers. We all want to be the best we can be. One way to move above and beyond where you are currently is to advice from outside.

After you've made the first presentation of your work. The best way to find new areas where you can improve that work is ask the people around you what they think.

To be useful feedback needs to useful and actionable. If you have ideas but they won't be useful you might not need to mention them at all.

An easy what to format your feedback is in the form of:

- Good - Say what you liked in the work
- Better - Say what you think could be working better
- Best - Mention what you liked best about the work

<!-- > -->

## Review work

Review your work with your peers. Each of you will present your work. Give yourself up to 5 minutes to show your work. Take a few minutes to provide feedback.

In groups of 4 take 3 to 5 minutes to show your work. Take a couple more minutes to provide feedback.

Choose one person from your group to show their work to the whole class.

## Final Assessment Study Guide

The final assessment is used to measure your skills and check your fit for the next classes that come in the track.

The final assessment will be conducted in class and will require you to build a small software project. The assessment will consist of set of challenges. A passing score is completing 70% or more of these challenges.

Expect to see some or all of the items listed in the guide below. Use the guide to check your skills and study for the final.

- [Final Assessment Guide](../final-assessment-guide.md)

<!-- .slide: data-background="#087CB8" -->
## [**10m**] BREAK

Take a 10 minute break

# Lab time

Continue working on your final project.

## Overview/TT II (optional) (20 min)

## In Class Activity II (optional) (30 min)

## Wrap Up (5 min)

-

<!-- > -->

## Additional Resources

<!--

## Minute-by-Minute

| **Elapsed** | **Time** | **Activity** |
| ----------- | -------- | ------------ |
| 0:00 | 0:05 | [Why you should know this](#why-you-should-know-this) |
| 0:05 | 0:15 | [Learning Objectives](#learning-objectives) |
| 0:20 | 0:30 | In Class Activity I |
| 0:50 | 0:10 | BREAK |
| 1:00 | 0:45 | In Class Activity II |
| 1:45 | 0:05 | Wrap up review objectives |

-->

repository: KitsuneNoctus/makeschool

repo_name: KitsuneNoctus/makeschool


text:
# Man fined for bringing more than S$250,000 into Singapore without reporting

Published at: **2019-11-04T22:14:00+00:00**

Author: ****

Original: [CNA](https://www.channelnewsasia.com/news/singapore/man-fined-for-bringing-more-than-s-250-000-into-singapore-12062740)

SINGAPORE: A 42-year-old man was fined S$6,000 on Monday (Nov 4) for failing to report the movement of more than S$254,000 in cash when entering Singapore.
Police said they were alerted on Feb 18 to a man trying to bring in a large amount of cash at the arrival car counter of Woodlands Checkpoint.
Tien Siong Chye had been caught with stacks of Singapore dollars and 10 other currencies with a value of more than S$254,000.
He had failed to give a report to an authorised officer of the cash movement, said police.
It is an offence not to declare the movement of any cash exceeding S$20,000, or its equivalent in foreign currency, into or out of Singapore.
Those convicted can be fined up to S$50,000, jailed up to 3 years or both.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
---
title: Events
---

SvelteKit emits [CustomEvents](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) on the `window` object when certain things happen:

- `sveltekit:start` — fired once the app has hydrated
- `sveltekit:navigation-start` — navigation has started
- `sveltekit:navigation-end` — navigation has ended

You probably won't need to use these, but they can be useful in the context of (for example) integration tests.

repository: matths/kit

repo_name: matths/kit


text:
Pattern: Stateless class

Issue: -

## Description

Deprecated - This rule can be replaced with TSLint's `no-unnecessary-class`.

A stateless class represents a failure in the
object oriented design of the system. A class without state is better
modeled as a module or given some state. A stateless class is defined as
a class with only static members and no parent class.

## Further Reading

* [TSLint - no-stateless-class](https://github.com/microsoft/tslint-microsoft-contrib/blob/master/README.md#supported-rules)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# Radio control of Bessie

## Configuring BessieBitBot for radio.

[This makecode project](https://makecode.microbit.org/_CHRUs56Dz1U1) sets Bessie up to listen on radio group **21** for
(`name`, `value`) pairs, where `name` is a string and `value` is a number.

If `name` is `"left"` or `"right"` the corresponding `value` is used to control the left or right motor. If the `value` is greater
than a `threshold` (controlled by button "A") then the corresponding motor will move forward, if the `value` is less than
`-1 * threshold` it will reverse. The `threshold` is included to allow a motor to be stopped without having to have the controling
microbit perfectly level.

## The Controllers

 1. In the `on start` block set radio group to **21**
 1. create a variable called `pitch`
 1. write a function called `get pitch`
    * set `pitch` to `map`(`rotation pitch`  from `-180`, `180` to `-10`, `10`)
 1. In the `forever` loop
    * call `get pitch` function
    * On one microbit use the radio to send name `"left"` = variable`pitch`
    * On the other send  `"right"` = variable `pitch`
    * Pause for 100 ms

Note that the behaviour of the controllers is likely to be the reverse to that expected.

https://makecode.microbit.org/_PMjLPVWC7JDi

repository: matthew-mizielinski/BroadclystCodeClub

repo_name: matthew-mizielinski/BroadclystCodeClub