text:
# Klaviyo PHP SDK (Legacy)

## Legacy Notice

This SDK is set to be deprecated + retired on 2024-01-01.

We have a NEW PHP SDK to go along with our [new API](https://developers.klaviyo.com/en/reference/api_overview).

We recommend migrating over to our [newest SDK](https://github.com/klaviyo/klaviyo-api-php).

You can read more about our SDK release history and support [here](https://developers.klaviyo.com/en/docs/sdk_overview)

For a comparison between our old and new APIs, check out [this guide](https://developers.klaviyo.com/en/docs/apis_comparison_chart).

## Klaviyo PHP SDK

- SDK version: <IP_ADDRESS>20329

## Helpful Resources

- [API Reference](https://developers.klaviyo.com/en/reference/api-overview)
- [API Guides](https://developers.klaviyo.com/en/docs)
- [Postman Workspace](https://www.postman.com/klaviyo/workspace/klaviyo-developers)

## Design & Approach

This SDK is a thin wrapper around our API. See our API Reference for full documentation on API behavior.

This SDK mirrors the organization and naming convention of the above language-agnostic resources, with a few namespace changes to conform to PHP idioms (details in Appendix).

## Organization

This SDK is organized into the following resources:

- Campaigns

- DataPrivacy

- ListsSegments

- Metrics

- Profiles

- Templates

- TrackIdentify

# Installation

You can install this package using either [Packagist](https://packagist.org/packages/klaviyo/sdk), or the source code.

## Option 1: Packagist

You can install this library using Packagist.

If you have composer installed, you can run: `composer require klaviyo/sdk`

## Option 2: Source code

You can also install this library directly from source code, without using the Packagist package, as follows:

1. cloning this repo
2. running `composer update` (within the repo)

# Usage Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Klaviyo\Client;

$client = new Client(
    'YOUR_API_KEY',
    $num_retries = 3,
    $wait_seconds = 3);

$response = $client->Metrics->getMetrics();
```

# Retry behavior

* The SDK retries on resolvable errors, namely: rate limits (common) and server errors on Klaviyo's end (rare).
* The keyword arguments in the example above define retry behavior
  * `wait_seconds` denotes how long to wait per retry, in *seconds*
  * If you wish to disable retries, set `$num_retries = 0`
  * the example is populated with the default values
* non-resolvable errors and resolvable errors which have timed out throw an `ApiException`, detailed below.

# Error Handling

This SDK throws an `ApiException` error when the server returns a non resolvable response, or a resolvable non-`2XX` response times out.

If you'd like to extend error handling beyond what the SDK supports natively, you can use the following methods to retrieve the corresponding attributes from the `ApiException` object:

* `getCode() : int`
* `getMessage() : str`
* `getReponseBody() : bytes`
* `getResponseHeaders() : string[]`

For example:

```php
try {
  $client.Metrics.getMetrics();
} catch (Exception $e) {
  if ($e->getCode() == SOME_INTEGER) {
    doSomething();
  }
}
```

# Comprehensive list of Operations & Parameters

_**NOTE:**_
- Organization: Resource groups and functions are listed in alphabetical order, first by Resource name, then by **OpenAPI Summary**. Operation summaries are those listed in the right side bar of the [API Reference](https://developers.klaviyo.com/en/reference/track-post). These summaries link directly to the corresponding section of the API reference.
- For example values / data types, as well as whether parameters are required/optional, please reference the corresponding API Reference link.
- Some keyword args are required for the API call to succeed, the API docs above are the source of truth regarding which keyword args are required.
- Keyword args are not included in the sample SDK calls; instead, where applicable, they are included as comments above each SDK call.
- JSON payloads should be passed in as associative arrays
- A strange quirk of PHP is that default/optional arguments must be passed in in order, and MUST be included and set as `null`, at least up to the last default value you wish to use.
  - For example, if a given function has the following optional parameters `someFunction($a=1, $b=2, $c=3)`, and you wish to only set `$b`, you MUST pass in `someFunction($a=null, $b=$YOUR_VALUE)`
  - Otherwise, if you pass in something such as `someFunction($b=$YOUR_VALUE)`, PHP will actually assign the `$YOUR_VALUE` to parameter `$a`, which is wrong.

## Campaigns

#### [Cancel a Campaign](https://developers.klaviyo.com/en/reference/cancel-campaign)

```php
## Positional Arguments

# $campaign_id | string

client->Campaigns->cancelCampaign($campaign_id);
```

#### [Clone a Campaign](https://developers.klaviyo.com/en/reference/clone-campaign)

```php
## Positional Arguments

# $campaign_id | string
# $name | string
# $list_id | string

client->Campaigns->cloneCampaign($campaign_id, $name, $list_id);
```

#### [Create New Campaign](https://developers.klaviyo.com/en/reference/create-campaign)

```php
## Positional Arguments

# $list_id | string
# $template_id | string
# $from_email | string
# $from_name | string
# $subject | string

## Keyword Arguments

# $name | string
# $use_smart_sending | bool
# $add_google_analytics | bool

client->Campaigns->createCampaign($list_id, $template_id, $from_email, $from_name, $subject);
```

#### [Get Campaign Info](https://developers.klaviyo.com/en/reference/get-campaign-info)

```php
## Positional Arguments

# $campaign_id | string

client->Campaigns->getCampaignInfo($campaign_id);
```

#### [Get Campaign Recipients](https://developers.klaviyo.com/en/reference/get-campaign-recipients)

```php
## Positional Arguments

# $campaign_id | string

## Keyword Arguments

# $count | int
# $sort | string
# $offset | string

client->Campaigns->getCampaignRecipients($campaign_id);
```

#### [Get Campaigns](https://developers.klaviyo.com/en/reference/get-campaigns)

```php

## Keyword Arguments

# $page | int
# $count | int

client->Campaigns->getCampaigns();
```

#### [Schedule a Campaign](https://developers.klaviyo.com/en/reference/schedule-campaign)

```php
## Positional Arguments

# $campaign_id | string
# $send_time | string

client->Campaigns->scheduleCampaign($campaign_id, $send_time);
```

#### [Send a Campaign Immediately](https://developers.klaviyo.com/en/reference/send-campaign)

```php
## Positional Arguments

# $campaign_id | string

client->Campaigns->sendCampaign($campaign_id);
```

#### [Update Campaign](https://developers.klaviyo.com/en/reference/update-campaign)

```php
## Positional Arguments

# $campaign_id | string

## Keyword Arguments

# $list_id | string
# $template_id | string
# $from_email | string
# $from_name | string
# $subject | string
# $name | string
# $use_smart_sending | bool
# $add_google_analytics | bool

client->Campaigns->updateCampaign($campaign_id);
```

## DataPrivacy

#### [Request a Deletion](https://developers.klaviyo.com/en/reference/request-deletion)

```php

## Keyword Arguments

# $body | array

client->DataPrivacy->requestDeletion();
```

## ListsSegments

#### [Add Members to a List](https://developers.klaviyo.com/en/reference/add-members)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->addMembers($list_id);
```

#### [Create List](https://developers.klaviyo.com/en/reference/create-list)

```php
## Positional Arguments

# $list_name | string

client->ListsSegments->createList($list_name);
```

#### [Delete List](https://developers.klaviyo.com/en/reference/delete-list)

```php
## Positional Arguments

# $list_id | string

client->ListsSegments->deleteList($list_id);
```

#### [Exclude Profile From All Email](https://developers.klaviyo.com/en/reference/exclude-globally)

```php
## Positional Arguments

# $email | string

client->ListsSegments->excludeGlobally($email);
```

#### [Get Global Exclusions & Unsubscribes](https://developers.klaviyo.com/en/reference/get-global-exclusions)

```php

## Keyword Arguments

# $reason | string
# $sort | string
# $count | int
# $page | int

client->ListsSegments->getGlobalExclusions();
```

#### [Get All Exclusions for a List](https://developers.klaviyo.com/en/reference/get-list-exclusions)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $marker | int

client->ListsSegments->getListExclusions($list_id);
```

#### [Get List Info](https://developers.klaviyo.com/en/reference/get-list-info)

```php
## Positional Arguments

# $list_id | string

client->ListsSegments->getListInfo($list_id);
```

#### [Check if Profiles Are in a List](https://developers.klaviyo.com/en/reference/get-list-members)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->getListMembers($list_id);
```

#### [Check if Profiles Are in a List and not Suppressed](https://developers.klaviyo.com/en/reference/get-list-subscriptions)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->getListSubscriptions($list_id);
```

#### [Get Lists](https://developers.klaviyo.com/en/reference/get-lists)

```php

client->ListsSegments->getLists();
```

#### [Get List and Segment Members](https://developers.klaviyo.com/en/reference/get-members)

```php
## Positional Arguments

# $list_or_segment_id | string

## Keyword Arguments

# $marker | int

client->ListsSegments->getMembers($list_or_segment_id);
```

#### [Check if Profiles Are in a Segment](https://developers.klaviyo.com/en/reference/get-segment-members)

```php
## Positional Arguments

# $segment_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->getSegmentMembers($segment_id);
```

#### [Remove Profiles From List](https://developers.klaviyo.com/en/reference/remove-members)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->removeMembers($list_id);
```

#### [Subscribe Profiles to List](https://developers.klaviyo.com/en/reference/subscribe)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->subscribe($list_id);
```

#### [Unsubscribe Profiles From List](https://developers.klaviyo.com/en/reference/unsubscribe)

```php
## Positional Arguments

# $list_id | string

## Keyword Arguments

# $body | array

client->ListsSegments->unsubscribe($list_id);
```

#### [Update List Name](https://developers.klaviyo.com/en/reference/update-list-name)

```php
## Positional Arguments

# $list_id | string
# $list_name | string

client->ListsSegments->updateListName($list_id, $list_name);
```

## Metrics

#### [Get Metrics Info](https://developers.klaviyo.com/en/reference/get-metrics)

```php

## Keyword Arguments

# $page | int
# $count | int

client->Metrics->getMetrics();
```

#### [Query Event Data](https://developers.klaviyo.com/en/reference/metric-export)

```php
## Positional Arguments

# $metric_id | string

## Keyword Arguments

# $start_date | string
# $end_date | string
# $unit | string
# $measurement | string
# $where | string
# $by | string
# $count | int

client->Metrics->metricExport($metric_id);
```

#### [Get Events for a Specific Metric](https://developers.klaviyo.com/en/reference/metric-timeline)

```php
## Positional Arguments

# $metric_id | string

## Keyword Arguments

# $since | string
# $count | int
# $sort | string

client->Metrics->metricTimeline($metric_id);
```

#### [Get Events for All Metrics](https://developers.klaviyo.com/en/reference/metrics-timeline)

```php

## Keyword Arguments

# $since | string
# $count | int
# $sort | string

client->Metrics->metricsTimeline();
```

## Profiles

#### [Exchange ID for Profile ID](https://developers.klaviyo.com/en/reference/exchange)

```php

## Keyword Arguments

# $body | array

client->Profiles->exchange();
```

#### [Get Profile](https://developers.klaviyo.com/en/reference/get-profile)

```php
## Positional Arguments

# $person_id | string

client->Profiles->getProfile($person_id);
```

#### [Get Profile ID](https://developers.klaviyo.com/en/reference/get-profile-id)

```php

## Keyword Arguments

# $email | string
# $phone_number | string
# $external_id | string

client->Profiles->getProfileId();
```

#### [Get Profile's Events for a Specific Metric](https://developers.klaviyo.com/en/reference/profile-metric-timeline)

```php
## Positional Arguments

# $person_id | string
# $metric_id | string

## Keyword Arguments

# $since | string
# $count | int
# $sort | string

client->Profiles->profileMetricTimeline($person_id, $metric_id);
```

#### [Get Profile's Events for all Metrics](https://developers.klaviyo.com/en/reference/profile-metrics-timeline)

```php
## Positional Arguments

# $person_id | string

## Keyword Arguments

# $since | string
# $count | int
# $sort | string

client->Profiles->profileMetricsTimeline($person_id);
```

#### [Update Profile](https://developers.klaviyo.com/en/reference/update-profile)

```php
## Positional Arguments

# $person_id | string

## Keyword Arguments

# $params | array<string,mixed>

client->Profiles->updateProfile($person_id);
```

## Templates

#### [Clone Template](https://developers.klaviyo.com/en/reference/clone-template)

```php
## Positional Arguments

# $template_id | string
# $name | string

client->Templates->cloneTemplate($template_id, $name);
```

#### [Create New Template](https://developers.klaviyo.com/en/reference/create-template)

```php
## Positional Arguments

# $name | string
# $html | string

client->Templates->createTemplate($name, $html);
```

#### [Delete Template](https://developers.klaviyo.com/en/reference/delete-template)

```php
## Positional Arguments

# $template_id | string

client->Templates->deleteTemplate($template_id);
```

#### [Get All Templates](https://developers.klaviyo.com/en/reference/get-templates)

```php

## Keyword Arguments

# $page | int
# $count | int

client->Templates->getTemplates();
```

#### [Render Template](https://developers.klaviyo.com/en/reference/render-template)

```php
## Positional Arguments

# $template_id | string

## Keyword Arguments

# $context | string

client->Templates->renderTemplate($template_id);
```

#### [Render and Send Template](https://developers.klaviyo.com/en/reference/send-template)

```php
## Positional Arguments

# $template_id | string
# $from_email | string
# $from_name | string
# $subject | string
# $to | string

## Keyword Arguments

# $context | string

client->Templates->sendTemplate($template_id, $from_email, $from_name, $subject, $to);
```

#### [Update Template](https://developers.klaviyo.com/en/reference/update-template)

```php
## Positional Arguments

# $template_id | string

## Keyword Arguments

# $name | string
# $html | string

client->Templates->updateTemplate($template_id);
```

## TrackIdentify

#### [Identify Profile (Legacy)](https://developers.klaviyo.com/en/reference/identify-get)

```php
## Positional Arguments

# $data | string

client->TrackIdentify->identifyGet($data);
```

#### [Identify Profile](https://developers.klaviyo.com/en/reference/identify-post)

```php
## Positional Arguments

# $data | string

client->TrackIdentify->identifyPost($data);
```

#### [Track Profile Activity (Legacy)](https://developers.klaviyo.com/en/reference/track-get)

```php
## Positional Arguments

# $data | string

client->TrackIdentify->trackGet($data);
```

#### [Track Profile Activity](https://developers.klaviyo.com/en/reference/track-post)

```php
## Positional Arguments

# $data | string

client->TrackIdentify->trackPost($data);
```

# Appendix

## Limitations

- The `api_key` is set at the global level: this means that if you manage multiple stores, you will need to run the code for each store in a different environment

## Namespace

In the interest of making the SDK conform to PHP idioms, we made the following namespace changes *relative* to the language agnostic resources up top (API Docs, Guides, etc).

- non-alphanumeric symbols (spaces, dashes, underscore, ampersand etc) stripped from resource names (tags) and function names (operation IDs)
- Resource names and function names use camelCase
- NOTE: this does not apply to parameter names

For example:
* `Track & Identify` becomes `TrackIdentify`
* `get-campaigns` becomes `getCampaigns`
* `profile_id` *remains* unchanged

## Parameters & Arguments

The parameters follow the same naming conventions as the resource groups and operations.

We stick to the following convention for parameters/arguments

1. All parameters are passed as function args.
2. All optional params, as well as all Body and Form Data params (including required ones), are passed as keyword args.
3. All query and path params that are tagged as `required` in the docs are passed as positional args.
4. There is no need to pass in your private `api_key` for any operations, as it is defined upon client instantiation; public key is still required where noted for Track/Identify endpoints.

repository: klaviyo/klaviyo-php-sdk

repo_name: klaviyo/klaviyo-php-sdk


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.2.1](https://github.com/times/times-visuals/compare/@times-visuals/treemap@1.2.0<EMAIL_ADDRESS>(2019-11-11)

**Note:** Version bump only for package @times-visuals/treemap

# [1.2.0](https://github.com/times/times-visuals/compare/@times-visuals/treemap@1.1.1<EMAIL_ADDRESS>(2019-06-14)

### Features

* BREAKING CHANGE Update all packages to BSD-3-Clause license ([87a5e01](https://github.com/times/times-visuals/commit/87a5e01))

## [1.1.1](https://github.com/times/times-visuals/compare/@times-visuals/treemap@1.1.0<EMAIL_ADDRESS>(2019-06-14)

### Bug Fixes

* add d3-jetpack dependency ([58c5294](https://github.com/times/times-visuals/commit/58c5294))

# [1.1.0](https://github.com/times/times-visuals/compare/@times-visuals/treemap@1.0.3<EMAIL_ADDRESS>(2019-06-13)

### Features

* Add treemap d3 code ([ddbecb5](https://github.com/times/times-visuals/commit/ddbecb5))

## 1.0.1 (2019-06-05)

**Note:** Version bump only for package @times-visuals/treemap

repository: times/times-visuals

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

license_type: permissive

repo_name: times/times-visuals


text:
# Installation

## Create a conda environoment

Download the latest version of [Miniconda](<https://docs.conda.io/en/latest/miniconda.html>)
for the appropriate OS. Follow the remaining [steps](<https://conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation>)
for the appropriate OS version.

Using conda, create a new virtual environment, replacing `<environment_name>` with a name
of your choosing (without spaces):
```text
$ conda create -n <environment_name> python=3.7 --no-default-packages
$ conda activate <environment_name>
$ conda install -c anaconda pip
```
You can now use ``conda activate <environment_name>`` to enter the environment and
``conda deactivate`` to exit the environment.

## Installing

```{note}
The folowing all asssume you are in your `wombat` environment!
```

### Pip

NOTE: THIS ONLY WORKS FOR WOMBAT, DO NOT DO THIS FOR WOMBAT!!!!!!!!
```text
$ pip install wombat
```

### From Source

```text
$ git clone https://github.com/WISDEM/WOMBAT.git
$ pip install wombat/
```

### For contributors:

```text
$ git clone https://github.com/WISDEM/WOMBAT.git
$ cd wombat
$ pip install -e '.[dev]'
# Required for automatic code formatting!
$ pre-commit install
```

### For documentation:

```text
$ git clone https://github.com/WISDEM/WOMBAT.git
$ cd wombat
$ pip install -e '.[docs]'
```

#### Build the documentation site

```text
$ cd docs/
$ make html
```

Now, the documentation site should be able to be viewed locally at
docs/_build/html/index.html

repository: hbpeters/WOMBAT

branch_name: refs/heads/main

repo_name: hbpeters/WOMBAT


text:
# Device42 Integration Pack

Integration pack that provides support for Device42, a self-documenting CMDB and single source of truth for all things
IT infrastructure

## Configuration

Copy the example configuration in [device42.yaml.example](./device42.yaml.example)
to `/opt/stackstorm/configs/device42.yaml` and edit as required.

* `d42_server` - Device42 instance address (with protocol and without trailing slash)
* `d42_username` - Device42 username
* `d42_password` - Device42 password
* `verify_certificate` - Set to `false` in case of self-signed SSL certificate

You can also use dynamic values from the datastore. See the
[docs](https://docs.stackstorm.com/reference/pack_configs.html) for more info.

## Supported Actions
```
+-------------------------------+----------+--------------------+---------------------------------------------+
| ref                           | pack     | name               | description                                 |
+-------------------------------+----------+--------------------+---------------------------------------------+
| device42.device_name_list     | device42 | device_name_list   | Returns list of devices names               |
| device42.suggest_next_ip      | device42 | suggest_next_ip    | Suggest next available IP Address           |
| device42.get_dns_zone         | device42 | get_dns_zone       | Returns DNS zone file content for a domain  |
+-------------------------------+----------+--------------------+---------------------------------------------+
```

## Examples

#### Get `device42.device_name_list` for FreeBSD
```sh
# st2 run device42.device_name_list os=freebsd

id: 57e2dad51d41c80479ff1de6
status: succeeded
parameters:
  os: freebsd
result:
  exit_code: 0
  result:
  - freebsd
  - freebsd-93-001
  - Unknown
  stderr: ''
  stdout: ''
```

#### Get `device42.suggest_next_ip` for subnet
```sh
# st2 run device42.suggest_next_ip subnet=<IP_ADDRESS>/22

id: 57e2d9741d41c80479ff1dc8
status: succeeded
parameters:
  subnet: <IP_ADDRESS>/22
result:
  exit_code: 0
  result: <IP_ADDRESS>
  stderr: ''
  stdout: ''
```

#### Get `device42.get_dns_zone` for domain
```sh
# st2 run device42.get_dns_zone domain=domain.com

id: 581c7c441d41c804d9067e59
status: succeeded
parameters:
  domain: domain.com
result:
  exit_code: 0
  result: ''@ 3600 IN SOA nh-win2k8r2-vm-03 hostmaster. 107493<PHONE_NUMBER>0 3600
    @ 600 IN A <IP_ADDRESS>
    @ 3600 IN NS nh-win2k8r2-vm-03
    gc._msdcs 600 IN A <IP_ADDRESS>
    _ldap._tcp.gc._msdcs 600 IN SRV 0 100 3268 nh-win2k8r2-vm-03'
  stderr: ''
  stdout: ''
```

repository: circlesgit/resources

gha_language: Go

repo_name: circlesgit/resources


text:
---
layout: post
title: Thali Story 0 - The lights are officially on!
---
Story 0 includes (in rough form) most of the major technologies needed to make Thali go including Android and iOS local discovery and
connectivity, [JXcore](https://github.com/jxcore/jxcore),  [Cordova](https://cordova.apache.org/),
[JXcore for Cordova](https://github.com/jxcore/jxcore-cordova) and [PouchDB](http://pouchdb.com/).
See [here](http://www.goland.org/story0/) for details! You can get the sample app [here](https://github.com/thaliproject/postcardapp).
Tons more work to do but this is an exciting step!

license: MIT

repository: thaliproject/thali

branch_name: refs/heads/gh-pages

gha_license_id: MIT

repo_name: thaliproject/thali


text:
Recommended Learning Path
---
This document is a work-in-progress.

## Overview

This document containers a recommended path for learning key HPE Container Platform (HCP) capabilities

## Pre-requisites

- A thirst for knowledge is important - we cover a lot of topics!
- AWS account for running a demo environment
- Bookmark and regularly refer to http://docs.bluedata.com

## Product Overview

TODO create learning pages with knowledge test for ...

- [HPE container strategy - Market overview](erraform/blob/master/learn/Product_Overview/hpe_container_strategy_market_overview.md) [15 mins] (coming soon)
- [HPE container strategy - Transformation challenges](https://www.hpe.com/us/en/solutions/container-platform.brightcove.c94f2cc7-92b7-44b1-aae1-8ba2992f0578.html.html)
- [HPE container strategy - HPE solution](https://www.hpe.com/us/en/solutions/container-platform.brightcove.20b7d874-85ca-4c3f-8765-9a6c6492bbdb.html.html)
- [HPE Container Platform - How it Works](https://www.hpe.com/us/en/solutions/container-platform.brightcove.df01eb6c-2faf-4eb6-b637-82d0080fb1b9.html)
- [HPE Data Fabric](https://www.hpe.com/us/en/solutions/container-platform.brightcove.2c86bcce-641c-4df8-99b9-7f43afb4c1f1.html.html)
- [Operationalizing the ML Lifecycle](https://www.hpe.com/us/en/solutions/container-platform.brightcove.b7e8ce3b-f18e-49e7-bd3c-d55b11c4ca9a.html)

## Foundation Technical Concepts

- [Software Components](./HCP_Foundation_Concepts/software-components.md) [30 mins] (ready)
- [Controller, Gateway and Worker Hosts](./HCP_Foundation_Concepts/controller_gateway_and_worker_hosts.md) [30 mins] (ready)
- ...
- [DataTaps](./HCP_Foundation_Concepts/datataps.md) [30 mins] (ready)

more topics coming soon ...

## Platform Administration

### Demo environment lifecycle

- [Provision demo environment](./HCP_Administration/provision_demo_environment.md) [2 hours] (coming soon)
- [Teardown demo environment](./HCP_Administration/teardown_demo_environment.md) [30 mins] (coming soon)
- [Shutdown demo environment](./HCP_Administration/shutdown_demo_environment.md) [15 mins] (coming soon)
- [Startup demo environment](./HCP_Administration/startup_demo_environment.md) [15 mins] (coming soon)
- [Status of demo environment](./HCP_Administration/status_demo_environment.md) [15 mins] (coming soon)

### Manual install HCP

- [Manually install HCP](./HCP_Administration/manually_install_demo_environment.md) [4 hours] (coming soon)

### Configure HCP Global Settings

- [Add a Gateway Host](./HCP_Administration/add_a_gateway_host.md) [30 mins] (coming soon)
- [Configure Active Directory](./HCP_Administration/configure_active_directory.md) [30 mins] (coming soon)
- [Install CENTOS 7 EPIC Image](./HCP_Administration/install_centos_7_image.md) [15 mins] (coming soon)
- [Enable Controller Virtual Nodes](./HCP_Administration/enabled_controller_virtual_nodes.md) [15 mins] (coming soon)
- [Tenant AD authentication](./HCP_Administration/tenant_ad_authentication.md) [30 mins] (coming soon)
- [Deploy CENTOS 7 Cluster](./HCP_Administration/deploy_centos_7_cluster.md) [15 mins] (coming soon)
- [HA Overview](./HCP_Administration/ha_overview.md) [30 mins] (coming soon)

### Managing EPIC

- [Cluster Security](./HCP_Administration/cluster_security.md) [1 hour] (coming soon)
- [Creating a Tenant](./HCP_Administration/creating_a_tenant.md) [1 hour] (coming soon)
- [Tenant authentication](./HCP_Administration/tenant_authentication.md) [1 hour] (coming soon)
- [Host Management](./HCP_Administration/host_management.md) [1 hour] (coming soon)

### Managing K8S

- [Creating a Cluster](./HCP_Administration/creating_a_k8s_cluster.md) [1 hour] (coming soon)
- [Creating a Tenant](./HCP_Administration/creating_a_k8s_tenant.md) [1 hour] (coming soon)
- [Tenant authentication](./HCP_Administration/tenant_authentication.md) [1 hour] (coming soon)
- [Host Management](./HCP_Administration/k8s_host_management.md) [1 hour] (coming soon)

### Managing MLOPS

- [Pre-requisites](./Managing_MLOPS/prerequisites.md) [1 hour] (coming soon)
- [MLOPS Images](./Managing_MLOPS/images.md) [1 hour] (coming soon)
- [Creating MLOPS Tenants](./Managing_MLOPS/creating_tenants.md) [1 hour] (coming soon)
- [Creating Training Clusters](./Managing_MLOPS/creating_training_clusters.md) [1 hour] (coming soon)
- [Creating Deployment Clusters](./Managing_MLOPS/creating_deployment_clusters.md) [1 hour] (coming soon)
- [Tutorial 1](./Managing_MLOPS/tutorial_1.md) [2 hours] (coming soon)
- [Tutorial 2](./Managing_MLOPS/tutorial_2.md) [2 hours] (coming soon)
- [Tutorial 3](./Managing_MLOPS/tutorial_3.md) [2 hours] (coming soon)

### HCP CLI and API

- [HCP CLIs](./HCP_Administration/hcp_cli.md) [1 hour] (coming soon)
- [HCP APIs](./HCP_Administration/hcp_api.md) [1 hour] (coming soon)

## Data Fabric Administration

- [Management Console](./Data_Fabric_Administration/management_console.md) [1 hour] (coming soon)
- [Deployment Architecture](./Data_Fabric_Administration/deployment_architecture.md) [2 hours] (coming soon)
- [Topologies and Volumes](./Data_Fabric_Administration/topologies_and_volumes.md) [2 hours] (coming soon)
- [Tiering](./Data_Fabric_Administration/tiering.md) [2 hours] (coming soon)
- [CLI](./Data_Fabric_Administration/cli.md) [1 hour] (coming soon)
- [API](./Data_Fabric_Administration/cli.md) [1 hour] (coming soon)

## EPIC User

- [Spark Cluster](./EPIC_User/spark_cluster.md) [2 hours] (coming soon)
- [Action Scripts](./EPIC_User/action_scripts.md) [2 hours] (coming soon)

## Creating an EPIC application image

topics coming soon ...

## Creating a K8S KubeDirector application image

topics coming soon ...


text:
# compressQuat

Getting inspiration from
 [blog.codingnow.com](https://blog.codingnow.com/2017/11/quaternion_compress.html)
 and
 [ozz-animation](https://github.com/guillaumeblanc/ozz-animation)

License
-------

compressQuat is hosted on [github](https://github.com/lts123124/compressQuat.git) and distributed under the **MIT License** (MIT).


text:
# Favicon Detector
![favicon-detector-logo]

A simple way to detect website icons based on [parse-favicon] library.

[favicon-detector-logo]: src/assets/images/icon-128.png
[parse-favicon]: https://github.com/BlackGlory/parse-favicon

## Supported browsers and platforms
- [x] [Chrome]
- [x] [Firefox]
- [x] [Edge]

[Chrome]: https://chrome.google.com/webstore/detail/jlfeffjhgmgblofcgpbgpkkhfniipejm
[Firefox]: https://addons.mozilla.org/firefox/addon/favicon-detector/
[Edge]: https://microsoftedge.microsoft.com/addons/detail/favicon-detector/kmlcolmkcjbpagopgiojkflkejfnnjbm

## Build
```sh
yarn install
yarn build
```

repository: BlackGlory/favicon-detector

gha_language: TypeScript

repo_name: BlackGlory/favicon-detector


text:
# Using the shell scripts
"toplevel directory" assumes that the current path contains the `maggot_connectome` folder (i.e. this repo).

## `make_notebook.sh`
From the toplevel directory, do

``./maggot_connectome/shell/make_notebook.sh <script name>``

where `<script name>` is the name of a Python script in `maggot_connectome/scripts`.
The Python script will be run as a notebook, the notebook will be saved in
`maggot_connectome/docs` with the same name, and cell metadata tags will be added to
the notebook.

repository: neurodata/bilateral-connectome

gha_language: Python

repo_name: neurodata/bilateral-connectome


text:
### Description

Compute the external contour of a polydata.

At first, it creates a black and white image of a scene containing the polydata and then extracts the contour of the black shape from the image.

repository: Kitware/vtk-examples

repo_name: Kitware/vtk-examples


text:
# access-logs-dw-gcp-js

Utility functions used to backup access logs into a Google Cloud-hosted Data Warehouse.

[![js-standard-style][1]][2] [![CircleCI][3]][4]

_This repository is part a project described in the article
[Serverless ETL on Google Cloud, a case study: raw data into JSON Lines][5]._

## How to contribute

Please make sure to take a moment and read the [Code of
Conduct](https://github.com/ricardolsmendes/access-logs-dw-gcp-js/blob/master/.github/CODE_OF_CONDUCT.md).

### Report issues

Please report bugs and suggest features via the [GitHub
Issues](https://github.com/ricardolsmendes/access-logs-dw-gcp-js/issues).

Before opening an issue, search the tracker for possible duplicates. If you find a duplicate, please
add a comment saying that you encountered the problem as well.

### Contribute code

Please make sure to read the [Contributing
Guide](https://github.com/ricardolsmendes/access-logs-dw-gcp-js/blob/master/.github/CONTRIBUTING.md)
before making a pull request.

[1]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[2]: http://standardjs.com
[3]: https://circleci.com/gh/ricardolsmendes/access-logs-dw-gcp-js.svg?style=svg
[4]: https://circleci.com/gh/ricardolsmendes/access-logs-dw-gcp-js
[5]: https://medium.com/google-cloud/serverless-etl-on-google-cloud-a-case-study-raw-data-into-json-lines-d20711cd3917

repository: ricardolsmendes/access-logs-dw-gcp-js

repo_name: ricardolsmendes/access-logs-dw-gcp-js


text:
The Jupyter Notebooks in this directory document
various aspects of the development and maintenance of the SalishSeaCast
automation system.

In particular:

* The [ERDDAP_datasets.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/ERDDAP_datasets.ipynb)
  notebook describes and partially automates the process of generating
  XML fragments for model results datasets to be included in the ERDDAP
  server system.
* The
  [DevelopingNowcastFigureFunctions.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/DevelopingNowcastFigureFunctions.ipynb)
  notebook describes the recommended process for development of those functions,
  and provides an example of development of one.

The links below are to static renderings of the notebooks via
[nbviewer.org](https://nbviewer.org/).
Descriptions under the links below are from the first cell of the notebooks
(if that cell contains Markdown or raw text).

* ## [FCST_Template.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/FCST_Template.ipynb)

    Forecast template

* ## [Out_Template.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/Out_Template.ipynb)

    Production template

* ## [DevelopingSalinityTemplate.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/DevelopingSalinityTemplate.ipynb)

* ## [In_Template.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/In_Template.ipynb)

    Reasearch figures template

* ## [SSH_NeahBay.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/SSH_NeahBay.ipynb)

    This notebook creates daily forcing files for the sea surface height (hourly frequency) at Neah Bay. This can be used to create "obs" or "hindcast" forcing files for nowcasts in the event of a automation system error.

* ## [ERDDAP_datasets.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/ERDDAP_datasets.ipynb)

    **Building ERDDAP Datasets**

    This notebook documents the process of creating XML fragments
    for nowcast system run results files
    for inclusion in `/opt/tomcat/content/erddap/datasets.xml`
    on the `skookum` ERDDAP server instance.

    The contents are a combination of:

    * instructions for using the
    `GenerateDatasetsXml.sh` and `DasDds.sh` tools found in the
    `/opt/tomcat/webapps/erddap/WEB-INF/` directory
    * instructions for forcing the server to update the datasets collection
    via the `/results/erddap/flags/` directory
    * code and metadata to transform the output of `GenerateDatasetsXml.sh`
    into XML fragments that are ready for inclusion in `/opt/tomcat/content/erddap/datasets.xml`

* ## [DevelopingAnalyzeModule.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/DevelopingAnalyzeModule.ipynb)

    Notebook for developing functions in analyze.py

* ## [Developing-make_ww3_current_file-worker.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/Developing-make_ww3_current_file-worker.ipynb)

    **Developing `make_ww3_current_file` Worker**

    Code experiments and verification for the `make_ww3_current_file` worker.

* ## [Test-research_VENUS-Module.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/Test-research_VENUS-Module.ipynb)

    **Test research_VENUS.py**

    This notebook is used to test the research_VENUS.py module.

* ## [LiveOcean_TS_BC_Runner.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/LiveOcean_TS_BC_Runner.ipynb)

    Test LiveOcean BC's for new tidally average single time files

* ## [Salininty_Template.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/Salininty_Template.ipynb)

    Salinity ferry data template

* ## [TofinoWaterLevels.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/TofinoWaterLevels.ipynb)

    Notebook to compare Tofino water levels to previous years.

* ## [ProductionDailyRiverNCfile.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/ProductionDailyRiverNCfile.ipynb)

    **Test `make_runoff_file` for v202111**

    This notebook was used to develop and test the code for generation of the v202111 daily runoff forcing files.
    Those runoff files are based on day-averaged discharge (1 day lagged) observations from gauged rivers across
    the SalishSeaCast model domain.
    That replaces the use of climatology for all watersheds,
    in contrast to prior model versions that used observations for the Fraser River at Hope and climatology for all
    other rivers.

* ## [Original_DailyNowcastFigures.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/Original_DailyNowcastFigures.ipynb)

    Template notebook for creation of notebooks that show daily figures
    from most recent SalishSeaCast NEMO model real-time (nowcast) run.

    This is an interim step toward fully automated web publication of
    analysis and monitoring figures from nowcast runs.

* ## [MakeOldRunoffFiles.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/MakeOldRunoffFiles.ipynb)

    **Code to make old runoff files ****
    note: make_old_runoffs.yaml is identical to nowcast.yaml but puts the river output files somewhere other that /results to avoid accidental overwriting

* ## [surge_warning.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/surge_warning.ipynb)

* ## [ExamineResiduals.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/ExamineResiduals.ipynb)

    Notebook for examinng residuals and error in residuals

* ## [Developing-make_ww3_wind_file-worker.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/Developing-make_ww3_wind_file-worker.ipynb)

    **Developing `make_ww3_wind_file` Worker**

    Code experiments and verification for the `make_ww3_wind_file` worker.

* ## [TestResearchFerriesModule.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/TestResearchFerriesModule.ipynb)

    **Test New `research_ferries` Module**

    Render figure objects returned by `nowcast.research_ferries.salinity_ferry_route()` function.
    Provides data for visual testing to confirm that refactoring has not adversely changed figures for web pages.

    Set-up and function call replicates as nearly as possible what is done in the `nowcast.workers.make_plots` worker.

* ## [DevelopingNowcastFigureFunctions.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/DevelopingNowcastFigureFunctions.ipynb)

    This notebook describes the recommended process for development of
    functions for the `salishsea_tools.nowcast.figures` module,
    and provides an example of development of such a function.

* ## [DailyNowcastFigures.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/DailyNowcastFigures.ipynb)

    Template for daily nowcast figure generation.

* ## [TestingAnalyzeModule.ipynb](https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/TestingAnalyzeModule.ipynb)

    Noteboook to test analyze.py functions

##License

These notebooks and files are copyright 2013 – present
by the SalishSeaCast Project Contributors
and The University of British Columbia.

They are licensed under the Apache License, Version 2.0.
http://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.

repository: SalishSeaCast/SalishSeaNowcast

repo_name: SalishSeaCast/SalishSeaNowcast


text:
# Developer instructions

## Development mode installation

- We recommend doing development work in a conda environment. For information on setting up conda for the first time, see [this article](https://towardsdatascience.com/get-your-computer-ready-for-machine-learning-how-what-and-why-you-should-use-anaconda-miniconda-d213444f36d6).

- This method allows you to modify the source code for example DataJoint
  workflows (e.g. `workflow-array-ephys`) and their
  dependencies (e.g., `element-array-ephys`).

- Launch a new terminal and change directory to where you want to clone the
  repositories (e.g., `bash cd ~/Projects`)

- Clone the relevant workflow and refer to the `requirements.txt` in the workflow for the list of Elements to clone and install as editable. You will also need to install `element-interface`
    ```bash
    deps=("lab" "animal" "session" "interface" "<others>")
    for repo in $deps # clone each
    do
        git clone https://github.com/datajoint/element-$repo
    done
    for repo in $(ls -d ./{element,workflow}*) # editable install
    do
        pip install -e ./$repo
    done
    ```

## Optionally drop all schemas

If you need to drop all schemas to start fresh, you'll need to do following the dependency order. Refer to the workflow's notebook (`notebooks/06-drop-optional.ipynb`) for the drop order.

## Run integration tests

- Download the test dataset to your local machine. Note the directory where the
  dataset is saved (e.g. `/tmp/testset`).

- Create an `.env` file within the `docker` directory with the following content.
  Replace `/tmp/testset` with the directory where you have the test dataset downloaded.
  `TEST_DATA_DIR=/tmp/testset`

- If testing an unreleased version of the `element` or your fork of an `element`
  or the `workflow`, within the `Dockerfile` uncomment the lines from the
  different options presented. This will allow you to install the repositories
  of interest and run the integration tests on those packages. Be sure that the
  `element` package version matches the version in the `requirements.txt` of the
  `workflow`.

- Run the Docker container.
  ```
  docker-compose -f ./docker/docker-compose-test.yaml up --build
  ```

## Jupytext
We maintain `.py` script copies of all didactic notebooks to facilitate the GitHub review process. From the main workflow directory, we recommend the following command to generate these copies. You may wish to save this as an alias in your `.bash_profile`. Note that the jupytext sync features may cause issues with the original notebooks.

    ```bash
    pip install jupytext
    jupytext --to py notebooks/0*ipynb; mv notebooks/*py notebooks/py_scripts
    ```

repository: guzman-raphael/datajoint-docs

gha_license_id: NOASSERTION

repo_name: guzman-raphael/datajoint-docs


text:
# jeetutorial
Project to try different JEE technologies and alternatives

## JPA

Java persistence API 2.2, JSR 338.

Implementations:

 - Eclipselink (reference)
 - Hibernate

Alternatives:

 - JDBC
 - MyBatis
 - Hibernate
 - Spring Data

## Debugging jetty
`set MAVEN_DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1042"`

or

`set MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1042`

`mvn jetty:run`

## CDI

Weld is RI for CDI. It can be included into the Tomcat, however it work only in listeners, servlets and filters.
It will not by default inject stuff into the JAX-WS services for example.

https://memorynotfound.com/install-and-configure-cdi-in-tomcat/
https://developer.jboss.org/thread/179870
https://www.mkyong.com/webservices/jax-ws/jax-ws-spring-integration-example/
https://bthurley.wordpress.com/2014/04/27/web-services-with-jax-ws-jaxb-and-spring/

In Payara you need to add beans.xml to the WEB-INF or annotate your bean with @ApplicationScoped the beans to be found.
@ManagedBean does not work

## JAX-WS

Payara won't see the wsdls when old-style web.xml is used (with DOCTYPE and stuff).
It's not required to generated wsdls with jaxws-maven-plugin.

http://www.archive.ricston.com/blog/contract-cxf-springws/

Wspure with no Dependency Injection
 - com.sun.xml.ws:jaxws-rt - Done (DI is possible to do with some obsolete library, which was not updated for 8 years)
 - Apache CXF (DI is done with Spring, I tried only XML)
 - Spring WS
 http://projects.spring.io/spring-ws/#quick-start
 - Spring Boot
 https://spring.io/guides/gs/producing-web-service/
 - Application Server (Payara) - Done (DI is done automatically there)

repository: navpil/jeetutorial

gha_language: Java

repo_name: navpil/jeetutorial


text:
---
layout: doc_page
---

## Unioning Sketches with Different values of \(k\)

One of the benefits of the Theta Sketch algorithms is that they support the union of sketches that have been created with different values of \(k\) or Nominal Entries. More specifically, it is possible to create a Union operation with a \(k_U\) and then update the union with sketches created with different \(k_i\) that can be either larger or smaller than \(k_U\).

The interesting case, of course, is where \(k_U > k_i\), and, it turns out that it is possible that the Relative Standard Error, \(\color{black}{RSE = 1/{\sqrt{k}}}\), of the resulting Union, can be improved,
i.e., \(RSE_U < min(RSE_i)\).

This is in contrast to the HLL algorithm, where unioning is only possible with the same \(k\) or with values that are powers-of-2 smaller.
In this case the \(RSE_U = min(RSE_i)\).

repository: dapokiya/incubator-datasketches-website

repo_name: dapokiya/incubator-datasketches-website


text:
# DatabaseValidations

[![CircleCI](https://circleci.com/gh/toptal/database_validations/tree/master.svg?style=svg)](https://circleci.com/gh/toptal/database_validations/tree/master)
[![Gem Version](https://badge.fury.io/rb/database_validations.svg)](https://badge.fury.io/rb/database_validations)
[![Maintainability](https://api.codeclimate.com/v1/badges/a7df40a29c63f7ba518b/maintainability)](https://codeclimate.com/github/toptal/database_validations/maintainability)

DatabaseValidations helps you to keep the database consistency with better performance.
Right now, it supports only ActiveRecord.

*The more you use the gem, the more performance increase you have. Try it now!*

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'database_validations'
```

And then execute:

```bash
bundle
```

Or install it yourself as:

```bash
gem install database_validations
```

Have a look at [example](example) application for details.

## Benchmark ([code](benchmarks/composed_benchmarks.rb))

Imagine, you have `User` model defines as

```ruby
class User < ActiveRecord::Base
  validates :email, :full_name, uniqueness: true

  belongs_to :company
  belongs_to :country
end
```

and then replace with

```ruby
class User < ActiveRecord::Base
  validates :email, :full_name, db_uniqueness: true
  # OR
  # validates_db_uniqueness_of :email, :full_name

  db_belongs_to :company
  db_belongs_to :country
  # OR
  # belongs_to :company
  # belongs_to :country
  # validates :company, :country, db_presence: true
end
```

you will get the following performance improvement:

![](benchmarks/composed.png)

## Caveats

- `db_belongs_to` doesn't work with SQLite due to a poor error message.
- In Rails 4, the gem validations work differently than the ActiveRecord ones when `validate: false` option is passed to `save`/`save!`. They incorrectly return a validation message instead of raising a proper constraint violation exception. In Rails >= 5 they correctly raise the exceptions they supposed to.

## db_belongs_to

Supported databases are `PostgreSQL` and `MySQL`.
**Note**: Unfortunately, `SQLite` raises a poor error message
by which we can not determine exact foreign key which raised an error.

### Usage

```ruby
class User < ActiveRecord::Base
  db_belongs_to :company
end

user = User.create(company_id: nil)
# => false
user.errors.messages
# => {:company=>["must exist"]}
```

### Problem

ActiveRecord's `belongs_to` has `optional: false` by default. Unfortunately, this
approach does not ensure existence of the related object. For example, we can skip
validations or remove the related object after we save the object. After that, our
database becomes inconsistent because we assume the object has his relation but it
does not.

`db_belongs_to` solves the problem using foreign key constraints in the database
also providing backward compatibility with nice validations errors.

### Pros and Cons

**Advantages**:
- Ensures relation existence because it uses foreign keys constraints.
- Checks the existence of proper foreign key constraint at the boot time.
Use `ENV['SKIP_DB_UNIQUENESS_VALIDATOR_INDEX_CHECK'] = 'true'` if you want to
skip it in some cases. (For example, when you run migrations.) _Note:_ we skip it for the abstract classes.
- It's almost two times faster because it skips unnecessary SQL query. See benchmarks
below for details.

**Disadvantages**:
- Cannot handle multiple database validations at once because database
raises only one error per query.

### Configuration options

| Option name   | PostgreSQL | MySQL |
| ------------- | :--------: | :---: |
| class_name    | +          | +     |
| foreign_key   | +          | +     |
| foreign_type  | -          | -     |
| primary_key   | +          | +     |
| dependent     | +          | +     |
| counter_cache | +          | +     |
| polymorphic   | -          | -     |
| validate      | +          | +     |
| autosave      | +          | +     |
| touch         | +          | +     |
| inverse_of    | +          | +     |
| optional      | -          | -     |
| required      | -          | -     |
| default       | +          | +     |

### Benchmarks ([code](benchmarks/db_belongs_to_benchmark.rb))

![](benchmarks/db_belongs_to.png)

## validates_db_uniqueness_of

Supported databases are `PostgreSQL`, `MySQL` and `SQLite`.

### Usage

```ruby
class User < ActiveRecord::Base
  validates :email, db_uniqueness: true
  # The same as following:
  # validates :email, uniqueness: {case_sensitive: true, allow_nil: true, allow_blank: false}
end

original = User.create(email<EMAIL_ADDRESS>dupe = User.create(email<EMAIL_ADDRESS># => false
dupe.errors.messages
# => {:email=>["has already been taken"]}
User.create!(email<EMAIL_ADDRESS># => ActiveRecord::RecordInvalid Validation failed: email has already been taken
```

Complete `case_sensitive` replacement example (for `PostgreSQL` only):

```ruby
validates :slug, uniqueness: { case_sensitive: false, scope: :field }
```

Should be replaced by:

```ruby
validates :slug, db_uniqueness: {index_name: :unique_index, case_sensitive: false, scope: :field}
```

**Keep in mind**: because `valid?` method uses default validator you should:

- if your index has many fields, provide proper `scope` option
- if your index has lower function, provide `case_sensitive` option
- if your index has where condition, provide proper `where` option

### Problem

Unfortunately, ActiveRecord's `validates_uniqueness_of` approach does not ensure
uniqueness. For example, we can skip validations or create two records in parallel
queries. After that, our database becomes inconsistent because we assume some uniqueness
over the table but it has duplicates.

`validates_db_uniqueness_of` solves the problem using unique index constraints
in the database also providing backward compatibility with nice validations errors.

### Advantages

- Ensures uniqueness because it uses unique constraints.
- Checks the existence of proper unique index at the boot time.
Use `ENV['SKIP_DB_UNIQUENESS_VALIDATOR_INDEX_CHECK'] = 'true'`
if you want to skip it in some cases. (For example, when you run migrations.) _Note:_ we skip it for the abstract classes.
- It's two times faster in average because it skips unnecessary SQL query. See benchmarks below for details.
- It has different [modes](#modes) so you can pick up the best for your needs.

### Configuration options

| Option name    | PostgreSQL | MySQL | SQLite |
| -------------- | :--------: | :---: | :----: |
| mode           | +          | +     | +      |
| scope          | +          | +     | +      |
| message        | +          | +     | +      |
| if             | +          | +     | +      |
| unless         | +          | +     | +      |
| index_name     | +          | +     | -      |
| where          | +          | -     | -      |
| case_sensitive | +          | -     | -      |
| allow_nil      | -          | -     | -      |
| allow_blank    | -          | -     | -      |

### Rescue option

The validation has an option `:rescue` with two values:
- `:default` (default option) that follows default ActiveRecord behavior. It respects `validate: false` option for `save/save!` (for example, this is being used for nested associations)
- `:always` that catches database constraint errors and turns them to ActiveRecord validations filling `.errors` properly.

You may want to use `rescue: :always` in case you save nested associations with `accepts_nested_attributes_for` helper and you want the validation to happen automatically when a user
provides duplicated data in the same request.

### Modes

There are 3 `mode` options:

- `:optimized` - the default one. In this mode it turns DB constraint exceptions into proper validation messages.
- `:enhanced` - a combination of the standard uniqueness validation and the db uniqueness validation. Runs a query first but also rescues from exception. The preferable mode for user-facing validations.
- `:standard` - in this mode works pretty much the same way as `validates_uniqueness_of` (except the index existence check).

### Benchmark ([code](benchmarks/uniqueness_validator_benchmark.rb))

![](benchmarks/validates_db_uniqueness_of.png)

## Testing (RSpec)

Add `require database_validations/rspec/matchers'` to your `spec` file.

### validate_db_uniqueness_of

Example:

```ruby
class User < ActiveRecord::Base
  validates_db_uniqueness_of :field, message: 'duplicate', where: '(some_field IS NULL)', scope: :another_field, index_name: :unique_index
end

describe 'validations' do
  subject { User }

  it { is_expected.to validate_db_uniqueness_of(:field).with_message('duplicate').with_where('(some_field IS NULL)').scoped_to(:another_field).with_index(:unique_index) }
end
```

## Using with RuboCop

DatabaseValidations provides custom cops for RuboCop to help you consistently apply the improvements.
To use all of them, use `rubocop --require database_validations/rubocop/cops` or add to your `.rubocop.yml` file:

```yaml
require:
  - database_validations/rubocop/cops
```

Or you case use some specific cop directly:
```yaml
require:
  - database_validations/rubocop/cop/belongs_to
  - database_validations/rubocop/cop/uniqueness_of
```

## Development

You need to have installed and running `postgresql` and `mysql`.
And for each adapter manually create a database called `database_validations_test` accessible by your local user.

Then, run `rake spec` to run the tests.

To check the conformance with the style guides, run:

```bash
rubocop
```

To run benchmarks, run:

```bash
ruby -I lib benchmarks/composed_benchmarks.rb
```

To install this gem onto your local machine, run `bundle exec rake install`.
To release a new version, update the version number in `version.rb`, and then
run `bundle exec rake release`, which will create a git tag for the version,
push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

[Bug reports](https://github.com/toptal/database_validations/issues)
and [pull requests](https://github.com/toptal/database_validations/pulls) are
welcome on GitHub. This project is intended to be a safe, welcoming space for
collaboration, and contributors are expected to adhere
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the DatabaseValidations project’s codebases, issue trackers, chat rooms and mailing
lists is expected to follow the [code of conduct](https://github.com/toptal/database_validations/blob/master/CODE_OF_CONDUCT.md).

## Contributors

- [Evgeniy Demin](https://github.com/djezzzl) (author)
- [Filipp Pirozhkov](https://github.com/pirj)
- [Maxim Krizhanovski](https://github.com/Darhazer)
- [Alfonso Uceda](https://github.com/AlfonsoUceda)

gha_language: Ruby


text:
# Slides for writing good research code good

* [Introduction and keeping things tidy](pdf/01-intro.pdf)
* [Decoupling code](pdf/02-decouple.pdf)
* [Testing](pdf/03-testing.pdf)
* [Documentation](pdf/04-docs.pdf)
* [Make it social](pdf/05-social.pdf)

# References

## Reading

- Research software engineering: [https://merely-useful.github.io/py-rse/](https://merely-useful.github.io/py-rse/)
- Making packages and testing [https://education.molssi.org/python-package-best-practices/index.html](https://education.molssi.org/python-package-best-practices/index.html)
- Carpentries testing Python: [http://carpentries-incubator.github.io/python-testing/](http://carpentries-incubator.github.io/python-testing/)
- Shablona template: [https://github.com/uwescience/shablona](https://github.com/uwescience/shablona)
- The Turing Way: [https://the-turing-way.netlify.app/reproducible-research/code-quality.html](https://the-turing-way.netlify.app/reproducible-research/code-quality.html)
- Software engineering best practices: [http://www.bris.ac.uk/acrc/acrc-training/](http://www.bris.ac.uk/acrc/acrc-training/)
- Data science in practice paper: [https://www.tandfonline.com/doi/full/10.1080/10691898.2020.1860725](https://www.tandfonline.com/doi/full/10.1080/10691898.2020.1860725)
- Software engineering for data scientists: [http://uwseds.github.io/](http://uwseds.github.io/)

## Media

- Software engineering for research: [https://www.youtube.com/watch?v=SxoDCo9iNI0&feature=emb_title](https://www.youtube.com/watch?v=SxoDCo9iNI0&feature=emb_title)
- Test and code for scientists (podcast): [https://testandcode.com/140](https://testandcode.com/140)

## Inspiration

* The Zen of Python: https://zen-of-python.info/

## Tools

* [IDEs for scientific Python](https://xcorr.net/2013/04/17/evaluating-ides-for-scientific-python/)

# Compiling these slides

Slides can be compiled with `make all`. Requires pandoc:

```
sudo apt-get install pandoc texlive texlive-latex-extra
pip install pandoc-latex-fontsize
```


text:
# IntradayForecastData

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**offered** | **double** | The number of interactions routed into the queue for the given media type(s) for an agent to answer | [optional]
**averageTalkTimeSeconds** | **double** | The average time in seconds an agent spends interacting with a customer | [optional]
**averageAfterCallWorkSeconds** | **double** | The average time in seconds spent in after-call work. After-call work is the work that an agent performs immediately following an interaction | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

repository: jameBruno/platform-client-sdk-php

repo_name: jameBruno/platform-client-sdk-php


text:
# Treehouse_project_4
## Inventory store
## ~~~~~~~~~~~~~~~

#### **_Objectives:_**
    + Read data from a csv file
    + Clean the data
    + Setup a Sqlite database
    + Map the data using Peewee ORM
    + Setup a menu structure
    + Allow the user to view a record from the database
    + Allow the user to add a record from the database
    + Allow the user to create a backup of the database data into CSV file

#### **_Validations:_**
    + Validate the menu entries the user makes
    + Validate that a given productID exists when user wants to view data
    + Validate that when adding data a product with the same name does not yet exist

### *_Structures_*
    - The input data exists in the data_import folder
    - The backup data will be stored in the data_back-up folder
    - The database is stored under folder database
    - The documentation folder contains the rubric data and the requirements info
    - The models folder contains the ORM mappings
    - The helper_modules contains small helper modules that can be reused across projects

### **_ATTENTION_**
    The database is not included in the repository.
    The database will generate the first time you run the file.


text:
---
layout: post
title:      "Learning CSS... the highs and the lows "
date:       2019-04-24 20:49:34 +0000
permalink:  learning_css_the_highs_and_the_lows
---

Hi all,

I have always been passionate about learning CSS. I have a background in design and just love putting together various projects in order to display my messaging in an aethetically pleasing way. I get my inspirations from a lot of different places, but ever since I started the FI program, I have been drawn towrads https://www.awwwards.com/. If you are not familiar with this site, it displays various sites around the world that demonstrate design, creativity and innovation on the internet. I usually tend to agree with the users who vote on these sites, as most of them are elegant and clean. I have tried to implement this is my projects, but have found out rather quickly that it is one thing to add some CSS to your project so it doesn't look vanilla, it is another to get sites to look like some of the sites I love on awwwwards.com.

What I have learned so far in my initial studies of CSS is that it's very difficult to make beautiful sites just by going at it on your CSS pages. I have found using Flexbox and CSS Grid help organize your code and make it easier to control various divs/containers you are using in your code to control various objects on your page.

Below, I am going to show a very simple example of CSS GRID to prove my point:

```
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="../assets/style.css">
  <title>CSS Grid Implicit vs Explicit Grid Tracks!</title>
</head>

<body>
  <div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
  </div>

  <style>
    .container {
      display: grid;
      grid-gap: 10px;
      grid-template-columns: 200px 400px;
      grid-template-rows: 50px 100px;
      grid-auto-rows: 500px;
      grid-auto-columns: 100px;
    }
  </style>
</body>

</html>
```

In the code above, there are six divs used to print out 1, 2, 3, 4, 5, 6 on separate lines. I added in the style on the same page just for the purpose of this demonstration, but here we are taking the main container div and displaying it as a grid. We are then adding a space (grid-gap) of 10px between each element/div. Next, we are adding in two columns. The first column is going to be 200px, and the other is 400px. For rows, we are adding in 50px for the first row and 100px for the second row. Anything after that overflows will have a row height of 500px and a column width of 100px. What this does is allow us to organize how we can shove these divs in each column. Right now, without specifiying specifically where they go, they will try to fit within each column and row available at first, and anything that doesn't fit will autoflow in the rows/columns.

Anddddd that is the very basics of CSS grid. I find this is really helpful for organizing divs etc. and will definitely write another post on this topic.

Till next time,
Chris

extension: markdown


text:
# Python django example

This example was written using django 1.4.

To run this example:

    ./manage.py runserver

And go to [localhost:8000](http://localhost:8000)

repository: ryuslash/browserid-cookbook

repo_name: ryuslash/browserid-cookbook


text:
Printf API logging framework for resource constrained environments.

Inspiration
------------------
Logger idea is based on:
- python logging module
  https://docs.python.org/2/library/logging.html
- linux kernel vsprintf module
  http://lxr.free-electrons.com/source/lib/vsprintf.c

Logger concepts
------------------
- storage

  Implements operation of storing log. Log may be composed of: timestamp, level, logger name or id,
  text or format string whereabouts and serialized printf arguments (see binary printf section).
  Storage may be a ring-buffer keeping only newest logs or a ping-pong buffer flushed on a regular basis.

- handler

  Handler contains reference to storage and level which may filter logs before they get stored.
  Level may be changed at runtime to control logging output.

- logger

  Front-end of logging framework, contains list of handlers, level and optional parent logger.
  If level is not set, it's taken from first parent who has it set.
  If handlers list is empty, it's taken from first parent who has any.
  Level may be changed at runtime to control logging output.
  It's probably good to keep logger objects (or at references to them) globally accessible
  to avoid having to pass them in function signatures and store in application objects.

Usage proposal
------------------

Logging framework should work more or less along these lines.
During startup application:
- establishes storages,
- wraps them into handlers, which also get levels,
- initializes loggers with identification data and initial levels,
- associates handlers with loggers.
This way user has fine-grained control over logging
by setting handler and logger levels in runtime.

Binary printf
------------------
Binary printf should be used by applications which may log extensively
and have limited resources: memory size, stack size, cpu time,
since it consumes less of each compared to sprintf.

Binary printf stores only arguments of printf call in binary buffer.
User can form a text string from format string and those any time later,
if at all.

Additional care needs to be taken to decode binary logs, but logging
interface is the same as for sprintf storages,
so binary and textual printfs can be used interchangeably.

How to store format strings with binary arguments:
- store fmt verbatim
- store fmt pointer
  - get pointer-string pairs from running application or from linked binary
- store fmt hash
  - get hash-string pairs from application source code
  - #define LOG(LEVEL, FMT, ...) { static const hasher hasher_(FMT); log.log(LEVEL, FMT, ##\__VA_ARGS__, hasher_.hash); }
  - modify vsnbprintf function so that it returns the one-after-the-last argument: hash
- store fmt id
  - make sure that each log is assigned unique id
  - get id-string pairs from application source code
  - #define LOG(ID, LEVEL, FMT, ...) log.log(LEVEL, FMT, ##\__VA_ARGS__, ID)
  - modify vsnbprintf function so that it returns the one-after-the-last argument: id

repository: aurzenligl/uclog

repo_name: aurzenligl/uclog


text:
## How to generate barcode on forms in Delphi using ByteScout Barcode SDK

### The tutorial below will demonstrate how to generate barcode on forms in Delphi

Sample source code below will show you how to cope with a difficult task like generate barcode on forms in Delphi. ByteScout Barcode SDK is the robost library (Software Development Kit) that is designed for automatic generation of high-quality barcodes for printing, electronic documents and pdf. All popular barcode types are supported from Code 39 and Code 129 to QR Code, UPC, GS1, GS-128, Datamatrix, PDF417, Maxicode and many others. Provides support for full customization of fonts, colors, output and printing sizes. Special tools are included to verify output quality and printing quality. Can add generated barcode into new or existing documents, images and PDF and you can use it to generate barcode on forms with Delphi.

You will save a lot of time on writing and testing code as you may just take the Delphi code from ByteScout Barcode SDK for generate barcode on forms below and use it in your application. Follow the instructions from the scratch to work and copy the Delphi code. Code testing will allow the function to be tested and work properly with your data.

You can download free trial version of ByteScout Barcode SDK from our website to see and try many others source code samples for Delphi.

## Get In Touch

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20Barcode%20SDK%20Question)

or send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20Barcode%20SDK%20Question)

## Free Trial Download

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)

## Web API (On-demand version)

[Get your free API key](https://pdf.co/documentation/api?utm_source=github-readme)

## API Documentation and References

[Explore ByteScout Barcode SDK Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)

[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)

[Check Free Training Sessions for ByteScout%20Barcode%20SDK](https://academy.bytescout.com/)

## Video Review

[https://www.youtube.com/watch?v=REnj3A-oSPI](https://www.youtube.com/watch?v=REnj3A-oSPI)

repository: repohoarder/ByteScout-SDK-SourceCode

path: /BarCode SDK/Delphi/Generate Barcode on Forms/README.md

repo_name: repohoarder/ByteScout-SDK-SourceCode


text:
---
title: Migrate KVM virtual machines from CentOS 6 to Fedora 18 without the luxury of shared storage
author: Major Hayden
type: post
date: 2013-05-22T15:15:36+00:00
url: /2013/05/22/migrate-kvm-virtual-machines-from-centos-6-to-fedora-18-without-the-luxury-of-shared-storage/
dsq_thread_id:
  -<PHONE_NUMBER>
categories:
  - Blog Posts
tags:
  - centos
  - command line
  - fedora
  - kvm
  - linux
  - red hat
  - virtualization

---
I've converted one of my KVM hypervisors from CentOS 6 to Fedora 18 and now comes the task of migrating my virtual machines off of my single remaining CentOS 6 hypervisor. This is definitely on a budget, so there's no shared storage to make this process easier.

Here's how I did it:

**Migrate the logical volume**

My first VM to migrate is my Fedora development VM where I build and test new packages. I have a 10G logical volume on the old node:

```
[root@helium ~]# lvs /dev/mapper/vg_helium-fedora--dev
  LV         VG        Attr     LSize  Pool Origin Data%  Move Log Copy%  Convert
  fedora-dev vg_helium -wi-a--- 10.00g
```

I made a 10G logical volume on the new hypervisor:

```
[root@hydrogen ~]# lvcreate -n fedora-dev -L10G vg_hydrogen
  Logical volume "fedora-dev" created
```

After getting ssh keys set up between both hypervisors and installing [`pv`][1] (to track progress), I started the storage migration over ssh:

```
dd if=/dev/mapper/vg_helium-fedora--dev | pv | ssh hydrogen dd of=/dev/mapper/vg_hydrogen-fedora--dev
```

Luckily it was only a 10GB logical volume so it transferred over in a few minutes.

**Dump and adjust the source VM's XML**

On the source server, I dumped the VM configuration to an XML file and copied it to the new host:

```
virsh dumpxml fedora-dev > fedora-dev.xml
scp fedora-dev.xml hydrogen:
```

Before importing the XML file on the new host, there are some adjustments that need to be made. First off was an adjustment of the storage volume since the new host had the same logical volume name but a different volume group (the source line):

```xml
  <disk type='block' device='disk'>
  <driver name='qemu' type='raw' cache='none' io='native'></driver>
  <source dev='/dev/vg_hydrogen/fedora-dev'/>
  <target dev='vda' bus='virtio'></target>

<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'>

</address>
</disk>
```

Also, there's a mismatch with the machine type (not architecture) between CentOS 6 and Fedora 18. I dumped the XML from a VM running on the Fedora 18 hypervisor and compared the machine type to my old CentOS VM's XML (the XML from the CentOS VM is on top):

```diff
-    <type arch='x86_64' machine='rhel6.3.0'>hvm</type>
+    <type arch='x86_64' machine='pc-1.2'>hvm</type>
```

I replaced `rhel6.3.0` with `pc-1.2`. _If you forget this step, your VM won't start._ You'll get some errors about a mismatched machine type before the VM boots.

There's one last fix: the path to the `qemu-kvm` emulator:

```diff
-    <emulator>/usr/libexec/qemu-kvm</emulator>
+    <emulator>/usr/bin/qemu-kvm</emulator>
```

Replace `/usr/libexec/qemu-kvm` with `/usr/bin/qemu-kvm` and save your XML file.

**Import the VM configuration and launch the VM**

Importing the VM on the Fedora 18 hypervisor was easy:

```
virsh define fedora-dev.xml
```

That causes the configuration to load into libvirt and it should appear in `virt-manager` or `virsh list` by this point. If not, double check your previous steps and look for error messages in your logs. That doesn't actually start the virtual machine, so I started it on the command line:

```
virsh start fedora-dev
```

Within a few moments, the VM was up and responding to pings.

It's a good idea to hop into `virt-manager` and verify that the VM configuration is what you expect. Some configuration options don't line up terribly well between CentOS 6 and Fedora 18. You might need to adjust a few to match the performance you expect to see.

 [1]: http://linux.die.net/man/1/pv


text:
# InfraRed

這是專為micro:bit提供的紅外線積木\
This is the infrared blocks for microbit

## Author
Liou Zheng-Ji\
劉正吉\
[my page, https://sites.google.com/jes.mlc.edu.tw/ljj/](https://sites.google.com/jes.mlc.edu.tw/ljj/)

## Video
[![click here to see the sample video](https://img.youtube.com/vi/4JWbFmI6djI/0.jpg)](https://www.youtube.com/watch?v=4JWbFmI6djI)

## Blocks
![image](images/blocks.jpg)

## Sample1
[![click here to see the sample video](https://img.youtube.com/vi/Id3h4RjNyXw/0.jpg)](https://www.youtube.com/watch?v=Id3h4RjNyXw)\
\
The code of how to receive IR message.\
For now, the blocks can send and receive IR message using the encoding of NEC and SONY. You can emit IR to your IR receiver attached on microbit from the normal IR remote control, then the blocks will decode the IR message to Hex. You can record the IR message then send the same IR message when you want to emit the same IR message by microbit.
![image](images/rec_sample1_en.jpg)

## Sample2
[![click here to see the sample video](https://img.youtube.com/vi/WI193AyCgbA/0.jpg)](https://www.youtube.com/watch?v=WI193AyCgbA)\
\
I use the TV remote controller to control the micro:bit.
![image](images/sample3_en.jpg)

## Sample3
The code of how to send IR message
![image](images/rec_sample2_en.jpg)

## License

* MIT

## Supported targets

* for PXT/microbit
(The metadata above is needed for package search.)

```package
IR=github:lioujj/pxt-IR
```

repository: lioujj/pxt-IR

repo_name: lioujj/pxt-IR


text:
% JSON Domain Format as Implemented by Pdns-Pipe-Nmc

This document is based on
[Namecoin Domain Name Specification](https://wiki.namecoin.info/index.php?title=Domain_Name_Specification).
It tries to follow it closely, and clarify parts that are not
specified, or specified ambiguously, in the original document.

One notable deviation is the specification of `"delegate"` and `"import"`
attributes: domain objects to which their value point are
replacing/merging to the domain object in which they are defined.
This seems to be in line with at least one existing "real world"
implementation.

This specification is implemented by the `pdns-pipe-nmc` program.

## Data Format

### `DomObj` Object

`DomObj` is a data structure that is associated with an FQDN. It is
either a `String` containing a dotted quad (see Note below), or a
JSON `Map`, with the following attributes, all optional:

| Key         | Type                                  | Comment                                    |
|-------------|---------------------------------------|--------------------------------------------|
| service     | Array(SrvObj)                         | Located two levels above position          |
| ip          | Array(String)                         | Dotted quad format "<IP_ADDRESS>"               |
| ip6         | Array(String)                         | Semicolon format "DEAD::BEEF"              |
| tor         | String                                | Onion name                                 |
| i2p         | I2pObj                                |                                            |
| freenet     | String                                |                                            |
| alias       | String                                | Nullifies other attributes                 |
| translate   | String                                | Nullifies the "map" attribute              |
| email       | String                                | Used in `SOA`                              |
| loc         | String                                | Format suitable for `LOC`                  |
| info        | JsonObj                               | Currently unspecified                      |
| ns          | Array(String)                         | Domain names as in `NS`                    |
| delegate    | String                                | Replaces current object                    |
| import      | Array(String)                         | "Deep" merges into current object          |
| map         | Map(String:DomObj)                    | Tree of subdomain objects                  |
| fingerprint | Array(String)                         |                                            |
| tls         | Map(String:Map(String:Array(TlsObj))) | Outer `Map` by `Protocol`, inner by `Port` |
| ds          | Array(DsObj)                          |                                            |

#### Notes:

* Any attribute specified as `Array(String)` may be present in the
  JSON document as a plain `String`, which is interpreted the same way
  as an `Array` containing a single `String` element. In other words,
  `"ip":"<IP_ADDRESS>"` is equivalent to `"ip":["<IP_ADDRESS>"]`. (This does not
  apply to non-string-array attributes, like "service" or "ds".)
* If `DomObj` is a `String`, it is interpreted as an IPv4 address.
  In other words, string `"<IP_ADDRESS>"` is the same as the Map
  `"{\"ip\":\"<IP_ADDRESS>\"}"`. Such "shorthand" DomObj can be present at
  the top level or as a value in the `"map"` attribute.

### `SrvObj` Object

`SrvObj` is a heterogenous Array of fixed size containing 6 elements:

| N | Type   | Meaning  |
|---|--------|----------|
| 0 | String | Service  |
| 1 | String | Protocol |
| 2 | Int    | Priority |
| 3 | Int    | Weight   |
| 4 | Int    | Port     |
| 5 | String | FQDN     |

#### Notes

* `Service` and `Protocol` are two elements of the domain name, without
  the undescore '_'.
* `SrvObj` with Service `"smtp"`, Protocol `"tcp"` and Port `25` is also
  interpteted as an `MX` DNS resource at the domain level containing the
  `"service"` object.
* When lookup is performed for `SRV` records at fqdn
  `"_serv._proto.sub.dom.bit"`, domain object for `"sub.dom.bit"` must be
  fetched, and in this object, `SrvObj`s for the Service `"serv"` and
  Protocol `"proto"` selected from its `"service"` attribute.

### `TlsObj` Object

`TlsObj` is a heterogenous Array of fixed size containing 3 elements:

| N | Type   | Meaning                                               |
|---|--------|-------------------------------------------------------|
| 0 | Int    | Match type - 0:Exact, 1:SHA-256, 2:SHA-512            |
| 1 | String | Match value - certificate or hash of it as hex string |
| 2 | Int    | Include subdomains - 0:No, 1:Yes                      |

#### Notes

* The fields of the object correspond to the attributes defined by
  [RFC-6698](http://tools.ietf.org/html/rfc6698) ("DANE").

### `DsObj` Object

`DsObj` is a heterogenous Array of fixed size containing 4 elements:

| N | Type   | Meaning                  |
|---|--------|--------------------------|
| 0 | Int    | Key Tag                  |
| 1 | Int    | Key Algorithm            |
| 2 | Int    | Hash Type                |
| 3 | String | Hash Value as hex string |

#### Notes

* The fields of the object correspond to the attributes defined by
  [RFC-3658](http://tools.ietf.org/html/rfc3658).

## Data Interpretation

### Semantics of the Attributes

#### service attribute

Translates to DNS `SRV` RR, only it is located in the subdomain tree
two levels higher than the `SRV` record would. For example, a
`"service"` attribute in the `"map"` hieararchy at the point
corresponding to the FQDN "sub.dom.bit" with the value

```
"service": [ ["imap", "tcp", 0, 0, 143, "mail.host.com" ],
             ["smtp", "tcp", 0, 0,  25, "relay.host.com"] ]
```

corresponds to two `SRV` RRs at two different points in the
subdomain tree:

```
_imap._tcp.sub.dom.bit. IN SRV 0 0 143 mail.host.com.
_smtp._tcp.sub.dom.bit. IN SRV 0 0  25 relay.host.com.
```

In addition to these, an `MX` RR is syntesized at the "sub.dom.bit"
level:

```
sub.dom.bit. IN MX 0 relay.host.com.
```

Note: Hostname element **must** be specified as fully qualified domain
name of the host, and **must not** terminate with a dot.
This requirement seems to be in line with many existing definitions in
the blockchain; however it deviates from the BIND zone file format, in
which names that have not terminating dot are automatically expanded
by attaching the current origin zone to the end of the name.

#### ip attribute

Contains a list of strings representing IPv4 addresses in dotted
quad notation. For example,

```
"ip": ["<IP_ADDRESS>", "<IP_ADDRESS>"]
```

translates into a series of `A` RRs:

```
        IN A <IP_ADDRESS>
        IN A <IP_ADDRESS>
```

#### ip6 attribute

Contains a list of strings representing IPv6 addresses in semicolon
quads notation. For example,

```
"ip6": ["2001:4860:0:1001::68"]
```

translates into one AAAA RR:

```
        IN AAAA 2001:4860:0:1001::68
```

#### tor attribute

Does not translate into any DNS RR. Contains Tor hidden service address.

```
"tor": "eqt5g4fuenphqinx.onion"
```

#### i2p attribute

Does not translate into any DNS RR. It is a JSON Map with three
optional String attributes: `"destination"`, `"name"` and `"b32"`.

```
"i2p": { "destination": "XaZscx...0jGAAAA"
       , "name": "example.i2p"
       , "b32" : "ukeu...nkdq.b32.i2p"
       }
```

#### freenet attribute

Does not translate into any DNS RR. Contains Freesite key.

```
"freenet": "USK@0I8g...xbZ4,AQACAAE/Example/42/"
```

#### alias attribute

Translates into `CNAME` RR. Invalidates all other attributes.

```
"alias": "realhost.example.bit"
```

Notes:
* Hostname **must** be specified as fully qualified domain
  name of the host, and **must not** terminate with a dot.
* Element of the `"map"` with empty key, `"delegate"` and `"import"`
  are processed before this invalidation takes place.

#### translate attribute

Translates into `DNAME` RR. Invalidates the contents of the `"map"`
attribute.

```
"translate": "otherhost.bit"
```

Notes:
* Hostname **must** be specified as fully qualified domain
  name of the host, and **must not** terminate with a dot.
* Element of the `"map"` with empty key, `"delegate"` and `"import"`
  are processed before this invalidation takes place.

#### email attribute

Translates into the `email` element of the SOA and RP RRs. The
value<EMAIL_ADDRESS>becomes `user.domain.tld.`
in the DNS record.

```
"email"<EMAIL_ADDRESS>```

#### loc attribute

Translates into `LOC` RR. Value must conform to the format defined
by [RFC-1876](http://tools.ietf.org/html/rfc1876).

```
"loc": "46 31 18.000 N 6 34 26.000 E 401.00m 1m 10000m 10m"
```

#### info attribute

Does not translate into any DNS RR. Contains a JSON object with
format unspecified at the time of this writing. Intented for
the registrant information.

#### ns attribute

Translates into `NS` RR. Because it effectively delegates all
control over the domain to external nameservers, it also invalidates
all other attributes.

```
"ns": ["ns.myserver.net", "<IP_ADDRESS>"]
```

Notes:
* Hostname **must** be specified as fully qualified domain
  name of the host, and **must not** terminate with a dot.
* Element of the `"map"` with empty key, `"delegate"` and `"import"`
  are processed before this invalidation takes place.

#### delegate attribute

Does not translate into any DNS RR. Instead, the value is used as
a key for namecoin lookup (i.e. the value must be specified with
the namespace prefix), and the result of the lookup replaces all
other attributes

```
"delegate": "s/example74845"
```

Notes:
* Element of the `"map"` with empty key, `"delegate"` and
  `"import"` are processed before this invalidation takes place.
* Unlike many other attributes, this can only contain a single
  string as the value, rather than a list.

#### import attribute

Does not translate into any DNS RR. Instead, the value is used as
the key for namecoin lookup (i.e. the value must be specified with
the namespace prefix), and the result of the lookup is merged with
the current domain object.

```
"import": ["dd/example", "s/example6473"]
```

#### map attribute

JSON Map object containing subdomain names as its keys and domain
objects as values. Element of the map with empty key "" has special
meaning: the value of this map element is merged into the current
domain object. This operaton happens first when a new domain object
is analyzed, and is performed recursively. In the result of the
merge, the `"map"` does not contain the element with empty key.
Further operatons that can potentially modify the contents of the
current domain object (`import` and `delegate` lookups) start when
the empty element of the `"map"` has been recursively merged into
the current object.

```
"map": { "www": { "alias" : "www.example.com" }
       , "www2": { "delegate": "d/example" }
       }
```

Note: When a key contains dots ".", it is converted to a nested
map. Empty elements in the result of split, such as when a dot is
at the beginning or at the end of the key, or there are
consequitive dots, are diagnosed as erroneous data.

```
"map": { "www.uk": { "alias" : "www.example.co.uk" }
       , "www..us": { "alias" : "www.example.com" }
       , "smtp.us.": { "alias" : "smtp.example.com" }
```

is equivalent to

```
"map": { "uk": { "map": { "www": { "alias" : "www.example.co.uk" }}}
       , "us": { "map": { "www": { "alias" : "www.example.com" }
                        , "smtp": { "alias" : "smtp.example.com" }}
               }
       }
```

#### fingerprint attribute

Does not translate into any DNS RR. Contains a list of TLS
certificate fingerprints. Deprecated.

#### tls attribute

Intended to carry attributes as per
[RFC-6698](http://tools.ietf.org/html/rfc6698) ("DANE").

```
"tls": {
  "tcp": {
           { "443": [ [1, "660008F9...7621B787", 1] ]
           , "25": [ [1, "660008F9...7621B787", 1] ]
           }
         }
       }
```

translates into:

```
_443._tcp      TLSA  (3 0 1 660008F9...7621B787)
_25._tcp       TLSA  (3 0 1 660008F9...7621B787)
```

The third element of the `TlsObj` heterogenous array is an extention
to the DANE definition. Value `0` means that this rule is not enforced
upon subdomains, value `1` means that it is enforced on subdomains.
Rule defined inside a subdomain `DomObj` that specifies `0` on a rule
existing in upper domain, that specifies `1` should be ignored. I.e.
subdomain rule cannot revoke enforcement imposed by an upper domain rule.

#### ds attribute

Translates into `DS` RR. Carries attributes defined by
[RFC-4034](http://tools.ietf.org/html/rfc4034).

```
"ds": [ [31381,8,1,"pA1W...ceTI="]
      , [31381,8,2,"toHB...ndexitQ6j8E="]
      ]
```

### Lookup Sequence

Assuming a query is performed for
`sdN`++"."++{...}++"."++`sd2`++"."++`sd1`++"."++`dom`++".bit"
(`sdX` list possibly being empty), the lookup process starts by
querying the database for the object corresponding to `dom`.
Technically, it is easiest to populate a "seed" DomObj with a
single attribute `"import"` the value of which corresponds to the
`dom` name in the Namecoin namespace, which is `"d/" ++ dom`.
This domain object is then transformed by the following
recursive sequece:

1. Value of the element of the `"map"` attribute with the key `""`
   (empty string) is recursively merged into the base domain. The
   `""` element of the `"map"` is removed from the result.
2. If attribute `"delegate"` does not exist in the resulting object,
   step 3 is is performed. If attribute `"delegate"` exists, in
   the resulting object, lookup is performed for the values of this
   attribute, and fetched object replaces the base domain completely.
   The result is passed as base domain to step 1.
3. If attribute `"import"` does not exist in the resulting object,
   recursion stops, and step 4 is performed on the result
   If attribute `"import"` exists in the resulting object, lookup is
   performed for the values of this attribute, and fetched objects
   are recursively merged into the base domain. The `"import"`
   attribute is removed from the result. Then the result is passed
   as base domain to step 1.
4. If subdomain chain is empty, recursion stops, and step 5 is
   performed on the result. If subdomain chain is not empty, next
   element is taken out of the chain, and the `"map"` is looked
   up for the element with the name matching the subdomain element.
   The value of this element of the `"map"` is passed as base domain
   to step 1. If matching element does not exist, lookup is considered
   failed.
5. Domain object in which all `""` map elements and all `"delegate"`
   and `"import"` elements are acted upon and removed, is then
   "normalized" by removal of attributes that are nullified by the
   presence of other attributes.

Note that the process involves recursion nested levels deep.

### Merging Procedure

When a domain object `extra` needs merging into a domain object `base`,
the following rules are applied:

* Of `String` and other "scalar" attributes, one is chosen, the value
  from the `base` taking precedence.
* On `Array` attribtes, `union` operation is performed. (Of equal
  elements, only one copy is left.)
* On `Map` attributes, recursive merge is performed. On the top level,
  elemens with keys that are only present in either `base` or `extra`
  object are all put into result. The values of the elements that are
  present in both `base` and `extra` objects are merged according to
  the rules applicable to their type.

license: Zlib

repository: crosser/pdns-pipe-nmc

repo_name: crosser/pdns-pipe-nmc


text:
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
[![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)

[Demonstration/Explanation Video](https://youtu.be/yu_ZIr0q5rU)

fvid is a project that aims to encode any file as a video using 1-bit color images
to survive compression algorithms for data retrieval.

---

# Installation

Requires installation of [FFmpeg](https://ffmpeg.org/download.html) and libmagic first, then install using pip3

Linux/macOS

```
pip3 install fvid
```

Windows

```
py -m pip install fvid
```

# Usage

Encoding files as videos

Linux/OSX

```
fvid -i [input file] -e
fvid -i [input file] --framerate 1 -e
fvid -i [input file] --password "wow fvid is cool" -e
```

Windows

```
py -m fvid -i [input file] -e
py -m fvid -i [input file] --framerate 1 -e
py -m fvid -i [input file] --password "wow fvid is cool" -e
```

Retrieving data from videos

Linux/OSX

```
fvid -i [input video] -d
```

Windows

```
py -m fvid -i [input video] -d
```

If the file was encoded with a non-default password, it'll prompt you to enter the password upon decoding.

 How to Contribute
-----------------

1.  Check for open issues or open a fresh issue to start a discussion
    around a feature idea or a bug [here](https://github.com/AlfredoSequeida/fvid/issues)
    tag for issues that should be ideal for people who are not very familiar with the codebase yet.
2.  Fork [the repository](https://github.com/alfredosequeida/fvid) on
    GitHub to start making your changes to the **master** branch (or branch off of it).
3.  Write a test which shows that the bug was fixed or that the feature
    works as expected.
4.  Send a pull request and bug the maintainer until it gets merged and
    published. :)

repository: aspenmayer/fvid

repo_name: aspenmayer/fvid


text:
Write a playbook that installs the httpd package on ansible2.example.com
2. Ensure that it is started and that the firewall is opened to allow access to it
3. Also create a file /var/www/html/index.html with some welcome text
4. Lastly, write a playbook that will undo all modifications


text:
# Marching Cubes in Unreal Engine 5
![Demo Image](https://i.imgur.com/W8lIxHx.png)
A small voxel sandbox using the [marching cubes](http://paulbourke.net/geometry/polygonise/) algorithm.

Uses [FastNoiseLite](https://github.com/Auburn/FastNoiseLite) for creating the initial voxel data and the [RuntimeMeshComponent](https://github.com/TriAxis-Games/RuntimeMeshComponent/tree/RMC4_UE5) for creating procedural meshes in UE5.


text:
# Phyllachora pestis-nigra var. caracaensis Rehm, 1897 VARIETY

#### Status
ACCEPTED

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

#### Published in
Hedwigia 36: 368 (1897)

#### Original name
Phyllachora pestis-nigra var. caracaensis Rehm, 1897

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
[Go back to the Autonomous Overview Page](readme.md)

![](../common/images/customer.logo2.png)
## Autonomous Cloud Lab ##
### Section 5. Creating an Autonomous Analytics Cloud instance ###

You use Oracle Cloud Stack to set up services with Oracle Autonomous
Analytics Cloud.

1.  In My Services, open the dashboard.

2.  Navigate to **Autonomous Analytics**,
    click the **Action Menu**, and then select **Open Service Console**.

    ![](./media/image51.jpeg)

3.  Click **Create Instance**.

![](./media/image52.jpeg)

4.  In the **Details** area:

    -   **Name**: Enter a name for your service instance. The name must
        start with a letter and can contain only letters and numbers.

    -   **Description:** (Optional) Enter a description.

    -   **Notification Email**: Enter the email address of the person
        who should receive status updates about this service.

    -   **Region**

    -   **Tags:** (Optional) Add tags and assign tags to this service.

    -   **License Type:** Bring your own license or subscribe to a new
        Autonomous Analytics Cloud software license and the Autonomous
        Analytics Cloud.

        For example:

 ![](./media/image53.png)

5.  In the **Select Region** area:

    -   **Region**: A region is a localized geographic area.

![](./media/image54.jpeg)
        For example:

6.  In the **Choose Service Options** area:

    -   **Edition:** Select the edition of Oracle Analytics Cloud that
        you want to use. The edition that you select determines the
        feature set that you can use.

        -   Enterprise Edition --- **EE-Enterprise**

        -   Standard Edition --- **SE-Standard**

        -   Data Lake Edition --- **DATALAKE-Datalake**

    -   **Feature Set:** Select the features that you want to deploy.
        The options available to you depend on the edition you're
        subscribed to. If you select **Business Intelligence**, you
        automatically have access to Data Visualization.

        -   Standard Edition --- **Data Visualization**

        -   Data Lake Edition --- **Data Visualization** or **Essbase**

        -   Enterprise Edition --- **Data
            Visualization** or **Essbase** or **Business
            Intelligence** (includes Data Visualization)

    -   **Number of OCPUs:** Select the number of Oracle Compute Units
        (OCPUs) for your environment.

**You can raise a service request to change the compute shape after creating the service, if the needs of your business change.**

 For example:

![](./media/image55.png)

7.  Click **Next**.

8.  Verify that the details are correct, and click **Confirm**.

It takes about half an hour to create the service. Oracle sends an email
to the designated email address when your service is ready. Display the
Activity page to check the current status.

9.  After the instance has been created you can go ahead and launch the
    platform by clicking on the menu drop-down button and selecting
    **Oracle Analytics Cloud URL**

![](./media/image56.png)

10. You will be redirected to the
    following page, which is the Data Visualization welcome page:

    ![](./media/image57.png)

11. In the left hand side you will find the Analytics Cloud menu with
    the following options:

    ![](./media/image58.png)

    -   **Home:** easy access to manage your connections, view existing
        data sets, projects and data flows.

    -   **Projects:** you can manage folders and projects from this
        section.

    -   **Data:** displays all the datasets, connections, dataflows and
        sequences.

    -   **Machine Learning:** manage and inspect the models that you
        have created.

    -   **Console:** add/edit map layers, jobs, administer users and
        roles, manage snapshots, connections and configure mail
        settings.

    -   **Academy:** useful resources for getting started.

    ---

    [Continue to Section 6](Section6.md)

    ---
    [Go back to the Autonomous Overview Page](readme.md)

repository: juarezjuniorgithub/EventLabs

repo_name: juarezjuniorgithub/EventLabs