text:
# bosh-vmrun-cpi-release

[BOSH CPI](https://bosh.io/docs/cpi-api-v1/) for VMWare Workstation/Fusion using `vmrun` and related binaries

## Releases

The software is under very active development and there there is currently no published releases on [bosh.io](bosh.io/releases).  See the usage section for instructions to build a dev release using the bosh-cli.

You can find bre-built tarballs on the [releases](https://github.com/micahyoung/bosh-vmrun-cpi-release/releases) page.

## Pre-requisites

* VMware Fusion or Workstation installed on Linux, MacOS or Windows 10 (tested against on Fusion 8 and Workstation 14)
* Linux or Windows Stemcell for vsphere
    * Linux stemcells are at [bosh.io/stemcells](https://bosh.io/stemcells/bosh-vsphere-esxi-ubuntu-trusty-go_agent)
    * Windows stemcells must be manually built using [bosh-windows-stemcell-builder](https://github.com/cloudfoundry-incubator/bosh-windows-stemcell-builder) due to Microsoft licensing restrictions.
* Note: VMware Player not supported (but may be possible when used with `vmrun` provided by [VMware VIX SDK](https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0|PLAYER-1259|drivers_tools))

## Deployment scenarios

* Stand-alone VMs created with `bosh create-env`
  * `bosh` CLI communicates directly with the hypervisor on the host machine
* BOSH director via `bosh create-env` and deployments via `bosh deploy` over localhost SSH tunnel
  * SSH server must be running on `vmrun` hypervisor with public key enabled
  * OS-specific CPI binary will be installed on the hypervisor
  * CPI must run as user with privileges to execute `vmrun`

## Usage
Follow the instructions for your VMware product:

### Fusion setup
* Find the paths for these binaries: `vmrun`, `ovftool`, and `vmware-vdiskmanager`
  * Fusion defaults:
    * `/Applications/VMware Fusion.app/Contents/Library/vmrun`
    * `/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager`
    * `/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool`
* Network configured for NAT
   * VMware Fusion Menu -> Preferences -> Network
   * Create/choose a network with these settings
     * [x] Allow virtual machines on this network to connect to external networks (using NAT)
     * [x] Connect this host Mac to this network
     * [x] Provide addresses on this network via DHCP
     * Choose a specific subnet range (ex: <IP_ADDRESS>/<IP_ADDRESS>)
* **Note:** Do not open Fusion while CPI is active during VM creation/updating - you'll see errors about files being inaccessible. It's fine to open after VMs are all up and running.
   * **Tip:** To exit Fusion and leave VMs running, right-click the Fusion Dock icon, hold <kbd>Option</kbd> and `Force Quit`.

### Workstation for Linux/Windows setup
* Find the paths for these binaries: `vmrun`, `ovftool`, and `vmware-vdiskmanager`
  * Windows defaults:
    * `C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe`
    * `C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe`
    * `C:\Program Files (x86)\VMware\VMware Workstation\OVFTool\ovftool.exe`
  * Linux:
    * `/usr/bin/vmrun`
    * `/usr/bin/vmware-vdiskmanager`
    * `/usr/bin/ovftool`
* Network configured for NAT
    * Edit -> Virtual Network Editor
    * Create/choose a network with these settings
      * [x] NAT (share host's IP address with VMs)
      * [x] Use local DHCP service to distribute IP addresses to VMs
      * [x] Connect a host virtual adapter ([your vm network name]) to this network
      * Choose a specific subnet range (ex: <IP_ADDRESS>/<IP_ADDRESS>)
* **Note:** Do not open any BOSH VMs in Workstation while CPI is active during VM creation/updating - you'll see errors about files being inaccessible. It's fine to open and view VMs are they are all up and running.

### Example deployment

```
# create the vm <example manifest below>
bosh create-env my-vm.yml \
  --vars-store ./state/vm-creds.yml \
  --state ./state/vm_state.json \
  -v cpi_url="https://github.com/micahyoung/bosh-vmrun-cpi-release/releases/download/v1.1.0/bosh-vmrun-cpi-release-1.1.0.tgz" \
  -v cpi_sha1="f2c971abbc4be6c97f77306fd49ad23fac238099" \
  -v stemcell_url="https://bosh.io/d/stemcells/bosh-vsphere-esxi-ubuntu-xenial-go_agent?v=97.10" \
  -v stemcell_sha1="9e832921a4a1279b8029b72f962abcb2f981b32c" \
  -v vmrun_bin_path="$(which vmrun)" \
  -v ovftool_bin_path="$(which ovftool)" \
  -v vdiskmanager_bin_path="$(which vmware-vdiskmanager)" \
  -v vm_store_path="/tmp/vm-store-path" \
  -v internal_ip=<IP_ADDRESS>  \
  -v internal_cidr=<IP_ADDRESS> \
  -v internal_gw=<IP_ADDRESS> \
  -v network_name=vmnet3 \
;
```

#### Example manifest

```
---
name: my-vm

releases:
- name: bosh-vmrun-cpi
  url: ((cpi_url))
  sha1: ((cpi_sha1))

resource_pools:
- name: vms
  network: default
  stemcell:
    url: ((stemcell_url))
    sha1: ((stemcell_sha1))
  cloud_properties:
    cpu: 2
    ram: 4_096
    disk: 40_000

    # optional bootstrap script, runs before bosh-agent starts
    bootstrap:
      script_content: |
        # add your own bootstrap actions here
      script_path: '/tmp/bootstrap.sh'  # full path where to write temporary script on VM
      interpreter_path: '/bin/bash'     # full path to script interpreter
      username: 'vcap'                  # VM username with permissions to run the script
      password: 'c1oudc0w'              # hard-coded stemcell password (eventually changed by bosh-agent)
      ready_process_name: 'bosh-agent'  # process name that the script should wait for before running
      min_wait_seconds: 180             # time to sleep before polling for ready_process_name (defaults to 0)
      max_wait_seconds: 300             # max time to wait for ready_process_name - fails if exceeded  env:
    bosh:
      mbus:
        cert: ((mbus_bootstrap_ssl))

disk_pools:
- name: disks
  disk_size: 65_536

networks:
- name: default
  type: manual
  subnets:
  - range: ((internal_cidr))
    gateway: ((internal_gw))
    static: [((internal_ip))]
    dns: [<IP_ADDRESS>]
    cloud_properties:
      name: ((network_name))

instance_groups:
- name: my-vm
  instances: 1
  jobs: []
  resource_pool: vms
  persistent_disk_pool: disks
  networks:
  - name: default
    static_ips: [((internal_ip))]
  properties:
    agent:
      env:
        bosh: {}
    ntp: &ntp
    - time1.google.com
    - time2.google.com
    - time3.google.com
    - time4.google.com
cloud_provider:
  mbus: https://mbus:((mbus_bootstrap_password))@((internal_ip)):6868
  cert: ((mbus_bootstrap_ssl))
  properties:
    blobstore:
      provider: local
      path: '/var/vcap/micro_bosh/data/cache' #depends on agents internal location
    agent: {mbus: "https://mbus:((mbus_bootstrap_password))@<IP_ADDRESS>:6868"}
    ntp: *ntp
    vmrun:
      vmrun_bin_path: "((vmrun_bin_path))"
      ovftool_bin_path: "((ovftool_bin_path))"
      vdiskmanager_bin_path: "((vdiskmanager_bin_path))"
      vm_store_path: "((vm_store_path))"
      vm_start_max_wait_seconds: 600
      vm_soft_shutdown_max_wait_seconds: 30
  template:
    name: vmrun_cpi
    release: bosh-vmrun-cpi

variables:
- name: mbus_bootstrap_password
  type: password

- name: default_ca
  type: certificate
  options:
    is_ca: true
    common_name: ca

- name: mbus_bootstrap_ssl
  type: certificate
  options:
    ca: default_ca
    common_name: ((internal_ip))
    alternative_names: [((internal_ip))]
```

## Troubleshooting

### Common errors

* `Error: The operation was canceled`
   * Usually indicates your host is out of memory

* VMs not starting or failing to come up
   * Check if there are any unknown running VMs
   ```
   vmrun list
   ```

   * If so, shut down all running vms
   ```
   vmrun list | grep vmx | while read vmx; do [ -d $(dirname $vmx) ] || mkdir $(dirname $vmx); [ -f $vmx ] || curl -L https://github.com/micahyoung/bosh-vmrun-cpi-release/raw/v1.0.0/src/bosh-vmrun-cpi/test/fixtures/test.vmx -o $vmx; vmrun stop $vmx hard; done
   ```
   * Reattempt operation

### Recovery from a hard-shutdown

If you have shutdown the physical machine running the Workstation/Fusion, your VMs are likely in a very inconsistent state. There are at least two ways to go about recovering

#### Delete all state and recreate all VMs:

1. Stop all running VMs
1. Remove entire vm-store-path directory
1. Remove any BOSH deployment `state.json` files
1. Redeploy all VMs

repository: aslanshemilov/bosh-vmrun-cpi-release

repo_name: aslanshemilov/bosh-vmrun-cpi-release


text:
elm-json-parser
===============

This is a straightforward JSON parser for Elm 0.18.  It builds a parse tree of the following shape:

```elm
type JValue =
    JString String
  | JNumber Float
  | JBool Bool
  | JNull
  | JObject (Dict String JValue)
  | JArray (List JValue)
```

which is produced by the __parse__ function:

```elm
parse : String -> Result.Result ParseError JValue
```

This parser provides an alternative strategy to [Json.Decode](http://package.elm-lang.org/packages/elm-lang/core/4.0.5/Json-Decode) for handling possibly awkward JSON input - such as that described in [Decoding Large JSON Objects](https://www.brianthicks.com/post/2016/08/22/decoding-large-json-objects-a-summary/).

(I was a little surprised to see that Json.Decode was implemented primarily in javascript.)

Dependencies
------------

*  elm-lang/core 5.0.0
*  Bogdanp/elm-combine 3.1.1

repository: newlandsvalley/elm-json-parser

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: newlandsvalley/elm-json-parser


text:
# {{cookiecutter.paper_title}}
Repository for LaTeX for my paper.

## How to compile paper
### Docker

Below is for powershell and windows
```powershell
# Build the new image and compile the documnet
docker build -t paper .
# Spin up a container and get the ID of it
New-Variable -Name id -Value (docker create paper)
# Copy the main.pdf back
docker cp ${id}:/document/main.pdf .
docker rm -v $id
Remove-Variable id
```

### Normal Linux
 ```bash
cd latex
latexmk --pdf main.pdf
```

license: MIT


text:
# DSB RPA Applicant Challenge

## Overview

Within this 2-hour window, we have included the following tasks:

1. Completion of a described RPA process using a skeleton workflow
2. Submission of your workflow as instructed by this guide

## Why do a Challenge?

As a part of our RPA developer applicant assessment process, we have decided to include a robotics challenge. Here is what we hope to gain from this exercise:

- Greater insight into the way you work.
- A concrete example of your work we can discuss in the in-person interview.

The challenge is not meant to cause extra stress or take up too much of your time; instead we hope it is a time for you to exhibit your skills and know-how.

## Accessibility

At DSB, we care about equal accessibility for all. We should have already provided you the chance to let us know about any accommodations that you need for the challenge. Here we want to reiterate that you still have the chance to make requests for accommodation. Just contact Nathan to do so (contact info below).

## Technical Problems & Support

You are completing the challenge on resources provided by us, so we take the responsibility for malfunctions and/or complications. If you have any problems, ring or send an email to Nathan Kuik, who has pre-arranged this period for you to complete the challenge.

- Telephone: +45 24 68 50 90
- Email: [naku<EMAIL_ADDRESS>
## **Remember!**

Your VM will, without warning, shutdown at the end of the pre-arranged window, so please ensure you leave time to submit your workflow!

## Process Description

For this exercise, you are asked to read data from a spreadsheet in a browser and input the data into a web form on a different website. The workflow you have been provided with includes the opening of the spreadsheet (where the data is read) within a single browser window, as well as the opening of the web form in a second browser window (where the data is input).

There are 10 lines of data that should be read from the spreadsheet and each row of data should be input in the web form in the order of the rows of the spreadsheet. The web form should be submitted after each row’s information is submitted.

The steps of the process can be listed like this:

1. Open the browser window of the spreadsheet to read data from (already included in the workflow).
2. Open the browser window of the web form to input the data (already included in the workflow).
3. Read a row of data from the spreadsheet.
4. Input the data in the corresponding fields in the webform.
5. Submit the form.
6. Repeat the steps above for each row of data in the spreadsheet.

## Directions

1. Open the workflow (.xaml file with the “Ui” icon) from your desktop (double-click):

![Open Challenge Workflow](images/workflow.png)

2. Test the workflow by hitting “Run” or F5 to ensure two web browser windows are opened:

![Run Workflow](images/run_workflow.png)

3. Close the Internet Explorer windows just created
4. Complete the code to read data from the rows of the spreadsheet:

![Spreadsheet from which to read values](images/challenge_spreadsheet.png)

5.Input the data for each row from the Google sheet in the corresponding fields in the rpachallenge.com site (Read “Notes” below for more details):

![Web form to input values](images/challenge_fields.png)

**Notes**: The directions on the rpachallenge.com site are the same as what we want you to accomplish—BUT we are using a spreadsheet from a browser instead of the file located on the site, but all the values are the same.
You can test your workflow as many times as you’d like. Ensure that the web form is refreshed, because the web form expects the values as they are ordered on in the spreadsheet.

## Submit Challenge

When you are ready to submit the challenge, please follow these directions:

1. Save you workflow (ctrl-s)
2. Select “Publish” within UiPath Studio:

![Select Publish](images/publish.png)

3. Select “Custom” from the publish option:

![Custom Publish](images/custom_publish.png)

4. From the dropdown, select: https://dsbcp.pkgs.visualstudio.com/_packaging/ApplicantSubmissions/nuget/v2
5. Type your name in the “API Key” field.
6. Select “Publish”:

![Hit Publish button](images/publish_button.png)

7. Ring to Nathan (+45 24 68 50 90) to confirm your submission

## Checklist

Ensure that you have:

- [ ] Completed the pre-challenge questionnaire
- [ ] Completed the RPA challenge as best you could
- [ ] Published your workflow
- [ ] Ring to Nathan (+45 24 68 50 90) to confirm your submission

## Thanks!

On behalf of DSB, we’d like to thank you for your time and effort spent on this task. It will greatly assist us in finding the best match for the position.

repository: dsb-automation/interview-challenges

repo_name: dsb-automation/interview-challenges


text:
# Modules Sample

In this sample we are going to introduce **Linting**. This is a technique which you can analyse code for potential errors, so that can help you to make less mistakes.

We will start from sample _"00 Intro/03 Output"_.

Summary steps:
 - Installing ESLint.
 - Configuring ESLint.
 - Connecting with Babel.
 - Connecting with Webpack.
 - Adding custom rules.

# Steps to build it

## Prerequisites

Prerequisites, you will need to have [nodejs](https://nodejs.org/en/) (v. 6.3.1) installed on your computer. If you want to follow this step guides you will need to take as starting point sample _"00 Intro/03 output"_.

## Installing and Configuring

- [ESLint](http://eslint.org/) is the newest tool for _linting_ that goes to the next level and it allows us to use custom rules, parsers, plugins, etc.
Let's start by downloading the `eslint` library via `npm`, in this case we will execute the following command from the command prompt `npm install eslint --save-dev`:

```
npm install eslint --save-dev
```

![package.json installing eslint](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/00 Install eslint.png)

- ESLint works with Babel and JSX syntax by installing plugins. That is, It's a great library to develop React projects. This sample is a demo, so come on to implement a basic configuration.
We are going to create a file `.eslintrc.json` (there are many [file formats options](http://eslint.org/docs/user-guide/configuring#configuration-file-formats))

#### .eslintrc.json
```json
{
  "extends": [
    "eslint:recommended"
  ],
  "env": {
    "browser": true
  }
}
```

- This is the most basic configuration where we are using [defaults rules](http://eslint.org/docs/rules/) provided by ESLint and we are defining [browser environment](http://eslint.org/docs/user-guide/configuring#specifying-environments) to define browser global variables like _window_ object.

- We can implement a [npm command script](https://docs.npmjs.com/misc/scripts) to run eslint:

#### package.json
```json
"scripts": {
  "start": "webpack-dev-server --inline",
  "lint": "eslint .",
  "test": "echo \"Error: no test specified\" && exit 1"
}
```

- Executing this command

```
npm run lint
```

![eslint errors](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/01 ESLint errors.png)

- ESLint throws two parse errors due to use _export_ and _import_ keywords. Import and export functionalities are provided by Babel to work with modules. So it's time to connect ESLint with Babel:

```
npm install babel-eslint --save-dev
```

#### .eslintrc.json
```json
{
  "extends": [
    "eslint:recommended"
  ],
  "env": {
    "browser": true
  },
  "parser": "babel-eslint"
}
```
![result after configuring eslint](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/02 Result after configuring babel-eslint.png)

- As we see, this time `npm run lint` doesn't throw any errors, it sounds good!. But we want to execute ESLint while we are writing our code. That is, the following step is connect ESLint with Webpack.

- We should install `eslint-loader`:

```
npm install eslint-loader --save-dev
```

![package.json installing eslint-loader](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/03 Install eslint-loader.png)

- To configure Webpack, we're going to use preloader definition. We make sure ESLint parse the code before any other process. We get a _webpack.config.js_ like this:

#### webpack.config.js
```javascript
...
module: {
  preLoaders: [
    {
      test: /\.js$/,
      loader: "eslint",
      exclude: /node_modules/,
    }
  ],
  loaders: [
    {
      test: /\.js$/,
      loader: "babel-loader",
      exclude: /node_modules/,
      query: {
        presets: ['es2015']
      }
    }
  ]
},
...
```

- Now we can remove previous npm command and execute again `npm start`.

#### package.json
```json
...
"scripts": {
  "start": "webpack-dev-server --inline",
  "test": "echo \"Error: no test specified\" && exit 1"
},
...
```

![Webpack build after configure eslint-loader](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/04 Webpack build after configure eslint-loader.png)

- Naked eye, it looks like nothing happens with the build. Let's go to change the code:

#### BEFORE students.js

```javascript
import {getAvg} from "./averageService"

const scores = [90, 75, 60, 99, 94, 30]
const averageScore = getAvg(scores);
const messageToDisplay = `average score ${averageScore}`;

document.write(messageToDisplay);
```

#### Typo: using _message_ instead of _messageToDisplay_

```javascript
import {getAvg} from "./averageService"

const scores = [90, 75, 60, 99, 94, 30]
const averageScore = getAvg(scores);
const messageToDisplay = `average score ${averageScore}`;

document.write(message);
```

![Typo](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/05 Typo in students.js.png)

## Defining Rules

- As we see previously, we are using [ESLint default rules](http://eslint.org/docs/rules/)

#### .eslintrc.json
```json
{
  "extends": [
    "eslint:recommended"
  ],
  ...
}
```

- The good news is that we can [configure all of these rules](http://eslint.org/docs/user-guide/configuring#configuring-rules) following these values:

  - `0` o `off` - Disable rule.
  - `1` o `warn` - Turn to warning.
  - `2` o `error` - Turn to error.

- For example, if we change `students.js` to this code:

```javascript
import {getAvg} from "./averageService"

const scores = [90, 75, 60, 99, 94, 30]
const averageScore = getAvg(scores);
const messageToDisplay = `average score ${averageScore}`;

console.log(messageToDisplay);
```

- As result, we get this error because the use of _console_ is disallow by default.

![Using console](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/06 Using console log.png)

- We can disable this rule with the following configuration:

```json
{
  "extends": [
    "eslint:recommended"
  ],
  "env": {
    "browser": true
  },
  "parser": "babel-eslint",
  "rules": {
    "no-console": 0
  }
}
```

![Disabling no-console rule](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/07 Disabling no-console rule.png)

- Other example is rule named [max-lines](http://eslint.org/docs/rules/max-lines) that it _enforces a maximum number of lines per file, in order to aid in maintainability and reduce complexity._

```json
{
  "extends": [
    "eslint:recommended"
  ],
  "env": {
    "browser": true
  },
  "parser": "babel-eslint",
  "rules": {
    "no-console": 0,
    "max-lines": ["error", 1]
  }
}
```

_NOTE:_ We can use "error" or 2. But we can read better this line if we use "error" word.

![Using max-lines rule](../../99 Readme Resources/02 Webpack/04 Misc/01 Linting/08 Using max-lines rule.png)

- To integrate tslinter with React based project we can use [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) that provides linting for JSX language.

path: /04 Misc/01 Linting/README.md

gha_language: JavaScript

gha_license_id: MIT


text:
# V1PodResourceClaim

PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL. |
**source** | [**V1ClaimSource**](V1ClaimSource.md) |  | [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: kubernetes-client/python

gha_language: Python

repo_name: kubernetes-client/python


text:
# TypedCssClasses Fable Sass Sample

![Demo](sassdemo.gif)

This sample illustrates the following concepts:

- Using [TypedCssClasses](https://github.com/zanaptak/TypedCssClasses) for type-safe CSS class properties in a [Fable](https://fable.io/) single page application.

- Using the [Sass](https://sass-lang.com/) CSS preprocessor to generate CSS. The sample uses Sass syntax; SCSS syntax would also work with the same setup.

- Using [Feliz](https://github.com/Zaid-Ajaj/Feliz/) for type-safe HTML and React components.

## Getting started

Install [.NET Core SDK](https://dotnet.microsoft.com/download).

Install [Node.js](https://nodejs.org/).

Run `dotnet tool restore`.

Run `dotnet restore`.

Run `npm install`.

Run `npm start`, and then browse to `http://localhost:8080`. You should get a counter with the header styled as white monospace text on blue background.

Optionally, run `npm run build` to produce a production deployment version.

## Project structure

* `src/App.fs`

  The application code, consisting of `App` and `Counter` React components.

  In the code, note the `type Css = CssClasses<...>` declaration for the TypedCssClasses type provider and the `Css`-prefixed CSS class properties.

* `content/styles.sass` and `content/_base.sass`

  The source Sass files that are used to generate the CSS.

* `sass-process.js`

  The Node-based script file executed by the TypedCssClasses type provider at design and compile time to preprocess the Sass source file into standard CSS, which is then used to generate the CSS class properties.

  This script is used instead of the Sass CLI in order to additionally communicate any referenced files (`_base.sass` in this case) to the type provider as files to watch for changes.

* `dist/`

  The folder containing the final distributable output after running `npm run build`. You can look at the `style.[some hash value].css` file to see the final generated CSS, and you can open `index.html` in the browser to run the application.

repository: zanaptak/TypedCssClasses

branch_name: refs/heads/main

gha_language: F#

repo_name: zanaptak/TypedCssClasses


text:
---
layout: default
---

[![Build Status](https://travis-ci.org/landrok/activitypub.svg?branch=master)](https://travis-ci.org/landrok/activitypub)
[![Test Coverage](https://api.codeclimate.com/v1/badges/410c804f4cd03cc39b60/test_coverage)](https://codeclimate.com/github/landrok/activitypub/test_coverage)

ActivityPub is an implementation of ActivityPub layers in PHP.

It provides two layers:

- A __client to server protocol__, or "Social API"
    This protocol permits a client to act on behalf of a user.
- A __server to server protocol__, or "Federation Protocol"
    This protocol is used to distribute activities between actors on
    different servers, tying them into the same social graph.

As the two layers are implemented, it aims to be an ActivityPub
conformant Federated Server

All [normalized types]({{ site.doc_baseurl }}/activitystreams-types.html)
are implemented too. If you need to create a new one, just extend
existing implementations.

________________________________________________________________________

- [Install]({{ site.doc_baseurl }}#install)
- [Requirements]({{ site.doc_baseurl }}#requirements)
- [Usage]({{ site.doc_baseurl }}#usage)
    - [Properties names]({{ site.doc_baseurl }}#properties-names)
    - [All properties and their values]({{ site.doc_baseurl }}#all-properties-and-their-values)
    - [Set several properties]({{ site.doc_baseurl }}#set-several-properties)
    - [Get a property]({{ site.doc_baseurl }}#get-a-property)
    - [Set a property]({{ site.doc_baseurl }}#set-a-property)
    - [Check if property exists]({{ site.doc_baseurl }}#check-if-property-exists)
    - [Use native types]({{ site.doc_baseurl }}#use-native-types)
    - [Use your own extended types]({{ site.doc_baseurl }}#use-your-own-extended-types)
    - [Create your own property validator]({{ site.doc_baseurl }}#create-your-own-property-validator)

________________________________________________________________________

Requirements
------------

- Supports PHP7+

________________________________________________________________________

Install
-------

```sh
composer require landrok/activitypub
```
________________________________________________________________________

Usage
-----

### Properties names

Whatever be your object or link, you can get all properties names with
`getProperties()` method.

```php
use ActivityPub\Type;

$link = Type::create('Link');

print_r( $link->getProperties() );
```

Would output something like:

```
Array
(
    [0] => type
    [1] => id
    [2] => name
    [3] => nameMap
    [4] => href
    [5] => hreflang
    [6] => mediaType
    [7] => rel
    [8] => height
    [9] => preview
    [10] => width
)
```

________________________________________________________________________

### All properties and their values

In order to dump all properties and associated values, use `toArray()`
method.

```php
use ActivityPub\Type;

$link = Type::create('Link');
$link->setName('An example');
$link->setHref('http://example.com');

print_r(
    $link->toArray()
);
```

Would output something like:

```
Array
(
    [type] => Link
    [name] => An example
    [href] => http://example.com
)
```

________________________________________________________________________

### Get a property

There are 3 equivalent ways to get a value.

```php
use ActivityPub\Type;

$note = Type::create('Note');

// Each method returns the same value
echo $note->id;
echo $note->get('id');
echo $note->getId();
```

________________________________________________________________________

### Set a property

There are 3 equivalent ways to set a value.

```php
use ActivityPub\Type;

$note = Type::create('Note');

$note->id = 'https://example.com/custom-notes/1';
$note->set('id', 'https://example.com/custom-notes/1');
$note->setId('https://example.com/custom-notes/1');

```

Whenever you assign a value, the format of this value is checked.

This action is made by a validator. If rules are not respected an
Exception is thrown.

________________________________________________________________________

### Set several properties

With __Type factory__, you can instanciate a type and set several
properties.

```php
use ActivityPub\Type;

$note = Type::create('Note', [
    'id'   => 'https://example.com/custom-notes/1',
    'name' => 'An important note',
]);

```
________________________________________________________________________

### Check if property exists

```php
use ActivityPub\Type;

$note = Type::create('Note');

echo $note->has('id'); // true
echo $note->has('anotherProperty'); // false

```

________________________________________________________________________

### Use native types

All core and extended types can be used with a classic instanciation.

```php
use ActivityPub\Type\Extended\Object\Note;

$note = new Note();
```

Same way with the Type factory:

```php
use ActivityPub\Type;

$note = Type::create('Note');
```

________________________________________________________________________

### Use your own extended types

If you need some custom attributes, you can extend predefined types.

- Define your custom type:

```php
use ActivityPub\Type\Extended\Object\Note;

class MyNote extends Note
{
    // Override basic type
    protected $type = 'CustomNote';

    // Custom property
    protected $myProperty;
}
```

There are 2 ways to instanciate a type:

- A classic PHP call:

```php
$note = new MyNote();
$note->id = 'https://example.com/custom-notes/1';
$note->myProperty = 'Custom Value';

echo $note->getMyProperty(); // Custom Value
```

- With the Type factory:

```php
use ActivityPub\Type;

$note = Type::create('MyNote', [
    'id' => 'https://example.com/custom-notes/1',
    'myProperty' => 'Custom Value'
]);
```

Extending types preserves benefits of getters, setters and
their validators.

________________________________________________________________________

### Create your own property validator

Use a custom property validator when you define custom attributes or
when you want to override ActivityPub attribute default validation.

Regarding to previous example with a custom attribute `$myProperty`, if
you try to set this property, it would be done without any check on
values you're providing.

You can easily cope with that implementing a custom validator using
`Validator`.

```php
use ActivityPub\Type\ValidatorInterface;
use ActivityPub\Type\Validator;

// Create a custom validator that implements ValidatorInterface
class MyPropertyValidator implements ValidatorInterface
{
    // A public validate() method is mandatory
    public function validate($value, $container)
    {
        return true;
    }
}

// Attach this custom validator to a property
Validator::add('myProperty', MyPropertyValidator::class);

// Now all values are checked with the validate() method
// 'myProperty' is passed to the first argument
// $note is passed to the second one.

$note->myProperty = 'Custom Value';

```

An equivalent way is to use Type factory and `addValidator()` method:

```php
use ActivityPub\Type;

// Attach this custom validator to a property
Type::addValidator('myProperty', MyPropertyValidator::class);

```
________________________________________________________________________

Now that we know how to use types, let's see what types are implemented
and how to use them thanks to
[the ActivityStreams Types manual]({{ site.doc_baseurl }}/activitystreams-types.html).

{% capture doc_url %}{{ site.doc_repository_url }}/index.md{% endcapture %}
{% include edit-doc-link.html %}


text:
# serial-to-tcp

Allows TCP access to serial port based VBus connections.

## Overview

There are two types of VBus adapters:

- TCP based: DL2, DL3, KM2, VBus/LAN
- serial port based: VBus/USB, USB port of DeltaSol SLT and other controllers

This tool connects to one or more serial port based adapters and exposes them over TCP. This allows:

- transmitting VBus data over longer distances than USB or serial ports would normally permit
- accessing serial port based adapters from applications that only support TCP based ones

## Initial setup

```
$ cd <workspace>
$ git clone https://github.com/danielwippermann/resol-vbus
$ cd resol-vbus
$ npm install --production
$ cd examples/serial-to-tcp
$ cp config.js.example config.js
```

## Configuration

This tool needs a configuration file called `config.js`. The repository already contains a `config.js.example` file that was copied during the initial setup above as a starting point.

```javascript
module.exports = {
    // A list of serial ports to connect to
    serialPorts: [{
        channel: 1,
        path: '/dev/tty.usbmodem141301',
        baudrate: 9600,
    }, {
        channel: 2,
        path: '/dev/tty.SLAB...',
        baudrate: 9600,
    }],

    // The TCP port on which the service is listening for incoming connections
    port: 7053,
};
```

If you only want to connect to a single serial port it is recommended to configure that to use channel 0, since most applications will by default try and connect that channel 0.

## Using the tool

After adjusting the configuration, just run the `main.js`:

```
$ cd <workspace>
$ cd resol-vbus/examples/serial-to-tcp
$ node main.js
Opening serial port...
Opening TCP endpoint...
Waiting for connections...
```

## Known issues

- Selecting a non-existing channel using the `CHANNEL` command returns `+OK` instead of an error.
- Sending the `DATA` command with a non-existing channel selected returns `+OK`, but immediately closes the connection afterwards.

## License

The MIT License (MIT)

Copyright (c) 2013-present, Daniel Wippermann.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

repository: danielwippermann/resol-vbus

repo_name: danielwippermann/resol-vbus


text:
# Replacing A Subgraph

## Introduction

This example first generates a model consisting of a `Min` op followed by a
`Max`, and then uses the `graph.layer()` and `graph.register()` APIs seen in
[example 07](../07_creating_a_model_with_the_layer_api) to create a function
that can be used to replace this subgraph with a `Clip` op.

This can be useful, for example, to enable TensorRT plugins with ONNX.

## Subgraph Replacement Basics

The process of replacing a subgraph involves 3 steps. For example, for a graph
with the following structure:

         Tensor0
            |
          Node0
            |
         Tensor1    Tensor2
               \    /
                Node1
                  |
               Tensor3
                  |
                Node2

In order to replace the subgraph consisting of [`Node0`, `Node1`], we need to:

1. Disconnect the **outputs** of the subgraph inputs: `Tensor0` and `Tensor2`

    That means we need to delete the edge between `Tensor0` and `Node0`,
    and between `Tensor2` and `Node1`.

2. Disconnect the **inputs** of the subgraph outputs: `Tensor3`

    That means we need to delete the edge between `Node1` and `Tensor3`.

This will leave us with a graph like this:

         Tensor0     Tensor2

               Tensor3
                  |
                Node2

And the now disconnected subgraph:

          Node0
            |
         Tensor1
               \
                Node1

3. Lastly, we need to insert our node such that it has inputs: [`Tensor0`, `Tensor2`]
    and outputs: [`Tensor3`, ].

After this step, we have our final graph (`cleanup()` will remove the dangling subgraph):

         Tensor0     Tensor2
               \     /
              MyNewNode0
                  |
               Tensor3
                  |
                Node2

## Running the example

1. Generate a the model including `Min` and `Max` ops by running:
    ```bash
    python3 generate.py
    ```

    The generated model will compute `max(min(x, 6), 0)` and look like this:

    ![../resources/08_model.onnx.png](../resources/08_model.onnx.png)

2. Replace the subgraph with a `Clip` op by running:
    ```bash
    python3 replace.py
    ```

    The final model will include a `clip(x, min=0, max=6)` and look like this:

    ![../resources/08_replaced.onnx.png](../resources/08_replaced.onnx.png)

repository: NVIDIA/TensorRT

repo_name: NVIDIA/TensorRT


text:
work days per week
=====

A node.js module for getting the work days in a week.

install & test
------

Checkout project with git and run

    npm install
    npm test

in project root.

usage
-----

The workDays() API returns a list of [moment.js](http://momentjs.com) objects representing the work days for given country, region and week.
Country and state are mandatory. If no week/year given current week/year will be used.

    workDays('DE', 'BY');
    workDays('DE', 'BY', '14');
    workDays('DE', 'BY', '14', 2013);

license
----

This library was developed by [hour1](http://www.hour1.de) and is freely distributable under the terms of the MIT license.

repository: schneidexe/workdaysperweek

repo_name: schneidexe/workdaysperweek


text:
# Day 29 | [HWS 29](https://www.hackingwithswift.com/100/swiftui/29) | [Index](https://github.com/JulesMoorhouse/100DaysOfSwiftUI/blob/main/README.md)

- [P05B WordScramble](https://github.com/JulesMoorhouse/100DaysOfSwiftUI/blob/main/P05B%20WordScramble/P05B%20WordScramble/ContentView.swift)

- List, Bundle, UITextChecker and more.

<img src="../Images/day29a.png">

path: /P05B WordScramble/README.md


text:
# OPEN SOURCE SPEECH RECOGNITION TOOLKIT

CMUSphinx is a speaker-independent large vocabulary continuous speech recognizer released under BSD style license. It is also a collection of open source tools and resources that allows researchers and developers to build speech recognition systems.

http://cmusphinx.sourceforge.net/

http://sourceforge.net/projects/cmusphinx/

http://cmusphinx.sourceforge.net/wiki/tutorialam

https://github.com/cmusphinx

Sphinx-4 Speech Recognition System
-------------------------------------------------------------------

Sphinx-4 is a state-of-the-art, speaker-independent, continuous speech
recognition system written entirely in the Java programming language. It
was created via a joint collaboration between the Sphinx group at
Carnegie Mellon University, Sun Microsystems Laboratories, Mitsubishi
Electric Research Labs (MERL), and Hewlett Packard (HP), with
contributions from the University of California at Santa Cruz (UCSC) and
the Massachusetts Institute of Technology (MIT).

The design of Sphinx-4 is based on patterns that have emerged from the
design of past systems as well as new requirements based on areas that
researchers currently want to explore.  To exercise this framework, and
to provide researchers with a "research-ready" system, Sphinx-4 also
includes several implementations of both simple and state-of-the-art
techniques.  The framework and the implementations are all freely
available via open source under a very generous BSD-style license.

Because it is written entirely in the Java programming language, Sphinx-4
can run on a variety of platforms without requiring any special
compilation or changes.  We've tested Sphinx-4 on the following platforms
with success.

https://github.com/cmusphinx/sphinx4

#For Android
https://github.com/cmusphinx/pocketsphinx-android-demo

http://cmusphinx.sourceforge.net/wiki/tutorialandroid

http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx

http://cmusphinx.sourceforge.net/wiki/tutorial

#Tutorials
http://mariangemarcano.blogspot.com.es/2012/09/speech-recognition-with-pocketsphinx.html

https://ronaldramdhan.wordpress.com/2010/03/11/sphinxtrain/

# Automatic Speech Recognition: From the Beginning to the Portuguese Language
http://www.inf.pucrs.br/~propor2010/proceedings/tutorials/Adami.pdf

André Gustavo Adami

<EMAIL_ADDRESS>
#Links:
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=9487

Speech Recognition with the Raspberry Pi

https://sites.google.com/site/observing/Home/speech-recognition-with-the-raspberry-pi

Google Voice for Python

https://code.google.com/archive/p/pygooglevoice/

LAPS UFPA

http://www.laps.ufpa.br/falabrasil/downloads.php

repository: caiomsouza/artificial-intelligence

repo_name: caiomsouza/artificial-intelligence


text:
# Employee - Employee Management System

Employee Pages - A Fully Responsive Employee Management System built with Vue and NodeJS

 - [Report  Bug](https://github.com/thepasterover/employee-management-system/issues)
 - [Request Feature](https://github.com/thepasterover/employee-management-system/issues)

Table of contents
1. [About the project](#about-the-project)
    - [Built With](#built-with)
2. [Getting Started](#getting-started)
    - [Prerequisites](#prerequisites)
    - [Installation](#installation)
3. [Usage](#usage)
4. [Contributing](#contributing)
5. [License](#license)
6. [Contact](#contact)

## About the Project

![image](https://user-images.githubusercontent.com/50194033/116855346-db186880-ac16-11eb-805f-2e7d80c69ce7.png)

![image](https://user-images.githubusercontent.com/50194033/116855380-e79cc100-ac16-11eb-904a-780aa911d1d3.png)

This project is a fully responsive part of employee management system for an employee of the company built using Vue and Vuetify. This is an system built keeping in mind the modern design as well as the functionality needed for an employee.

Features:
- View basic details such as work and growth over the past month.
- A work chart to show how much progress made by an employee daily.
- Attendance overview of every month and also marks everyone present by midnight unless and until altered.
- Add Work done by an employee for today
- View Total Salary with a yearly chart for growth perceptions.
- A dynamic profile with an option to update basic info and update profile picture.
- Reset Password using email verification.
- Fully Mobile Responsive

Known Bugs:
- Employee can't set a password with special characters. Fix soon!

Future Scope:
- Add a option for the user to dispute salary distributed.
- Add a filter for Salary chart so the employee can see past year's monthly chart too.

## Built With
- [VueJS](https://vuejs.org/)
- [Vuetify](https://vuetifyjs.com/)
- [Nuxt](https://nuxtjs.org/)

## Getting Started

### Prerequisites

- VueJS: [VueJS installation](https://v3.vuejs.org/guide/installation.html)

## Installation

```bash
# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate
```

For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

## Usage

This project can be setup and used by small to medium sized businesses to manage and handle their employee records and data.

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

1. Fork the Project
2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
3.  Push to the Branch (git push origin feature/AmazingFeature)
5. Open a Pull Request

## License
Distributed under the MIT License. See LICENSE for more information.

## Contact

Name: Boobalan Shettiyar -<EMAIL_ADDRESS>ProjectLink: https://github.com/thepasterover/employee-management-system


text:
# webpack-tests - webpack-dev-server-sandbox

Implementing the first [documentation on the site](https://webpack.github.io/docs/webpack-dev-server.html)
using a simple server taken from [here](http://blog.modulus.io/build-your-first-http-server-in-nodejs).

- build with .\node_modules\.bin\webpack
- run with  .\node_modules\.bin\webpack-dev-server --content-base build/

repository: Muzietto/webpack-tests

repo_name: Muzietto/webpack-tests


text:
Liferay blade

Docker image for use of the Liferay blade tool.

Usage:
```shell script
docker build -t liferay-blade
# docker run -v [dir]:/blade liferay-blade [blade commands]
docker run -v $(pwd):/blade liferay-blade help
```


text:
---
title: "This Month in Mun - March 2020"
author: The Mun Team
excerpt: A lot of things that we cannot fully control are currently going on in the world. The Mun community and Core Team are trying to make the best of the situation and have once again made great strides; the recently obtained MOSS grant giving us an additional productivity boost!
---

A lot of things that we cannot fully control are currently going on in the world. The Mun community and Core Team are trying to make the best of the situation and have once again made great strides; the recently obtained MOSS grant giving us an additional productivity boost!

#### Community

Our community has made great progress on the integration of the [annotate-snippets](https://crates.io/crates/annotate-snippets) crate. Hopefully we will be able to merge their [PR](https://github.com/mun-lang/mun/pull/91) soon.

We have added new [*good first issues*](https://github.com/mun-lang/mun/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) on Github, so if you want to get involved with Mun please check them out:

* **Replace return type annotation `:` with `->`** [[issue#105]](https://github.com/mun-lang/mun/issues/105)

* **Implement slab allocator to store `ObjectInfo<T>`** [[issue#106]](https://github.com/mun-lang/mun/issues/106)

* **feat: add type aliases** [[issue#110]](https://github.com/mun-lang/mun/issues/110)

#### v0.2 progress

We still had two major features left on our [v0.2 roadmap](https://trello.com/b/ZcMiREnC/mun-roadmap): **garbage collection** and **struct hot reloading**. This month we were able to finish the former and started on foundational work for the latter; with a projected release date of Mun v0.2 by early May:

* **feat(runtime): add marshalling of value structs** [[PR#93]](https://github.com/mun-lang/mun/pull/93)
  ```mun
    struct(value) Foo {
        x: int,
        y: int
    }

    pub fn foo_new(x: int, y: int): Foo {
        Foo { x: x, y: y, }
    }

    pub fn foo_add(foo: Foo): int { foo.x + foo.y }
  ```
  ```rust
    fn main() {
        let lib_dir = env::args().nth(1).expect("Expected path to a Mun library.");
        let mut runtime = RuntimeBuilder::new(lib_dir)
            .spawn()
            .expect("Failed to spawn Runtime");

        // The Mun compiler automatically generates a wrapper for `pub fn`s that
        // contain `struct(value)` arguments or return types, which allocates the
        // marshalled data in the runtime's allocator.
        let mut foo: StructRef = invoke_fn!(runtime, "foo_new", 1i64, 2i64).wait();
        let x = foo.get::<i64>("x").unwrap();
        let y = foo.replace("y", x + 1).unwrap();
        foo.set("x", y).wait();
    }
  ```

* **feat: extern functions** [[PR#96]](https://github.com/mun-lang/mun/pull/96)
  ```mun
    /// This is a function that does not have an implementation in Mun but instead is linked
    /// dynamically when loading the assembly
    extern fn tick_the_system();

    fn main() {
      // The extern functions can be called like any other Mun function
      tick_the_system()
    }
  ```

* **feat: object ptr indirection** [[PR#97]](https://github.com/mun-lang/mun/pull/97)

* **feat: size and alignment in type info** [[PR#98]](https://github.com/mun-lang/mun/pull/98)

* **feat: garbage collector (defaults to mark&sweep)** [[PR#99]](https://github.com/mun-lang/mun/pull/99)

#### Quality Assurance

Our unceasing efforts to improve code coverage have resulted in several PRs focussed on new tests (and consequent fixes) - including our 100th PR!! 🎉

* **Replace grcov with tarpaulin for test coverage** [[PR#100]](https://github.com/mun-lang/mun/pull/100)

* **fix(code_gen): incremental compilation** [[PR#101]](https://github.com/mun-lang/mun/pull/101)

* **test(code_gen): add incremental compilation test** [[PR#102]](https://github.com/mun-lang/mun/pull/102)

* **fix: name of type table global** [[PR#108]](https://github.com/mun-lang/mun/pull/108)

We are always trying to improve metrics for objectively tracking quality as we progress. We've previously talked about how unit and integration tests are a big part of our development process. This month we've added [performance benchmarks](https://github.com/mun-lang/mun/pull/104) using [Criterion](https://crates.io/crates/criterion), allowing us to do our first optimisations in the Mun Runtime.

<img src="../images/empty-violin.svg" alt="Violin plot of an `empty` function call" width="100%" />

The violin plot above compares **function invocation overhead** of embedded languages (Mun, LuaJIT, Wasm) with the raw performance of Rust by invoking an empty function that merely returns the input argument. The [Wasmer](https://crates.io/crates/wasmer) runtime was used to execute Wasm.

Please note that Rust takes around 675 ps and is thus not visible on the above scale. For clarity, below you can see the respective PDFs of function call times in order of speed (less is better); i.e. for Rust, Mun, Wasm, LuaJIT (from left to right, top to bottom).

<img src="../images/empty-rust-pdf.svg" alt="PDF of an `empty` function call time using Rust" width="450" height="300" /><img src="../images/empty-mun-pdf.svg" alt="PDF of an `empty` function call time using Mun" width="450" height="300" />

<img src="../images/empty-wasm-pdf.svg" alt="PDF of an `empty` function call time using Wasm (with wasmer runtime)" width="450" height="300" /><img src="../images/empty-luajit-pdf.svg" alt="PDF of an `empty` function call time using LuaJIT" width="450" height="300" />

To test **arithmetic and logic performance**, we needed to minimise the function invocation overhead; enter Fibonacci. The line chart below shows the mean measured time for each language as the input argument increases (100, 200, 500, 1000, 4000, 8000). Even at this early stage, Mun's dependence on LLVM as compiler backend allows us to achieve performance comparable to Rust.

<img src="../images/fibonacci-lines.svg" alt="Line plot of `fibonacci` function calls" width="100%" />

*All benchmarks were run on an Intel(R) Core(TM) i7-6700HQ CPU @ 2.6 GHz with 16 GB DDR4 RAM.*

The benchmark source code is included with the [Mun repository](https://github.com/mun-lang/mun). Feel free to give it a try, add additional benchmarks, and share your findings with us on [Discord](https://discord.gg/SfvvcCU), [Twitter](https://twitter.com/munlangorg), or [Github](https://github.com/mun-lang/mun).

Last but not least, some miscellaneous quality of life improvements were also merged:

* **feat: only create symbols for public functions** [[PR#92]](https://github.com/mun-lang/mun/pull/92)

* **fix: removed the codecov token** [[PR#94]](https://github.com/mun-lang/mun/pull/94)

* **improvement: bump parking_lot dependency to 0.10** [[PR#103]](https://github.com/mun-lang/mun/pull/103)

* **improvement: bump failure dependency to 0.1.7** [[PR#107]](https://github.com/mun-lang/mun/pull/107)

repository: mun-lang/website

repo_name: mun-lang/website


text:
# Logging Style

This document describes a specific logging style that we use that helps us having as useful logs as possible.

## Logging Levels

There are three basic settings of logging that we commonly use:

 * default production mode - logging level is set to INFO;
 * debug mode - logging level is set to DEBUG, at least for some components;
 * deep development mode - logging level is set to TRACE, at least for some components.

In our current logging setup, all logs at INFO and higher levels are also written to the console. This means that in the default mode, all you see in the console is all that is logged.
The debug mode can be enabled using `debug` configuration option (see [Using Logging document](./using-logging.md)) and if it is enabled, DEBUG level logs will be also sent to the console.
The TRACE logging level can only be enabled in `NLog.config` file (again, see [Using Logging document](./using-logging.md)) and are only logged to files.

This setup implies which logging level should each logging line have:

 * use INFO level for something that the end user is supposed to see;
 * use DEBUG level for logs that contain very important information for developers, but avoid using DEBUG level for logs that appear often;
 * use TRACE level logs for any detailed logging;
 * higher levels - WARN, ERROR, FATAL - are also sent to the console, so use them accordingly.

The rest of the document mostly describes style of TRACE level logs. It is up to the developer, which logs will be promoted to DEBUG or higher levels.

## Purpose

The purpose of TRACE level logs is to record the execution flow in a way it can later be inspected. This implies that the logs need to contain enough
information and have a good degree of coverage. **Good logs of execution flow allow the reader to see the exact execution path of each object instance in particular component.**

Consider the following example:

```
while (true)
{
    uint256 hash = await this.UTXOSet.Rewind();
    ChainedBlock rewinded = this.Chain.GetBlock(hash);
    if (rewinded == null)
        continue;

    this.Tip = rewinded;
    this.Puller.SetLocation(rewinded);
    break;
}
```

Where should we introduce the logs in this code in order to always catch the whole execution flow? It is not enough to log just the exit state of the loop as we would
lose the information about how many times the rewind operation was made. Therefore we use two logs in this code:

```
while (true)
{
    uint256 hash = await this.UTXOSet.Rewind();
    ChainedBlock rewinded = this.Chain.GetBlock(hash);
    if (rewinded == null)
    {
        this.logger.LogTrace("Rewound to '{0}', which is still not a part of the current best chain, rewinding further.", hash);
        continue;
    }

    this.logger.LogTrace("Rewound to '{0}'.", hash);
    this.Tip = rewinded;
    this.Puller.SetLocation(rewinded);
    break;
}
```

Logs from this code will contain hash of each block after each rewind operation as well as at the end of the loop.
**In general, each important execution path branch should be distinguishable from any other important execution path branch in the logs.**
Which execution path is important is up to the developer to decide. This is why it is always better if the author of the code
is the one who introduces the logs to the code. Adding logs to the code later may lead to excessive logging of unimportant branches,
or not enough logging of important branches. Note that in order to distinguish two branches, you only need a log in one of them.
Sometimes, you will find it useful to have a log in both branches, sometimes just having the log in the branch that is executed LESS often
will be enough. This can be seen in the following example:

```
VersionPayload version = node.PeerVersion;
if (version != null)
{
    TimeSpan timeOffset = version.Timestamp - this.dateTimeProvider.GetUtcNow();
    if (timeOffset != null) this.state.AddTimeData(address, timeOffset, node.Inbound);
}
else this.logger.LogTrace("Node '{0}' does not have an initialized time offset.", node.RemoteSocketEndpoint);

```

Note that in the context of this example, most `node` object do have `PeerVersion` set. Rarely it is not set. Therefore it is not necessary
to explicitly mention that a particular node was "normal". Only if the node was abnormal, we will see it in the log file due to the log line
in the else branch. If the node is normal, no log will be created and thus the reader knows it was normal.

## Method Entry/Exit Logs

Entry and exit logs are added automatically on compilation by fody weaver and therefore should not be added manually except for exit markers (`(-)[THIS_IS_MARKER]`).

This section is outdated but for historical reasons it's kept as it is in case we would like to return to manual entry\exit logs.

All important methods, which are almost all methods, except for methods that do very little, are very simple (trivial), and are called very often,
should have special method entry and exit logs. These logs have a unified structure and provide an uniform looking logs that are very easy
to read. A method is considered to be called too often, if it is called in a loop, in which the same set of objects are being used.
However, if different objects are being used in each call, the method does not necessarily qualify as being called too often.
Thus calling a method that processes a transaction in block can't be considered as called too often even if a block contains 1000 transactions.
Each transaction is different and we can very much be interested in how each transaction is processed. However, if there is a method
that is called 100 times for each such transaction and only calculates and updates some internal value, that might be considered as
a method that is called too often. The final decision is, as always, on the developer.

Each such method has a single entry log and one or more exit logs. An entry log is always placed at the very beginning of the method's code
and only method guards and reusable variables that will also go into the entry log can be put in front of the entry log. The entry log format is as follows:

```
"(arg1:value1,arg2:value2,...)"
```

Example of an entry log:

```
private void AttachedNode_MessageReceived(Node node, IncomingMessage message)
{
    this.logger.LogTrace("({0}:'{1}',{2}:'{3}')", nameof(node), node.RemoteSocketEndpoint, nameof(message), message.Message.Command);
```

The intention here is to identify each object passed to the method, so that the reader of the logs can track the object through the execution flow.
This will produce the following log:

```
...AttachedNode_MessageReceived (node:'[::ffff:<IP_ADDRESS>]:26178',message:'block')
```

**In general, we try to log all input arguments to the method.** Usually, some kind of name or identifier is available, sometimes it is a pair of values
(e.g. UTXO ID is a pair of transaction's ID and transaction output number). Sometimes, the input argument does not have such an ID, in which case
we can decided not to log it (if that is not very important argument), or we may decide to use `GetHashCode` method. There is one exception
to this general rule - we never log sensitive data such as passwords or cryptographic seeds.

Each entry log must have its matching exit log. This means that the method should have as many exit logs as there are ways to exit the method.
The only exception to this entry-exit pairing are unhandled exceptions coming from methods that the method calls. The format of an exit log is as follows:

```
"(-):resultValue,outarg1=outval1,outarg2=outval2,..."
```

We log result value and values of all output arguments (same rules as for the input arguments) and in case the method changes a global state
variable (or object state variable), we also consider such value as an output argument. A very common example of exit log:

```
    this.logger.LogTrace("(-):{0}", res);
    return res;
}
```

If a return variable is a structure, we only log some useful part of it. In this case, we use `*` that represents the returned object:

```
    FetchCoinsResponse result = null;

    ...

    this.logger.LogTrace("(-):*.{0}='{1}',*.{2}.{3}={4}", nameof(result.BlockHash), result.BlockHash, nameof(result.UnspentOutputs), nameof(result.UnspentOutputs.Length), result.UnspentOutputs.Length);
    return result;
}
```

This will produce the following log:

```
...FetchCoinsAsync (-):*.BlockHash='838b8efcb78c693087fc39dd0b8648e5bde92c019633be5340b7fe2629e839b6',*.UnspentOutputs.Length=1064
```

**We always want each log to be unique.** Therefore, if a method have more than 1 way of exit, we need to distinguish its exit logs. We do that by introducing a context
identifier to all non-default exit logs and sometimes to all exit logs. The format of the exit log with context identifier is as follows:

```
"(-)[CONTEXT_NAME_ALL_CAPS]:resultValue,outarg1=outval1,outarg2=outval2,..."
```

Here is an example of that:

```
Block block = context.BlockResult.Block;

if (!BlockStake.IsProofOfStake(block))
{
    this.logger.LogTrace("(-)[NOT_POS]");
    return;
}

// Verify hash target and signature of coinstake tx.
BlockStake prevBlockStake = this.stakeChain.Get(chainTip.HashBlock);
if (prevBlockStake == null)
{
    this.logger.LogTrace("(-)[NO_PREV_STAKE]");
    ConsensusErrors.PrevStakeNull.Throw();
}
```

We can see two different ways of exiting the method. One simply returns and other throws. There are no output arguments or result values,
but there is a context identifier that allows the reader to distinguish which exit was used.

With both entry and exit logs we use nameof() to put names of arguments in the log. This makes it easy to refactor the code and avoid
having old names in logs.

Method entry and exit logs are always logged on TRACE level.

## Other Logs

Non-entry and non-exit logs are used to give us some extra information about the execution flow or the state of the object or system.
The format of these logs is

```
"Not very complex, but unique, English sentence."
```

We do not use '[CONTEXT]' context identifier as the context is given by the sentence itself. We also do not use `nameof()` because we rather describe
the event in English. We also don't use `"name:value"` notation or `"name=value"`. Example:

```
this.logger.LogTrace("UTXO '{0}/{1}' with value {2} might be available for staking.", stakeTx.OutPoint.Hash, stakeTx.OutPoint.N, utxo.Value);
```

## Value Log Format

Examples in this section are mostly for method exit logs, but the formatting of the values inside the log applies to all logs.
All value types, small integer types, enums, booleans etc. are logged without any apostrophes or quotes.

```
bool res = false;

...

this.logger.LogTrace("(-):{0}", res);
```

In case of strings or block hashes or similar values, we use apostrophes:

```
uint256 blockHash;

...

this.logger.LogTrace("(-):'{0}'", blockHash);
```

For integer flags (not enums), bits, or other hex values, we use `0x` prefix and the composite format string:

```
uint flags = FLAG_1 | FLAG_3;

...

this.logger.LogTrace("(-):0x{0:x}", flags);
```

For date and time, we use the composity format string:

```
DateTime date = DateTime.UtcNow;

...

this.logger.LogTrace("(-):{0:yyyy-MM-dd HH:mm:ss}", date);
```

In case of collections, lists, arrays, sets, etc. we usually only log the number of items they contain. This is especially common for input arguments of such types:

```
private bool ReleaseDownloadTaskAssignmentLocked(Dictionary<uint256, DownloadAssignment> peerPendingDownloads, uint256 blockHash)
{
    this.logger.LogTrace("({0}.{1}:{2},{3}:'{4}')", nameof(peerPendingDownloads), nameof(peerPendingDownloads.Count), peerPendingDownloads.Count, nameof(blockHash), blockHash);

```

As a general rule, we try the log to be as light as possible and as such, it should not enumerate all the items in a collection unless this information is considered
as very important. In case we need the log to be somewhat heavy, we should use `IsEnabled` method of the logger:

```
if (this.logger.IsEnabled(LogLevel.Debug))
{
    foreach (Item item in list)
        this.logger.LogDebug("... something about each item ...");
}

```

In some cases, we do want to log all items of a collection. In that case we use square brackets and comma as a separator:

```
int[] arr = new int[] { 1, 3, 5 };

...

this.logger.LogTrace("(-):[{0}]", string.Join(",", arr));
```

Note that with this method you have to be careful to check the same logging level as it is then used.

As stated and explained in [Using Logging document](./using-logging.md), do not use interpolated strings in logs.

repository: CityChainFoundation/city-chain

gha_language: C#

repo_name: CityChainFoundation/city-chain


text:
# Installation
> `npm install --save @types/webpack-hot-client`

# Summary
This package contains type definitions for webpack-hot-client (https://github.com/webpack-contrib/webpack-hot-client).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-client

Additional Details
 * Last updated: Fri, 22 Jun 2018 00:08:12 GMT
 * Dependencies: webpack, net, node
 * Global values: none

# Credits
These definitions were written by Ryan Clark <https://github.com/rynclark>, ZSkycat <https://github.com/ZSkycat>.


text:
# Unit test file generator

Lightweight library for generating unit test files.

The time used for writing test setup can now be used for thinking better testing scenarios !

### Info

The library uses [Code Dom](https://msdn.microsoft.com/en-us/library/y2k85ax6(v=vs.110).aspx) for generating unit test files.
It takes the absolute path to the dll as input, and outputs the tests in the current directory.
Test file names contain the full namespace of the files tested.

### Usage

The utility aids in reducing the repetitive work when writing unit tests by auto-generating the setup.

- [x] Generates compiling test class setup
- [x] Declares class dependencies
- [x] Declares test methods for all public methods
- [x] Constructs the class under test instance
- [x] Uses AAA syntax
- [x] Implements a default call for the method under test
- [x] Keeps tests consistent with code style naming
- [x] Adds random values for value types/ initializes reference type parameters

```
C:\TestsGenerator\bin\Debug>TestsGenerator.exe "C:\Projects\bin\Debug\Project.dll"
```

repository: mihaicrisanbodea/unit-test-generator

repo_name: mihaicrisanbodea/unit-test-generator


text:
# Git and Github

Slides from my talk on Bicol IT tech talk 4 [Check out the live demo](http://files.mayonvolcanosoftware.com/git-and-github-slides/).

repository: johnnncodes/git-and-github-slides

repo_name: johnnncodes/git-and-github-slides


text:
# Sublime Terminal

Shortcuts and menu entries for opening a terminal at the current file, or the current root project folder in [Sublime Text](http://sublimetext.com/).

## Features

 - Opens a terminal in the folder containing the currently edited file
 - Opens a terminal in the project folder containing the currently edited file

## Installation

Download [Package Control](https://packagecontrol.io/) and use the *Package Control: Install Package* command from the command palette. Using Package Control ensures Terminal will stay up to date automatically.

## Usage

 - **Open Terminal at File**
     Press *ctrl+shift+t* on Windows and Linux, or *cmd+shift+t* on OS X
 - **Open Terminal at Project Folder**
     Press *ctrl+alt+shift+t* on Windows and Linux, or *cmd+alt+shift+t* on OS X

In addition to the key bindings, terminals can also be opened via the editor context menu and the sidebar context menus.

## Package Settings

The default settings can be viewed by accessing the ***Preferences > Package Settings > Terminal > Settings – Default*** menu entry. To ensure settings are not lost when the package is upgraded, make sure all edits are saved to ***Settings – User***.

 - **terminal**
     - The terminal to execute, will default to the OS default if blank. OS X users may enter *iTerm.sh* to launch iTerm if installed.
     - *Default:* ***""***
 - **parameters**
     - The parameters to pass to the terminal. These parameters will be used if no [custom parameters](#custom-parameters) are passed via a key binding.
     - *Default:* ***[]***

### Examples

Here are some example setups:

#### Cmder on Windows

```js
{
  // Replace with your own path to cmder.exe
  "terminal": "C:\\Program Files\\cmder_mini\\cmder.exe",
  "parameters": ["/START", "%CWD%"]
}
```

#### xterm on GNU/Linux

```js
{
  "terminal": "xterm"
}
```

#### iTerm on OS X

```js
{
  "terminal": "iTerm.sh"
}
```

#### iTerm on OS X with tabs

```js
{
  "terminal": "iTerm.sh",
  "parameters": ["--open-in-tab"]
}
```

#### iTerm2 v3 on OS X

```js
{
  "terminal": "iTerm2-v3.sh"
}
```

## Custom Parameters

With the parameters argument to the *open_terminal* and *open_terminal_project_folder* commands, it is possible to construct custom terminal environments.

The following is an example of passing the parameters *-T 'Custom Window Title'* to a terminal. Please note that this example is just an example, and is tailored to the XFCE terminal application. Your terminal may use the `-T` option for some other features or setting. Custom key bindings such as this would be added to the file opened when accessing the *Preferences > Key Bindings – User* menu entry (the file name varies by operating system).

```json
{
  "keys": ["ctrl+alt+t"],
  "command": "open_terminal",
  "args": {
    "parameters": ["-T", "Custom Window Title"]
  }
}
```

A parameter may also contain the *%CWD%* placeholder, which will be substituted with the current working directory the terminal was opened to.

```json
{
  "keys": ["ctrl+alt+t"],
  "command": "open_terminal",
  "args": {
    "parameters": ["-T", "Working in directory %CWD%"]
  }
}
```

repository: zce/windows-st-portable

repo_name: zce/windows-st-portable


text:
# ♥ Heart Button ♥

[![CI Status](http://img.shields.io/travis/darquro/heart-button.svg?style=flat)](https://travis-ci.org/darquro/heart-button)
[![Version](https://img.shields.io/cocoapods/v/HeartButton.svg?style=flat)](https://cocoapods.org/pods/HeartButton)
[![License](https://img.shields.io/cocoapods/l/HeartButton.svg?style=flat)](https://cocoapods.org/pods/HeartButton)
[![Platform](https://img.shields.io/cocoapods/p/HeartButton.svg?style=flat)](https://cocoapods.org/pods/HeartButton)

Animating Heart button inspired by animation within [Instagram App](https://itunes.apple.com/app/instagram/id389801252).

## Usage

1. Drag and drop UIView.

2. Set `HeartButton` to Class and Module fields.

3. Set the outlet and write the handling code.

    ```swift
    import HeartButton

    class ViewController: UIViewController {

        @IBOutlet weak var heartButton: HeartButton!

        override func viewDidLoad() {
            super.viewDidLoad()

            self.heartButton.stateChanged = { sender, isOn in
                if isOn {
                    // selected
                } else {
                    // unselected
                }
            }
        }
    ```

## Customizing

You can change the design on the Storyboard.

Or You can change it programmatically.

| property | type | default |
|----|----|----|
| offLineWidth | CGFloat | 2.0 |
| offLineColor | UIColor | UIColor.black |
| offFillColor | UIColor | UIColor.clear |
| onLineWidth  | CGFloat | 0 |
| onLineColor  | UIColor | UIColor.clear |
| onFillColor  | UIColor | UIColor(red:0.92, green:0.29, blue:0.35, alpha:1.0) |

## Change state programmatically

```swift
// Change with animation
self.heartButton.setOn(!self.heartButton.isOn, animated: true)
```

## Installation

HeartButton is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "HeartButton"
```

To integrate using [Carthage](https://github.com/Carthage/Carthage), add the following to your Cartfile:

```
github "darquro/heart-button"
```

## Requirements

- Swift 4.0 or later
- iOS 9.0 or later

## Author

darquro

## License

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

repository: darquro/heart-button

repo_name: darquro/heart-button


text:
# Website Page

*Iota* is the blog page I am hosting on GitHub. It's implemented on top of [Poole](https://github.com/poole/poole). I also maintaining of repo of summaries of papers using deep learning on finance and related domains.

gha_language: HTML

gha_license_id: NOASSERTION


text:
# DEPRECATED

This project is deprecated, instead the preferred tool will be `spin-cli-py`.

# Spin CLI

Spin stands for *Static Page INcubator*. It is a system that allows users to write content in whatever format they want, and then compile that content into html, js, css files.

This project is a CLI that helps users to:

1. Initialize a new spin project
2. Build the content in a spin project
3. Publish the build content to an online place.
4. Create new documents for your spin distribution.

The actual compilation of of content is performed by so called `archetypes`. The archetypes are published as *OCI Containers*, and gets invoked by the CLI with the source and target volumes mounted so that needed logic can be performed. For archetypes one can look at [the base archetype project](https://github.com/ruffythepirate/spin-archetype-base) which contain useful tools that can be used when constructing archetypes, or the [blog archetype](https://github.com/ruffythepirate/spin-archetype-blog) which is an archetype that can be used to compile blog entries.

## Usage

In the `bin` folder, a couple of node entry points are available for different commands that can be executed. The `bin/spin` command can be used to invoke the other commands, much as is the pattern with the *AWS CLI*.

Commands to be implemented are:
1. `spin build` - ensures that a `.spin` folder exists in current folder, calls the *blog archetype* with the `src` and `target` folders mounted.

repository: ruffythepirate/spin-cli-js

repo_name: ruffythepirate/spin-cli-js


text:
---
title: Daikin AC
description: Instructions on how to integrate Daikin AC devices with Open Peer Power.
ha_category:
  - Climate
  - Sensor
  - Switch
ha_release: 0.59
ha_iot_class: Local Polling
ha_config_flow: true
ha_quality_scale: platinum
ha_codeowners:
  - '@fredrike'
  - '@rofrantz'
ha_domain: daikin
excerpt: none
---

The `daikin` integration integrates Daikin air conditioning systems into Open Peer Power.

There is currently support for the following device types within Open Peer Power:

- [Climate](#climate)
- [Sensor](#sensor)
- [Switch](#switch)

## Supported hardware

- The European versions of the Wifi Controller Unit (BRP069A41, 42, 43, 45), which is powered by the [Daikin Online Controller](https://play.google.com/store/apps/details?id=eu.daikin.remoapp) application. The new versions of WiFi Controller Unit (BRP069Bxx) also should work but it have to be confirmed by users. Tested and working device is BRP069B45.
- The Australian version of the Daikin Wifi Controller Unit BRP072A42. Confirmed working on a Daikin Cora Series Reverse Cycle Split System Air Conditioner 2.5kW Cooling FTXM25QVMA with operation mode, temp, fan swing (3d, horizontal, vertical) which is powered by the [Daikin Mobile Controller](https://itunes.apple.com/au/app/daikin-mobile-controller/id917168708?mt=8) ([Android version](https://play.google.com/store/apps/details?id=eu.daikin.remoapp)) application.
- The Australian version of the Daikin Wifi Controller for **AirBase** units (BRP15B61), which is powered by the [Daikin Airbase](https://play.google.com/store/apps/details?id=au.com.daikin.airbase) application.

## Configuration

The Daikin integration can be configured in three ways.

- Automatically via the [discovery]({{site_root}}/integrations/discovery/) integration.
- Via the Open Peer Power user interface where it will let you enter the IP-address of your Daikin AC.
- Or via the `configuration.yaml` file by adding the following:

```yaml
# Full manual example configuration.yaml entry
daikin:
  hosts:
    - <IP_ADDRESS>
```

## Climate

The `daikin` climate platform integrates Daikin air conditioning systems into Open Peer Power, enabling control of setting the following parameters:

- [**set_hvac_mode**](/integrations/climate/#service-climateset_hvac_mode) (`off`, `heat`, `cool`, `heat_cool`, or `fan_only`)
- [**target temperature**](/integrations/climate#service-climateset_temperature)
- [**turn on/off**](/integrations/climate#service-climateturn_on)
- [**fan mode**](/integrations/climate#service-climateset_fan_mode) (speed)
- [**swing mode**](/integrations/climate#service-climateset_swing_mode)
- [**set_preset_mode**](/integrations/climate#service-climateset_preset_mode) (away, none)

Current inside temperature is displayed.

Some models do not support setting of **fan speed** or **swing mode**.

Preset mode **away** translates to Daikin's "Holiday Mode":

_"Holiday mode" is used when you want to turn off your units when you leave you home for a longer time._

_When "Holiday mode" is enabled, the following action take place:_
 - _All connected units are turned OFF._
 - _All schedule timers are disabled._

## Sensor

The `daikin` sensor platform integrates Daikin air conditioning systems into Open Peer Power, enabling displaying the following parameters:

- Inside temperature
- Outside temperature

Some models only report outside temperature when they are turned on.

## Switch

Daikin AirBase units exposes zones (typically rooms) that can be switched on/off individually.

Zones with the name `-` will be ignored, just as the AirBase application is working.

extension: markdown


text:
---
layout: post
title: Introduction
subtitle:
categories: [Data structure]
tags: [ComputerScience]
---

### 1.3 algorithm specification
an algorithm is a finite set of instructions that accomplish a particular task

algorithms satisfy the following criteria
- zero or more inputs
- at least one output
- Definiteness (clear, unambiguous instructions)
- Finiteness (terminates after a finite number of steps
- Effectiveness

### 1.3.2 recursive algorithms
- extremely powerful

- allows us to express a complex process in very clear terms
- establish boundary condition that terminate the recursive call

### 1.4 data abstraction
a data type is a collection of objects and a set of operations that act on those objects

different data types in C
- basic data type: char, int, float, double
- composite data type: array, structure
- user-defined data type
- pointer data type

an abstract data type (ADT) is a data type that is organized in such a way that the specification of the objects and the operations on the objects is separated from the representation of the objects and the implementation of the operations

### 1.5 performance evaluation

- performance analysis (machine independent, complexity theory)
	- space complexity: the amount of memory that it needs to run to completion
	- time complexity: the amount of computer time that it needs to run to completion
- performance measurement (machine dependent)

### 1.5.3 asymptotic notation

![1.1](/assets/images/data_structure/1.1.png)
![1.2](/assets/images/data_structure/1.2.png)


text:
---
title: Bintray Proxy
description: Providers download proxy
date: 2018-10-14T21:26:42-07:00
draft: false
bref: Providers download proxy for setup shared plugins
toc: false
sidebar: false
type: app
chart: bintray-proxy
repo:
web:
logo: logo.png
---
{{<app>}}

If you've chosen to use shared RWX persistent storage for storing providers,
this application might come in handy to avoid errors due to parallel access to
same providers.

### Configuration options

| Section | Param | Default | Description |
|---------|-------|---------|-------------|
|| **nameOverride** || Use this to override name of the chart |
|| **sharedStorage** | `gh-go-home` | Name of the shared PVC used by `go-home` |
| **general** |
|| **namespace** | `default` | Namespace to install app into |
| **docker** |
|| **image** | `gohomeio/bintray-proxy` | Docker image |
|| **tag** | `1.0.3` | Docker image version |
|| **pullPolicy** | `IfNotPresent` | When to pull an image |
| **resources** |
|| **cpu.requests** | `100m` | CPU request for the proxy |
|| **cpu.limits** | `100m` | CPU limit for the proxy |
|| **memory.requests** | `50Mi` | Memory request for the proxy |
|| **memory.limits** | `100Mi` | Memory limit for the proxy |
| **inbound** |
|| **port** | `9090` | HTTP API port |
|| **type** | `ClusterIP` | Type of exposed service. Defaults to cluster-only |

repository: go-home-io/website

repo_name: go-home-io/website


text:
# 1636. Aerial Movie

**Description**

In order to prevent passengers from being too bored during the flight, LQ Airlines decided to play two movies during the flight. Since the movie cannot be played during the take-off and landing of the aircraft, LQ Airlines must ensure that the `duration of the two movies` to be `less than or equal` to the `flight duration minus 30 minutes`, and the total length of the two movies should be as long as possible. Now given `t` ,the flight duration (minutes), and array `dur[]`,the length of movies. Please output the length of the two movies in order of length. If there are multiple groups of the same length, select the one which contains the longest single moive.It is guarantee that there is a least one solution.

```
30 < t <= 1000
dur[i] <= 1000
1 <= len(dur) <= 100000
```

**Example**

Example 1:

```
Input: t=87，dur=[20,25,19,37]
Output: [20,37]
Explanation:
87-30=57
20+25=45, 57-45=12
20+19=39, 57-39=19
20+37=57, 57-57=0
25+19=44, 57-44=13
25+37=62, 57<62
19+37=56, 57-56=1
```

Example 2:

```
Input: t=67，dur=[20,17,19,18]
Output: [17,20]
Explanation:
67-30=37
17+20=37
18+19=37
The longest movie in the first group is 20，and 19 in the second grouo, so output`[17,20]`
```

repository: jxhangithub/lintcode

repo_name: jxhangithub/lintcode


text:
# CSGNet: Neural Shape Parser for Constructive Solid Geometry
[Gopal Sharma](https://hippogriff.github.io/), Rishabh Goyal, Difan Liu, [Evangelos Kalogerakis](https://people.cs.umass.edu/~kalo/), [Subhransu Maji](https://people.cs.umass.edu/~smaji/)

***

![](image.png)

_We present a neural architecture that takes as input a 2D or 3D shape and induces a program to generate it. The instructions in our program are based on constructive solid geometry principles, i.e., a set of boolean operations on shape primitives defined recursively. Bottom-up techniques for this task that rely on primitive detection are inherently slow since the search space over possible primitive combinations is large. In contrast, our model uses a recurrent neural network conditioned on the input shape to produce a sequence of instructions in a top-down manner and is significantly faster. It is also more effective as a shape detector than existing state-of-the-art detection techniques. We also demonstrate that our network can be trained on novel dataset without ground-truth program annotations through policy gradient techniques._

[Paper](https://arxiv.org/abs/1712.08290),  [Code-2D](https://github.com/Hippogriff/CSGNet),  [Code-3D](https://github.com/Hippogriff/3DCSGNet)

### Cite:
```bibtex
@InProceedings{Sharma_2018_CVPR,
author = {Sharma, Gopal and Goyal, Rishabh and Liu, Difan and Kalogerakis, Evangelos and Maji, Subhransu},
title = {CSGNet: Neural Shape Parser for Constructive Solid Geometry},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2018}
}
```

repository: adrelino/CSGNet

repo_name: adrelino/CSGNet


text:
# Docker container for Waves Testnet node

This Docker image will install the latest release version of Waves Testnet node upon building.

## Building the image

### Prerequisites

You need the latest version of Docker installed.

Please, follow installation istructions at [Docker Site](https://docs.docker.com/engine/installation/).

### Building the image

In order to build a new Docker image execute the following commands:

Clone the project's repository:

```
git clone https://github.com/wavesplatform/docker-waves-testnet.git
```

Get into project's directory:

```
cd docker-waves-testnet
```

Build an image with the following command:

```
docker build -t waves-testnet .

```

### Running the image

List your Docker's images:

```
docker images
```

To start a new Docker container, please, execute:

```
docker run --name waves-testnet waves-testnet

```

This image defines a storage volume in folder `/data` and volume for configuration file in `/conf` folder. Those folders are persisted on host drive. So, your node configuration and downloaded blockchain will survive the container restart. You can find the locations of volumes on a host computer using `docker inspect` command.

Alternatively you can map volumes on host folders using option `-v` as in:

```
docker run --name waves-testnet -v /home/user/local-waves-data:/data -v /home/user/local-waves-conf:/conf waves-testnet
```

In order to use your configuration file you have to place this file in `local-waves-conf` folder and provide the name of the file as command line parameter in `run` command.

```
cp my-waves.conf /home/user/local-waves-conf/
docker run --name waves-testnet -v /home/user/local-waves-data:/data -v /home/user/local-waves-conf:/conf waves-testnet my-waves.conf
```

To start and stop the container use Docker commands `docker start waves-testnet` and `docker stop waves-testnet`.

repository: cryptochain/docker-waves-devnet

repo_name: cryptochain/docker-waves-devnet


text:
# Doctrine ORM Batcher Bundle

[![Latest Version][ico-version]][link-packagist]
[![Latest Unstable Version][ico-unstable-version]][link-packagist]
[![Software License][ico-license]](LICENSE)
[![Build Status][ico-travis]][link-travis]
[![Quality Score][ico-code-quality]][link-code-quality]

Integrates the [Doctrine ORM Batcher library](https://github.com/Setono/doctrine-orm-batcher) into Symfony.

## Installation

### Step 1: Download the bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this plugin:

```bash
$ composer require setono/doctrine-orm-batcher-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

### Step 2: Enable the bundle

Enable the plugin by adding it to the list of registered plugins/bundles in `config/bundles.php`:

```php
<?php
$bundles = [
    // ...

    Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true],

    // ...
];
```

## Usage
Now you can inject the `BatcherFactoryInterface` or the `Setono\DoctrineORMBatcher\Query\QueryRebuilderInterface` into your services:

```php
<?php

use Setono\DoctrineORMBatcher\Factory\BatcherFactoryInterface;

final class YourService
{
    private $factory;

    public function __construct(BatcherFactoryInterface $factory)
    {
        $this->factory = $factory;
    }
}
```

With auto wiring this will work out of the box. If you're not using auto wiring you have to inject it in your service definition:

```xml
<?xml version="1.0" encoding="UTF-8" ?>

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <services>
        <service id="YourService">
            <argument type="service" id="Setono\DoctrineORMBatcher\Factory\BatcherFactoryInterface"/>
        </service>
    </services>
</container>

```

[ico-version]: https://poser.pugx.org/setono/doctrine-orm-batcher-bundle/v/stable
[ico-unstable-version]: https://poser.pugx.org/setono/doctrine-orm-batcher-bundle/v/unstable
[ico-license]: https://poser.pugx.org/setono/doctrine-orm-batcher-bundle/license
[ico-travis]: https://travis-ci.com/Setono/DoctrineORMBatcherBundle.svg?branch=master
[ico-code-quality]: https://img.shields.io/scrutinizer/g/Setono/DoctrineORMBatcherBundle.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/setono/doctrine-orm-batcher-bundle
[link-travis]: https://travis-ci.com/Setono/DoctrineORMBatcherBundle
[link-code-quality]: https://scrutinizer-ci.com/g/Setono/DoctrineORMBatcherBundle

repository: Setono/DoctrineORMBatcherBundle

gha_language: PHP

repo_name: Setono/DoctrineORMBatcherBundle


text:
# shopy

Python package for comfortable concurrent article research on multiple shopping platforms. The parsing rules for each shop are defined as *xpath* expressions in a *json* file. This makes it easy to add new websites to the shoplist. Search results are presented as a list objects allowing further processing like ordering and filtering.

### Code Sample

```python
>>> from shopy import Shoplist, Shop
>>> from itertools import islice

>>> shoplist = Shoplist()
>>> shoplist.shops = [Shop.from_file('amazon')]

>>> iterator = islice(sorted(shoplist.find('Batterie AAA 1.5V'),
                             key=lambda x: x.price), 5)
>>> for item in iterator:
        print(item.name[:30], "%0.2f" % item.price)

Panasonic LR 03 PAP Alkali Mic 3.15
Varta® Batterie (4103) Longlif 3.29
Micro-Batterie VARTA LONGLIFE  4.79
Panasonic LR 03 PSP Alkali Mic 5.75
Batterien Sparpack - 10 Stück  5.90

```

The parsing of a shops website is done via xpath syntax and is defined in a *json* file.

`amazon.json`:
```json
{
  "__type__": "Shop",
  "name": "Amazon",
  "url": "http://www.amazon.de",
  "search_url": "http://www.amazon.de/s/ref=nb_sb_noss_2?",
  "params": {
    "__mk_de_DE": "ÅMÅŽÕÑ",
    "url": "search-alias%3Daps"
  },
  "search_param": "field-keywords",
  "items": {
    "container": {"xpath": ".//li[@class=\"s-result-item\"]"},
    "name": {"xpath": ".//h2[contains(@class,\"s-access-title\")]/text()"},
    "price": {"xpath": ".//span[contains(@class, \"s-price\")]/text()"},
    "url": {"xpath": ".//a[contains(@class,\"a-link-norma\")]/@href"},
    "images": {"xpath": ".//img[contains(@class,\"s-access-image\")]/@src"}
  }
}

```

repository: stlehmann/shopy

repo_name: stlehmann/shopy