text:
# drone-coveralls

Drone.io plugin for pushing test coverage to Coveralls

_note this was just for testing how to create a plug-in for Drone.io while it should work it is more a proof of concept for us more than anything_

## Configuration

The following parameters are used to configure the plugin:
- `files`: list of target files to push to coveralls

You can optionally also set the coveralls repo token for private repos as a environment variable.
- `COVERALLS_REPO_TOKEN`: set the private repository token.

### Drone configuration examples

Simple example:
```yaml
...
  coveralls:
    image: sharpnotions/drone-coveralls
    files:
      - ./coverage/lcov.info
    environment:
      - COVERALLS_REPO_TOKEN=$${COVERALLS_TOKEN}
    secrets: [ coveralls_token ]
...
```

repository: SharpNotions/drone-coveralls

repo_name: SharpNotions/drone-coveralls


text:
#csv4cpp [![Build Status](https://travis-ci.org/astronomerdamo/csv4cpp.svg?branch=master)](https://travis-ci.org/astronomerdamo/csv4cpp)

C++ CSV Data File Parser

##Requirements

* C++ compiler [Note: only tested with gcc - see .travis.yml]

##Introduction

I wrote this function after becoming frustrated with the level of difficulty required to read in a tabled data file for use in C++ command line programs. This csv parser uses only standard (STL) C++ libraries

##Installation

```
git clone https://github.com/astronomerdamo/csv4cpp.git
```

##Usage

Feel free to copy only the csv parser function, or compile and test at will. If you choose to copy only the parser make note of the included libraries.

To compile,

```
g++ readcsv.cpp -o readcsv
```

To run using the provided data file example,

```
./readcsv data.csv
```

with output,

    0.2    1.2    0.4
    0.4    1.3    0.3
    0.6    1.8    0.4
    0.8    2.4    0.2

Or more generically,

```
./readcsv path_to/data.csv
```

