text:
**This is not an officially supported Google product.**

# Knative Continuous Delivery User Guide

## What does KCD do?

Knative Continuous Delivery automates progressive rollout of cloud services in Knative. You can choose one of the predefined rollout policies or define a new policy on your own, and the KCD controller will make sure that all services you deploy using that policy will follow the rollout traffic behavior. This greatly reduces rollout risk when introducing new versions of your product, and can help improve continuous delivery during development.

## Use Cases & Expected Behavior

### Deploying your product using Knative Service

KCD supports progressive deployment if you deploy your services using Knative Service. You should specify a rollout policy for a Service using annotations like so:

```yaml
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  ...
  annotations:
    delivery.knative.dev/policy: <your_policy>
...
```

Note that you must first create a valid policy with the correct name, otherwise the progressive rollout will not initiate because it will not be able to find the correct policy resource with the given name. The newest Revision created for this Service will follow the policy you specified, slowly increasing its traffic percentage over time. All the older Revisions will have their routing percentages adjusted as appropriate.

By default, KCD searches for the Policy in the same namespace as the Service. However, you can optionally instruct KCD to perform a cross-namespace policy query by prefixing your policy name with another namespace:

```
delivery.knative.dev/policy: other-namespace/your-policy-name
```

For this reason, the forward slash character `/` is specially reserved. You should avoid naming your policies or namespaces with it.

### Deploying your product using Knative Route and Configuration

If you are not using Knative Service to deploy your service, KCD also supports Route and Configurations (if you use Knative Service, then Route and Configuration will be automatically created by Knative). You should annotate your Configuration resource with the correct namespace and policy name (as shown above). Note that cross-namespace policy queries are also supported in this use case.

### Deployment multiple Revisions simultaneously

KCD can handle more than 2 active Revisions for a service at the same time. It will always satisfy the traffic demands of the latest Revision first, followed by the second latest Revision, third latest Revision, and so on. When 100% of traffic has been assigned to a set of Revisions, any older Revisions that are not included in this pool will be eliminated as a traffic target. An in-depth example demonstrating the routing behavior when multiple Revisions are simultaneously "in flight" can be found [here](multiple_revision_example.md)

## Rollout Policies

### Example Policies

KCD comes with some predefined, example policies for you to play with. One example is the following yaml manifest of a policy:

```yaml
apiVersion: delivery.knative.dev/v1alpha1
kind: Policy
metadata:
  namespace: default
  name: advanced-policy
spec:
  mode: time
  defaultThreshold: 60
  stages:
  - percent: 25
    threshold: 30
  - percent: 50
    threshold: 30
  - percent: 75
```

The `mode` field specifies how the threshold values should be interpreted. A time-based policy implies that the threshold values should be interpreted with units of seconds. A threshold value is used to determine when to move the rollout into the next stage. The first rollout stage in the example above has a rollout threshold of 30 seconds, meaning that 30 seconds after the rollout enters this stage, it will progress to the next stage.

The `defaultThreshold` field specifies what the threshold value for a stage should be if that stage does not specify an optional threshold value on its own. For example, the third stage in the example above (with 75%) does not have an optional threshold value, so its threshold is 60 seconds.

Each `percent` in the list of stages specify the rollout percentage for that stage, i.e. the percentage of traffic that the newest Revision should be receive at this stage.

### Customizing Policies

Although you can choose to use one of the example policies directly, you can also write and apply rollout policies on your own. To do so, you need a yaml file that describes your policy in a format similar to the one shown above.

When applying policies, the following criteria must be met (otherwise your policy will be rejected and will have no effect):

1. The value of the `mode` field must be valid (currently only "time" is accepted).
2. The value of `defaultThreshold` must be a positive integer, and `defaultThreshold` cannot be omitted.
3. There must be at least one rollout stage.
4. The values of `percent` fields must be in non-decreasing order.
5. The values of `percent` fields must be in the range [1, 99]. You do not need to specify 0 as the first stage, and you MUST not specify 100 as the final stage.
6. Any optional `threshold` values, if specified, must be positive integers.

## Example Workflow

### Installing KCD

Before installing and using KCD, you need to make sure that you have `go`, `kubectl`, and `ko` installed on your machine. Your cluster must also have Knative Serving.

To install KCD, run the following command in your terminal:

```sh
ko apply -f config/
```

This will create all the prerequisite custom resource definitions and deploy the KCD controller and webhook to your cluster. To verify that the controller and webhook have been correctly deployed, you can use the following command:

```sh
kubectl get pod -n knative-serving
```

In the printout, if you can find two lines similar to the ones below, then your KCD controller and webhook are correctly deployed:

```
NAME                                                            READY   STATUS    RESTARTS   AGE
continuous-delivery-webhook-677cf69bcd-k4lls                    1/1     Running   0          89s
knative-continuous-delivery-dg8g6-deployment-6d97dd9869-r6hp9   1/2     Running   0          88s
```

### Applying your Policy or use a built-in Policy

A few built-in policies have been provided in `example-policies/`. You can apply them by doing

```sh
ko apply -f example-policies
```

Note that to actually use a built-in policy in a rollout, the relevant Service or Configuration must have the appropriate annotations to specify the name of the policy that it is using.

### Deploying your service

Suppose you have a Knative Service `default/my-app` in a file called `my-app.yaml` like the following:

```yaml
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: my-app
  annotations:
    delivery.knative.dev/policy: basic-policy
spec:
  runLatest:
    configuration:
      revisionTemplate:
        spec:
          container:
            image: <some image>
```

then you can simply run the following command to deploy it:

```sh
kubectl apply -f my-app.yaml
```

If this is the first Revision of `my-app`, then the behavior is the same as if KCD is not present. However, if this is not the first Revision of `my-app`, and if `my-app.yaml` correctly identifies a rollout policy in the annotations ("basic-policy" in this case, which refers to one of the two example policies), then KCD will automatically compute the correct routing state for `my-app` and initiate a progressive rollout. You can watch the traffic percentages in real time via the following command:

```sh
kubectl get -w route my-app -o yaml
```

## Common Failures & Diagnostics

### Incorrect traffic behavior

If you see that the rollout percentage for a Revision you just created stays at 0 or jumps to 100 directly, there can be a few potential culprits:

1. You have not applied any rollout policy.
2. You have not annotated your Service/Configuration with the correct policy name.
3. You are not using Knative Service, and your Route and Configuration have namespace and/or name mismatches.
4. The policy you specified does not live in the same namespace as your Service/Configuration, and you did not specify any namespace for the cross-namespace policy query.

### Debugging tips

You can view the logs of the KCD controller and/or webhook by using the following command:

```sh
kubectl logs -n knative-serving <pod_name_for_controller/webhook>
```

## Under-the-Hood Technicalities

### Continuous Delivery Webhook

The continuous delivery webhook serves two purposes:

1. To make sure that the KService reconciler does not overwrite changes to the Route object, the webhook implements a method that intercepts and overwrites the Route with the desired routing spec before the Route reaches the K8s API server.
2. To make sure that customized policies strictly adhere to all the required criteria, the webhook implements a method that valids any Policy object it receives, and rejects any errors.

### The PolicyState resource

The PolicyState custom resource is owned by the KCD controller. Its purpose is for the KCD controller to communicate the desired routing state to the continuous delivery webhook. Because the KCD controller and the webhook are not run in the same binary, PolicyStates are used to relay information. It is purely an internal mechanism that helps the webhook write the correct Route spec; any tampering with PolicyStates might cause undefined behavior.

gha_language: Go


text:
## DistanceSensorOD1000IOLink
Connecting and communicating to IO-Link device OD1000 distance sensor
### Description
This sample shows how to connect to the IO-Link device OD1000 and how to
receive distance measurement data.
### How to Run
This sample can be run on any AppSpace device which can act as an IO-Link master,
e.g. SIM family. The IO-Link device OD1000 must be properly connected to a port
which supports IO-Link. If the port is configured as IO-Link master, see script,
the power LED blinks slowly. When a IO-Link device is successfully connected the
LED blinks rapidly.
### More Information
See device manual of IO-Link master for according ports. See manual of IO-Link
device OD1000 for further IO-Link specific description and device specific commands

### Topics
Remote-Device, Communication, Acquisition, Sample, SICK-AppSpace

license: Unlicense

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Transformer encoder - visualized

This repo contains the slides and the notebook

Update: On slide 15, you don't need to set the embeddings of the masked words to all zeros, just leave it as the embedding of the MASK token.