__Note:__
* CSV parser is not built to support comments in data file (it's on my ToDo).
* The data file must have a constant number of columns.
* Every value in the data file should have a numeric value.
* The column delimiter must a single consistent character, a single space between values is ok.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# June 2018 Meetup

| Speaker | Topic | Description  |
| ------------- | ------------- | ----- |
| Chris Constable | Polymorphism in Swift | Swift allows for many different types of polymorphism including ad hoc, parametric, and subtype. We'll talk about these different types of polymorphism, how they relate to something called method dispatching, and what the performance implications are of using polymorphic types. |

repository: Nashville-Swift/monthly-meetups

gha_language: Swift

gha_license_id: MIT

repo_name: Nashville-Swift/monthly-meetups


text:
Rust Unshare
============

*Status:* 90% feature-complete, works in production in [lithos][1] and powers [vagga][2]

[Github](https://github.com/tailhook/unshare) |
[Documentaion](http://docs.rs/unshare) |
[Crate](https://crates.io/crates/unshare)

Unshare is a low-level library to create linux containers.

It contains the following:

* Process creation interface similar to `std::process::Command`
* Unsharing arbitrary linux namespaces
* Ability to change root (`chroot/pivot_root`), `uid`, `gid`, `gid_map`
* Some signal mask handling (especially for new processes)
* Forwarding file descriptors and other unixy stuff (sessions, terminals)
* Setting few important prctl flags (`PR_SET_PDEATHSIG`)
* Runs both as root user and as unprivileged user

Not implemeneted yet:

* Fine grained capabilities control (currently you may change user or use
  user namespaces)

The following is considered:

* Capture input (should be, because part of ``std::process`` interface)
* Pseudo tty creation for child
* The `unshare` and `setns`

The following is out of scope:

* mounting file systems
* setting up network
* in-container and out of container supervision
* handing child signals

[1]: http://lithos.readthedocs.org
[2]: http://vagga.readthedocs.org

License
=======

Licensed under either of

 * Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution
------------

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.

repository: tailhook/unshare

gha_language: Rust

repo_name: tailhook/unshare


text:
# Algae-core-legacy
The image generator of Algae

**Note:** This repository is considered legacy and will not be updated. It was meant as a test.

## Installation instructions
This project uses Maven. See the ui [installations instructions](https://github.com/Dacaspex/Algae-ui/blob/master/README.md) on how to setup the project.

Clone this repository into the Algae project folder
```
git clone https://github.com/Dacaspex/Algae-core.git
```
When the project is build, the `algae-core.jar` is placed into the algae-ui folder so that the ui can access it. To build the jar

#### Using the command line
Simply run
```
mvn clean install
```
#### Using IntelliJ
Edit configuration -> Create new configuration (green plus) -> Maven.
Set "Command line" to `clean install`.
Press the "run" button to build the project.

repository: Dacaspex/Algae-core-legacy

repo_name: Dacaspex/Algae-core-legacy


text:
# Markdown commands

| Description | Syntax |
| ----------- | ----------- |
| Headings |  |
| H1 | ``` # H1``` |
| H2 | ``` ## H2``` |
| H3 | ``` ## H3``` |
| Bold Text | ```**bold text**``` |
| Italic Text | ```*italicized text*``` |
| Blockquotes | ```> blockquote``` |
| Ordered List | |
| First item | ``` 1. ``` |
| Second item | ``` 2. ``` |
| Third item | ``` 3. ``` |
| Unordered List | |
| First item | ``` - First item ``` |
| Second item | ``` - Second item ``` |
| Third item | ``` - Third item ``` |
| Code | ``` `code` ``` |
| Horizontal Rule | ``` --- ``` |
| Link | ``` [title](https://www.example.com) ``` |
| Image | ``` ![alt text](image.jpg) ``` |

### Navigation
[Back Home](../README.md)

repository: liamsorsby/cheat-sheet

branch_name: refs/heads/main

repo_name: liamsorsby/cheat-sheet


text:
# spider-monkey
_A web development environment for dabblers_

## Description
When playing with libraries like [p5js](http://p5js.org/) and [pixijs](http://www.pixijs.com/) I want access to all the handy development tools I use professionally; but without the overhead of setting up a separate project for each little experiment.

This setup is an attempt to achieve that.  I've started with parsing of SASS, Jade templates and linting and direct copying of JS; with browserSync handling automatic refresh duties.  Browserify has been added.  Babel and further improvements will follow as I put it to the test...

## Installation

Make sure global dependencies are installed (see below) and then run `npm install` (as admin) from the root folder.  That will install all the local dependencies listed in package.json.

### Dependencies

* [nodejs](https://nodejs.org/) and npm (tested with 5.6.0 3.6.0)
* [gulp](http://gulpjs.com/) (tested with 3.9.1)
* [node-sass](https://www.npmjs.com/package/node-sass) (tested with 3.4.2)

### Optional dependencies
* [Vagrant](https://www.vagrantup.com/)
* Git

### Possible gotchas
#### Windows users
Node and npm on Windows still have some pain points.  The path length  issue happily appears [a thing of the past](https://github.com/npm/npm/blob/master/CHANGELOG.md#flat-flat-flat); but that doesn't mean it's plain sailing. node-gyp in particular is still a [significant enough problem](https://github.com/nodejs/node-gyp/issues/629) to put me off.  Having wasted too much time trying to figure it out, and being reluctant to install 7-8GBs of Visual Studio dependencies to get it working, I opted instead to use a [Vagrant](https://www.vagrantup.com/docs/why-vagrant/) box running Ubuntu.  I've included a Vagrant file that will set up the box with the appropriate global dependencies (make sure you're running your command line as admin on first `vagrant up` and when you run `npm install`).

## Usage

* Add your source code, assets etc. to the src folder.
* Organise into folders as you see fit (an example of a typical setup for p5js is included).
* Run `gulp` from the command line.
  This will process existing files and shunt the results into a new 'dist' folder; fire up a server on localhost:8080; and do its best to auto-refresh when you save assets.
* If necessary manually run `gulp clean` to remove the dist folder


text:
## Linker ID Receiving

### Overview

This document illustrates in detail how the linker param is constructed, so that analytics vendors or publishers implementing their own solutions are able to ingest this parameter on the destination page.

### Format

The linker param will be formatted in the following structure:

`<paramName>=<version>*<checkSum>*<idName1>*<idValue1>*<idName2>*<idValue2>...`

The asterisk `*` is used to seperate each piece of data.

-   `paramName` - Name of parameter given in configuration.
-   `version` - The version of the linker used to create the param.
-   `checkSum` - A unique value generated by the linker. Details about how this value is generated are [here](#checksum)
-   `idName1*idValue1` This is where any key value pairs in the `ids` object will be included. The values will be "URL Safe" base64 encoded, while the keys will remain in their raw form.

#### Example

Take this example [linker configuration](./linker-id-forwarding.md):

```json
"linkers": {
  "linker1" : {
    "ids" : {
      "cid": "CLIENT_ID(_ga)",
      "uid" "QUERY_PARAM(uid)"
    },
    "proxyOnly" : false,
    "enabled": true
  }
}
```

The above config would generate a parameter similar to the following: `linker1=1*5epghs*cid*YW1wLVNsQjJnZmlpXzExZFdxdFNyM3pUNHc.*uid*MTIzNA..`.

There are several parts to this url parameter. First, the name of the param `linker1` matches the name from the configuration above. The param value contains several pieces of data seperated by the `*`delimiter.

-   The first value `1` indicates the version number of the linker used.
-   The second value `5epghs` is a [checksum](#checksum) generated by the linker.
-   After that, the two key value pairs given in the `ids` object. The linker has resolved any macros that may exist, base64 encoded them in a url-safe format, and then appended them to the parameter. This results in `cid*YW1wLVNsQjJnZmlpXzExZFdxdFNyM3pUNHc.`, and `uid*MTIzNA..`.

#### Checksum

The checksum is a unique value generated by the linker that can be used to prevent accidental Id sharing. Publishers and/or anayltics vendors can generate this checksum on the destination page and ensure that it matches. Since this checksum contains a time input, a common practice is to check it against a few values generated by adding or subtracting a time tolerance.

It is generated from the following formula.

`base36(CRC32(fingerprint*timestampRoundedInMin*key1*val1*key2*val2...))`

-   `fingerprint` - A semi-unique value for page visitors. Generated by using `User Agent + * + timezone + * + language`.
-   `minutesSinceEpoch` - Time since epoch. Floored to minute resolution.
-   `key1...` - Each key value pair that will be passed along. The key will remain in its raw form, while the value will be url-safe base64 endcoded.
-   `CRC32` - A standard CRC32 implementation.
-   `base36` - The result of the CRC32 algorithm is base36 encoded.

You can find all the code for our implementaion in the [linker.js](./0.1/linker.js)

#### Test Cases

If you are implementing your own logic to verify these checksums, please ensure that you are using our test vectors located in [test-linker.js](./0.1/test/test-linker.js)

### Receiving Linker Params on AMP Pages

The `<amp-analytics>`'s `cookies` feature can be used to extract information from the document url and write to the origin domain.

#### Configuration

A `cookies` example configuration looks like

```js
'cookies': {
  'enabled': true,
  'cookieName1': {
    'value': 'QUERY_PARAM(example)',
  },
  'cookieName2': {
    'value': 'LINKER_PARAM(exampleParamName, exampleIdName)',
  },
}
```

The `enabled` value can be used to override default vendor settings.

##### Cookie Names

Each key within the `cookies` config object defines the cookie name. It's value needs to be an object. The key should be named `value`, and its value should be the macro that determines the information stored in the cookie.

Note: The following key values are reserved, and cannot be used as cookie names. They are ['`referrerDomains`', '`enabled`', '`cookiePath`', '`cookieMaxAge`', '`cookieSecure`', '`cookieDomain`', '`sameSite`', '`SameSite`', '`secure`'].

##### Cookie Values

Each cookie to write is defined by an object, where the value is defined by the required `value` field.

Two macros are supported for the `value` field. [`QUERY_PARAM`](https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-var-substitutions.md#query-parameter) and [`LINKER_PARAM`](#linker-param).

If there's error resoving the value, or the value is resolved to empty string. Nothing will be written to the cookie.

##### SameSite Cookies

To specify a SameSite value for a cookie, include a key-value pair where the key is `sameSite` and the value is one of `Strict`, `Lax` or `None`. If `sameSite` is set to `None`, we pair it with the `Secure` attribute as [recommended](https://web.dev/samesite-cookies-explained/#samesitenone-must-be-secure) to prevent the cookie from getting rejected.

There are 2 ways to set SameSite cookies:

1. Set the SameSite attribute for all cookies using the `sameSite` key and value as one of `Strict`, `Lax` or `None` in the `cookies` config object, such as:

```js
'cookies': {
  'sameSite': 'Strict',
  'cookieName1': {
    'value': 'QUERY_PARAM(example)',
  },
  'cookieName2': {
    'value': 'LINKER_PARAM(exampleParamName, exampleIdName)',
  },
}
```

This will set SameSite=Strict for `cookieName1` and `cookieName2`.

1. Set or override the SameSite attribute using the `sameSite` key on an individual cookie object, such as:

```js
'cookies': {
  'sameSite': 'None',
  'cookieName1': {
    'value': 'QUERY_PARAM(example)',
    'sameSite': 'Strict',
  },
  'cookieName2': {
    'value': 'LINKER_PARAM(exampleParamName, exampleIdName)',
  },
}
```

This will set the SameSite=None for `cookieName2` and override `cookieName1` to SameSite=Strict.

##### LINKER PARAM

`LINKER_PARAM` takes two arguments, the `name` and the `value`. It will verify the checksum and read the `idName1*idValue1` key value pair from the linker param. The `value` ('idValue1' here) will be returned.

repository: ampproject/amphtml

gha_language: JavaScript

repo_name: ampproject/amphtml


text:
# Shift Scheduling Application
Project Members:
- [Alex Creencia](https://github.com/Creenciaa)
- [Erwin Pascual](https://github.com/pascuale2)
- [Jaxon Strembitsky](https://github.com/Strembitsky)
- [Wamiq Hussain](https://github.com/hussainm7)

A nifty scheduling application for designed for managers of fast-food or retail related jobs which allow them to assign or designate shifts (Opening/Closing/All-Day/Holiday shifts) to employees. You can register or delete employees within your organization and can also assign them the option to be either trained opening or trained closing.

Below is a preview of some of the features in our application.

# Log-in Screen
![Log-in](https://user-images.githubusercontent.com/56744638/106404857-6a806680-63f1-11eb-92c9-8788011a323f.png)

# Register Screen
![Register](https://user-images.githubusercontent.com/56744638/106404858-6a806680-63f1-11eb-8c86-e4acfd5c8d8e.png)

# Dashboard
![Dashboard](https://user-images.githubusercontent.com/56744638/106404856-69e7d000-63f1-11eb-8dd2-ef61aafb7f81.png)

# View/Edit Current Schedule (MainScreen)
#### - Each icon represents a shift created and assigned employees to work for shift.
![Calendar](https://user-images.githubusercontent.com/56744638/106405468-871d9e00-63f3-11eb-988a-fd7bfebc9ebe.png)

# Employee Details
#### - You can edit names, assign if trained opening/closing or change the availabilities of employees
![Details](https://user-images.githubusercontent.com/56744638/106405469-871d9e00-63f3-11eb-85a9-75f548ca8ccf.png)
# Employee Work Availability
#### - You can also assign them colour coded availibities.
![Availability](https://user-images.githubusercontent.com/56744638/106405466-86850780-63f3-11eb-9c75-70a7887fbb1f.png)
![Availability2](https://user-images.githubusercontent.com/56744638/106405467-871d9e00-63f3-11eb-85b9-44c45cf2a175.png)


text:
## Week 11: More Text Analysis

Open Terminal in macOS and launch our Docker container:

```
docker rm -f pcda_ubuntu
docker pull pcda18/ubuntu-image
docker run --name pcda_ubuntu -ti -p 8889:8889 --volume ~/Desktop/sharedfolder/:/sharedfolder/ pcda18/ubuntu-image
```

In Windows 10, open PowerShell and enter the following to launch the Docker container:

```
docker rm -f pcda_ubuntu
docker pull pcda18/ubuntu-image
docker run --name pcda_ubuntu -ti -p 8889:8889 --volume C:\Users\***username_here***\Desktop\sharedfolder:/sharedfolder/ pcda18/ubuntu-image
```

Download a Jupyter notebook from the list below to `sharedfolder` on your desktop.

Navigate to [localhost:8889](localhost:8889) in your browser to open the notebook.

### Jupyter Notebooks

- [Reference Snippets: Strings and Lists](https://github.com/pcda18/pcda18.github.io/blob/master/copy_me/Strings_and_Lists_done.ipynb)

- [Topic Modeling](Week-11_Topic-Modeling.ipynb)

- [Supervised Learning](Week-11_Supervised_Learning.ipynb)

- [New York Times Article Scraper](Week-11_NYT_Article_Scrape.ipynb)

### Resources

- [scikit-learn Cheat Cheet](https://s3.amazonaws.com/assets.datacamp.com/blog_assets/Scikit_Learn_Cheat_Sheet_Python.pdf)

- [scikit-learn Classifier Decision Tree](http://scikit-learn.org/stable/tutorial/machine_learning_map/index.html)

- [scikit-learn Supervised Learning Overview](http://scikit-learn.org/stable/tutorial/statistical_inference/supervised_learning.html)

gha_language: Jupyter Notebook


text:
#meteor-deployment-manager
Meteor Deployment Manager (or MDM for short) is a command line tool intended to automate the process of deploying your [Meteor](http://www.meteor.com/) applications to self-hosted infrastructure like Amazon EC2.

**NB: You have found this project in its infancy. The best documentation at the moment is the [source code](https://github.com/chriswessels/meteor-deployment-manager/blob/master/lib/meteor-deployment-manager.js), so check it out!**

##Features
- Written in pure JavaScript.
- Installs as a global NPM package, accessible from any directory.
- Supports multiple deployment environments and configurations.
- Supports the use of Meteor's [Meteorite](https://github.com/oortcloud/meteorite) package manager.
- Supports predefined password, private key and keyboard-interactive authentication.
- Keeps a specifiable number of builds.
- Uses symbolic links to retain build history and allow for instant build rollbacks.
- Uses [Upstart](http://upstart.ubuntu.com) to monitor Node.js.

##How it works

MDM makes itself available with the `mdm` command line program. By default, it looks for a deployment configuration file named `deploy.json` in the current working directory. You can change this behaviour with the `--project-path` and `--config-file` command line options.

Usage:

```text
$ mdm [command] [options]
```

For a full list of available command line options, please execute `mdm --help`.

###1. mdm deploy

The `deploy` command is used to deploy changes you have made to a remote server.

It performs the following operations:

1. Opens an SSH connection to the remote server.
1. Updates the project source via Git.
1. Cleans old builds (specify how many to keep using the `buildsToKeep` configuration option).
1. Creates a new build directory.
1. Uses `meteor` or `mrt` (if you're using Meteorite) to bundle the latest source into a tarball.
1. Extracts the tarball into the latest build directory.
1. Resets `current` symbolic link to latest build directory.
1. Restarts the Node.js process associated with the project.

###2. mdm rollback

The `rollback` command is used to roll back an erroneous deployment.

It performs the following operations:

1. Opens an SSH connection to the remote server.
1. Resets the `current` symbolic link to the second most recent build directory
1. Restarts the Node.js process associated with the project.

###3. mdm generate

The `generate` command is used to create a sample `deploy.json` file in the current working directory. You should customise this file to suit your requirements.

####Sample Deployment Configuration

You can find a sample `deploy.json` file on GitHub: https://github.com/chriswessels/meteor-deployment-manager/blob/master/lib/sample_deploy.json

###4. mdm start

The `start` command is used to start the instance of Node.js associated with your application (via the Upstart script).

###5. mdm stop

The `stop` command is used to stop the instance of Node.js associated with your application (via the Upstart script).

###6. mdm restart

The `restart` command is used to restart the instance of Node.js associated with your application (via the Upstart script).

##Installation

MDM is installed using the [Node Package Manager](https://npmjs.org) command line tool. MDM should be installed with the global flag (-g) to ensure that it is available within any Meteor application directory you might want to deploy.

Install MDM with the following command:

```sh
$ npm install -g meteor-deployment-manager
```

##Project and server requirements

MDM assumes that your project and server set up conforms to a set of requirements:

1. You are using Git as a version control system.
1. You use [Upstart](http://upstart.ubuntu.com) to manage system services on your server.
1. You have [Node.js](http://nodejs.org/), [Meteor](http://www.meteor.com) and [Meteorite](https://github.com/oortcloud/meteorite) installed on your server.
1. Your project source directory (see below) should be a Git repository with an `origin` remote.

###Server directory structure

```text
app_root # This is specified in deploy.json as deploymentDirectory.
app_root/source # This directory contains the source code for your project.
app_root/working # This directory is used as a bundling directory.
app_root/builds # This directory contains the project builds made by MDM.
app_root/builds/timestamp # These directories contain the extracted bundle tarball.
app_root/builds/current # This is a symbolic link to the current build directory.
```

Looking for a guide to set up your server for use with MDM? Look here: [https://gist.github.com/chriswessels/6540167](https://gist.github.com/chriswessels/6540167).

##Contributions

1. Fork this repository.
1. Make your changes, ideally documenting your new code with in-context comments.
1. Submit a pull request with a sane commit message.

##License

The code for this project is released under the MIT License. Please see the `LICENSE` file.

repository: chriswessels/meteor-deployment-manager

repo_name: chriswessels/meteor-deployment-manager


text:
----[mla, mlm, mlu, mpe, mco, mlc]----

---
content_section_with_media:
 - title: WooCommerce
 - message: WooCommerce is a plugin that allows you to enable your WordPress website to function as a virtual store with the peace of mind of offering buyers the possibility of making payments using Mercado Pago.
 - media_video: https://www.youtube.com/embed/GvlMgBLu5wE
---

------------

----[mlb]----

---
content_section_with_media:
 - title: WooCommerce
 - message: WooCommerce is a plugin that allows you to enable your WordPress website to function as a virtual store with the peace of mind of offering buyers the possibility of making payments using Mercado Pago.
 - media_video: https://www.youtube.com/embed/fsMK4EWlnHQ
---

------------

--- mini_landing_separator ---

>>>> Availability by country <<<<
---
available_countries: mla, mlb, mlm, mlu, mlc, mco, mpe

---

---
bullet_section_with_media:
 - title: Receive payments with Checkout Pro
 - type: normal
 - message: Integrate Mercado Pago into a Wordpress store through the WooCommerce plugin and redirect your buyers to a Mercado Pago page to complete the payment.
 - image: /shopify/mini-landing-1.png
---

----[mlb]----
---
bullet_section_with_media:
 - title: Customize payments with Transparent Checkout
 - type: reversed
 - message: Integrate our Transparent Checkout and make the buyer carry out the entire payment process within your store environment.
 - image: /shopify/mini-landing-4.png
---
------------

----[mla, mlm, mlu, mpe, mco, mlc]----
---
bullet_section_with_media:
 - title: Customize payments with Checkout API
 - type: reversed
 - message: Integrate our Checkout API and make the buyer carry out the entire payment process within your store environment.
 - image: /shopify/mini-landing-4.png
---
------------

--- mini_landing_separator ---

>>>> Accepted payment methods <<<<

----[mlb]----

---
available_payments: credit, debit, mercadopago, boleto, pix, pec, moneda, mercadocredito

---
------------

----[mla]----

---
available_payments: credit, debit, mercadopago, efectivo, atm, mercadocredito

----
------------

----[mlm]----

---
available_payments: credit, debit, mercadopago, efectivo, atm, moneda, mercadocredito

----
------------

----[mlu]----

---
available_payments: credit, efectivo

----
------------

----[mco]----

---
available_payments: mercadopago, pse, credit, debit, efectivo

----
------------

----[mlc]----

---
available_payments: mercadopago, credit, debit

----
------------

----[mpe]----

---
available_payments: mercadopago, atm, credit, debit

----
------------
> For details of accepted payment methods in each country, check the full list with [payment methods availability.](/developers/en/docs/sales-processing/payment-methods)

repository: mercadopago/devsite-docs

branch_name: refs/heads/development

repo_name: mercadopago/devsite-docs


text:
# NHS App Dashboard v1.4

## Data Caveats:
- GP Registered Patients data is not available for a small proportion of GP practices. Any metrics that use this measure as a denominator (e.g. Proportion of GP population registered for the NHS App) will have a slightly higher than expected rate.

- The dashboard displays data only for GP practices that are currently active. Should a practice close, their historical data will no longer appear in the dashboard.

## Version 1.4 Change Log (29-11-2020)

### 1. Features Added

- **National Summary and Local App Usage:** Split national and local level data into separate sheets. Filters now work correctly on all graphs with no caveats
- **Data Table page:** Allows users to easily filter data via Region, STP, CCG, CCG Code, Practice, Practice Code.
- **Data Dictionary page:** Will help users understand the meaning, description, lowest level of data, calculation, limitations and data source(s) for the different metrics in the NHS App Analytics Dashboard
- **Information icons:** Allow the user to understand the purpose behind each page

### 2. User Interface Changes
-  UI fixes on National Summary Dashboard charts and titles to ensure accessibility, as well as adherence to NHSE&I dashboard formatting guidance
- Clickable mailto link added to About page to allow users to email developers for support
- Minor UI fixes to the About page
- UI fixes on National Summary and App Usage pages
- Consistent colour scheme applied to all charts on dashboard to improve user experience
- Minor UI fixes on National Summary and App Usage page
- Header formatting changed for all pages to improve user experience
- Null Value(s) option deleted from filters
- Filters now correspond with all charts

### 3. Features Removed:
To ensure the dashboard only includes metrics that are supported by the NHS App, the following charts have been removed:
- Registrations by Non-Patient Online users running total
- % of registrations by Non-Patient Online Users based on running totals
- Active returning visitors

## Version 1.3 Change Log (29-09-2020)

### 1. User Verification Process
To improve the App’s user registration journey and increase digital uptake, a 2-tier verification process has been implemented for new App users. The two tiers are as follows:
- Partially Verified (P5) users - Requiring Name, Email, D.O.B, Postcode and Mobile Number
- Fully Verified (P9) users - Requiring Photo ID and Photo/Video Identity Matching
Partially verified (P5) users cannot access confidential information, and have limited access to App features until fully (P9) verified.

### 2. Updated Registration Metric
The 'NHS App Registrations' metric has been updated to give a count of new App users who have obtained full (P9) verification. The dashboard has now been updated to account for this change and will resume weekly updates.

As a result of the new verification process and developments to the App over time, a new method for tracking user acquisition has been established. Previously, patients moving practice may have been assigned a new Linkage Key, and would therefore have been counted as a new app user. Data prior to May-2020 has been updated to reflect the new tracking method made possible by the new verification system, which avoids the risk of duplication. This may result in a slightly lower registrations count at practice level prior to May-2020.


text:
# @pie-element/text-entry

A simple text input element.

Supports multiple languages, see the commented model in docs/demo/config.js

## Running

```shell
cd packages/text-entry
pie info
````

license: ISC

repository: pie-framework/pie-elements

branch_name: refs/heads/develop

gha_license_id: ISC

repo_name: pie-framework/pie-elements


text:
# CHANGELOG

## 1.0.0

* First stable release.
* Requires PHP >= 7.0.
* Added`Gbowo\Bridge\Laravel\GbowoManager`
* Added `Gbowo\Bridge\Laravel\Facades\Gbowo`.

repository: adelowo/laravel-gbowo

repo_name: adelowo/laravel-gbowo


text:
# PhCP-Public-Transforms

This folder contains CDA to FHIR and FHIR to CDA transforms for the Pharmacist Care Plan document type.

The transforms are in XSLT, with a Java program to invoke them. The Java program is currently required for CDA to FHIR conversion (it adds UUIDs to the input CDA files) and for any transform involving JSON content.

To run the CDA to FHIR transform, use com.lantanagroup.phcpdemo.CDA2FHIR.

To run from the command line, call that class with the following command line parameters:

-cda CDA-INPUT-FILE -fhir FHIR-OUTPUT-FILE -transform LOCATION-OF-cda2fhir.xslt

You can optionally add the fhirJson parameter. If present it will output FHIR in JSON syntax instead of XML.

To run via a service, create a CDA2FHIR instance (contructor requires you pass the location of cda2fhir.xslt as a File), then call the method with the following signature, which takes input/output streams:

public void runTransform(InputStream cdaIn, OutputStream fhirOut, boolean fhirJson)

TBD: create the FHIR to CDA driver.

It is possible to run the transforms directly using OxygenXML or Saxon PE. To do so, run cda2fhir-SaxonPE.xslt or fhir2cda.xslt. If using Oxygen, be sure to select SaxonPE as your XSLT processor.


text:
Mina.NET
========

.NET implementation of [Apache MINA] (http://mina.apache.org/). I like the ideas in it, simple yet functional, but I failed to find one in .NET, finally I created one.

Mina.NET is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract event-driven asynchronous API over various transports such as TCP/IP via **async socket**.

Mina.NET is often called:

* NIO framework library,
* client server framework library, or
* a networking socket library

Features
-----------

Mina.NET is a simple yet full-featured network application framework which provides:

* Unified API for various transport types:
  - TCP/IP & UDP/IP via .NET asynchronous socket
  - Serial communication (RS232)
  - Loopback (in-application pipe) communication
  - You can implement your own!
* Filter interface as an extension point;
* Low-level and high-level API:
  - Low-level: uses IoBuffers
  - High-level: uses user-defined message objects and codecs
* Highly customizable thread model:
  - Single thread
  - One thread pool
  - More than one thread pools
* Out-of-the-box SSL · TLS
* Overload shielding & traffic throttling
* Stream-based I/O support via StreamIoHandler

Quick Start
-----------

```csharp
  IoAcceptor acceptor = new AsyncSocketAcceptor();

  acceptor.FilterChain.AddLast("logger", new LoggingFilter());
  acceptor.FilterChain.AddLast("codec", new ProtocolCodecFilter(new TextLineCodecFactory(Encoding.UTF8)));

  acceptor.ExceptionCaught += (o, e) => Console.WriteLine(e.Exception);

  acceptor.SessionIdle += (o, e) => Console.WriteLine("IDLE " + e.Session.GetIdleCount(e.IdleStatus));

  acceptor.MessageReceived += (o, e) =>
  {
    String str = e.Message.ToString();

    // "Quit" ? let's get out ...
    if (str.Trim().Equals("quit", StringComparison.OrdinalIgnoreCase))
    {
      e.Session.Close(true);
      return;
    }

    // Send the current date back to the client
    e.Session.Write(DateTime.Now.ToString());
    Console.WriteLine("Message written...");
  };

  acceptor.Bind(new IPEndPoint(IPAddress.Any, 8080));
```

See https://mina.codeplex.com/documentation for more.

License
-------

Licensed under the Apache License, Version 2.0. You may obtain a copy of the License at [LICENSE] (LICENSE) or http://www.apache.org/licenses/LICENSE-2.0.


text:
# Welcome to the ICS3U Course Page!

## Course information
* [Course Outline](./Course-Outline)
* [Overarching Learning Goals](./images/ICS3U.jpg)
* [Due Dates and Submission Details](./Due-Dates-and-Submission-Details)

## Assignments

This section will contain links to all of the course assignments.  They are grouped by Overarching Learning Goal (OLG).  Be aware that within each OLG, the material is in a suggested chronological order for completing the work to ease your understanding of the materials.

If you believe you can show your understanding of certain materials in another manner, please discuss with your teacher _well ahead_ of the deadline.

[Pre-Course Work](./Pre-Course-Work)

#### 📙 Computers and Algorithms

* ~~[Hardware Presentation](./Hardware-Presentation)~~ Cancelled for Semester 2 (Spring 2023)
* [Hardware Project](./Hardware-Project)
* [File Backup and Organization](./File-Backup-and-Organization)
* [Problem Solving and Teamwork](./Problem-Solving-and-Teamwork)

#### 📘 Programming Concepts

* [Programming - Assignment 1](./Programming-Assignment-1)
* [Programming - Assignment 2](./Programming-Assignment-2)

#### 📗 Digital Scholar

* [Emerging Technologies](./Emerging-Technologies)
* [Post-Secondary Opportunities](./Post-Secondary-Opportunities)

## JavaScript Notes
* [Arrays](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/23%20-%20arrays)
* [Arrays (Modifying)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/24%20-%20modifying%20arrays)
* [Arrow Functions](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/22%20-%20arrow%20functions)
* [Built-in Math Functions](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/14%20-%20built-in%20math%20functions)
* [Comments](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/11%20-%20constants%2C%20variables%2C%20input%2C%20and%20comments)
* [Conditional Statements (if)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/12%20-%20conditionals%20(if))
* [Constants and Variables](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/11%20-%20constants%2C%20variables%2C%20input%2C%20and%20comments)
* [Custom Functions (Calling)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/17%20-%20calling%20custom%20functions)
* [Custom Functions (Creating)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/16%20-%20creating%20custom%20functions)
* [Formal Documentation (JSDocs)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/21%20-%20formal%20documentation%20jsdocs)
* [Headers](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/00%20-%20header)
* [JSON-style Objects](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/25%20-%20JSON-style%20objects)
* [Repetition Structures (while and for)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/13%20-%20repetition%20(while%20and%20for))
* [String Enhancements](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/15%20-%20string%20enhancements)

### Enrichment Notes
* [HTML (basics)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E1%20-%20HTML%20-%20text%20basics)
* [HTML (formatting text)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E2%20-%20HTML%20-%20formatting%20text)
* [HTML (images, links, and more)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E3%20-%20HTML%20-%20images%2C%20links%2C%20and%20more)
* [HTML (ids and buttons)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E4%20-%20HTML%20-%20ids%20and%20buttons)
* [HTML/JS (connecting both)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E5%20-%20HTML%20and%20JS%20-%20connecting%20both)
* [CSS (basics)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E6%20-%20CSS%20-%20basics)
* [JS (external libraries)](https://github.com/johnfraserss/ICS3U/tree/master/javascript-notes/E7%20-%20JS%20-%20external%20libraries)

## Resources
* [Repl.it](https://repl.it/)

### JavaScript Language and Resources
* [Eloquent JavaScript (3rd edition)](https://eloquentjavascript.net/)
* [JavaScript for Impatient Programmers](https://exploringjs.com/impatient-js/toc.html)
* [W3 Schools](https://www.w3schools.com/)

### Other IDE Options
If you want something different than the default IDE, here are a few options.  Note, there will be no support by the teacher to get these working at home - use at your own risk.
* Coming soon...

## Licensing and Notices

All of the written work contained herein falls under the Creative Commons Attribution-ShareAlike 4.0 International License, unless otherwise explicitly noted (there are a few pages that contain works that do _**not**_ fall under this license.  They will be noted at the bottom of their respective pages).

All code found within the site falls under the [MIT License](https://github.com/johnfraserss/ICS3U/blob/master/LICENSE.md)

All other content, including images, are copyright their respective owners.

This course is **not** always being taught by Mr. Seidel.  All information here was uploaded at the direction of (or by) the teacher(s) that are teaching this course.  Mr. Seidel will not be held liable for any of the course work, suggestions, ideas, or requirements on this wiki.  If you have issue with any of the content or the previously mentioned items, please contact the appropriate teacher that is teaching the course.  If you are someone online who has issue with something herein, please create an issue in this repository, and I will pass along the information as needed to the appropriate teacher.

repository: mrseidel-classes/archives

repo_name: mrseidel-classes/archives


text:
# Stock-Trading-Strategy
On-Balance-Volume (OBV) Stock Trading Strategy Using Python

OBV capitalizes on this idea by keeping a running tally of volume when price moves up or down. On up days, volume (e.g., share count) is added to the indicator. On down days, volume is subtracted from the indicator. OBV can be used in any kind of system – trend following/momentum or price reversal.

![Currency](https://i.imgur.com/93Vz77m.png)

# KEY TAKEAWAYS
- On-balance volume (OBV) is a simple accumulation-distribution tool that tallies up and down volume, creating a smooth indicator line to predict when major market moves might occur based on changes in relative trading volume.
- OBV works best when testing around major highs and lows to measure for possible breakouts and breakdowns.
- Investors can use OBV to provide many key predictions, such as a bullish divergence predicting the price will break resistance or a bearish divergence predicting a rally will stall or reverse.

repository: ricardospinoza/stock-trading-strategy

repo_name: ricardospinoza/stock-trading-strategy


text:
tomee Cookbook
==============
A cookbook to setup a tomee instance, with a jdbc connection (currently supporting mysql and postgres)

Requirements
------------
VirtualBox
vagrant
berkshelf

Attributes
----------
See the Vagrantfile

Usage
-----
Set your attributes and run vagrant up

Contributing
------------
From the boilerplate, abbreviated
1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Submit a Pull Request using Github

License and Authors
-------------------
License: Apache
Authors: Henry Kastler<EMAIL_ADDRESS>


text:
---
layout: default
---

# 1993-08-31 - Re: AV Macs and Apple Paranoia

## Header Data

From<EMAIL_ADDRESS>(Timothy C. May)

To<EMAIL_ADDRESS>Message Hash: 85d62768c564d3ab09bcd02624390160714f8f06c19eb5ca5f09d219d6d25f44

Message ID<EMAIL_ADDRESS>Reply To: \<Pine.3.07.9308301518.A9769-8100000@hopper\>

UTC Datetime: 1993-08-31 02:33:51 UTC

Raw Date: Mon, 30 Aug 93 19:33:51 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Timothy C. May)
Date: Mon, 30 Aug 93 19:33:51 PDT
To<EMAIL_ADDRESS>Subject: Re: AV Macs and Apple Paranoia
In-Reply-To: <Pine.3.07.9308301518.A9769-8100000@hopper>
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Jamie Jamieson asks:
>
> Actually I was going to ask in here if the DSP in the new Macs would lend
> itself to real-time PGP use for voice communications.

Phil Zimmermann says a non-CELP scheme he is investigating is fast
enough on a run-of-the-mill 486 for "Pretty Good Phone Privacy," or
whatever he ends up calling his project.

The 66 MHz AT&T DSP (a true paranoid would note the "AT&T") in the new
AV Macs is enormously faster, for many DSP and array manipulations,
and should be even easier to develop a voice-encryption scheme for.

Also, software-based schemes can easily be reconfigured to
emulate/talk to other encryption systems or phones. This may be part
of why the Skipjack algorithms are being held secret for as long as
possible, to delay this emulation.

-Tim May

--
..........................................................................
Timothy C. May         | Crypto Anarchy: encryption, digital money,
<EMAIL_ADDRESS>     | anonymous networks, digital pseudonyms, zero
408-688-5409           | knowledge, reputations, information markets,
W.A.S.T.E.: Aptos, CA  | black markets, collapse of governments.
Higher Power: 2^756839 | Public Key: PGP and MailSafe available.
Note: I put time and money into writing this posting. I hope you enjoy it.

{% endraw %}
```

## Thread

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

+ Return to "[Jamie Jamison <jamie@apl.washington.edu>](/authors/jamie_jamison_jamie_at_apl_washington_edu_)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_netcom_com_timothy_c_may_)"

+ 1993-08-30 (Mon, 30 Aug 93 15:43:50 PDT) - [AV Macs and Apple Paranoia](/archive/1993/08/db676964f3d31303056c8b30b0361ca0d9b9b3e13f0912d834e8138bd365848f) - _Jamie Jamison<EMAIL_ADDRESS>  + 1993-08-31 (Mon, 30 Aug 93 19:33:51 PDT) - Re: AV Macs and Apple Paranoia -<EMAIL_ADDRESS>(Timothy C. May)_


text:
---
layout: post
title: GAMES-102 Lec3 NOTES
subtitle: NOTES
cover-img: /assets/img/path.jpg
thumbnail-img: /assets/img/parametric_curve.png
share-img: /assets/img/path.jpg
tags: [notes]
---

## Parametric Curve Fitting

### 1. Tensor product basis function

* **Pros**： simple definition，kinds of product form of unary basis function

* **cons**： the number of basis function and variable. increase sharply as dimension growing

**New solution** :

Neutral Network

	Different affine transformations of a unary function(is called activation function) is used to construct "basis function", whose number of basis function is controllable.

### 2. Vector valued function

$$
f:R^1\rightarrow R^m
$$

The vector valued function can be processed as multiple unary functions, among which every function is independent.

**Geometry explanation**：

A real number $x$ $\in$ $R^1$ is mapped to a point in m-dimensions space, whose trackage constructs a curve in $R^m$.

Essential dimension is 1.

#### Some example:

* **flat(space) parametric curve**

flat(space) parametric curve can flexibly express non-functional curves

* **Parametric curved surface**

$$
f:R^2\rightarrow R^3
$$

**Geometry Explanation**：

A curved surface which can be determined by two parameters, namely _hyperparametric surface_

 Parametric curved surface can flexibly express ono-functional curved surface.

Dimensionality reduction mapping usually causes information loss, which is irreversible typically.

### 3. Parameterization of dot column

* Equidistant(uniform) parameterization

$$
t_{i+1}-t_i=const
$$

* Chordal parameterization

$$
t_{i+1}-t_i = ||k_{i+1}-k_i||
$$

* centripetal parameterization

$$
t_{i+1}-t_i=\sqrt{||k_{i+1}-k_i||}
$$

### Supplement:

[Developable surface](https://en.wikipedia.org/wiki/Developable_surface)


text:
# Cron Monitor API Bundle

This package is the server side for the cron monitor system.

Install the bundle in your server app as you're used to do and declare the configuration like the following.

## Configuration
```yaml
parameters:
    mailer_default_sender: "no-reply@your-mta"

tranchard_cron_monitor_api:
    secret: '%cron-monitor-secret%'
    user_provider: YOUR-SERVICE-ID
    notification_system: YOUR-NOTIFICATION-SYSTEM-SERVICE-ID
    monitoring:
        Dummy-Project:
            environments:
                prod:
                    cron:
                        default:
                            checkers:
                                threshold:
                                    max_failed: 1
                                    duration_interval: 3600
                                duration:
                                    max_execution_duration: ~
                                    duration_interval: 3600
                                lock:
                                    use_cron_tokens: true
                                    duration_interval: 3600
                                critical:
                                    enabled: true
                staging:
                    cron:
                        default:
                            checkers:
                                threshold:
                                    max_failed: 1
                                    duration_interval: 7200
                                duration:
                                    max_execution_duration: ~
                                    duration_interval: 7200
                                lock:
                                    use_cron_tokens: true
                                    duration_interval: 900
                                critical:
                                    enabled: true

```
* As you may have noticed, the project name declared in the client must match the node name under the monitoring node.

* You also need to import some routes to make it works
```yaml
tranchard_cron_monitor_api:
    resource<EMAIL_ADDRESS>    prefix:   /api

tranchard_cron_monitor_internal:
    resource<EMAIL_ADDRESS>    prefix:   /internal
```
* The first route are public route, the other one should only be available through your private network. It's a route to get the status
* You must create a user provider that implements the `UserProviderInterface`, and your user entity class must implement `UserInterface`. These two interfaces are provided in the bundle.
* Finally, you need to declare a default sender email and provide a service that implements the `NotificationSystemInterface`. The bundle provides a mailer with the service id `Tranchard\CronMonitorApiBundle\Services\Notification\Mailer`

* Optional: the secret node is to secure the exchange between the client and the server. It's nullable.

## Checkers
4 checkers are provided by default, and each of them has its own configuration settings.

* DurationChecker is designed to be notified if the cron has taken more than a specified amount of time (+ eventually a % of tolerance), or you can choose to auto monitor the duration (using the cron tokens or not).

Here's the full configuration for this checker
```yaml
duration:
    auto_monitor_duration: true|false # Enable the auto monitor duration
    use_cron_tokens: true|false # Refine or not the auto monitor duration based on the command tokens
    duration_tolerance: 0 # 0.10 for 10% for tolerance margin
    max_execution_duration: ~ # if null, the you must set the auto monitor duration to true
    duration_interval: 7200 # meantime between 2 notifications sent
```

* ThresholdChecker is designed to be notified if a cron has failed more than a defined time during a given interval.

Here's the full configuration for this checker
```yaml
threshold:
    max_failed: 1 # 1 fail allowed
    duration_interval: 3600 # in 3600 seconds
```

* LockChecker is designed to be notified when a cron is locked.

Here's the full configuration for this checker
```yaml
lock:
    use_cron_tokens: true|false # Refine or not the check based on the command tokens
    duration_interval: 900 # meantime between 2 notifications sent
```

* CriticalChecker is designed to be notified when a cron has a specific exit code. You'll be notified systematically, no matters you were notified 10 minutes before.

Here's the full configuration for this checker
```yaml
critical:
    enabled: true|false # activate this check on this cron or not
```

## Create your own checker
* Create a service that implements `CheckerInterface` and extends `Checker` abstract class.
* Tag this service with the following tag `tranchard.cron_monitor_api.checkers`. You can set a priority too.
* Declare the new event in `CheckEvents` class
* Update the CheckSubscriber to subscribe to the new event
* If it needs a new status, declare it in the client bundle `CronReporter` model and in the `CronReporter` document in this bundle.
* Add the new status to the enumeration to make it valid during form validation
* Update the edit action of the `CronReporterController` to use your new event.
* Describe the new checker configuration into the bundle configuration

gha_language: PHP


text:
# Good ReadMe Generator

  ## License
  ![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg "License Badge")
  [License](https://opensource.org/licenses/ISC)

  ## Demo
  ![Demo](Assets/demo.gif)

  ## Table of Contents

  - [Description](#description)
  - [Link](#url)
  - [Installation](#installation)
  - [Technologies](#technologies)
  - [Usage](#usage)
  - [Tests](#tests)
  - [Contributors](#contributors)
  - [Contact](#contact)

  ## Description
  A short terminal application that creates a read me using specific questions

  ## Link
  To Access this application, please use this link: https://github.com/HannahCloves/9-Good-README-Generator.git

  ## Installation
  VS Code and Node.js

  ## Technologies
  The technologies I have used in this project are: VS Code and Node.js

  ## Usage
  A quick and easy way to generate a readme file for your project

  ## Tests
  Test

  ## Contributors
  Myself

  ## Contact
  Please contact me here for any questions;
  [GitHub Profile: HannahCloves](https://github.com/HannahCloves)
  Email Address<EMAIL_ADDRESS>


text:
# Core Differential Privacy

[**Please note that we are renaming the toolkit and will be introducing the new name in the coming weeks.**](https://projects.iq.harvard.edu/opendp/blog/building-inclusive-community)

## Documentation

The Core is built around a data representation for a statistical analysis.

These pages contain Rust-generated documentation for the Validator and Runtime

- Validator: [whitenoise_validator](https://opendifferentialprivacy.github.io/whitenoise-core/doc/whitenoise_validator/index.html)
- Runtime: [whitenoise_runtime](https://opendifferentialprivacy.github.io/whitenoise-core/doc/whitenoise_runtime/index.html)

---

GitHub pages site: https://opendifferentialprivacy.github.io/whitenoise-core/

---

Note: [CI generated documentation](https://github.com/opendifferentialprivacy/whitenoise-core/blob/develop/.travis.yml)

repository: u-prime/smartnoise-core

repo_name: u-prime/smartnoise-core


text:
# gha-issuenumber
A GitHub action that enforces all commits have issue numbers linked.
It supports silencing the check via a "skip issue" label on a given
pull request.  To support this, it's configured as two workflows:

## 1. The check

```yaml
name: Issue Number

on:
  push:
    branches:
      - master
      - ci
  pull_request:
    branches:
      - '*'

jobs:
  issuenumber-job:
    runs-on: ubuntu-latest
    name: Check Commit Messages

    steps:
    - uses: actions/checkout@v1
      with:
        fetch-depth: 10
        submodules: false
    - uses: ambv/gha-issuenumber/check@master
      id: issuenumber
    - name: Check output
      run: "echo \"Last issue number is ${{ steps.issuenumber.outputs.issuenumber }}\""
```

## 2. A trigger to re-run the check on label changes

GitHub Actions have a limitation/bug that causes checks triggered by
"labeled" and "unlabeled" types of events on pull requests to be
duplicated on the pull request body.  In other words, if the check
for issue numbers failed initially, and you added the "skip issue" label
later, GitHub would create a *new* run of the check and list it
**next to** the old one.  You'd have one failing check and one
successful check.  This makes it impossible to approve a pull request if
you're enforcing that checks must pass before merging.

To work around this, we introduce a trigger for those event types that
simply hits "Re-run" on a pre-existing check.

```yaml
name: Re-Run

on:
  pull_request:
    types: [labeled, unlabeled]
    branches:
      - '*'

jobs:
  issuenumber-job:
    runs-on: ubuntu-latest
    name: Issue Number

    steps:
    - uses: ambv/gha-issuenumber/trigger@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        check_to_rerun: "Check Commit Messages"
```

repository: ambv/gha-issuenumber

repo_name: ambv/gha-issuenumber


text:
# Web Services

- Outline:
  - Web services as a remote procedure call (RPC)
  - XML and XSD
  - Simple object access protocol (SOAP)
    - Web service definition language (WSDL)
    - XML schema definition (XSD)
    - WSDL message
    - HTTP (POST)
  - Implementing SOAP client
- RPC-style communication on top of the web
- Service consumer sends request to service provider using the provider's API
- A web service is any piece of software that makes itself available over the internet
- Accessible via a standard web protocol (e.g HTTP)
- Suited for machine-to-machine communication
- There can be aggregator services which collect information from external services to then serve the client
  - E.g travel agent services need to know about hotel bookings/flights/hire cars

---

- A way of utilising services on remote machines
- On top of HTTP
- Like RPC but
  - With different communication protocol
  - Different interface description language

## Web Services: Usage

- Reusable application-components
  - E.g currency conversion, weather reports, language translation services
- Connect existing software
  - E.g exchange data between different applications and different platforms
- Access functionality
  - E.g google web service

---

- Any application can have a web service component

## Web Services Types

- Two main types
  - Simple object access protocol (SOAP)
    - HTTP (POST)
    - Format: XML
  - Representational state transfer (REST)
    - HTTP (POST, GET, PUT, DELETE, ...)
    - Format: XML, JSON, TEXT, ...

### SOAP VS REST

- REST kinda like a post card
  - Lightweight, no sealing/opening required to read the message
- SOAP kinda like an envelope
  - Fold letter, seal it, has to be opened
- SOAP has extra overhead, more bandwidth required

### Simple Object Access Protocol (SOAP)

- SOAP is a messaging protocol specification for exchanging structured information in the implementation of web services in a distributed environment
- SOAP is an XML based protocol for accessing web services
- A web service has a URI
- Transport (usually) over HTTP
- Initially XML-RPC
- It consists of 4 concepts:
  - XSD schema
  - WSDL (XML)
  - SOAP XML messages
  - HTTP (POST)

### SOAP: Usage

- Used for enterprise-level web services that require high security and are complex transactions
- Used examples of SOAP APIs
  - Financial services
  - Payment gateways
  - Identity management
  - CRM (customer relationship management)
  - Telecommunication services
- PayPal public API

## XML And XSD

- XML: extensible markup language
- XSD: XML schema definition
- XSD is used to describe and validate the structure and the content of XML data
- Example:

![XSD From XML](./images/xsd_from_xml.png)

## WSDL

- WSDL = web services description language
- WSDL is used to describe web services
- WSDL is written in XML
- Programming language independent
- The interface definition language for web services
- Java has a mapping for it's own types to the WSDL types
- Consists of:
  - `Types` - a container for data type definitions using some type system (such as XSD)
  - `Message` - an abstract, typed definition of the data being communicated
    - `Port Type` - an abstract set of operations supported by one or more endpoints
      - `Operation` - an abstract description of an action supported by the service
  - `Binding` - a concrete protocol and data format specification for a particular port type
  - `Service` - a collection of related endpoints
    - `Port` - a single endpoint defined as a combination of a binding and a network address
- You have the data types
- Apply those data types to messages
- Those messages are put together in the port type section to create the operations
- The operations are bundled into a service
- The service as an endpoint a URL which a user can reach

## XSD

- XSD = XML schema definition
- It's a description of datatypes and thus static properties of the service - it's about data

### SOAP Message

- A soap message is an ordinary XML document containing:
  - An envelope element that identifies the XML document as a SOAP message
  - An optional header
  - A body element that contains request and response information
  - A fault element containing errors and status information (e.g resulting from incorrect message format)


text:
# Contributing

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

Please visit our [centralized guidelines] before contributing to this repo.

[centralized guidelines]: https://github.com/taosmountain/guidelines/blob/master/CONTRIBUTING.md

repository: fugoku/docker-nu-atlantis

repo_name: fugoku/docker-nu-atlantis


text:
---
title: "Upgrade"
Latest Release: 4.3.2 {docdate}
draft: false
weight: 80
---

# Upgrading the Crunchy PostgreSQL Operator

There are two methods for upgrading your existing deployment of the PostgreSQL Operator.

If you are upgrading from PostgreSQL Operator 4.1.0 or later, you are encouraged to use the [Automated Upgrade Procedure](/upgrade/automatedupgrade). This method simplifies the upgrade process, as well as maintains your existing clusters in place prior to their upgrade.

For versions before 4.1.0, please see the appropriate [manual procedure](/upgrade/manual).


text:
# kaffee-web :coffee:

## Contributing :computer:
Checkout the [contributing guidline](https://github.com/kaffee-haus/kaffee-web/blob/master/CONTRIBUTING.md)
to get started.

## Continuous Integration/Deployment :rocket:
Continuously integrated with Netlify. When changes are merged into master the site
is rebuilt and redeployed through the service.

## Project setup :wrench:
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn run serve
```

### Compiles and minifies for production
```
yarn run build
```

### Run your tests
```
yarn run test
```

### Lints and fixes files
```
yarn run lint
```

### Run your unit tests
```
yarn run test:unit
```

repository: kaffee-haus/kaffee-web

repo_name: kaffee-haus/kaffee-web


text:
The geometry classes associates 3D positions with the points in a point cloud, and can compute various derived quantities.  These use the same paradigm of "requiring quantities" as the [surface mesh geometry interface](/surface/geometry/geometry), see additional documentation there.

```#include "geometrycentral/pointcloud/point_position_geometry.h"```

!!! warning "Point clouds are in beta"

    The current point cloud API in geometry-central is preliminary, and may change in future versions.

The geometry classes manage buffers of geometric quantities which can be computed, as well as a dependency graph relationship between these quantities. For instance, calling `geom.requireNormals()` will ensure the `geom.normals` buffer is populated with normals, additionally computing & caching any preceding quantities which are needed (here: neighborhoods).  Derived classes can be used to extend with more features, specify additional input data, or override the computation of particular quantities.

**Example:** Basic use of quantities
```c++
#include "geometrycentral/pointcloud/point_cloud.h"
#include "geometrycentral/pointcloud/point_position_geometry.h"

// create a new cloud & geometry object
size_t nPts = 5000;
PointCloud cloud(nPts);
PointData<Vector3> positions = /* some positions */;
PointPositionGeometry geom(*cloud, positions);

// Per-point normals
geom.requireNormals();
for(Point p : cloud.points()) {
  std::cout << "normal for point " << p << " is " << geom.normals[p] << "\n";
}

// Point cloud Laplace matrix
geom.requireLaplacian();
Eigen::SparseMatrix<double> L = geom.laplacian;
```

## Point Position Geometry

This is the most basic core geometry, corresponding to a 3D position associated with each vertex.

Remember, for each quantity YYY, call `requireYYY()` to ensure it has been computed, then access it at `geom.YYYs`.

### Construction

??? func "`#!cpp PointPositionGeometry::PointPositionGeometry(PointCloud& cloud)`"

    Constructs a new unitialized point position geometry on the cloud.

    You should immediately set positions like

    ```cpp
    PointPositionGeometry goem(*cloud);
    for(Point p : cloud->points()) {
      geom.positions[p] = /* some Vector3 position */;
    }
    ```

??? func "`#!cpp PointPositionGeometry::PointPositionGeometry(PointCloud& cloud, const PointData<Vector3>& positions)`"

    Constructs a new point position geometry with specified positions.

    The given positions will be copied to the `geom.positions` field.

### Quantities

??? func "neighbors"

    ##### neighbors

    A collection of `k`-nearest neighbors for each point. Represented via a `Neighborhoods` object, which encapsulates the functionality.

    Set the number of neighbors by assigning to `PointPositionGeometry::kNeighborSize`. The default is 30. If you're going to change it, do so _before_ requiring any quantities that involve neighbors (most of them).

    Iterate over neighbors like:

    ```cpp
    geom.requireNeighbors();
    for (Point p : cloud->points()) {
      std::vector<Point>& neigh = geom.neighbors->neighbors[p];
      size_t M = neigh.size();
      for (size_t iN = 0; iN < M; iN++) {
        Point pN = neigh[iN];
        std::cout << "Point " << p << " has neighbor " << pN << std::endl;
      }
    }
    ```

    - **member:** `std::unique_ptr<Neighborhoods> PointPositionGeometry::neighbors`
    - **require:** `void PointPositionGeometry::requireNeighbors()`

    !!! note "Changes coming"

        A future update will replace this nested `std::vector<>` interface with a flat list and fancy iterators.

??? func "normals"

    ##### normals

    A 3D unit normal at each point.

    Normals are comptuted via PCA over neighbors. By default, nothing is done to orient normals, so orientations will be arbitrary.

    - **member:** `PointData<Vector3> PointPositionGeometry::normals`
    - **require:** `void PointPositionGeometry::requireNormals()`

??? func "tangent basis"

    ##### tangent basis

    A pair of X-Y tangent basis axes at each point. Guaranteed to form an orthonormal right-handed coordinate frame with the normal vector.

    - **member:** `PointData<std::array<Vector3,2>> PointPositionGeometry::tangentBasis`
    - **require:** `void PointPositionGeometry::requireTangentBasis()`

??? func "neighborhood tangent coordinates"

    ##### tangent coordinates

    Local 2D tangent coordinates associated with each neighboring point, corresponding to projection in to the axes in `geom.tangentBasis`.

    - **member:** `PointData<std::vector<Vector2>> PointPositionGeometry::tangentCoordinates`
    - **require:** `void PointPositionGeometry::requireTangentCoordinates()`

??? func "neighborhood tangent transport"

    ##### tangent transport

    Parallel transport coefficients to rotate tangent vectors between neighboring frames.`tangentTransport[i][j]` holds the rotation which maps a vector in the tangent space of i to that of j.

    - **member:** `PointData<std::vector<Vector2>> PointPositionGeometry::tangentTransport`
    - **require:** `void PointPositionGeometry::requireTangentTransport()`

??? func "tufted triangulation"

    ##### tufted triangulation

    A tufted intrinsic triangulation associated with the point cloud. Intuitively this is a special triangulation atop the points in the pointcloud, represented only by its connectivity and edge lengths. It is a very effective numerical data structure to compute downstream quantities, like a highly-quality Laplace matrix. To be clear, this is _not_ a "nice" triangulation like you might get from 3D reconstruction; instead it is a crazy nonmanifold triangulation which happens to have a very useful structure for subsequent numerical computations.  See the publication ["A Laplacian for Nonmanifold Triangle Meshes"](http://www.cs.cmu.edu/~kmcrane/Projects/NonmanifoldLaplace/NonmanifoldLaplace.pdf) for formal details.

    Intuitively,

    - **member:** `PointData<std::unique_ptr<surface::SurfaceMesh>> PointPositionGeometry::tuftedMesh`
    - **member:** `PointData<std::unique_ptr<surface::EdgeLengthGeometry>> PointPositionGeometry::tuftedGeom`
    - **require:** `void PointPositionGeometry::requireTuftedTriangulation()`

??? func "Laplacian"

    ##### Laplacian

    A Laplace matrix for the point cloud. Computed internally using the tufted triangulation as described in [A Laplacian for Nonmanifold Triangle Meshes"](http://www.cs.cmu.edu/~kmcrane/Projects/NonmanifoldLaplace/NonmanifoldLaplace.pdf).

    - **member:** `Eigen::SparseMatrix<double> PointPositionGeometry::laplacian`
    - **require:** `void PointPositionGeometry::requireLaplacian()`

??? func "connection Laplacian"

    ##### connection Laplacian

    A connection Laplace matrix for the point cloud, which is similar to normal scalar Laplacian, but operates on tangent vectors at each point rather than on scalar values. See ["The Vector Heat Method"](https://nmwsharp.com/research/vector-heat-method) for a detailed introduction to connection Laplacians.

    **Note:** This connection Laplacian includes an orientation flip to handle inconsistent normals. Rather than a complex matrix, it builds a `2N x 2N` expanded real matrix, with sign flips on imaginary elements to conjugate (a necessary trick, because conjugation is not a complex-linear operation). This allows us to apply the connection even when normal orientations are inconsistent.

    - **member:** `Eigen::SparseMatrix<double> PointPositionGeometry::connectionLaplacian`
    - **require:** `void PointPositionGeometry::requireConnectionLaplacian()`

??? func "gradient"

    ##### gradient

    A gradient operator `G` for the point cloud. Given a vector `v` of scalar values at each point in the point cloud, multiplying `G*v` yields a tanget vector at each point (as a complex number), representing the spatial gradient of `v` at that point.

    Constructed via a least-squares approximation in the neighborhood tangent coordinate space at each point.

    - **member:** `Eigen::SparseMatrix<std::complex<double>> PointPositionGeometry::gradient`
    - **require:** `void PointPositionGeometry::requireGradient()`

## Point Position & Normal Geometry

The class `PointPositionNormalGeometry` extends the basic `PointPositionGeometry` class to manually specify a set of known normals at points. These normals will be used for all computations, rather than computing normals from scratch.

The `PointPositionNormalGeometry` **is-a** `PointPositionGeometry` via inheritance, so you can directly pass it anywhere a `PointPositionGeometry` is expected.

```#include "geometrycentral/pointcloud/point_position_normal_geometry.h"```

**Example:**
```cpp
std::unique_ptr<PointCloud> cloud; // your cloud
PointData<Vector3> positions(*cloud); // populate with your positions
PointData<Vector3> knownNormals(*cloud); // populate with your normals

PointPositionNormalGeometry geom(*cloud, positions, knownNormals);

// we can now use this just like a `PointPositionGeometry` as above
```

??? func "`#!cpp PointPositionNormalGeometry::PointPositionNormalGeometry(PointCloud& cloud, const PointData<Vector3>& positions, const PointData<Vector3>& normals)`"

    Constructs a new point position geometry with specified normals.

    The given normals will be copied to the `geom.normals` field.

## Point Position & Tangent Basis Geometry

The class `PointPositionFrameGeometry` extends the basic `PointPositionGeometry` class to manually specify a set of known normals and tangent frames at points. These frames / normals will be used for all computations, rather than computing frames / normals from scratch.

The input frames are specified via three vectors at each point `std::array<Vector3, 3>`. These vectors should form a right-handed, orthonormal basis at each vertex, with the two vectors forming the X/Y tangent basis, and the third as the normal direction.

The `PointPositionFrameGeometry` **is-a** `PointPositionGeometry` via inheritance, so you can directly pass it anywhere a `PointPositionGeometry` is expected.

```#include "geometrycentral/pointcloud/point_position_frame_geometry.h"```

**Example:**
```cpp
std::unique_ptr<PointCloud> cloud; // your cloud
PointData<Vector3> positions(*cloud); // populate with your positions
// your {tangent-X, tangent-Y, normal} at each vertex
PointData<std::array<Vector3, 3>> knownFrames(*cloud);

PointPositionFrameGeometrygeom(*cloud, positions, knownNormals);

// we can now use this just like a `PointPositionGeometry` as above
```

??? func "`#!cpp PointPositionFrameGeometry::PointPositionFrameGeometry(PointCloud& cloud, const PointData<Vector3>& positions, const PointData<std::array<Vector3, 3>>& frames)`"

    Constructs a new point position geometry with specified normals.

    The given tangent bases and normals will be copied to the `geom.normals` and `geom.tangentBasis` fields.

repository: nmwsharp/geometry-central

repo_name: nmwsharp/geometry-central


text:
%{
    "Id":"219",
    "Title": "original bibingka at bibingkinitan",
    "Url":"bibingkinitan-original-bibingka",
    "PubDate":"9-Sep-2012",
    "Tags": ["personal"],
    "Preview": "",
}%
[Source](http://markhughneri.com/blog/444/bibingkinitan-original-bibingka/
 "Permalink to the kimerran logs - Original Bibingka At Bibingkinitan")

# the kimerran logs - Original Bibingka At Bibingkinitan

published: Sep 9, 2012

You will definitely buy again when you started munching on this very Pinoy snack. Priced at 20-25 pesos per piece, you will be tempted to buy a dozen bibingka the next time you see their stalls at many malls inside and outside Metro Manila.

Even without tasting it, once I smelled the aroma of their original bibingka, I already bought another box so everyone at home can taste it.

Bibingkinitan is the biggest bibingka and coffee chain popularized by variety of soft and moist bibingka and kapeng barako (Philippine Liberica). It was established in 2006 and has been an innovator during the time when burgers and donuts are popular in the Philippine market.

## What is Bibingka?

Bibingka is a type of rice cake native to the Philippines. This is traditionally made from galapong (milled glutinous rice), coconut milk, margarine, and sugar.

## Bibingkinitan Franchise

Bibingkinitan is open for franchise. The total investment cost ranges from 500,000 to 1.5 million pesos. They prefer areas located in malls, hospitals, offices, gas stations or free standing roadside areas.

To learn more about how to franchise Bibingkinita, visit their franchise information page [here][5].

Information credits:

http://www.bibingkinitan.com

http://panlasangpinoy.com

### Share and Enjoy

* * *

* * *

[1]: http://markhughneri.com/blog/assets/loading.gif "bibingkinitan yummy mouth watering snack"
[2]: http://www.sisigbytes.com/food/wp-content/uploads/sites/2/2012/09/bibingkinitan-yummy.jpg "bibingkinitan yummy mouth watering snack"
[3]: http://panlasangpinoy.com/2010/03/22/rice-cake-bibingka-recipe/
[4]: http://panlasangpinoy.com
[5]: http://www.bibingkinitan.com/category/franchising/

repository: kimerran/kimerran-blog

repo_name: kimerran/kimerran-blog


text:
Ravi Programming Language
=========================

![image](https://travis-ci.org/dibyendumajumdar/ravi.svg?branch=master%0A%20:target:%20https://travis-ci.org/dibyendumajumdar/ravi)

Ravi is a dialect of [Lua](http://www.lua.org/) with limited optional
static typing and features [MIR](https://github.com/vnmakarov/mir)
powered JIT compilers. The name Ravi comes from the Sanskrit word for
the Sun. Interestingly a precursor to Lua was
[Sol](http://www.lua.org/history.html) which had support for static
types; Sol means the Sun in Portugese.

Lua is perfect as a small embeddable dynamic language so why a
derivative? Ravi extends Lua with static typing for improved performance
when JIT compilation is enabled. However, the static typing is optional
and therefore Lua programs are also valid Ravi programs.

There are other attempts to add static typing to Lua - e.g. [Typed
Lua](https://github.com/andremm/typedlua) but these efforts are mostly
about adding static type checks in the language while leaving the VM
unmodified. The Typed Lua effort is very similar to the approach taken
by Typescript in the JavaScript world. The static typing is to aid
programming in the large - the code is eventually translated to standard
Lua and executed in the unmodified Lua VM.

My motivation is somewhat different - I want to enhance the VM to
support more efficient operations when types are known. Type information
can be exploited by JIT compilation technology to improve performance.
At the same time, I want to keep the language safe and therefore usable
by non-expert programmers.

Of course there is the fantastic [LuaJIT](http://luajit.org)
implementation. Ravi has a different goal compared to LuaJIT. Ravi
prioritizes ease of maintenance and support, language safety, and
compatibility with Lua 5.3, over maximum performance. For more detailed
comparison please refer to the documentation links below.

Features
--------

-   Optional static typing - for details [see the reference
    manual](https://the-ravi-programming-language.readthedocs.io/en/latest/ravi-reference.html).
-   Type specific bytecodes to improve performance
-   Compatibility with Lua 5.3 (see Compatibility section below)
-   Generational GC from Lua 5.4
-   `defer` statement for releasing resources
-   Compact JIT backend [MIR](https://github.com/vnmakarov/mir).
-   A [distribution with
    batteries](https://github.com/dibyendumajumdar/Suravi).
-   A [Visual Studio Code debugger
    extension](https://marketplace.visualstudio.com/items?itemName=ravilang.ravi-debug)
    - interpreted mode debugger.

Documentation
-------------

-   For the Lua extensions in Ravi see the [Reference
    Manual](https://the-ravi-programming-language.readthedocs.io/en/latest/ravi-reference.html).
-   [MIR JIT Build
    instructions](https://the-ravi-programming-language.readthedocs.io/en/latest/ravi-mir-instructions.html).
-   Also see [Ravi
    Documentation](http://the-ravi-programming-language.readthedocs.org/en/latest/index.html).
-   and the slides I presented at the [Lua 2015
    Workshop](http://www.lua.org/wshop15.html).

Lua Goodies
-----------

-   [An Introduction to
    Lua](http://the-ravi-programming-language.readthedocs.io/en/latest/lua-introduction.html)
    attempts to provide a quick overview of Lua for folks coming from
    other languages.
-   [Lua 5.3 Bytecode
    Reference](http://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html)
    is my attempt to bring up to date the [Lua 5.1 Bytecode
    Reference](http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf).
-   A [patch for Lua
    5.3](https://github.com/dibyendumajumdar/ravi/blob/master/patches/defer_statement_for_Lua_5_3.patch)
    implements the 'defer' statement.
-   A [patch for Lua
    5.4.[0-2]](https://github.com/dibyendumajumdar/ravi/blob/master/patches/defer_statement_for_Lua_5_4.patch)
    implements the 'defer' statement.
-   Updated [patch for Lua
    5.4.3](https://github.com/dibyendumajumdar/ravi/blob/master/patches/defer_statement_patch_for_Lua_5_4_3.patch)
    implements the 'defer' statement.

Lua 5.4 Position Statement
--------------------------

Lua 5.4 relationship to Ravi is as follows:

-   Generational GC - back-ported to Ravi.
-   New random number generator - back-ported to Ravi.
-   Multiple user values can be associated with userdata - under
    consideration.
-   `<const>` variables - not planned.
-   `<close>` variables - Ravi has `'defer'` statement which is the
    better option in my opinion, hence no plans to support `<close>`
    variables.
-   Interpreter performance improvements - these are beneficial to Lua
    interpreter but not to the JIT backends, hence not much point in
    back-porting.
-   Table implementation changes - under consideration.
-   String to number coercion is now part of string library metamethods
    - back-ported to Ravi.
-   utf8 library accepts codepoints up to 2\^31 - back-ported to Ravi.
-   Removal of compatibility layers for 5.1, and 5.2 - not implemented
    as Ravi continues to provide these layers as per Lua 5.3.

Compatibility with Lua 5.3
--------------------------

Ravi should be able to run all Lua 5.3 programs in interpreted mode, but
following should be noted:

-   Ravi supports optional typing and enhanced types such as arrays (see
    the documentation). Programs using these features cannot be run by
    standard Lua. However all types in Ravi can be passed to Lua
    functions; operations on Ravi arrays within Lua code will be subject
    to restrictions as described in the section above on arrays.
-   Values crossing from Lua to Ravi will be subjected to typechecks
    should these values be assigned to typed variables.
-   Upvalues cannot subvert the static typing of local variables (issue
    \#26) when types are annotated.
-   Certain Lua limits are reduced due to changed byte code structure.
    These are described below.
-   Ravi uses an extended bytecode which means it is not compatible with
    Lua 5.x bytecode.
-   Ravi incorporates the new Generational GC from Lua 5.4, hence the GC
    interface has changed.

  Limit name         Lua value      Ravi value
  ------------------ -------------- --------------
  MAXUPVAL           255            125
  LUAI\_MAXCCALLS    200            125
  MAXREGS            255            125
  MAXVARS            200            125
  MAXARGLINE         250            120

When JIT compilation is enabled there are following additional
constraints:

-   Ravi will only execute JITed code from the main Lua thread; any
    secondary threads (coroutines) execute in interpreter mode.
-   In JITed code tailcalls are implemented as regular calls so unlike
    the interpreter VM which supports infinite tail recursion JIT
    compiled code only supports tail recursion to a depth of about 110
    (issue \#17)
-   Debug api and hooks are not supported in JIT mode

History
-------

-   2015
    :   -   Implemented JIT compilation using LLVM
        -   Implemented [libgccjit based alternative
            JIT](https://github.com/dibyendumajumdar/ravi/tree/gccjit-ravi534)
            (now discontinued)

-   2016
    :   -   Implemented debugger for Ravi and Lua 5.3 for [Visual Studio
            Code](https://github.com/dibyendumajumdar/ravi/tree/master/vscode-debugger)

-   2017
    :   -   Embedded C compiler using dmrC project (C JIT compiler) (now
            discontinued)
        -   Additional type-annotations

-   2018
    :   -   Implemented [Eclipse OMR JIT
            backend](https://github.com/dibyendumajumdar/ravi/tree/omrjit)
            (now discontinued)
        -   Created [Ravi with
            batteries](https://github.com/dibyendumajumdar/Suravi).

-   2019
    :   -   New language feature - defer statement
        -   New JIT backend [MIR](https://github.com/vnmakarov/mir).

-   2020
    :   -   [New parser / type checker /
            compiler](https://github.com/dibyendumajumdar/ravi-compiler)
        -   Generational GC back-ported from Lua 5.4
        -   Support for [LLVM
            backend](https://github.com/dibyendumajumdar/ravi/tree/llvm)
            archived

-   2021 (Plan)
    :   -   Integrated AOT and JIT compilation support
        -   Ravi 1.0 release

License
-------

MIT License

repository: snoopcatt/ravi

repo_name: snoopcatt/ravi


text:
# Fix

The fix for [this
issue](https://my.guild.ai/t/tensorboard-permissionerror-due-to-trailing-space-in-label/1005)
is pending.

Requirements:

- guild<=0.9.0

Check expected Guild version.

    >>> run("guild check -n --version '>0.9.0'")
    <exit 0>

Configure a new Guild environment.

    >>> use_project(mkdtemp())

Create a simple operation to run.

    >>> write("guild.yml", """
    ... test:
    ...   main: guild.pass
    ... """)

Generate a run with an empty space at the end of the label.

    >>> run("guild run test --label 'hello ' -y")
    <exit 0>

Run TensorBoard using `--test-logdir` (note this is a developer only
option and not included in the Guild docs) to process the runs and
exit.

    >>> out = run_capture(f"guild tensorboard --no-open --test-logdir")

Get the log dir from output.

    >>> logdir = re.search("Initialized log dir (.*)", out).group(1)

Show files under log dir. Note the space at the end of the label.

    >>> dir(logdir)
    ['... test ... hello']

repository: guildai/issue-resolution

gha_language: Python

repo_name: guildai/issue-resolution


text:
---
title: "ZooKeeper: A Coordination Kernel"
date: "2021-02-18"
template: "post"
draft: false
slug: "zookeeper-coordination-kernel"
category: "Distributed Systems"
author: "Yingxuan Eng"
tags:
  - "Distributed Systems"
description:
  "ZooKeeper is a coordination kernel that provides a simple API along with powerful guarantees
  that provides clients an easy way to build concurrency primitives for coordinating
  large-scale distributed processes."
socialImage: "/media/zookeeper.png"
---

A key challenge commonly faced in distributed systems design has to do with
process coordination. Many large scale systems require efficient ways to coordinate
between servers, and there are variations on the purpose of coordination (e.g. node configuration,
group membership etc.) each with different requirements. Thus, developing a service
best suited for a particular application from scratch can be challenging and time consuming.

Introducing ZooKeeper, first described in a
[paper](https://www.usenix.org/legacy/event/atc10/tech/full_papers/Hunt.pdf)
published by Yahoo!, a service used for coordinating processes in distributed systems.
Authors of ZooKeeper call it a _coordination kernel_ as it exposes an interface
that allows clients to build coordination primitives (e.g. locks, condition variables)
without changes to the underlying service, much like an operating system provides
system calls for user-space processes. Contrast this with services that targets a specific use
case, such as the Akamai Configuration Management System for node configuration, or
the Amazon Simple Queue Service for queuing, ZooKeeper is much more flexible, which
allows clients to build arbitrary primitives for specific use cases.

> "Distributed systems are a zoo. They are chaotic and hard to manage, and ZooKeeper is meant to keep them
> under control."
>
> <div style="text-align: right"> - on the origin of the name "ZooKeeper" </div>

One of the advantages of ZooKeeper is the emphasis on being "wait-free", meaning that
its implementation does not make use of blocking primitives, such as locks. This
avoids common problems where slow/faulty clients become the bottleneck in the system.
Yet surprisingly, this does not prevent the implementation of locks as we will see later on.
That being said, in order to be an effective service for coordination, ZooKeeper
must provide some reasonable guarantees.

In this article, we will discuss the basic ZooKeeper API and its semantics,
the guarantees that come with ZooKeeper, some example implementations of common
primitives, as well as discuss the underlying implementation of ZooKeeper itself.

# The ZooKeeper Service

## The Abstraction

The ZooKeeper service is usually composed of an ensemble of ZooKeeper servers.
Clients of the service (which are processes that you want to coordinate) connect
to the service by obtaining a session handle from a particular server, but the
handle itself persist across ZooKeeper servers, which allow clients to transparently
move from one server to another.

The abstraction that ZooKeeper provides is a set of data nodes, organized
according to a hierarchical name space, which is a close analogue of
files in a typical filesystem. Each data node is stored in-memory, and can
contain arbitrary data, but is not designed for data storage, but more for
coordination metadata.

![Illustration of an example of ZooKeeper state](/media/example-namespace.png)

In particular, there are two types of data nodes that can be created:

- **Regular**: Clients create and delete regular nodes explictly.
- **Ephemeral**: Clients create ephemeral nodes and can delete
  them explicitly, but the system can remove such nodes automatically
  when the session that created the node terminates.

Note that ephemeral nodes can be useful for implementing certain primitives that are
dependent on whether specific nodes are connected (e.g. leader election,
group membership).

Further, each data node can be created with the _sequential_ flag. Nodes
created with the flag will have a monotonically increasing counter assigned
and appended to its name. This can be useful for implementing primitives
that require queuing.

Finally, ZooKeeper also provides a watching facility, much like
subscription services/change streams, which allows clients to
receive a notification of a change without polling. This can be useful
for implementing primitives that require event waiting or callbacks.

## Client API

Clients of the ZooKeeper service issue requests through the client API. We present
a basic subset of the API discussed in the paper, which we will use to build
some primitives later on.

1. `create(path, data, flags)`: Creates a data node with path name `path`,
   stores `data[]` and returns the name of the data node. `flags` allow
   a client to select between regular and ephemeral data nodes, as well as make
   the data node sequential.
2. `delete(path, version)`: Deletes the data node at `path` if the version
   number matches the data node.
3. `exists(path, watch)`: Returns whether a data node at `path` exists. The
   `watch` flag enables the client to watch the data node for changes.
4. `getData(path, watch)`: Returns the data associated with the data node. The
   `watch` flag enables the client to watch the data node for changes.
5. `setData(path, data, version)`: Writes `data[]` to the data node at `path`
   if the version number matches the data node.
6. `getChildren(path, watch)`: Returns the set of children names of a data node.
7. `sync(path)`: Waits for all updates pending at the start of the operation
   to propagate to the server that the client is connected to.

Note that these requests can be issued asynchronously. In particular, _multiple_
requests can be issued from the same client at a time.

## ZooKeeper Guarantees

A coordination kernel would be next to useless without reasonable guarantees about
how it behaves when operations interleave. Thus, ZooKeeper provides the following
guarantees.

- **Linearizable writes**: All requests that update the global state of the
  ZooKeeper ensemble are serializable and respect precedence. This means that the
  outcome of a set of possibly interleaving writes is equal to the outcome of
  those writes executing serially. Further, write requests are always processed in
  order.
- **FIFO client order**: All requests from a given client are executed
  in the order that they were sent by the client.

Note that ZooKeeper was designed for read-heavy workloads (target read-to-write ratios
range from 2:1 to 100:1), thus ZooKeeper does **not** support linearizable reads!
In other words, reads from a given server can be stale, meaning that updates
that are committed to global state might not be visible. This is a
conscious design decision and does not affect the correctness of the primitives
we can build with ZooKeeper if done carefully. We will discuss why this occurs
when we discuss the implementation details of the ZooKeeper service later on.

# Basic Coordination Primitives

Having seen the abstraction, client API and guarantees of ZooKeeper, let us
put it in action and build a couple of simple coordination primitives with ZooKeeper,
namely read-write locks and leader election.

## Read/Write Locks

A read-write lock is a locking primitive allows multiple readers to hold the lock
**or** exactly one writer to hold the lock at one point in time. To build such
a primitive, we create a regular data node at path `l` to hold metadata for
a particular lock. Then, for each client wishing to hold the lock for reading or
writing, we line them up by creating a _sequential_ data node, and watch the
data node ordered just in front of the newly created node for changes.
The following pseudocode describes the logic in more detail.

**Write Lock**

```
1 n = create(l + “/write-”, EPHEMERAL|SEQUENTIAL)
2 C = getChildren(l, false)
3 if n is lowest data node in C, exit
4 p = data node in C ordered just before n
5 if exists(p, true) wait for event
6 goto 2
```

**Read Lock**

```
1 n = create(l + “/read-”, EPHEMERAL|SEQUENTIAL)
2 C = getChildren(l, false)
3 if no write data nodes lower than n in C, exit
4 p = write data node in C ordered just before n
5 if exists(p, true) wait for event
6 goto 3
```

**Unlock**

```
1 delete(n)
```

A couple of interesting points to note:

- The _sequential_ flag came in useful to implement queuing for locks. Since reads
  can easily be stale, allowing the server to choose the concrete data node path
  prevents race conditions that typically happen due to the lack of atomicity
  of a read followed by a write.
- The _ephemeral_ flag made sure that clients that disconnect due to a failure or
  without releasing the lock on exit will not hold the lock indefinitely.
- The familiar loop to check whether a lock has been obtained by the client is
  important, since it is possible that the previous lock request in queue was abandoned
  (say by a disconnection) while an earlier client is still holding the lock.
- The watch facility provided by ZooKeeper is a neat way to notify a client that
  they can attempt to obtain the lock without polling.
- There is no [herd effect](https://en.wikipedia.org/wiki/Thundering_herd_problem)
  since exactly one client is woken up when a lock is released.
- Even though ZooKeeper does not support linearizable reads, we can be confident that the list
  of children `C` obtained above does not miss any clients that came before, since it is preceded
  by a write operation.
  If the write operation resolves, the read operation that follows must be as recent
  as the state right after the write operation.

## Leader Election

Leader elections are commonly used to coordinate between multiple processes
in distributed systems, where a leader is "elected" to make decisions which
"followers" obey. [Raft](https://penncomputersystems.github.io/posts/raft-consensus)
makes use of leader elections for consistent log replication, and ZooKeeper
itself follows a leader replication model, as we will see later.

To build such a primitive, we create a regular data node at path `l` to
hold metadata for the elction. Then, we again create a _sequential_ node
at `l`, and watch for changes of the preceding data node, and assume the role
of leader if it ever gets deleted. The following pseudocode describes the
idea more concretely.

**Election**

```
1 n = create(l + "/n-", EPHEMEREAL|SEQUENTIAL)
2 C = getChildren(l, false)
3 if n is lowest data node in C, assume leader, exit
4 p = data node in C ordered just before n
5 if exists(p, true) wait for event
6 goto 2
```

The underlying idea for implementing leader election is similar to how
we implemented the read/write lock above. Can you spot how we avoided the
herd effect? Which guarantees of ZooKeeper prevent two clients from thinking
they are both the leaders?

# ZooKeeper Implementation

Finally, we discuss some of the interesting aspects of the implementation of
ZooKeeper itself, namely how it provides its guarantees, and how it is optimized
for real-world throughputs.

## Replicated Databases

As discussed, a ZooKeeper service is usually composed of multiple servers
working as an ensemble. This allows ZooKeeper to provide high availability
by replicating the data nodes on each server. In order to maintain consistency
between servers, ZooKeeper opts for a common strategy for horizontal scaling,
namely leader replication. More specifically, a server is selected as the
_leader_ and the other servers are _followers_. Further, writes are always
routed through the reader and commits when there is a quorum. Note
that reads on the other hand can be served by a local replica which may be
out-of-date and stale (which is why ZooKeeper does not support linearizable reads),
but this allows for higher read throughput.

## Zab: An Atomic Broadcast Protocol

ZooKeeper makes use of _Zab_, an atomic broadcast protocol to provide
the strong guarantees as described previously. At a high level, Zab
makes use of a majority quorum to commit a proposal to a state change,
and guarantees that changes are delivered in order that they were sent
and are atomic. ZooKeeper also makes use of _Zab_ for fault tolerance,
and uses the protocol to deliver "catch-up" messages since the last
snapshot in the event of a server failure.

An important point about Zab is that each state change is recorded
in an _idempotent_ transaction. In other words, applying a particular
transaction multiple times will not affect the final state of the system.
Note that this often requires the leader to execute client requests locally
before proposing a change. For instance, an operation to increment the value
of the data node at `path` has to be converted to setting the value of the
data node to some value to preserve idempotency.

For more details and theoretical proofs of correctness of _Zab_, check out
the paper [here](https://marcoserafini.github.io/papers/zab.pdf).

## Fuzzy Snapshots

Since the data nodes are stored in-memory, each replica has to take snapshots
periodically as replaying all transactions from the leader would potentially
be too time consuming. Recall that ZooKeeper is _wait-free_, so the snapshots
are _fuzzy snapshots_, since the implementation does not take a lock on the
state of a particular replica. Interestingly, a resulting snapshot may not correspond
to the state of ZooKeeper at any point in time (can you think of a series of
transactions and snapshot procedure that results in this behavior?). But,
since transactions are idempotent, a replica can easily apply them as long as
the transactions are stored in the correct order.

# Summary

ZooKeeper was initially developed at Yahoo! and used for a variety of Yahoo!
services such as the search engine crawler and their distributed pub-sub system,
but has seen many more use cases ever since. For instance, the Apache Software
Foundation has developed [Apache ZooKeeper](https://zookeeper.apache.org/)
as an open-source version of ZooKeeper and is widely used for many production
applications including Apache Hadoop and Kafka as well as companies including
Yelp, Reddit, Facebook, Twitter etc. Its simple interface, reasonable
consistency guarantees, and flexible abstractions provides the user with the
ability to tailor specific primitives that fit the requirements of a particular system.

_P.S._ Personally, I first heard about ZooKeeper from an interesting
[Youtube video](https://www.youtube.com/watch?v=mMuk8Rn9HBg) from one of my favorite programming channels
on building an asynchronous ZooKeeper client in Rust, which is in
my opinion a great way to get hands-on experience with interacting with ZooKeeper!