[Source](https://github.com/mertensu/transformer-tutorial)

license: MIT

repository: kryvokhyzha/examples-and-courses

gha_language: Jupyter Notebook

gha_license_id: MIT

repo_name: kryvokhyzha/examples-and-courses


text:
# Project Name
Neighbourhood watch

## Author
Nicollette Ochola

## Description
- A private network for your neighbourhood, that allows members of the same community to post businesses and anything that concerns the members of the community.

## User Stories
- Users create an account.
- Users can log in to application and view available Neighborhoods once they have an account.
- Users can navigate to, and view a neighborhood as well as its details, including business posts and an option to join.
- Users can create business posts.
- Users can view their profile page.
- Users can use the side navigation bar to navigate to the home page, profile page as well, login and logout.

## BDD
| Behavior            | Input                         | Output                        |
| ------------------- | ----------------------------- | ----------------------------- |
| Users can sign up for an account | Input credentials in the registration form then click Sign Up | Users are prompted to login into their account |
| Users can log into their account | Input the correct credentials of an existing account in the login form | Once verified, users are navigated to the home page where they can view available neighborhoods |
| Users can view the details of a specific neighborhood | Click on a given neighborhood | Users are directed to the neighborhood's page where its details, business posts as well as an option to Join, are displayed |
| Users can view their profiles | Click on Profile in the side navigation | Users are directed to their profile page with their profile information displayed |
| Users can create business posts | Click on the Post Business option in the side navigation bar | User will be navigated to a new page with a form to create a new post |\

## Technologies Used
- Django 1.11 (Python3.6)
- HTML/CSS
- Bootstrap (MDB bootstrap)
- Javascript

## Setup Requirements
Here is a run through of how to set up the application:

- Step 1 : Clone this repository using the git clone link:
git clone https://github.com/Isaacg94/Neighbourhood-Watch.git
- Step 2 : Navigate to the directory:
cd Neighbourhood-Watch-master
- Step 3 : Open the directory created with your favorite IDE. If Atom type atom . if VSCode type code . . This will lauch the editor with the project setup,
- Now feel free to hack around the project.

## Testing
- To run the tests on the application run `python3.6 manage.py test app`

## Known Bugs
Posts are added from the admin side, user can not directly add posts and businesses.

## Contacts
<EMAIL_ADDRESS>
## Live Link
https://nicolewatch.herokuapp.com/

## License
MIT Licence (c) Nicollette Ochola 2020

repository: NicolletteOchola/NeighbourhoodWatch

gha_language: Python

repo_name: NicolletteOchola/NeighbourhoodWatch


text:
# Hierarchical State Nodes

Statecharts, by definition, are hierarchical - that is to say, they:

- enable refinement of state
- can group similar transitions
- allow isolation
- encourage composability
- and prevent state explosion, which frequently occurs in normal finite state machines.

In XState, state and machine configuration share a common schema, which allows machines to be _substates_ and for states to be infinitely nested.

Here's an example of a traffic light machine with nested states:

```js
const pedestrianStates = {
  initial: 'walk',
  states: {
    walk: {
      on: {
        PED_COUNTDOWN: { target: 'wait' }
      }
    },
    wait: {
      on: {
        PED_COUNTDOWN: { target: 'stop' }
      }
    },
    stop: {},
    blinking: {}
  }
};

const lightMachine = createMachine({
  key: 'light',
  initial: 'green',
  states: {
    green: {
      on: {
        TIMER: { target: 'yellow' }
      }
    },
    yellow: {
      on: {
        TIMER: { target: 'red' }
      }
    },
    red: {
      on: {
        TIMER: { target: 'green' }
      },
      ...pedestrianStates
    }
  },
  on: {
    POWER_OUTAGE: { target: '.red.blinking' },
    POWER_RESTORED: { target: '.red' }
  }
});
```

<iframe src="https://xstate.js.org/viz/?gist=e8af8924afe9352bf7d1e06f06407061&embed=1"></iframe>

The `'green'` and `'yellow'` states are **simple states** - they have no child states. In contrast, the `'red'` state is a **composite state** since it is composed of **substates** (the `pedestrianStates`).

To transition from an initial state, use `machine.initialState`:

```js
console.log(
  lightMachine.transition(lightMachine.initialState, { type: 'TIMER' }).value
);
// => 'yellow'
```

When a composite state is entered, its initial state is immediately entered as well. In the following example:

- the `'red'` state is entered
- since `'red'` has an initial state of `'walk'`, the `{ red: 'walk' }` state is ultimately entered.

```js
console.log(lightMachine.transition('yellow', { type: 'TIMER' }).value);
// => {
//   red: 'walk'
// }
```

When a simple state does not handle an `event`, that `event` is propagated up to its parent state to be handled. In the following example:

- the `{ red: 'stop' }` state does _not_ handle the `'TIMER'` event
- the `'TIMER'` event is sent to the `'red'` parent state, which does handle it.

```js
console.log(lightMachine.transition({ red: 'stop' }, { type: 'TIMER' }).value);
// => 'green'
```

If neither a state nor any of its ancestor (parent) states handle an event, no transition happens. In `strict` mode (specified in the [machine configuration](./machines.md#configuration)), this will throw an error.

```js
console.log(lightMachine.transition('green', { type: 'UNKNOWN' }).value);
// => 'green'
```

repository: michaelfriedman/xstate

repo_name: michaelfriedman/xstate


text:
# Distributed Training using TensorFlow and Horovod on Amazon EKS with ImageNet Data

This document explains how to perform distributed training on [Amazon EKS](https://aws.amazon.com/eks/) using TensorFlow and [Horovod](https://github.com/uber/horovod) with [ImageNet dataset](http://www.image-net.org/). The following steps can be ued for any data set though.

## Pre-requisite

1. Create [EKS cluster using GPU with Kubeflow](../../eks-gpu.md).

1. Create an [EFS](https://aws.amazon.com/efs/) and mount it to any worker node as explained in [Setup EFS on EKS](../../efs-on-eks-worker-nodes.md).

1. Download and put prepare ImageNet dataset on EFS path `/imagenet`. Please check [tutorial](#download-and-preprocess-imagenet-data)

## Steps

1. Follow [steps](tensorflow-horovod-synthetic.md#install-mpi-operator) to install mpi-operator

1. Prepare Persistent Volumne (PV) and Persistent Volume Claim (PVC)

   - Create the Persistent Volume (PV) based on EFS. You need to update the name of EFS server in the Kubernetes manifest file. Storage capacity based on dataset size and other requirements can be updated as well.

      ```
      kubectl create -f samples/imagenet/distributed_training/dist_pv.yaml
      ```

    - Create the Persistent Volume Claim (PVC) based on EFS. The storage capacity based on PV's capacity may adjusted in the manifest. The storage capacity of PVC should be the at most storage capacity of PV.

      ```
      kubectl create -f samples/imagenet/distributed_training/dist_pvc.yaml
      ```

    - Make sure that PV has been claimed by PVC under same namespace:

      ```
      kubectl get pv -n kubeflow

      NAME       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                              STORAGECLASS   REASON   AGE
      nfs-data   85Gi       RWX            Retain           Bound    kubeflow/nfs-external   nfs-external            58s
      ```

1. Prepare training job. Check [here](tensorflow-horovod-synthetic.md#launch-mpi-training-job) for more details

   ```
   export JOB_NAME=tf-resnet50-horovod-job
   ks generate mpi-job-custom ${JOB_NAME}

   ks param set ${JOB_NAME} image "mpioperator/tensorflow-benchmarks:latest"
   ks param set ${JOB_NAME} replicas 2
   ks param set ${JOB_NAME} gpusPerReplica 4

   EXEC="mpirun,-mca,btl_tcp_if_exclude,lo,-mca,pml,ob1,-mca,btl,^openib,--bind-to,none,-map-by,slot,-x,LD_LIBRARY_PATH,-x,PATH,-x,NCCL_DEBUG=INFO,python,scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py,--data_format=NCHW,--batch_size=256,--model=resnet50,--optimizer=sgd,--variable_update=horovod,--data_name=imagenet,--use_fp16,--nodistortions,--gradient_repacking=8,--data_dir=/data/imagenet"
   ```
   > Note: Instead of using synthetic data, job will read from `--data_dir`.

1. Right now, `mpi-job-custom` doesn't support volume in jsonnet, we can manually mount volumes.

   ```
   ks show default -c ${JOB_NAME} > /tmp/training_job.yaml
   vim  /tmp/training_job.yaml # add volumes
   ```
   Please check [template](../../samples/imagenet/distributed_training/mpi-job-template-nfs.yaml)

1. Deploy training job
   ```
   ks apply default -c ${JOB_NAME}
   ```

1. Check pod status and logs
    ```
    POD_NAME=$(kubectl -n kubeflow get pods -l mpi_job_name=${JOB_NAME},mpi_role_type=launcher -o name)

    kubectl -n kubeflow logs -f ${POD_NAME}
    ```

    Here is a [sample output](logs/tensorflow-horovod-imagenet-log.txt).

## Appendix

### Download and Pre-process ImageNet Data

If you work for Amazon, then reach out to the authors of this document to have access to the data. Otherwise, follow the instructions below.

1. Download [ImageNet](http://image-net.org/download-images) dataset to EFS in the `data` directory. This would typically be in the directory `/home/ec2-user/efs/data`. Use `Download Original Images (for non-commercial research/educational use only)` option.

2. TensorFlow consumes the ImageNet data in a specific format. You can preprocess them by downloading and modifying the script:

    ```
    curl -O https://raw.githubusercontent.com/aws-samples/deep-learning-models/master/utils/tensorflow/preprocess_imagenet.sh
    chmod +x preprocess_imagenet.sh
    ```

    The following values need to be changed:

    * `[your imagenet account]`
    * `[your imagenet access key]`
    * `[PATH TO TFRECORD TRAINING DATASET]`
    * `[PATH TO RESIZED TFRECORD TRAINING DATASET]`
    * `[PATH TO TFRECORD VALIDATION DATASET]`
    * `[PATH TO RESIZED TFRECORD VALIDATION DATASET]`

    Execute the script:

    ```
    ./preprocess_imagenet.sh
    ```


text:
# Description
This is a recipe application. The user can see recipes by category, and they can see all of the recipes offered. The user can also add a recipe to the application.

#Instructions
  * Fork and clone repo
  * Run custom rake file `rake dcms`

# Licensing Statement
  * This project has been licensed under the MIT open source license.

gha_language: Ruby


text:
This folder contains my fuzzing results of Mirai malware.

1. server.py is a fake C&C server and victim's HTTP server used to trigger DoS in Mirai.
2. The folder ```crashes``` contains malformed HTTP responses that trigger DoS in Mirai.
3. The folder ```Mirai``` is slightly modified (makes Mirai easier to fuzz and compile) version of Mirai.

    a. You need to run ``` ./build.sh debug telnet``` to be able to compile Mirai and ```debug/mirai.dbg``` to run it.

    b. You can find original Mirai code here https://github.com/m0n0ph1/malware-1/tree/master/Mirai
4. This is my working folder, you can find fuzzer stats in the Mirai folder.
5. Video https://drive.google.com/file/d/1WQTSRcBAYVAKUa84Tjdga71dhOD5vPpP/view?usp=sharing

Source code of Mirai provided only for educational purposes.


text:
# Couchbase Batch Sink

Description
-----------
This sink writes to a Couchbase bucket.

Configuration
-------------

**Reference Name:** Name used to uniquely identify this sink for lineage, annotating metadata, etc.

**Nodes:** List of nodes to use when connecting to the Couchbase cluster.

**Bucket:** Couchbase bucket name.

**Key Field:** Which input field should be used as the document identifier. Identifier is expected to be a string.

**Operation**: Type of write operation to perform. This can be set to Insert, Replace or Upsert. For more information,
see [Primitive Key-Value Operations].

[Primitive Key-Value Operations]:
https://docs.couchbase.com/java-sdk/2.7/core-operations.html#crud-overview

**Username:** User identity for connecting to the Couchbase.

**Password:** Password to use to connect to the Couchbase.

**Batch Size**: Size (in number of records) of the batched writes to the Couchbase bucket.
Each write to Couchbase contains some overhead. To maximize bulk write throughput,
maximize the amount of data stored per write. Commits of 1 MiB usually provide the best performance. Default value
is 100 records. For more information, see [Batching Operations].

[Batching Operations]:
https://docs.couchbase.com/java-sdk/2.7/batching-operations.html

Data Types Mapping
----------

    | CDAP Schema Data Type | Couchbase Data Type   | Comment                                            |
    | --------------------- | --------------------- | -------------------------------------------------- |
    | boolean               | Boolean               |                                                    |
    | bytes                 | String                | base64 encoded String                              |
    | string                | String                |                                                    |
    | date                  | String                | Date string in the following format: yyyy-MM-dd    |
    | double                | Number                |                                                    |
    | decimal               | Number                |                                                    |
    | float                 | Number                |                                                    |
    | int                   | Number                |                                                    |
    | long                  | Number                |                                                    |
    | time                  | String                | Time string in the following format: HH:mm:ss.SSS  |
    | timestamp             | String                | Timestamp string in the following format:          |
    |                       |                       | yyyy-MM-ddTHH:mm:ss.SSSZ[UTC]                      |
    | array                 | Array                 |                                                    |
    | record                | Object                |                                                    |
    | enum                  | String                |                                                    |
    | map                   | Object                |                                                    |
    | union                 |                       | Depends on the actual value. For example, if it's  |
    |                       |                       | a union ["string","int","long"] and the value is   |
    |                       |                       | actually a long, the Couchbase document will have  |
    |                       |                       | the field as a Number. If a different record comes |
    |                       |                       | in with the value as a string, the Couchbase       |
    |                       |                       | document will end up with a String for that field. |

repository: data-integrations/couchbase

branch_name: refs/heads/develop

gha_language: Java

repo_name: data-integrations/couchbase


text:
__Informal disclaimer:__ Craystack is experimental software for prototyping and research in lossless compression. We will change (and probably break) parts of Craystack, and do not make any guarantees about API stability.

# Craystack [![DOI](https://zenodo.org/badge/155861648.svg)](https://zenodo.org/badge/latestdoi/155861648) [![craystack](https://github.com/j-towns/craystack/actions/workflows/tests.yml/badge.svg)](https://github.com/j-towns/craystack/actions/workflows/tests.yml)

The basic building blocks for doing lossless compression are

1. Data to compress.
2. A (probabilistic, generative) model for the data. You'll need to be able to
   evaluate the likelihood (or ELBO) of the data under this model so no GANs
   allowed!
3. Software to do the compression, given data and a model.

Craystack is software to do compression, given data and model.

Craystack is based on **codecs**. In Craystack a codec is a pair of functions,
one for mapping data to a compressed representation (encoding) and one for
mapping back again (decoding). Simple codecs are provided, along with codec
builders for various kinds of model.

The codecs in Craystack are

 - **Composable**, meaning you can combine and mix them to code different
   combinations of data types, according to sophisticated models, in parallel or
   in series.
 - **Stacky**, meaning last-in-first-out (LIFO). The last item that an encoder
   compresses will be the first item that a decoder decompresses.

The core of Craystack is a vectorized version of Asymmetric Numeral Systems (ANS),
implemented using NumPy. ANS is a last-in-first-out (i.e. stack-like) entropy
coding method, invented by Jarek Duda. The vectorized method is based
on a [paper](https://arxiv.org/abs/1402.3392), and [accompanying code](
https://github.com/rygorous/ryg_rans), by Fabian Giesen. Jamie has also written
an accessible [tutorial on ANS](https://arxiv.org/abs/2001.09186), with
a pedagogical implementation at https://github.com/j-towns/ans-notes.

# Installation
To install craystack:

```bash
git clone git@github.com:j-towns/craystack.git
cd craystack
pip install -e .
```

Then to run the tests do

```bash
pytest
```

you may have to install pytest with

```bash
pip install pytest
```
# Example: compress the MNIST test set in a few seconds using BB-ANS
Note: this requires pytorch to be installed.

In the examples directory, run `python binary_mnist_vae.py mnist_data`. This
compresses the MNIST test set using a small VAE model, using the BB-ANS
algorithm. This uses the [VAE codec](craystack/bb_ans.py#L39), and runs in a
few seconds thanks to the vectorization of craystack.

# Authors
Craystack was written by [Jamie Townsend](https://j-towns.github.io), [Tom Bird](https://tom-bird.github.io/) and [Julius Kunze](https://juliuskunze.com/). If you use Craystack in your research, please cite [this paper](https://openreview.net/forum?id=r1lZgyBYwS). Bibtex:

```
@inproceedings{
townsend2020hilloc,
title={Hi{\{}LL{\}}oC: lossless image compression with hierarchical latent variable models},
author={James Townsend and Thomas Bird and Julius Kunze and David Barber},
booktitle={International Conference on Learning Representations},
year={2020},
url={https://openreview.net/forum?id=r1lZgyBYwS}
}
```

repository: j-towns/craystack

gha_license_id: NOASSERTION

repo_name: j-towns/craystack


text:
For example, consider the following program:

``` Go
// +build go1.7
package example

import (
	"net/http"
)

// Foo is a useless const in the scheme of things
const Foo = "item"

// B is a mock type just for the sake of adding a type to const declarations
type B string

// Contents of this block shouldn't really be used for anything
const (
	Bar B = "bar"
	Baz B = "baz"
)

// Contents of this block should also be ignored
const (
	Bak B = http.MethodGet
)
```

Running goalias over it would produce the following:

``` Go
// +build go1.9
package example

import (
    original "github.com/marstr/goalias/testdata/example"
)

const Foo = original.Foo

type B = original.B

const (
    Bar B = original.Bar
    Baz B = original.Baz
)

const (
    Bak B = original.Bak
)
```
## Motivation

Why would we want such a program? For starters, there is the trivial justification of wanting to rename a package without breaking people who still target the old name. This would saferly allow for that.

However, over on the [Azure/azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go), we ran into a far more interesting scenario. For better or worse, we wanted to allow for folks to use the latest version of the SDK to target any API Version of any service. This leads to a large matrix of packages that do more or less the same thing, and a little confusion for folks while writing import statements. To allow for more readable documentation, and quicker identification of which packages will be supported in which environments, Azure & Azure Stack are adding a concept of "Profiles". ([More loosely related reading about that here](https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-version-profiles)). Profiles create an interesting situation, where we basically want to expose exactly the same code through different namespaces.

To allow for duplicating types across namespaces, [go1.9's introduction of alias types](https://tip.golang.org/doc/go1.9#language) helped out tremendously. This allows for multiple symbols to target a single identity. There won't need to be any casting or composition while passing between identical API Versions, _alias types are just the same as the original_.

However, in addition to types, there are a lot of other top-level items that reside in a package.To fully replace an import statement, we need to replicate all of those items. `const` delcarations are trivial, as we just map the original declaration to a `const` in the new package of the same name. `func` declarations are also relatively easy, we can simply create a function in the new package that targets the orignal function. These functions should be inlined, so they will be invisible at runtime. Because Go is a functional language there are other options here, but I won't get into that now!

Lastly, we're left with global variables. These are somewhat troublesome, as unlike all of the previously mentioned types, they're mutable. The safest way to deal with them would be to create pointers to the original with the same name. However, this would represent this tool's first departure from truly identical types. At the moment of writing this README, I haven't implemented support for global variables so that I can defer that decision. My recommendation is to skip global variables anyway, they smell bad.

repository: marstr/goalias

repo_name: marstr/goalias


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.14.1] - 2021-10-22

### Fixed
* Fixed panic when providing no argument for `timetrace start` (#199)

## [0.14.0] - 2021-10-02

### Added
* Add support for tags (#183)
* Add support for durations in decimal format (#180)
* Introduce `@ID` notation for selecting records (#116)

### Changed
* Print colliding records as table when a collision occurs (#174)

## [0.13.0] - 2021-08-10

### Added
* Add support for per-project configuration (#166)
* Add support for making projects billable by default (#166)
* Add support for deleting and reverting projects with their modules (#160)
* Add support for restoring records associated with a restored project (#160)
* Add `--non-billable` flag for `timetrace start` command (#172)
* Add `--non-billable` flag for `timetrace report` command (#142)

### Changed
* Ask the user whether they want to delete all records when deleting a project (#160)

## [0.12.0] - 2021-07-30

### Changed
* `timetrace report`: Include project modules when filtering for a project (#143)

### Fixed
* Don't consider any backup records for calculations (#162)

### Other
* Refactorings and optimizations (#146, #164)
* Preparations for the larger and relevant 0.13.0 release

## [0.11.1] - 2021-07-05

### Changed
* Default to 'no' when asking the user for confirmation (#147)
* Ask the user for confirmation when deleting a project (#147, #155)
* Don't allow creation of records in the future (#152)

### Fixed
* Fix nil pointer dereference when checking record collisions (#150)
* Fix typos in documentation (#149)

## [0.11.0] - 2021-06-26

### Added
* Add `create record` command (#118)
* Add beta support for reports (#99)

## [0.10.0] - 2021-06-15

### Added
* Add `--output` flag for `timetrace status` (#129)
* Add `--format` flag for `timetrace status` (#114, #123, #124)
* Add Starship support
* Add Scoop support

### Changed
* Remove seconds from printed durations (#113)

## [0.9.0] - 2021-06-09

### Added
* Add the total tracked time for all listed records to `timetrace list records` (#106)

## [0.8.0] - 2021-06-06

### Added
* Introduce the `--revert` flag for `edit record`, `delete record`, `edit project` and `delete project` (#93)
* Add the overall break time for `timetrace status` (#100)

## [0.7.2] - 2021-06-04

### Fixed
* Fix critical error when starting tracking if there are no existing records (#103)

## [0.7.1] - 2021-06-02

### Fixed
* Fix unhandled error in `edit record` command if there are no tracked records (#96)

## [0.7.0] - 2021-05-30

### Added
* Add support for project modules

### Changed
* Consider project modules when filtering projects (#63)
* Display project modules when listing projects (#70)
* Require parent projects to exist when creating a module (#80)

## [0.6.1] - 2021-05-26

### Fixed
* Fix `timetrace stop` command (#86)

## [0.6.0] - 2021-05-26

### Added
* Add `timetrace edit record` command (#51)
* Add `latest` alias for `timetrace edit record` (#73)

### Changed
* Use an info output for `timetrace status` when there's no active tracking (#65)
* Always adhere to the `use12hours` setting for date- and time input and output (#67)

### Fixed
* Don't allow edting of incomplete records (#69)
* Don't allow re-creation of existing projects (#79)

## [0.5.0] - 2021-05-22

### Added
* Add record key to `list records` output (#44)
* Add `--project` filter to `list records` (#62)

### Changed
* Make command syntax and help sensible to `use12hours` in `config.yaml` (#44, #54)

### Fixed
* Fix Docker image labels (#35)

## [0.4.0] - 2021-05-20

### Added
* Add support for Bash autocompletion (#25)
* Add support for Snap (#31)
* Add filter for billable records (#33)

### Changed
* Use non-error output for `timetrace version` (#45)
* Colorize and stylize tables (#26, #48, #49)

## [0.3.1] - 2021-05-18

### Changed
* Introduce the `today` and `yesterday` aliases for `timetrace list records` (#32)
* Preview the target record and ask for confirmation when deleting a record (#37)

## [0.3.0] - 2021-05-17

### Added
* `timetrace delete record` command (#22)

### Changed
* Add project name to the output of `list records` (#24)

## [0.2.1] - 2021-05-16

### Changed
* Beautified output of time durations (#20)

### Fixed
* Fix `timetrace status` if there was no time tracking yet (#18)

## [0.2.0] - 2021-05-16

### Added
* `timetrace list records` command (#16)

## [0.1.4] - 2021-05-14

### Fixed
* Fix calculation of total tracked time

## [0.1.3] - 2021-05-14

### Fixed
* Fix determination of latest stored record

## [0.1.2] - 2021-05-14

### Fixed
* Support slashes and back-slashes in project keys (#9)

## [0.1.1] - 2021-05-14

### Fixed
* Fix status report for situations where time tracking is not active (#7)

## [0.1.0] - 2021-05-13

### The initial timetrace release.

repository: thatInfrastructureGuy/timetrace

branch_name: refs/heads/main

repo_name: thatInfrastructureGuy/timetrace


text:
# intothesource/deploy

Deploy helper without an interesting name

## Background

CI/CD helper for deploying PHP (Laravel) applications. Into the Source manages deployments for many different types of hosting platforms, where FTP seems to be the lowest common denominator. Some hosts also support SSH, but the fact that it is not available in some cases poses some challenges.

The aim for this project is to offer tools to tackle these challenges to provide a robust solution for deploying applications.

Tasks (in order)

1. Prepare
2. Lint
3. Build
4. Test
5. Backup
6. Deploy
7. Migrate
8. Rollback

## Solution

This repo provides tasks runners for all of the above. These are designed to be integrated with Gitlab CI/CD. But, rather than relying only on Gitlab CI/CD, this project provides a more standardized solution that should be easier to standardize over many projects.

We will be using our own backend to store backups build artifacts and caches to avoid any issues with gitlab's ephemeral storage.

repository: intothesource/deploy

repo_name: intothesource/deploy


text:
# Angular6Example

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.3.

Angular 8 just got released this May and here is the article for [Angular 8 CRUD example](https://www.devglan.com/angular/angular-8-crud-example).

repository: chaibio/chaipcr

repo_name: chaibio/chaipcr


text:
# Migrating to webpack-blocks v1.0

This is the migration guide for upgrading from webpack-blocks v0.4 to v1.0. It is a major update
with a couple of breaking changes.

The first section covers the changes you have to make to your webpack-blocks configuration. The
second section covers additional new features that you can use. The last section covers how to
upgrade your custom blocks.

## Table of Contents

<!-- To update run: npx markdown-toc --maxdepth 2 -i docs/MIGRATION-GUIDE.md -->

<!-- toc -->

- [Migrating configuration](#migrating-configuration)
- [Additional features](#additional-features)
- [Migrating custom blocks](#migrating-custom-blocks)

<!-- tocstop -->

## Migrating configuration

### `match()`

You can now use `match()` to specify on which files to apply certain loaders. Works with every block
that adds a loader, like `babel`, `css`, `elm`, `postcss`, `sass`.

The blocks still work without `match()`. **However, blocks dropped the `fileType`, `exclude` &
`include` from their options. Use `match()` for that.**

```js
const { createConfig, css, file, match, postcss, url } = require('webpack-blocks')
const path = require('path')

module.exports = createConfig([
  // Matches *.js and *.jsx outside node_modules/ by default
  babel(),

  match(['*.css', '!*node_modules*'], [css(), postcss()]),

  match(['*.gif', '*.jpg', '*.jpeg', '*.png', '*.svg', '*.webp'], [file()])
])
```

### `@webpack-blocks/assets` package

The `assets` package contains the `css`, `css.modules`, `file` and `url` blocks which were contained
in `@webpack-blocks/webpack` in v0.4. Use these blocks to configure a `css-loader`, `file-loader` or
`url-loader`.

See the package's [README](../packages/assets/README.md) for further details.

### `webpack-blocks` package

The new `webpack-blocks` package can be installed using `npm install --save-dev webpack-blocks`. It
is a convenience package, wrapping and exporting most of frequently used blocks, so you don't have
to manage all those small package dependencies by yourself. Contains:

- assets
- babel
- dev-server
- extract-text
- postcss
- sass
- typescript
- uglify
- webpack

It also exports all the `@webpack-blocks/webpack` utility functions. See the package's
[README](../packages/webpack-blocks/README.md) for further details.

### No more webpack v1

Support for webpack 1.x has been dropped. If you have not upgraded yet we recommend doing so soon.

### webpack v3 is the default

Most blocks should still work with webpack v2, but the latest `@webpack-blocks/extract-text`
requires webpack v3.

To use it with webpack v2, install the older beta version. See the package's
[README](../packages/extract-text/README.md) for further details.

### webpack as a peer dependency

Webpack is now a peer dependency of `@webpack-blocks/webpack`. Make sure to explicitly
`npm install --save-dev webpack`.

### babel6 is now babel

The `@webpack-blocks/babel6` package has been renamed to `@webpack-blocks/babel`. You can now choose
which version of babel to use, since `babel-core` is now a peer dependency (see below).

### babel-core as a peer dependency

`babel-core` is now a peer dependency of the `babel` block, so you can control which version of
`babel-core` to use. Make sure to `npm install --save-dev babel-core` in your application.

### `webpack` no longer exported

`webpack` is no longer exported by `@webpack-blocks/webpack`. Use
`const webpack = require('webpack')` instead which is more explicit.

### `resolve()` instead of `resolveAliases()`

The `resolveAliases` utility in `@webpack-blocks/webpack` has been replaced by the more generic
`resolve`.

```diff
module.exports = createConfig([
-  resolveAliases({ package: path.resolve('./src/package') })
+  resolve({
+    alias: { package: path.resolve('./src/package') }
+  })
])
```

### Removed `devServer.reactHot()`

The `devServer.reactHot()` block has never worked too well. We also decided not to ship
framework-specific blocks as core features.

If you feel like this is a feature you really want to have, create a new fancy React hot loader
block and share it with the world!

### Requiring Node.js 6+ now

Please use node 6 or newer. We don't transpile the webpack-blocks code for legacy node versions
anymore.

---

## Additional features

### `@webpack-blocks/uglify` package

The `uglify` package is a convenience block for easily configuring JS minification using the
[uglifyjs-webpack-plugin](https://www.npmjs.com/package/uglifyjs-webpack-plugin) which also supports
minifying untranspiled ES2015 code.

See the package's [README](../packages/uglify/README.md) for further details.

### `setEnv()`

New utility block in `@webpack-blocks/webpack`. Replaces constants in your source code with a values
from `process.env` using the
[webpack.EnvironmentPlugin](https://webpack.js.org/plugins/environment-plugin/).

Using `setEnv` multiple times results in a single EnvironmentPlugin instance configured to do all
the replacements.

```js
module.exports = createConfig([
  setEnv(['NODE_ENV']),
  setEnv({
    BABEL_ENV: 'development', // use 'development' unless process.env.BABEL_ENV is defined
    PORT: 3000
  })
])
```

### `resolve()` will prepend custom `extensions` (instead of appending them)

The new `resolve` utility in `@webpack-blocks/webpack` will prepend custom `extensions` you pass to
it, rather than appending them.

This way extensions you set later in your `createConfig()` will have precedence over extensions you
set earlier (webpack tries to match against the `extensions` from the first to last).

---

## Migrating custom blocks

### A concise migration example

A simple Babel block written for the old v0.4 API would look like this:

```js
function babel() {
  return context => ({
    module: {
      loaders: [
        {
          test: context.fileType('application/javascript'),
          loaders: ['babel-loader']
        }
      ]
    }
  })
}
```

The same block updated for the v1.0 API:

```js
function babel() {
  return (context, { addLoader }) =>
    addLoader(
      Object.assign(
        {
          test: /\.(js|jsx)$/,
          use: ['babel-loader']
        },
        context.match
      )
    )
}
```

### New API (#125)

In webpack-blocks v1.0 a block is now expected to have the signature

```diff
- (context) => configDiff
+ (context, utils) => prevConfig => updatedConfig
```

This way the block has more freedom about how to apply changes to the configuration. To keep writing
custom blocks simple, the block will receive a `utils` argument. It contains:

- `utils.addLoader(loaderDefinition: object)`
- `utils.addPlugin(plugin: WebpackPlugin)`
- `utils.merge(configSnippet: object)`

These utility functions return an updater function `prevConfig => updatedConfig`. For details see
[How to Write a Webpack Block](./BLOCK-CREATION.md).

### `context.match`

A small change in the block is required to support the new `match()`. Under the hood `match()` will
set `context.match` to an object
`{ test: RegExp, include: string|RegExp|string[]|RegExp[], exclude: string|RegExp|string[]|RegExp[] }`.
`test` is always set, `include` and `exclude` are optional.

The properties of `context.match` match the properties you would pass to a webpack loader to define
the files the loader should be applied to. This way you can just merge `context.match` into your
webpack loader configuration.

### `context.fileType` is deprecated

The `context.fileType()` function is now deprecated. Just use `context.match.test` and provide a
hard-coded RegExp as a default.

### See "How to Write a Webpack Block" (`/docs/BLOCK-CREATION.md`)

For more details you can check out [How to Write a Webpack Block](./BLOCK-CREATION.md).

### Added "How to test blocks" (`docs/TESTING.md`)

There is now a testing best-practices guide as well! See [How to test blocks](./TESTING.md).

repository: andywer/webpack-blocks

gha_language: JavaScript

repo_name: andywer/webpack-blocks


text:
# Linked List Merge

There are a significant amount of edge cases to be considered with this DSA.  Inserting a new node into a list is tricky enough by itself, but being able to hop back and forth between two lists and set each node as the desired node is a whole new ball game.  Check it out below to see how I approached a solution!

## Challenge

Given two linked lists, merge them into one list, alternating nodes from each list \(see white board diagram\).

## Approach and Efficiency

My partner and I spent about a half an hour working through a white board solution for this challenge, after which we had a generally decent idea of how to move forward with writing the code.  Once getting into the code, the solution presented far more problems than anticipated.  This was a very intricate challenge to find a solution for, but thus far I am keeping memory allocation to an O\(1\) solution, and time efficiency has remained at O\(n\).

As far as the code is concerned, I started with very small tests to make sure the program dependencies and references were set up properly, and then started breaking down the problem one step at a time.  There were many infinite loops, but once I got the loop situation fixed, every new turn presented a new null reference exception.  The solution is not fully implemented yet, but I think some specific and clever refactoring will lead me to an ultimate solution.  The code I have thus far is all functioning as expected, but a deeper level of refactoring will be the difference.

![White Board Solution](assets/lab08Merge.png)

## The Code

[Check the Code!](../Challenges/LinkedListChallenges.cs)

gha_language: C#


text:
Personal Tennis Scheduler

This repository differs from the Duval Tennis Scheduler
in that it is intended for a single user and incorporates
multiple leagues and tennis activities.

Instead of automating the tennis league management (as in Duval), this
app assumes manual league management by the league moderator and manual
communication of play schedules.  This app then allows rapid data entry of
the tennis schedule so that it can be displayed on a smart phone and
interfaced with Home Assistant.

repository: jcerullo/tennis

gha_language: PHP

repo_name: jcerullo/tennis


text:
### Description
This example reads a polygonal data (.vtp) file.
An example data set can be found at [Torso.vtp](https://gitlab.kitware.com/lorensen/VTKExamples/raw/master/Testing/Data/Torso.vtp)

repository: adithyakoundinya/VTKExamples

gha_language: HTML

repo_name: adithyakoundinya/VTKExamples


text:
Color Spark for Figma

# overview

Color Spark has minimalisitc user inferance and allows anyone to search for schemes, import them into their files, customize/use them, and boom. It's as simple as that. The better part? It's all free. All colours are from a variety of sources including OpenColor, TailwindCSS, MaterialUI, and more.

# installation

Direct from Figma: Color Spark Installation

Or do it yourself:

1. Go to Figma
2. Click "Community" on the sidebar (on the left)
3. On the top search for "Color Spark"
4. Head over to the plugins tab (just below the search)
5. Click it and press install

# assets

# thanks

Massive thanks to everyone for installing the plugin, supporting me, or just reading any of this (as well as any future contributors). I also want to say thank you to all the color/scheme providers including but not limited to OpenColor, TailwindCSS, and MaterialUI.

Bereket Semagn - Creator

Find me on **Twitter** - @heybereket

repository: hirajanwin/color-spark

repo_name: hirajanwin/color-spark


text:
# FMListPlaceholder
![](https://ws1.sinaimg.cn/large/006tNc79gy1fz8ipkdw88j30va0b4q48.jpg)

[![platform](https://img.shields.io/badge/platform-iOS-blue.svg?style=plastic)](#)
[![languages](https://img.shields.io/badge/language-objective--c-blue.svg)](#)
[![cocoapods](https://img.shields.io/badge/cocoapods-supported-4BC51D.svg?style=plastic)](https://cocoapods.org/pods/FMListPlaceholder)
[![support](https://img.shields.io/badge/support-iOS9%2B-orange.svg)](#)

#### [**中文说明**](https://github.com/yfming93/FMListPlaceholder/blob/master/README_Chinese.md)

A delightful Placeholder for List View (UITableView, UICollectionView).

**One line code handle empty list placeholder logic.**

### 0x001 Different From Other Similar：

- Placeholders are not displayed at first time while you enter the list. The logic is processed when the list is refreshed again after network request is completed.
- Simple, efficient and practical, one line code can be integrated;
- Provide a more comprehensive and highly customized effect.
- The default effect can be replaced with one line code. Set your own global default effects. You can also customize the effect again in a special list.

### 0x002 Renderings
![](https://ws1.sinaimg.cn/large/006tNc79gy1fz8jghf5d0g30hj0dsx6p.gif)

### 0x003 How to use
- Use CocoaPods:
    - write `pod "FMListPlaceholder"` in the `Podfile` file.
    - Open terminal, cd the directory of project. run `pod install`.
    - Import the main file：`#import <FMListPlaceholder.h>`
- Manual import：
    - Drag All files in the `FMListPlaceholder` folder to project.
    - Import the main file：`#import "FMListPlaceholder.h"`

##### One Line Use
    _tableView.needPlaceholderView = YES;   //the same as UICollectionView

Or Use Below
##### Custom Global Default

``` objc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [FMListPlaceholder fm_defaultBackgroundColor:UIColor.whiteColor coverName:@"xxx" tips:@"Sorroy,nil here!" tipsTextColor:UIColor.grayColor tipsFont:[UIFont systemFontOfSize:16] coverSize:CGSizeZero coverCenterYOffset:-30 coverSpaceToTips:10];

    return YES;
}
```
#### 0x004 Custom
##### Custom One List

``` objc
[_tableView fm_emptyCoverName:@"fm_placeholder_nil" emptyTips:@" "];
[_tableView fm_backgroundColor:[UIColor colorWithRed:0.91 green:0.90 blue:0.90 alpha:1.00] tipsTextColor:UIColor.redColor tipsFont:nil];
[_tableView fm_coverCenterYOffset:-80 coverSize:CGSizeMake(90, 120) coverSpaceToTips:20];
// the same as UICollectionView
```
<br/>

##### Click Reload Handle

``` objc
_tableView.reloadBlock = ^(UIScrollView *listView) {
  // Reload Handle is Here!
  // [listView.mj_header beginRefreshing]; // reloadData
};
```
##### Details (See the example program FMListPlaceholderExample for details)

### 0x005 Hope
- If you have any questions during the process or want more interfaces to customize，you can issues me!
Instead of giving me star, it is better to throw a bug to me!
- If you want to participate in the maintenance of this project or have a good design style, welcome to pull request!
- If you feel slightly discomfort in use, please contact me.
    - BLOG SITE: [www.yfmingo.cn](www.yfmingo.cn)
    - Email<EMAIL_ADDRESS>- Hope to improve this project together, let it become more powerful, able to meet the needs of most users!

### 0x006 QQ Chat Room
![](https://ws3.sinaimg.cn/small/006tNc79gy1fz8aavckscj30f10kl0us.jpg)

### 0x007 Requirements
- iOS 9.0 or later
- Xcode 9.0 or later

### 0x008 [Licenses](https://github.com/yfming93/FMListPlaceholder/blob/master/LICENSE)
**All source code is licensed under the MIT [License](https://github.com/yfming93/FMListPlaceholder/blob/master/LICENSE).**

repository: trylee/FMListPlaceholder

repo_name: trylee/FMListPlaceholder


text:
**| [Overview](#overview) | [Reproducibility](#reproducibility) | [License](#license) | [Contact](#contact) |**

##  New information

*  Launch new simulations   [here](https://mybinder.org/v2/gh/aladinoster/v2v-test.git/test?filepath=General.ipynb)

# Scoop Demo

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/aladinoster/v2v-test.git/master?filepath=General.ipynb)

## Overview

The following not is oriented to reproduce and simulate some effects of sending messages from infrastructure to connected vehicles.

* The following results are reproducible by executing instructions in the [Jupyter Notebook ](General.ipynb).

|Traffic Dynamic Response |                          |
:-------------------------|:-------------------------
![](img/1-head.png "Congestion")  |  ![](img/2-gps.png "Traces")
![](img/3-acc.png "Speed")  |  ![](img/4-accel.png "Acceleration")

## Reproducibility

Download this repository

```{bash}
git clone https://github.com/aladinoster/infra_to_vehicle_speed_msg.git
```

Be sure to get [conda](https://www.anaconda.com/distribution/), then:

```{bash}
conda env create -f environment.yml
conda activate v2vcflaw
jupyter labextension install jupyterlab_bokeh
jupyter lab General.ipynb
```

## License

The code here contained is licensed under [MIT License](LICENSE)

## Contact

If you run into problems or bugs, please let us know by [creating an issue](https://github.com/aladinoster/infra_to_vehicle_speed_msg/issues/new) an issue in this repository.


text:
# Documents
技术文档库

## License
The documents is released under version 2.0 of the [Apache License][].

[Apache License]: http://www.apache.org/licenses/LICENSE-2.0

repository: ijlhjj/documents

repo_name: ijlhjj/documents


text:
# sigma-esf
Run Sigma detection rules on logs from the new MacOS Endpoint Security Framework.

This is a super simple CLI that ties together:
* [ProcessMonitor](https://github.com/objective-see/ProcessMonitor) and [FileMonitor](https://github.com/objective-see/FileMonitor) from Patrick Wardle to do the Endpoint Security Framework subscribing
* [sigma-go](https://github.com/bradleyjkemp/sigma-go) to take the stream of Endpoint Security events and match them against Sigma rules.

## Installation

1. Install ProcessMonitor and FileMonitor from https://objective-see.com/products/utilities.html
1. ⚠ Make sure you follow the (Process|File)Monitor prerequisites so that Endpoint Security Framework works properly:
    * The terminal app you're using to run `sigma-esf` needs to have "Full Disk Access" granted.
    * You need to be running `sigma-esf` as root.
1. Install `sigma-esf` using either:
    * `go install github.com/bradleyjkemp/sigma-esf`
    * `brew install bradleyjkemp/formulae/sigma-esf`

## Usage
The most basic usage of `sigma-esf` is to simply run `sudo sigma-esf` within your Sigma rules folder.

There's not much configuration available yet other than:
* Disabling either file or process events (collecting *all* events can be quite CPU intensive so disable ones you don't need)
* Pointing to a directory of Sigma rules rather than using the current directory

```
Usage of sigma-esf:
  -monitor_files
    	Whether to monitor file events (default true)
  -monitor_processes
    	Whether to monitor process creation events (default true)
  -sigma_rules string
    	Path to a directory containing the Sigma rules to run (default ".")
```

repository: Ctfbuster/sigma-esf

repo_name: Ctfbuster/sigma-esf


text:
[![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23133-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-133)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Parser-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1255) [![Raizlabs Repository](http://img.shields.io/badge/Raizlabs%20Repository-1.3.0-blue.svg?style=flat)](https://github.com/Raizlabs/maven-releases)

# Parser

Parser is a blazing fast Key-Value-to-Model object parser that uses annotation processing to generate parsing definitions for you. It enables powerful flexibility by abstracting out the parse from ```JSONObject``` so you can create your own ```Parser``` from another JSON library without changing the core of your application's code.

The library enables you to swap and easily move between different JSON libraries or __any__ key-value object. Extend the standard ```JsonParser``` or create your own ```@ParseInterface```/```Parser``` by extending ```BaseParser```.

## Getting Started

```groovy
  buildscript {
    repositories {
        maven { url "https://raw.github.com/Raizlabs/maven-releases/master/releases" }
    }
    classpath 'com.raizlabs:Griddle:1.0.3'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
  }

  allprojects {
    repositories {
        maven { url "https://raw.github.com/Raizlabs/maven-releases/master/releases" }
    }
  }

```

Add the library to the project-level build.gradle, using the [apt plugin](https://bitbucket.org/hvisser/android-apt) and the
[Griddle](https://github.com/Raizlabs/Griddle) plugin:

```groovy

  apply plugin: 'com.neenbedankt.android-apt'
  apply plugin: 'com.raizlabs.griddle'

  dependencies {
    apt 'com.raizlabs.android:Parser-Compiler:1.3.0'
    mod "com.raizlabs.android:{Parser-Core}:1.3.0"
  }

```

For using the built-in Android ```JSONObject``` library add ```Parser-JsonParser``` to the ```{}``` enclosure from the main section.

For using ```FastJSON``` [here](https://github.com/alibaba/fastjson) add ```Parser-FastJsonParser``` to the ```{}``` enclosure from the main section.

## Changelog

### 1.3.0

1. Adds ability to define custom ```ParseHandler``` either by including it in the main parse, or by overriding the parse definition creation.
2. added ```@Mergeable``` so we can merge two different sources of JSON. can configure on class or field level.

### 1.2.0

  1. Makes ```Parser``` a java library with ```Parser-Compiler```. No need to use for just Android anymore. Also, ```Parser-Core``` is now part of ```Parser``` since ```Parser``` became a java-library.
  2. Moves out ```JsonParser``` into its own Android library
  3. Creates the ```FastJsonParser``` to use with ```FastJSON```.
  4. Doc and comment improvements

### 1.1.0
  1. Changed the ```Parser``` interface by adding ```keys()```, ```count()```, and ```getObject()```. These three methods now enable iteration of data in ```ParserUtils``` and simplify some of the implementation from now on.
  2. Support for non-```Parseable``` objects in ```List``` and arrays. It will be up to the parser to return the correct values. Reference ```JSON.get()``` for an example.
  3. Deprecated ```FieldParseable``` to the better-named ```ParseListener```.
  4. Fixed broken tests and sample app
  5. Added a ```BaseParser``` to eliminate need for implementing most of the methods manually.
  6. Removed restriction on ```Parseable``` classes for having one ```@Key``` field if they implement ```ParseListener```
  7. Now can subclass other ```Parser```, which means easy inclusion into your project by extending ```JsonParser``` instead of needing to implement the ```Parser``` interface!

## Usage

### Getting Started

Before creating any parse objects, you need to define a ```Parser```by adding the ```@ParseInterface``` annotation and implementing the ```Parser<ObjectType, ListType>``` interface.

To make things simpler, all you need to do is to extend the abstract ```BaseParser``` class included in the library and add the ```@ParseInterface``` annotation. If using ```Parser-JsonParser```, extend the included ```JsonParser``` or if using ```Parser-FastJsonParser``` extend the included ```FastJsonParser```.

This will register your parser with those datatypes, so that when we call ```ParserHolder.parse()```, the ```ParserHolder``` knows how to handle the two types. You can create Parsers for other key-value data types, but they must **not** reference the same classes.

For example:

```java

@com.raizlabs.android.parser.core.ParseInterface
public class JsonParser extends com.raizlabs.android.JsonParser {
}

```

### Define a Parseable Class

Parseable classes are defined as objects that contain fields that we can parse into. You need to register each class so that
the compiler can generate its ```$ParseDefinition```. In order to do so, you need:
  1. Add the ```@Parseable``` annotation.
  2. At least 1 ```@Key``` field or implement ```ParseListener```.
  3. Have a default constructor available so when nested, we can reference the default constructor when parsing data.
  4. All fields **must** be package private or public in order for the ```$ParseDefinition``` of the class to have access to the fields when parsing.

#### Example

Simple example will look for a key named "myField" using a ```Parser``` and fill it with the ```String``` value from data passed through the ```ParserHolder```.

```java

@Parseable
public class MyParseable {

  @Key
  String myField;
}

```

### How To Parse

We wanted to make parsing as simple as possible so ```ParserHolder.parse()``` can take in any object that has a parser and turn it into the ```Parseable``` class we want.

```java

public void someMethod(JSONObject json) {
  MyParseable parsedObject = ParserHolder.parse(MyParseable.class, json);

  // or precreated
  MyParseable modelObject = new MyParseable();
  ParserHolder.parse(modelObject, json);
}

```

## Features

Parser supports a good amount of flexible features that make this library very powerful.

### Annotations

```@Parseable``` will generate a ```$ParseDefinition``` class used in parsing the object. To list to it's own Parse events,
have the class implement ```ParseListener```. Can define its own ```ParseHandler``` to either override the generated parse, or to include it in the main parse.

```@FieldParseable``` marks a field as suscribing to the parse event data of parent ```@Parseable```. Must implement the ```FieldParsible``` interface.

```@ParseInterface```: use in conjunction with ```Parser``` interface to define parsers for a type of data object. You can also extend ```BaseParser``` (for custom JSON or key-value libraries), ```JsonParser``` for android JSON, or ```FastJsonParser``` for FastJSON.

```@Key``` tells the **Parser*** what key to reference for a specific field. The key is defaulted to the name of the field. A ```defValue``` can be specified as a string to use if the value is missing from a parse. Custom objects can be instantiated too with as default value, however you need to use the fully-qualified class name of any custom class you use. The default for all types are: "false" for boolean, "0" for numbers, or a "null" equivalent for any non-primitive. If ```required()``` is true, will throw a ```ParseException``` when a key is not found.

```@Mergeable```: Enables parsing multiple sources of data into a single ```@Parseable``` or ```@Key``` field. Consequent parses to the same object will not override preset data (if that value is missing from the JSON).

```@NotMergeable```: Disables mergeability for a specific key when the parent is ```@Mergeable```.

### Supported Types

  1. All datatypes supported by the ```JSONObject``` class when using the ```JsonParser```
  2. Lists using ```List<T>```. Default list class will be ```ArrayList```
  3. Maps defined as ```Map<String, Value>```. The default is ```HashMap```.
  4. Array of any supported type
  5. Primitives will be boxed up to the corresponding classes before returning to its primitive type.
  6. Custom ```ParseListener``` classes declared as ```@FieldParseable```
  7. Strings
  8. Any ```@Parseable``` class in single, list, and map (as a value) form.

### Complex Sample

#### Parseable

Here is an example showing the various supported field types and how they are declared.

```java

@Parseable
public class ComplexClass implements ParseListener {

    @Key
    String name;

    @Key
    long date;

    @Key(defValue = "0.5d") // will use this as the default value when the $ParseDefinition is created
    double math;

    @Key
    int number;

    @Key
    boolean truth;

    @Key(required = true) // will throw a ParseException if not found
    SimpleClass otherClass;

    @Key
    SimpleClass[] simpleClasses;

    @Key
    List<SimpleClass> simpleClassList;

    @Key
    Map<String, SimpleClass> simpleClassMap;

    String hidden;

    @Key
    SimpleFieldParser simpleFieldParser;

    @Key
    List<String> lists;

    @Override
    public void parse(Object dataInstance, Parser parser) {
        hidden = (String) parser.getValue(dataInstance, "hidden", "", false);
    }
}

```

#### ParseListener

Making a class that implements ```ParseListener``` enables it to suscribe to parse events. You can retrieve values from the parser this way and do something custom. This is called at the **end** of parsing--i.e. after all other fields are parsed.

```java

@Parseable
public class AppFeatureControl implements ParseListener {

    private String hidden;

    @Override
    public void parse(Object dataInstance, Parser parser) {
      hidden = (String) parser.getValue(dataInstance, "name", "", false);
    }
}

```

repository: Hazer/Parser

repo_name: Hazer/Parser


text:
# Hashrocket on Rails

Automate setting up a new project with defaults used at Hashrocket.

This gem provides the following:

  * Loose dependencies on gems we always use
  * Common assets accessible via the asset pipeline
  * A generator that sets up a base layout & sass structure
  * An engine & generator that exposes UI comps

## Installation

Add this line to your application's Gemfile:

    gem 'hashrocket-rails'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install hashrocket-rails

## Usage

### Gem Dependencies

There are a few gems we use on every project. These have been added to the
gemspec without a version specified. It should be safe to exclude them from the
project Gemfile. If you need to lock a specific version of the gem, just add it
back to the project Gemfile.

Included gems are:

  * haml-rails
  * decent_exposure

### Generators

Run all included generators:

    $ rails g hashrocket:install

This runs a meta generator which invokes the following:

    $ rails g hashrocket:layout
    $ rails g hashrocket:ui

### Layout

The generator adds a barebones haml layout and sets up the stylesheet structure for the app.

Layout includes:

  * html5shiv
  * flash rendering
  * a yield for head content

Stylesheet structure:

  * whitespace-reset is included
  * requires all stylesheets in /vendor
  * requires all stylesheets in /global
  * does not automatically include root stylesheets
  * imports mixins

All assets required are included with the engine. You can work in the
application stylesheet out of the box.

### UI Boilerplate

At Hashrocket we expose a `/ui` route where our front-end team implements
design before it is integrated to the main app. This code is included as an
engine. There is a generator which will hook your app into the engine.

    $ rails g hashrocket:ui

This will add a route and controller `app/controllers/ui_controller.rb` which
subclasses the engine controller. This avoids the need to namespace UI files
and provides an extension point for customization.

You can now add UI comps to `app/views/ui` and they will appear at `/ui` in
your app.

You can explicitly exclude files from being shown in the UI index by adding the
following to `ui_controller.rb`.

    class UiController < Hashrocket::UiController
      exclude 'filename', 'other_filename', ->(w) { w.ends_with?('_old') }
    end

By default the `index` view & any partials are excluded.

## Contributing

The intention of this gem is to be included & used on every Hashrocket project.
As such new features need to be something we might need on every project. Pull
requests adding features specific to your workflow will likely be declined.

However, if you think we are missing something feel free to make a case for it!

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: hackhands/hashrocket-rails

repo_name: hackhands/hashrocket-rails


text:
# Pico Bulma Starter

> A starter project or boilderplate for [Pico CMS](https://picocms.org/) using the [Pico Bulma Theme](https://github.com/unicate/pico-bulma).

## More Information

- [Bulma](https://bulma.io/) is a modern CSS framework that just works.
- [Pico CMS](https://picocms.org/) is a simple and fast flat file CMS.
- [Pico Bulma](https://github.com/unicate/pico-bulma) is a lightweight Bulma theme.

## Install Project

Installation using Git:

```
git clone https://github.com/unicate/pico-bulma-starter.git my-project-name
```

Download PHP dependencies using composer:
```
composer install
```

## Disclaimer & License

This project is released under the [MIT](https://raw.githubusercontent.com/unicate/licenses/master/MIT/MIT-Licence.txt) licence.

## Finally
> Now go and build something and **make people happy**!

repository: unicate/pico-bulma-starter

repo_name: unicate/pico-bulma-starter


text:
---
title: sn.exe | Microsoft .NET Strong Name Utility
excerpt: What is sn.exe?
---

# sn.exe

* File Path: `C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\sn.exe`
* Description: Microsoft .NET Strong Name Utility
* Comments: Flavor=Retail

## Hashes

Type | Hash
-- | --
MD5 | `10FB62758B7366034D099D86CEB76895`
SHA1 | `30120DEE36C457522640A8673D3E5DF9883E4A11`
SHA256 | `0B0BFB2EE32A2A58D0D7723EDBABF635145B349830110F0D696881CC35EF143F`
SHA384 | `2268C10A32EE8FB771BA8E3E3565DAB3533663B8AF54685665A7ECC7158EC01C0D4777D81999FC1EE0876CB9DE497BE2`
SHA512 | `674D20138560AF2ABAAA4A449BABF1FD2E57B9A48FE75B60B7B0CF371AE56AF11CE1DF112A031440C0A19A2B47FBCB6B66BA8645A1D55DF4C25250E72896EC1A`
SSDEEP | `3072:pK07uWd23HeYpMmOMu2h60YpnhTwQ/YmPwkZ093cvW9T+DYWbvsVk9XocssuTyhQ:NAOMg1fYYwgHDYWEkWyuCXhP+PMS`
IMP | `BA5D103CD67C13A261C3D965ED8D6252`
PESHA1 | `ECBF28BB7F0B20F4C51E1D5181E8EAF74D35B95D`
PE256 | `E912BD107C3D7D225B44BEFE6AD748F0E303D3D4117E00A62E5B4AE9E5E9C5BC`

## Runtime Data

### Usage (stdout):
```cmhg

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Usage: sn [-q|-quiet] <option> [<parameters>]
 Options:
  -a identityPublicKeyFile identityKeyPairFile signaturePublicKeyFile
    Generate AssemblySignatureKeyAttribute data to migrate the identity key to the signature key from a file.
  -ac identityPublicKeyFile identityKeyPairContainer signaturePublicKeyFile
    Generate AssemblySignatureKeyAttribute data to migrate the identity key to the signature key from a key container.
  -c [<csp> [<provtype>] ]
    Set/reset the name of the CSP to use for MSCORSN operations.
  -d <container>
    Delete key container named <container>.
  -dg <assembly> <digest file> [-rehash]
    Compute the digest of an assembly, generating a digest file for signing by
    the -ds or -dsc commands.
    If -rehash is specified, modules are re-hashed before digest calulation
  -ds <digest file> <keyfile> [-ecma]
    Sign a digest file generated by the -dg command using the full key pair
    from the given key file.
    If -ecma is used, keyfile is treated as the real key for ECMA signing.
  -dsc <digest file> <container> [-ecma]
    Sign a digest filegenerated by the -dg command using the key in the
    specified key container.
    If -ecma is used, container is treated as the real key for ECMA signing.
  -di <digest file> <assembly>
    Insert the signature from the digest file signed by the -ds or -dsc
    commands into the assembly.
  -dh <digest file> <hash file>
    Extract the base64 encoded hash value from the digest file
  -du <signature file> <digest file>
    Update the signature in the digest file with a base64 encoded signature
    in a signature file. WARNING: using this operation may result in a digest
    file that contains an invalid signature for its corresponding assembly.
  -dd <digest file>
    Dump the digest file to the console
  -D <assembly1> <assembly2>
    Verify <assembly1> and <assembly2> differ only by signature.
  -e <assembly> <outfile>
    Extract public key from <assembly> into <outfile>.
  -i <infile> <container>
    Install key pair from <infile> into a key container named <container>.
  -k [<keysize>] <outfile>
    Generate a new key pair of the specified size and write it into <outfile>.
  -m [y|n]
    Enable (y), disable (n) or check (no parameter) whether key containers
    are machine specific (rather than user specific).
  -o <infile> [<outfile>]
    Convert public key in <infile> to text file <outfile> with comma separated
    list of decimal byte values.
    If <outfile> is omitted, text is copied to clipboard instead.
  -p <infile> <outfile> [<hashalg>]
    Extract public key from key pair in <infile> and export to <outfile>,
    embedding the specified hash algorithm (sha1|sha256|sha384|sha512).
  -pc <container> <outfile> [<hashalg>]
    Extract public key from key pair in <container> and export to <outfile>,
    embedding the specified hash algorithm (sha1|sha256|sha384|sha512).
  -Pb [y|n]
    Enable (y), disable (n) or check (no parameters) the CLR policy allowing
    trusted applications to bypass strong name signature verification on their
    assemblies.
  -q
    Quiet mode. This option must be first on the command line and will suppress
    any output other than error messages.
  -R[a] <assembly> <infile> [-ecma]
    Re-sign signed or partially signed assembly with the key pair in <infile>.
    If -Ra is used, hashes are recomputed for all files in the assembly.
    If -ecma is used, infile is treated as the real key for ECMA signing.
  -Rc[a] <assembly> <container> [-ecma]
    Re-sign signed or partially signed assembly with the key pair in the key
    container named <container>.
    If -Rca is used, hashes are recomputed for all files in the assembly.
    If -ecma is used, container is treated as the real key for ECMA signing.
  -Rh <assembly>
    Re-compute hashes for all files in the assembly.
  -t[p] <infile>
    Display token for public key in <infile> (together with the public key
    itself if -tp is used).
  -T[p] <assembly>
    Display token for public key of <assembly> (together with the public key
    itself if -Tp is used).
  -TS <assembly> <infile>
    Test-sign signed or partially signed assembly with the key pair in
    <infile>.
  -TSc <assembly> <container>
    Test-sign signed or partially signed assembly with the key pair in the key
    container named <container>.
  -v[f] <assembly> [{-ecmakey <keyfile> | -ecmacontainer <container>}]
    Verify <assembly> for strong name signature self consistency. If -vf is
    specified, force verification even if disabled in the registry.
    If -ecmakey is specified, keyfile is treated as the real ECMA key.
    If -ecmacontainer is specified, container is treated as the real ECMA key.
  -Vk <regfile> <assembly> [<userlist>] [<testkey>]
    Generate a registry script in <regfile> to register <assembly> for
    verification skipping (with an optional, comma separated list of usernames
    for which this will take effect and an optional test public key in
    <testkey>). <assembly> can be specified as * to indicate all assemblies or
    *,<public key token> to indicate that all assemblies with the given public
    key token. Public key tokens should be specified as a string of hex digits.
  -Vl
    List current settings for strong name verification on this machine.
  -Vr <assembly> [<userlist>] [<infile>]
    Register <assembly> for verification skipping (with an optional, comma
    separated list of usernames for which this will take effect and an
 optional test public key in <infile>).
 <assembly>    can be specified as * to indicate all assemblies or *,<public key token> to
    indicate that all assemblies with the given public key token. Public key
    tokens should be specified as a string of hex digits.
  -Vu <assembly>
    Unregister <assembly> for verification skipping. The same rules for
    <assembly> naming are followed as for -Vr.
  -Vx
    Remove all verification skipping entries.
  -?
  -h
    Displays this help text.

```

### Loaded Modules:

Path |
-- |
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\sn.exe |
C:\Windows\SYSTEM32\ntdll.dll |
C:\Windows\System32\wow64.dll |
C:\Windows\System32\wow64cpu.dll |
C:\Windows\System32\wow64win.dll |

## Signature

* Status: Signature verified.
* Serial: `33000001519E8D8F4071A30E41000000000151`
* Thumbprint: `62009AAABDAE749FD47D19150958329BF6FF4B34`
* Issuer: CN=Microsoft Code Signing PCA 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
* Subject: CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

## File Metadata

* Original Filename: sn.exe
* Product Name: Microsoft .NET Framework
* Company Name: Microsoft Corporation
* File Version: 4.8.4084.0 built by: NET48REL1
* Product Version: 4.8.4084.0
* Language: English (United States)
* Legal Copyright:  Microsoft Corporation.  All rights reserved.
* Machine Type: 32-bit

## File Scan

* VirusTotal Detections: 0/73
* VirusTotal Link: https://www.virustotal.com/gui/file/0b0bfb2ee32a2a58d0d7723edbabf635145b349830110f0d696881cc35ef143f/detection

MIT License. Copyright (c) 2020-2021 Strontic.


text:
# Express Note Taker
  [![license](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://choosealicense.com/licenses/mit/)
  ![GitHub language count](https://img.shields.io/github/languages/count/jackloveday-git/loveday-note-taker)
  ![GitHub top language](https://img.shields.io/github/languages/top/jackloveday-git/loveday-note-taker)

  ## Description
  A Note Taking app designed to run with Node.js Express Server.

  ## Table of Contents
  * [Installation](#installation)
  * [Usage](#usage)
  * [Credits](#credits)
  * [License](#license)
  ## Installation
  npm install

  ## Usage
  Run the app, or visit the deployed link, and use the app to take detailed notes at will.
  ![screenshot1](./public/assets/imgs/example1.png)![screenshot2](./public/assets/imgs/example2.png)![screenshot3](./public/assets/imgs/example3.png)
  Deployed Link:  https://loveday-note-taker.herokuapp.com/
  ## Credits
  Jack Loveday
  ## License
  This project is [MIT](https://choosealicense.com/licenses/mit/) licensed.

  Copyright © 2021 [JACK LOVEDAY](https://github.com/jackloveday-git)

  ## Tests
  N/A
  ## Questions
  Contact the author with any questions!

  Github link: [jackloveday-git](https://github.com/jackloveday-git)
Email<EMAIL_ADDRESS>

repository: jackloveday-git/loveday-note-taker

repo_name: jackloveday-git/loveday-note-taker


text:
# Video Difference Measurement

Measure the difference between frames in videos. The brightness changes is measured using the average change in each pixel and channel respectively for those brighter and darker. Visualization is applied using the length of green blocks. The red value stand for the absolute value of changes.

![](./attachments/demo.jpg)

(Image captured from "Men's Long Jump Final | Rio 2016 Replay" on YouTube. Available at: https://www.youtube.com/watch?v=fXIbLmlUdOQ )

## Requirements

- Windows 10 x64
- Visual Studio 2019
- OpenCV >= 4.0 (recommended 4.1.2)
- (optional) OpenH264

>For Linux users:
>
>If you are using Ubuntu or other linux system, please use OpenCV of the same version. (I haven't tested on my own yet.) A possible tutorial could be found at:
>
>https://www.learnopencv.com/install-opencv-4-on-ubuntu-18-04/

## Preparation

1. Download and install OpenCV at:

    https://sourceforge.net/projects/opencvlibrary/files/4.1.2/opencv-4.1.2-vc14_vc15.exe/download

2. Add `opencv\build\x64\vc15\bin` to the `Path` in your `Environment Variables`.

3. Open VS2019 and configure the OpenCV include and library directories in the properties "x64 Release".

    ![](./attachments/step1.png)

4. Copy the file `opencv_world412.dll` from `opencv\build\x64\vc15\bin` to `C:\Windows\System32` path. Then add the additional depandencies.

    ![](./attachments/step2.png)

5. (optional) Download OpenH264 if you would like to employ Open Source H.264 Codec. Available at:

    https://github.com/cisco/openh264/releases

5. Build from `main.cpp`.

## Usage

- Input the filename of the video for testing, and the output result filename. "*.mp4" is recommended.

- If you want to test a camera online, just modify line 10 to:

    `#define CAMERA_ONLINE 1`

- During running, press any key in video window to quit.

- If you do not provide the filename of the input and output, they are respectively the default values "input.mp4" and "output.mp4".

## Functions and TODOs

- [x] Basic function of video frame difference

- [x] Enable optical flow estimation

- [x] Support GPU acceleration of GPU by default using OpenCL

- [x] Support video resolution downsample

    - [x] Downsample only when optical flow estimation

    - [ ] Automantic down according to resolution

- [x] Check the file readable or camera available

- [ ] Process with the arguments

- [ ] Support multi version of OpenCV

    - [x] OpenCV 4.2 (>=4.0)

    - [ ] Opencv 3.x (not installed)


text:
---
title:  sf.org.numRestCallsThrottledByToken
brief: Per token number of REST calls not accepted by SignalFx; exceeded per-minute limit
metric_type: counter
---
###  sf.org.numRestCallsThrottledByToken

One value per token; number of REST calls you made to the SignalFx API that were not accepted by SignalFx, because your organization significantly exceeded its per-minute limit.

Dimension(s): `orgId, tokenId`

Data Resolution: 1 second

Note that the sum of all the values may be less than the value of `sf.org.numRestCallsThrottled`. For an explanation, see [About ByToken metrics](../readme.md#about-bytoken-metrics).


text:
---
published: false
title: i01
layout: post
author: Yu
categories: v49
hidden: true
---

| Item | Detail | Link |
|---:|---|---|
| Authors | Pedro M. Valero-Mora, Ruben Ledesma| |
| Title |Graphical User Interfaces for R | [download](http://www.jstatsoft.org/v49/i01/paper) |
| Reference |Vol. 49, Issue 1, Jun 2012 | |
| | Submitted 2012-06-03, Accepted 2012-06-03| |
| Type | Article| |
| Abstract | Since R was first launched, it has managed to gain the support of an ever-increasing percentage of academic and professional statisticians. However, the spread of its use among novice and occasional users of statistics have not progressed at the same pace, which can be attributed partially to the lack of a graphical user interface (GUI). Nevertheless, this situation has changed in the last years and there is currently several projects that have added GUIs to R. This article discusses briefly the history of GUIs for data analysis and then introduces the papers submitted to an special issue of the Journal of Statistical Software on GUIs for R.| |
| Paper | Graphical User Interfaces for R  (application/pdf, 205.4 KB)| [download](http://www.jstatsoft.org/v49/i01/paper) |
| Resources | [BibTeX](http://www.jstatsoft.org/v49/i01/bibtex) [OAI](http://www.jstatsoft.org/oai?verb=GetRecord&identifier=oai.jstatsoft/v49/i01&prefix=oai_dc)| |
| |  | [返回卷目录]({{site.baseurl}}/volume/v49.html) |

repository: yulijia/jstatsoft

repo_name: yulijia/jstatsoft


text:
Array Chunking Exercise

Given a list/array of length n and a number of length n, return a new list/array of
sub arrays/sub lists of size n. Make sure any variables outside of an even chunk are
in their own list.

Function of 2 given inputs, an array and a number
Create an empty array to push chunked values to
Iterate through the 'unchunked' array:
    retrieve the last element in the 'chunked' array (first time, it's empty/undefined)
    IF last element does not exist, or its length is equal to chunk size:
        Push a new chunk to 'chunked' array with the current element
    ELSE
        add the current element into the chunk

SLICING SOLUTION

Create empty chunked array
Create an indexing variable, set to 0
While loop - while index is less than original array length
    Push a slize of index 'size' from array into chunked
    Add size to index

repository: taddes/AlgoChallenge

repo_name: taddes/AlgoChallenge


text:
---
title: "Option: mergeTypes"
layout: markdown-raw
category: api
---
## options.mergeTypes

Specify the [view collections](view-collections.md) to merge onto the context by passing an array of collection names to `options.mergePartials`.

**Type:** `Array`

**Default:** All registered `partial` view types. The most commonly registered partial view types are `partials` and `includes`.

**Example**

Given the following configuration:

```js
app.create('pages'); // viewType is renderable by default
app.create('partials', {viewType: 'partial'});
app.create('includes', {viewType: 'partial'});

app.partial('foo', {content: 'abc'});
app.include('foo', {content: 'xyz'});

app.pages('bar', {content: '{{> foo }}'});
```

and the following option:

```js
app.option('mergeTypes', ['includes']);
```

Then rendering the page `bar`, like so:

```js
app.pages.getView('bar')
  .render(function(err, res) {
    console.log(res.content)
    // results in => 'xyz'
  });
```

repository: assemble/assemble

gha_language: CSS

repo_name: assemble/assemble


text:
# react-skeleton-starter
A react  skeleton starter using ES6,Babel and Webpack.

Setup
---

```
npm install
```

Compile
---

```
npm run compile
```

Usage
---

Start the development server with this command:

```
npm start
```


text:
# Ubuntu 18.04 provisioning playbook

This is a modular ansible playbook, which can be used to setup a new Ubuntu 18.04 instance.

This setup does its best to provide security (although I'm by no means an expert on it I tried my best through researching). The following is provided:

- build tools (compilers, git, etc...), python pip, curl, wget, mosh, tmux etc
- utilities (rsync, htop, unzip, vim, etc...)
- sysctl configuration for tuning kernel parameters
- fail2ban: scans log files and ban IPs that show malicious activity (configured for ssh)
- auth: create a sudo user with access to the docker daemon and also sets the ssh keys for it.
- timezone/ntp configured for America/Sao_Paulo.
- firewalld configuration
- services: starts all daemons from the playbook
- cleanup: do some final cleaning up (remove caches, etc...)

## Important:

- To make some benchmarks after the playbook finishes, you can use two tools:

    - stress-ng
    - ioping

On my [personal blog](https://tiagopr.nl), you can find instructions on how to use both of them.

- This playbook uses the ansible facts pattern to detect if it should or not run a role each time. Facts are a nice way to run rules in an idempotent way.

## References:
- https://www.digitalocean.com/community/tutorials/how-to-use-ansible-roles-to-abstract-your-infrastructure-environment

repository: tiagoprn/devops

repo_name: tiagoprn/devops


text:
---
id: 15
timestamp:<PHONE_NUMBER>
author: "Matt Keller"
title: "What kind of game should I make?"
---

I have been following the [video tutorials](http://udn.epicgames.com/Three/VideoTutorials.html#3D%20Buzz%20Video%20Tutorials%20-%20Using%20UDK) referenced in [[2012-05-10-game-making-tutorial|this blog post]]. They have been really informative and are very well done. The videos go very in-depth and they don't take for granted that you have watched every video/remember everything from every video so he tends to err on the side of repetition. Overall, very well done.

During this process, I started to have a growing sense of pointlessness about the whole process. All of these lessons were very interesting but I couldn't help but feel like it wasn't worth my time to learn all of this stuff if I didn't have some final project. So I wanted to come up with something that wasn't trivial(ie an FPS), wasn't a direct copy and was something I could be excited about.

I decided that an extended version of Toy Home. I think that this is a great example of a game that would provide a significant challenge, would be something that I could add new functionality to such as new classes of vehicles and the like. Finally, I am energized by the thought of being able to play this with my friends possibly in the future.

### In Sum
Toy Home is awesome and I want to make it using UDK.


text:
# find-problems
Script that finds problems with wordrpess sites on shared hosting, use it in crontab.

## Installation
Put this file into the root of your hosting and add to crontab.

## Example:
```
35 10 * * * /path/to/home/find-problems.sh 2>&1 | mail -s "Cron: Files modified today"<EMAIL_ADDRESS>>/dev/null 2>&1
```

repository: miamibc/find-problems

repo_name: miamibc/find-problems


text:
---
layout: post
title:  "10 Simple Rules for Making Good Slides"
date:   2018-09-04 14:27:57 -0400
tags: [writing, checklist]
author: Joshua Vogelstein
---

My favorite book on making slides is [Slide:ology](https://www.amazon.com/slide-ology-Science-Creating-Presentations/dp/0596522347), and my favorite website on the topic is [how to give a talk](http://www.howtogiveatalk.com/).  I also like to follow the following checklist, which I find helpful. I realize there are only nine, maybe somebody can propose a tenth?

### Words
1. [Use fewer words](http://www.howtogiveatalk.com/blog/principle-1-dont-put-words-on-slides)
1. There are no full sentences on slides.  Slides are visual cues to remind you and the audience where you are, full grammatical sentences are not necessary.
2. There are no more than 3 bullet points per slide.  Each slide "should" contain a single concise point, you can say more, but more words will distract.
3. If a slide has a title, it is an "action title", meaning that if somebody were to read merely the titles of your slides, they would understand your message.

### Pictures

2. [Show your data](http://www.howtogiveatalk.com/blog/principle-3-show-your-data) (remember this [all important data science video](https://www.youtube.com/watch?v=EF8GhC-T_Mo)).
3. No more than two slides in a row utterly lacking a visualization or graphic.  Your slides "should" be visually compelling, to support your auditorily compelling narrative.
4. Every graphic on the slide is "up to code" (see [here for a figure checklist](https://github.com/neurodata/checklists/blob/7014b4c819ddafa6a25e3cdfa2de5cec4586315f/figures.md)).

### Generic

1. Remove every pixel that does not further your point (such as [irrelevant jokes](http://www.howtogiveatalk.com/blog/principle-4-dont-tell-jokes-but-dont-avoid-humor))
5. Have 1 slide per 1 minute of talking, and plan to speak for 65%-75% of the minutes allocated to you, to help make you [finish sooner than you are done](http://www.howtogiveatalk.com/blog/principle-8-finish-when-you-are-done-preferably-sooner).
6. Have an acknowledgements slide, thanking those who have helped, ideally with pictures to remind people that these are humans.

extension: markdown


text:
[//]: # (title: Type!)

So far, Alacrity is simply typed.
Currently, the only base types are [bool](boolean.md), [uint256](number.md) and [bytes](bytes.md).
Currently, the only type combinator is [pair](tuple.md).
All data types are combinations of the above.

Then there are [functions](function.md).
For now only first-order functions are allowed;
there are no function as first-class values, and
no need for explicit function types in the language so far.
A function has a list of parameters as input, each constrained to a data type;
it has one output, also constrained to a data type,
that may be a (nested) pair to return multiple values.

In the future, we will support richer types;
we will probably copying features from
OCaml (ReasonML), Haskell, Purescript, Scala, etc.

New types can be declared.
Currently, the only type declaration is [enum](enum.md), and
it actually declares an initial subset of the [integers](number.md).

repository: AlacrisIO/alacrity

repo_name: AlacrisIO/alacrity


text:
<!--![Build Passing](https://travis-ci.com/jwdebelius/q2-sidle.svg?branch=main)
[![Coverage Status](https://coveralls.io/repos/github/jwdebelius/q2-sidle/badge.svg)](https://coveralls.io/github/jwdebelius/q2-sidle)
-->
# q2-sidle
A QIIME 2 implementation of SMURF.

Full documentation on [read the docs](https://q2-sidle.readthedocs.io/)

## Installation

q2-sidle requires a QIIME 2 enviroment. [Install QIIME2](https://docs.qiime2.org/2020.8/install/) according to the method that works best for your system.

Sidle depends on two conda libraries, `dask` and `regex`, as well as the [RESCRIPt]() qiime2 plugin. To install the plugin, start with adding the addtional conda libraries:

```bash
conda install dask regex
conda install -c conda-forge -c bioconda -c qiime2 -c defaults xmltodict
```

Next, you will need the RESCRIPt and sidle plugins.

```bash
pip install git+https://github.com/bokulich-lab/RESCRIPt.git
pip install git+https://github.com/jwdebelius/q2-sidle
```

Finally, update your qiime libraries.

```bash
qiime dev refresh-cache
```

## Tutorial

Please see our tutorial on [read the docs](https://q2-sidle.readthedocs.io/)


text:
Please makes sure the items are checked before submitting your PR, thank you!

- [ ] Merge/Rebase before creating a PR.

- [ ] No eslint errors.

- [ ] Easy to understand your commit message.


text:
# Exercise-01c-Basic-Game-Loop

Exercise for MSCH-C220, 1 September 2020

A basic interactive-fiction game engine, designed to render Twine projects exported with Twison, written in Python

## Implementation

Built using Visual Studio Code and Python 3.8.5. Adventure.json was created in Twine 2 and exported with Twison 0.0.1 (https://github.com/lazerwalker/twison)

## References

None

## Future Development

Plans to implement additional Twine features (more than displaying the description and the options)

## Created by

Spencer Abrams


text:
## Version 2.1 - 2019/10/XX
### New Features:
    - Inspection: API to get the type of links/objects and datasets data-types (#221)
    - H5Easy: API for simple import/export to Eigen and xtensor (#141)
    - Support for chunk and deflate configuration at dataset creation/open (#125). Added generic RawPropertyLists. (#157)
    - Recursive `createGroup` and `exist` (#152)
    - Shortcut syntax: ability to create a filled dataset in a single line (#130)
    - DataSet now accepts `std::complex` and `std::array`'s (#128, #129)

### Improvements
    - Improved compat with MSVC and ICC compilers
    - CMake build system: modernized, create exported targets, better messages, etc.
    - Building and publishing documentation: https://bluebrain.github.io/HighFive/
    - Several other. See #231

### Bug Fixes:
    - Fixed header dependencies. They are now all include-able (#225)
    - Fixed read/write of N-Dimensional data as nested vectors (#191)
    - Fixed data broadcasting for reading (#136)

## Version 2.0 - 2018/07/19
    - First version with C++11 enforcement
    - Support for property list
    - Support for Chunking
    - Support for Compression / Deflate
    - Fix: missing move constructor for properties
    - Fix: typo in MPI IO driver
    - Fix: several typo fixes
    - Fix: Add missing include

## Version 1.5 - 2018/01/06
    - SliceTraits::read split in two overloads, the first one for plain C arrays
      and the second one for other types.
    - Add support for complex number
    - Add exist() method to the API
    - Will be last release before 2.0 and enforcement of C++11

## Version 1.4 - 2017/08/25
	- Support id selection for the `select` function
	- Suport STL containers of const elements
	- Support scalar values and strings management
	- Fix attribute assignment issue #40
    - Fix Object assignment operator missing unref (possible memory leak )
    - Introduce SilenceHDF5 for HDF5 error report
    - Fix a unit test issue with SilenceHDF5

## Version 1.3 - 2017/06/21
    - Minor fixes

## Version 1.2 - 2017/04/03
	- Add Attribute support for Dataset
	- Extend testing of Attribute support
	- Fix issue related to multiple definitions in default driver
	- Add more examples about attribute support

## Version 1.1 - 2017/03/23
    - Add support and examples for Parallel HDF5
    - Initial implementation for H5 Properties
    - Support for Attributes
    - Improve documentation
    - Add example for boost.Ublas matrix support

## Version 1.0 - Init
	- Initial release

repository: tvandera/HighFive

repo_name: tvandera/HighFive