text:
1750\. Minimum Length of String After Deleting Similar Ends

Medium

Given a string `s` consisting only of characters `'a'`, `'b'`, and `'c'`. You are asked to apply the following algorithm on the string any number of times:

1.  Pick a **non-empty** prefix from the string `s` where all the characters in the prefix are equal.
2.  Pick a **non-empty** suffix from the string `s` where all the characters in this suffix are equal.
3.  The prefix and the suffix should not intersect at any index.
4.  The characters from the prefix and suffix must be the same.
5.  Delete both the prefix and the suffix.

Return _the **minimum length** of_ `s` _after performing the above operation any number of times (possibly zero times)_.

**Example 1:**

**Input:** s = "ca"

**Output:** 2

**Explanation:** You can't remove any characters, so the string stays as is.

**Example 2:**

**Input:** s = "cabaabac"

**Output:** 0

**Explanation:** An optimal sequence of operations is:

- Take prefix = "c" and suffix = "c" and remove them, s = "abaaba".

- Take prefix = "a" and suffix = "a" and remove them, s = "baab".

- Take prefix = "b" and suffix = "b" and remove them, s = "aa".

- Take prefix = "a" and suffix = "a" and remove them, s = "".

**Example 3:**

**Input:** s = "aabccabba"

**Output:** 3

**Explanation:** An optimal sequence of operations is:

- Take prefix = "aa" and suffix = "a" and remove them, s = "bccabb".

- Take prefix = "b" and suffix = "bb" and remove them, s = "cca".

**Constraints:**

*   1 <= s.length <= 105
*   `s` only consists of characters `'a'`, `'b'`, and `'c'`.

repository: javadev/LeetCode-in-Java

repo_name: javadev/LeetCode-in-Java


text:
---
id: azure-ts-appservice-docker
title: Azure Ts Appservice Docker
desc: ''
updated:<PHONE_NUMBER>418
created:<PHONE_NUMBER>418
isDir: false
gitNotePath: '{{ noteHiearchy }}/README.md'
sources:
  - name: pulumi examples
    url: 'https://github.com/pulumi/examples'
    license: Apache License 2.0
---
[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new)

# Azure App Service Running Docker Containers on Linux

Starting point for building web application hosted in Azure App Service from Docker images.

The example shows two scenarios:

- Deploying an existing image from Docker Hub
- Deploying a new custom registry in Azure Container Registry, building a custom Docker image, and running the image from the custom registry

## Running the App

1. Create a new stack:

   ```
   $ pulumi stack init dev
   ```

2. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):

   ```
   $ az login
   ```

3. Restore NPM dependencies:

   ```
   $ npm install
   ```

4. Set the Azure region location to use:

   ```
   $ pulumi config set azure-native:location westus2
   ```

5. Run `pulumi up` to preview and deploy changes:

   ```
   $ pulumi up
   Previewing changes:
   ...

   Performing changes:
   ...
   Resources:
       + 8 created

   Duration: 56s
   ```

6. Check the deployed endpoints:

   ```
   $ pulumi stack output HelloEndpoint
   http://hello-app-91dfea.azurewebsites.net/hello
   $ curl "$(pulumi stack output HelloEndpoint)"
   Hello, world!

   $ pulumi stack output GetStartedEndpoint
   http://get-started-15da13.azurewebsites.net
   $ curl "$(pulumi stack output GetStartedEndpoint)"
   <html>
   <body>
   <h1>Your custom docker image is running in Azure App Service!</h1>
   </body>
   </html>
   ```

* * *

## Imported Assets

- [Pulumi.yaml](/assets/pulumi.yaml)
- [index.ts](/assets/index.ts)
- [package.json](/assets/package.json)
- [tsconfig.json](/assets/tsconfig.json)

repository: stjordanis/seeds-pulumi-examples

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: stjordanis/seeds-pulumi-examples


text:
# NAME

node-win32ole - Windows COM bindings for [node.js](https://github.com/joyent/node)

win32ole makes accessibility from node.js to Excel, Word, Access, Outlook, InternetExplorer, WSH ( ActiveXObject / COM ) and so on. It does not need TypeLibrary.

# USAGE

Install with `npm install win32ole`.

It works as... (version 0.1.x)

``` js
try{
  var win32ole = require('win32ole');
  // var xl = new ActiveXObject('Excel.Application'); // You may write it as:
  var xl = win32ole.client.Dispatch('Excel.Application');
  xl.Visible = true;
  var book = xl.Workbooks.Add();
  var sheet = book.Worksheets(1);
  try{
    sheet.Name = 'sheetnameA utf8';
    sheet.Cells(1, 2).Value = 'test utf8';
    var rg = sheet.Range(sheet.Cells(2, 2), sheet.Cells(4, 4));
    rg.RowHeight = 5.18;
    rg.ColumnWidth = 0.58;
    rg.Interior.ColorIndex = 6; // Yellow
    var result = book.SaveAs('testfileutf8.xls');
    console.log(result);
  }catch(e){
    console.log('(exception cached)\n' + e);
  }
  xl.ScreenUpdating = true;
  xl.Workbooks.Close();
  xl.Quit();
}catch(e){
  console.log('*** exception cached ***\n' + e);
}
```

There are 3 ways to make force Garbage Collection for node.js / v8 .

- 1. use huge memory to run GC automatically ( causes abnormal termination )
- 2. win32ole.force_gc_extension(1);
- 3. win32ole.force_gc_internal(1);

see also [examples/ole_args_test_client.js](https://github.com/idobatter/node-win32ole/blob/master/examples/ole_args_test_client.js)

# Tutorial and Examples

- [test/init_win32ole.test.js](https://github.com/idobatter/node-win32ole/blob/master/test/init_win32ole.test.js)
- [test/unicode.test.js](https://github.com/idobatter/node-win32ole/blob/master/test/unicode.test.js)
- [examples/maze_creator.js](https://github.com/idobatter/node-win32ole/blob/master/examples/maze_creator.js)
- [examples/maze_solver.js](https://github.com/idobatter/node-win32ole/blob/master/examples/maze_solver.js)
- [examples/word_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/word_sample.js)
- [examples/access_mdb_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/access_mdb_sample.js)
- [examples/outlook_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/outlook_sample.js)
- [examples/ie_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/ie_sample.js)
- [examples/typelibrary_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/typelibrary_sample.js)
- [examples/uncfinder_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/uncfinder_sample.js)
- [examples/activex_filesystemobject_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/activex_filesystemobject_sample.js)
- [examples/wmi_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/wmi_sample.js)
- [examples/wsh_sample.js](https://github.com/idobatter/node-win32ole/blob/master/examples/wsh_sample.js)
- [examples/ole_args_test_client.js](https://github.com/idobatter/node-win32ole/blob/master/examples/ole_args_test_client.js)
- [examples/ole_args_test_client_metamorphoses.js](https://github.com/idobatter/node-win32ole/blob/master/examples/ole_args_test_client_metamorphoses.js)

# Other built in functions

* win32ole.version(void) // returns version string
* win32ole.printACP(utf8string) // Utf8 to .ACP
* win32ole.print(utf8string) // ASCII
* win32ole.gettimeofday(struct timeval &tv, null) // now arg2 is not used
* win32ole.sleep(long milliseconds, bool withmessage=false, bool with\n=false)
* win32ole.force_gc_extension(long flag) // now flag is dummy
* win32ole.force_gc_internal(long flag, string) // now flag is dummy

# FEATURES

* fix BUG: date
* BUG: A few samples in<EMAIL_ADDRESS>needs '._' ideom.
* When you use unary operator '!' at the place that needs boolean CONDITION (for example 'while(!obj.status){...}') , you must write 'while(!obj.status._){...}' to complete v8::Object::ToBoolean() conversion. (NamedPropertyHandler will not be called because v8::Object::ToBoolean() is called directly for unary operator '!' instead of v8::Object::valueOf() in ParseUnaryExpression() v8/src/parser.cc .) Do you know how to fake it?
* V8Variant::OLEGetAttr returns a copy of object, so it uses much memory. I want to fix it.
* Now '._' ideom is obsoleted.
* Remove 'node-proxy' from dependencies list.
* Change default branch to dev0.1.0 .
* BUG: Some samples in between<EMAIL_ADDRESS>and<EMAIL_ADDRESS>( examples/maze_creator.js examples/maze_solver.js ) uses huge memory and many disposers will run by v8 GC when maze size is 20*30. I think that each encapsulated V8Variant (by node-proxy) may be big object. So I will try to use v8 accessor handlers ( SetCallAsFunctionHandler / SetNamedPropertyHandler / SetIndexedPropertyHandler ) instead of ( '__noSuchMethod__' / '__noSuchGetter__' / '__noSuchSetter__' ) by node-proxy.
* So much implements. (can not handle some COM VARIANT types, array etc.)
* Bug fix. (throws exception when failed to Invoke(), and many test message.)
* Implement accessors getter, setter and caller. (version 0.1.x) (Some V8Variants were advanced to 0.1.x .)

# API

See the [API documentation](https://github.com/idobatter/node-win32ole/wiki) in the wiki.

# BUILDING

This project uses VC++ 2008 Express (or later) and Python 2.6 (or later) .
(When using Python 2.5, it needs [multiprocessing 2.5 back port](http://pypi.python.org/pypi/multiprocessing/) .) It needs neither ATL nor MFC.

Bulding also requires node-gyp to be installed. You can do this with npm:

    npm install -g node-gyp

To obtain and build the bindings:

    git clone git://github.com/idobatter/node-win32ole.git
    cd node-win32ole
    node-gyp configure
    node-gyp build

You can also use [`npm`](https://github.com/isaacs/npm) to download and install them:

    npm install win32ole

# TESTS

[mocha](https://github.com/visionmedia/mocha) is required to run unit tests.

    npm install -g mocha
    nmake /a test

# CONTRIBUTORS

* [idobatter](https://github.com/idobatter)

# ACKNOWLEDGEMENTS

Inspired [Win32OLE](http://www.ruby-doc.org/stdlib/libdoc/win32ole/rdoc/)

# LICENSE

`node-win32ole` is [BSD licensed](https://github.com/idobatter/node-win32ole/raw/master/LICENSE).


text:
# Horus Monitoring

[Sustaingineering at UBC](https://www.sustaingineering.com)

GSM MONITORING PROJECT
UBC Sustaingineering is working in partnership with ENICALSA (Renewable solutions company in Nicaragua) to design and develop a 3G-network monitoring system for solar water pumps. There are currently 30 solar pumps systems installed in Nicaragua's country side whose functionality is currently being monitored by ENICALSA's team in-person.

The team is developing a remote monitoring platform that senses various operating parameters of the solar panels and water pumps such as the temperature, voltage/current, water pressure, and transmits this data through GSM/3G to a central base for its monitoring.

# Developer

The front-end is handled by React, which is backed by Firebase. As our backend, firebase handles the auth, hosting, and storage.

Check out `scripts/` to preview how to add sensor data to the RDB.

## Usage

Run `npm install` after cloning the repo.

## Testing and building projects

`npm run start` - start a local development server.

`npm run build` - build an optimized output to `build/`.

`npm run deploy` - deploy to firebase. Make sure you have auth permissions.

Firebase credentials are unique but non-secret, thus are committed.

## Firestore Format

```
{
  posts: {
    <unique document name>: {
      text: <html aware text>,
      title: <some title>
    }
  },
  users: {
    <uid> : {
      sensors: {
        <human readable name>: <sensor-id>,
        <human readable name>: <sensor-id>,
        etc
      }
    }
  }
}
```

## Firebase RDB Format

```
{
  <random-monotonically-increasing-UID> : {
    timestamp: <data>,
    voltage: <data>,
    ...
  },
}
```

license: MIT

repository: Sustaingineeringubc/Horus-Web-App

branch_name: refs/heads/master

repo_name: Sustaingineeringubc/Horus-Web-App


text:
# Tour-Guide-App
[![forthebadge](https://forthebadge.com/images/badges/built-for-android.svg)](https://forthebadge.com)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b3ff4806fb3443b687ec694fb13608e5)](https://www.codacy.com/app/alistairholmes95/devjournal?utm_source=alistair_holmes@bitbucket.org&utm_medium=referral&utm_content=alistair_holmes/devjournal&utm_campaign=Badge_Grade)

An Android Basics Nano degree course project from Udacity
### Project Description:
**Create an app which presents relevant information to a user who’s visiting your city.**
Create a Tour Guide App which presents relevant information to a user who’s visiting your city. The app can list top attractions, restaurants, public places, or events for the city. It can contain all the best known secrets that only locals know. It’s up to you which categories you want to provide, as well as what information to provide in each category.

**Tour Guide App** is a simple tour app that presents relevant information as to places to visit to a user who’s visiting Ghana for the first time.

**Hint:** If you encounter an installation error, Click Build tab ---> Clean Project ---> Run it again :)

**Android Tags:** *#linearlayout* *#relativelayout* *#imageview* *#textview* *#animation* *#gridview* *#listview* *#customadapter*

# License

	MIT License

	Copyright (c) 2018 Samuel Gracious Etsiakoh

	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.

**Source of the CardSlider:** https://github.com/Ramotion/cardslider-android

**Apk:** https://drive.google.com/open?id=1NDtsrYBx8dkf-moBpRPMXLumeFwEp7NY

repository: Johnyoat/Tour-Guide-App

repo_name: Johnyoat/Tour-Guide-App


text:
---
date: 2022-12-16T17:00:15.000Z
category: vulnerability
title: OpenSSL 3.0.7 update assessment
slug: openssl-fixes-in-regular-releases-dec2022
layout: blog-post.hbs
author: Rafael Gonzaga
---

## Summary

The vulnerability in the OpenSSL Security Advisory of Dec 13 2022 do not affect any active Node.js release lines.

## Analysis

Our assessment of the [security advisory](https://mta.openssl.org/pipermail/openssl-announce/2022-December/000246.html) is:

### X.509 Policy Constraints Double Locking (CVE-2022-3996)

Node.js doesn't call OpenSSL as a separate process (so the possibility to use the `-policy` flag is invalid), nor call
the functions `X509_VERIFY_PARAM_add0_policy()` and `X509_VERIFY_PARAM_set1_policies()`.
Therefore, Node.js is not affected by this vulnerability.

### Contact and future updates

The current Node.js security policy can be found at <https://github.com/nodejs/node/blob/HEAD/SECURITY.md#security>,
including information on how to report a vulnerability in Node.js.

Subscribe to the low-volume announcement-only **nodejs-sec** mailing list at
https://groups.google.com/forum/#!forum/nodejs-sec to stay up to date on
security vulnerabilities and security-related releases of Node.js and the
projects maintained in the
[nodejs GitHub organization](https://github.com/nodejs).

gha_language: TypeScript

gha_license_id: NOASSERTION


text:
# QSIL-Language
Quick, Self-Interpreting Language, or "Random Project for my Boredom"

This is a (hopefully) self-interpreting language that should, after some more development, be capable of compiling its own bytecodes for itself. To get it running, download the code, and in a terminal (or cmd for windows users), type:

    python3 qsilboostrapper.py
    python3 qsilInterpreter.py

Right now, all this does is print a single `Association` object and its instance variables, then run "1 + 1" in a loop for a bit to get an idea of the number of instructions processed (on average) per second.

repository: NoMod-Programming/QSIL-Language

repo_name: NoMod-Programming/QSIL-Language


text:
# rn-chnirt-ui

Essential cross-platform UI components for React Native

### Shadow:

- Step 1: Setting up React Native with Storybook: https://dev.to/ugglr/step-1-setting-up-react-native-with-storybook-36l

- How to deploy React App to GitHub Pages: https://dev.to/yuribenjamin/how-to-deploy-react-app-in-github-pages-2a1f

- Add SVG to webpack (Part I): https://stefanmajiros.medium.com/the-svgs-inside-react-native-0-61-5-and-storybook-566bcd43ba94

Add SVG to webpack (Part II): https://stefanmajiros.medium.com/exporting-react-native-storybook-components-as-static-web-app-d72024fbac19

### See more:

- React Native Storybook Loader: https://github.com/elderfo/react-native-storybook-loader

- Addon Actions is not handling React events properly: https://github.com/storybookjs/storybook/issues/6471

- Cannot find module ‘webpack cli / bin / config yargs‘: https://programmerah.com/cannot-find-module-webpack-cli-bin-config-yargs-14915/

- How to deploy React App to GitHub Pages: https://dev.to/yuribenjamin/how-to-deploy-react-app-in-github-pages-2a1f

- Setting up a React Native Component Library: https://whoisryosuke.com/blog/2020/setting-up-a-react-native-component-library/


text:
---
layout: default
---

# 1994-07-11 - Forwarding & Reference Pointers

## Header Data

From: Stuart Smith<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 660df4a89e5c26c679b6892f98f2ad8034b6e2e94af270b9040d1705b710a747

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-07-11 11:45:24 UTC

Raw Date: Mon, 11 Jul 94 04:45:24 PDT

## Raw message

```
{% raw  %}From: Stuart Smith<EMAIL_ADDRESS>Date: Mon, 11 Jul 94 04:45:24 PDT
To<EMAIL_ADDRESS>Subject: Forwarding & Reference Pointers
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

<EMAIL_ADDRESS>(Greg Broiles) writes:
>> Count this as a vote in favor of pointers to information instead of
<EMAIL_ADDRESS>writes:
>     Count this as a second, plus some kind of summary of the article
>referenced. :-)

This is a silly way to prove a point, but count this as a
third.. <sigh>

- --
 Baba baby mama shaggy papa baba bro baba rock a shaggy baba sister
shag saggy hey doc baba baby shaggy hey baba can you dig it baba baba
        E7 E3 90 7E 16 2E F3 45   *   28 24 2E C6 03 02 37 5C
   Stuart Smith<EMAIL_ADDRESS>
-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLiAWI6i5iP4JtEWBAQHfEwQAjBsf3djmjC+x6iCGZQVfQTbLqic+CgBy
pM/TFLVZWd7GxmsQSG8oOXpyo4WnAVDDsj2p/o7jNArUSFotbB5ZNEWJgrQV7c0Y
MVj08Tj4YtnPzfZaa9y3qN0R01smLp/q6RwiM2c2THRXkA7egqO0MXwUHyN2+wIN
ua3UJz8nhww=
=rNRk
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [July 1994](/archive/1994/07)

+ Return to "[Stuart Smith <stu@nemesis.wimsey.com>](/authors/stuart_smith_stu_at_nemesis_wimsey_com_)"

+ 1994-07-11 (Mon, 11 Jul 94 04:45:24 PDT) - Forwarding & Reference Pointers - _Stuart Smith<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# Stage

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**created_at** | **datetime** | when the stage was created |
**id** | **str** | the `id` of the stage |
**interactive_fields_names** | **list[str]** | the interactive fields that are currently required by the provider. Appears only for the interactive connections | [optional]
**interactive_html** | **str** | HTML code that shows the current interactive state of the connection. Appears only for the interactive connections | [optional]
**name** | **str** | the name of the stage. |
**updated_at** | **datetime** | when the stage was last updated |

[[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: ltowarek/budget-supervisor

gha_language: Python

repo_name: ltowarek/budget-supervisor


text:
# OpenMPF Python Component SDK

Welcome to the Open Media Processing Framework (OpenMPF) Python Component SDK Project!

## What is the OpenMPF?

OpenMPF provides a platform to perform content detection and extraction on bulk multimedia, enabling users to analyze, search, and share information through the extraction of objects, keywords, thumbnails, and other contextual data.

OpenMPF enables users to build configurable media processing pipelines, enabling the rapid development and deployment of analytic algorithms and large-scale media processing applications.

### Search and Share

Simplify large-scale media processing and enable the extraction of meaningful content

### Open API

Apply cutting-edge algorithms such as face detection and object classification

### Flexible Architecture

Integrate into your existing environment or use OpenMPF as a standalone application

## Overview

This repository contains source code for the Open Media Processing Framework (OpenMPF) Python Component SDK, including the API and associated utilities.

In OpenMPF, a  **component**  is a plugin that receives jobs (containing media), processes that media, and returns results.

Using this API, detection components can be built to provide:

- Detection (Localizing an object)
- Tracking (Localizing an object across multiple frames)
- Classification (Detecting the type of object and optionally localizing that object)
- Transcription (Detecting speech and transcribing it into text)

## Where Am I?

- [Parent OpenMPF Project](https://github.com/openmpf/openmpf-projects)
- [OpenMPF Core](https://github.com/openmpf/openmpf)
- Components
    * [OpenMPF Standard Components](https://github.com/openmpf/openmpf-components)
    * [OpenMPF Contributed Components](https://github.com/openmpf/openmpf-contrib-components)
- Component APIs:
    * [OpenMPF C++ Component SDK](https://github.com/openmpf/openmpf-cpp-component-sdk)
    * [OpenMPF Java Component SDK](https://github.com/openmpf/openmpf-java-component-sdk)
    * [OpenMPF Python Component SDK](https://github.com/openmpf/openmpf-python-component-sdk) ( **You are here** )
- [OpenMPF Build Tools](https://github.com/openmpf/openmpf-build-tools)
- [OpenMPF Web Site Source](https://github.com/openmpf/openmpf.github.io)
- [OpenMPF Docker](https://github.com/openmpf/openmpf-docker)

## Getting Started

### Build and Install the Component SDK
* If not already installed,
  [build and install Python 3.8.](https://openmpf.github.io/docs/site/Development-Environment-Guide#python-38)
* Install the Python Component API: `pip3 install openmpf-python-component-sdk/detection/api`
* (Optional) Install the Python Component Utilities: `pip3 install openmpf-python-component-sdk/detection/component_util`

### Using the Component SDK

Please read the
[Python Batch Component API documentation](https://openmpf.github.io/docs/site/Python-Batch-Component-API)
to get started.

## Project Website

For more information about OpenMPF, including documentation, guides, and other material, visit our
[website](https://openmpf.github.io/).

## Project Workboard

For a latest snapshot of what tasks are being worked on, what's available to pick up, and where the project stands as a whole, check out our [workboard](https://github.com/orgs/openmpf/projects/3).

repository: openmpf/openmpf-python-component-sdk

repo_name: openmpf/openmpf-python-component-sdk


text:
#Articles for visitation concerning certain matters ecclesiastical exhibited to the ministers, church-wardens and side-men of every parish within the Diocess of Ely in the second episcopal visitation of the Right Reverend Father in God Benjamin by divine permission Lord Bishop of Ely.#

##Church of England. Diocese of Ely. Bishop (1667-1675 : Laney)##
Articles for visitation concerning certain matters ecclesiastical exhibited to the ministers, church-wardens and side-men of every parish within the Diocess of Ely in the second episcopal visitation of the Right Reverend Father in God Benjamin by divine permission Lord Bishop of Ely.
Church of England. Diocese of Ely. Bishop (1667-1675 : Laney)

##General Summary##

**Links**

[TCP catalogue](http://www.ota.ox.ac.uk/tcp/)  •
[HTML](http://tei.it.ox.ac.uk/tcp/Texts-HTML/free/A32/A32946.html)  •
[EPUB](http://tei.it.ox.ac.uk/tcp/Texts-EPUB/free/A32/A32946.epub) •
[Page images (Historical Texts)](https://historicaltexts.jisc.ac.uk/eebo-9790649e)

**Availability**

This keyboarded and encoded edition of the work described above is co-owned by the
    institutions providing financial support to the Early English Books Online Text Creation
    Partnership. This text is available for reuse, according to the terms of  Creative Commons 0 1.0 Universal
    licence. The text can be copied, modified, distributed and performed, even for commercial
    purposes, all without asking permission.

**Major revisions**

1. __2009-07 __ __SPi Global__ *Keyed and coded from ProQuest page images *
1. __2014-06 __ __John Latta __ *Sampled and proofread *
1. __2014-06 __ __John Latta__ *Text and markup reviewed and edited *
1. __2015-03 __ __pfs__ *Batch review (QC) and XML conversion *
1. __2021-05 __ __lb__ *TEI P5 conversion *

##Content Summary##

#####Front#####
ARTICLES FOR VISITATION Concerning certain MATTERS Ecclesiastical: EXHIBITED To the Ministers, Churc
1. The Tenour of the Oath of the Church-wardens and Sworn-men.

#####Body#####

1. Articles of Instruction to the Church-wardens and Side-men, in some more special matters to direct them in their Presentments. Anno Domini 1671.

    _ TIT. I. Concerning Churches, Chappels, with the Ornaments and Furniture thereunto belonging.

    _ TIT. II. Concerning the Church-yard, the Houses, Glebes and Tythes belonging to the Church.

    _ TIT. III. Concerning Ministers.

    _ TIT. IV. Concerning the Parishioners.

    _ TIT. V. Concerning Parish-Clerks, and Sextons.

    _ TIT. VI. Concerning School-masters, Schools, Physicians, Chirurgeons and Midwives.

    _ TIT. VII. Concerning Church-wardens and Side-men.

**Types of content**

  * Oh, Mr. Jourdain, there is **prose** in there!

**Character listing**

|Text|string(s)|codepoint(s)|
|---|---|---|
|Latin Extended-B|Ʋ|434|

##Tag Usage Summary##

###Header Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__author__|3||
|2.|__availability__|1||
|3.|__biblFull__|1||
|4.|__change__|5||
|5.|__date__|7| @__when__ (1) : 2016-02 (1)|
|6.|__editorialDecl__|1||
|7.|__encodingDesc__|1||
|8.|__extent__|2||
|9.|__fileDesc__|1||
|10.|__idno__|7| @__type__ (7) : DLPS (1), EEBO-CITATION (1), VID (1), EEBO-PROQUEST (1), STC (2), OCLC (1)|
|11.|__keywords__|1| @__scheme__ (1) : http://authorities.loc.gov/ (1)|
|12.|__label__|5||
|13.|__langUsage__|1||
|14.|__language__|1| @__ident__ (1) : eng (1)|
|15.|__listPrefixDef__|1||
|16.|__note__|5||
|17.|__notesStmt__|2||
|18.|__p__|11||
|19.|__prefixDef__|2| @__ident__ (2) : tcp (1), char (1)  •  @__matchPattern__ (2) : ([0-9\-]+):([0-9IVX]+) (1), (.+) (1)  •  @__replacementPattern__ (2) : http://eebo.chadwyck.com/downloadtiff?vid=$1&page=$2 (1), https://raw.githubusercontent.com/textcreationpartnership/Texts/master/tcpchars.xml#$1 (1)|
|20.|__profileDesc__|1||
|21.|__projectDesc__|1||
|22.|__pubPlace__|2||
|23.|__publicationStmt__|2||
|24.|__publisher__|2||
|25.|__ref__|4| @__target__ (4) : https://creativecommons.org/publicdomain/zero/1.0/ (1), http://www.textcreationpartnership.org/docs/. (1), https://textcreationpartnership.org/faq/#faq05 (1), https://github.com/textcreationpartnership (1)|
|26.|__relatedItem__|1| @__type__ (1) : facs (1)  •  @__target__ (1) : https://data.historicaltexts.jisc.ac.uk/view?pubId=eebo-e (1)|
|27.|__revisionDesc__|1||
|28.|__seriesStmt__|1||
|29.|__sourceDesc__|1||
|30.|__term__|1| @__type__ (1) : topical_term (1)|
|31.|__textClass__|1||
|32.|__title__|3||
|33.|__titleStmt__|2||

###Text Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__body__|1||
|2.|__closer__|1||
|3.|__div__|10| @__type__ (10) : title_page (1), oath (1), articles_of_instruction (1), part (7)  •  @__n__ (7) : 1 (1), 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1)|
|4.|__front__|1||
|5.|__g__|61| @__ref__ (61) : char:EOLhyphen (61)|
|6.|__head__|9||
|7.|__hi__|51||
|8.|__note__|40| @__place__ (40) : margin (40)|
|9.|__p__|57| @__n__ (53) : 1 (7), 2 (7), 3 (5), 4 (4), 5 (3), 6 (3), 7 (3), 8 (2), 9 (2), 10 (2), 11 (2), 12 (2), 13 (2), 14 (2), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1)|
|10.|__pb__|12| @__facs__ (12) : tcp:44088:1 (2), tcp:44088:2 (2), tcp:44088:3 (2), tcp:44088:4 (2), tcp:44088:5 (2), tcp:44088:6 (2)  •  @__n__ (8) : 1 (1), 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1)|
|11.|__seg__|1| @__rend__ (1) : decorInit (1)|
|12.|__trailer__|1||


text:
### FireLens Example: Adding Keys to the Log Events

With the custom configuration file in this example, you can add a key to each log message. This is similar to how FireLens adds ECS Metadata to your logs.

In this example, we add a field called `app-version`- this will allow us to correlate log messages with the version of our app that generated them. The App Version is set via an environment variable, which can be referenced in the Fluent Bit configuration file.

Assuming ECS Log Metadata is enabled, the final log events in Firehose will look something like the following:
```
{
    "source": "stdout",
    "app-version": "v1.1.14",
    "log": "<IP_ADDRESS> - - [03/Oct/2019:00:06:20 +0000] \"GET / HTTP/1.1\" 200 612 \"-\" \"curl/7.54.0\" \"-\"",
    "container_id": "e54cccfac2b87417f71877907f67879068420042828067ae0867e60a63529d35",
    "container_name": "/ecs-demo-6-container2-a4eafbb3d4c7f1e16e00"
    "ecs_cluster": "mycluster",
    "ecs_task_arn": "arn:aws:ecs:us-east-2:01234567891011:task/mycluster/3de392df-6bfa-470b-97ed-aa6f482cd7a6",
    "ecs_task_definition": "demo:7",
    "ec2_instance_id": "i-06bc83dbc2ac2fdf8"
}
```

Keys can be added and removed via the record_modifier filter- for more information see the [Fluent Bit documentation](https://fluentbit.io/documentation/0.12/filter/record_modifier.html).

branch_name: refs/heads/mainline


text:
# Voxel
This is a voxel engine type that is programmed in Java, using LWJGL and OpenGL3.3+ . Is designed to be scalable and modular, allowing you to modify specific parts of the code and improve it, it is in a very early stage of development. Any help is greatly appreciated.

When the project is in a more stable and complete stage, my plan is to develop an API for the implementation of mods.

# Build Status
[![Build Status](https://drone.io/github.com/Guerra24/Voxel/status.png)](https://drone.io/github.com/Guerra24/Voxel/latest)

# Credits
- ThinMatrix: Rendering System
- sriharshachilakapati: General OpenGL stuff
- Lharing: General Optimization and code cleaning
- Paul Lamb: Sound. http://www.paulscode.com

# Licenses
"This software is based on or using the J-Ogg library available from
http://www.j-ogg.de and copyrighted by Tor-Einar Jarnbjo."

repository: lukasharing/Voxel

gha_language: Java

repo_name: lukasharing/Voxel


text:
# cheap-glkote
[![NPM Version](https://img.shields.io/npm/v/cheap-glkote.svg?style=flat-square)](https://www.npmjs.org/package/cheap-glkote)

This is an abstract implementation of the [GlkOte](https://github.com/erkyrath/glkote) library interface designed to be used with [Emglken](https://github.com/curiousdannii/emglken).

Can be used in Node.js or in a web browser.

## Usage

This repository includes examples of [stdio interface implementation](https://github.com/He4eT/cheap-glkote/blob/master/bin/stdio.js) and [integration with Emglken](https://github.com/He4eT/cheap-glkote/blob/master/bin/player.stdio.js).

### Initialization
```js
const { Dialog, GlkOte, send } =
  CheapGlkOte(handlers [, { loggers, size }])
```

### Input
```js
send('open door', inputType, targetWindow)
```
You can obtain `inputType` and `id` of `targetWindow` inside the `onUpdateInputs` handler.

You can specify `targetWindow` by its `id` inside the `onUpdateWindows` handler.

As I know, `inputType` can be `line` or `char`.

### Output and lifecycle
```js
const handlers = {
  onInit: () => {
    /**
      * It's time to initialize the user interface.
      */
  },
  onUpdateWindows: windows => {
    /**
      * Game wants to change the number of windows.
      */
  },
  onUpdateInputs: data => {
    /**
      * Game wants to change input type.
      * 'data' is a list with info about
      * the target window and the input type.
      */
  },
  onUpdateContent: messages => {
    /**
      * Process the game output here.
      */
  },
  onDisable: () => {
    /**
      * Game wants to disable user interface.
      */
  },
  onFileNameRequest: (tosave, usage, gameid, callback) => {
    /**
      * Game wants the user to specify the file name.
      * This name will be passed as an argument
      * to the "onFileRead" and "onFileWrite" functions.
      */
    callback({ filename: 'filename', usage })
  },
  onFileRead: filename => {
    /**
      * Game wants to read the contents from the file.
      */
    return 'content'
  },
  onFileWrite: (filename, content) => {
    /**
      * Game wants to write the contents in the file.
      */
  },
  onExit: () => {
    /**
      * Game is over.
      */
  }
}
```
### Logging
By default, the `console` is used for logging, but you can pass custom loggers to the constructor.

Default loggers:
```js
const defaultLoggers = {
  log: console.log,
  warning: console.warn,
  error: console.error,
}
```

### Size
Default sizes:
```js
const defaultSize = {
  width: 80,
  height: 25,
}
```

## Inspired and powered by

- [glkote-term](https://github.com/curiousdannii/glkote-term)
- [GlkOte](https://github.com/erkyrath/glkote)
- [Cheapglk](https://github.com/erkyrath/cheapglk)
- [Emglken](https://github.com/curiousdannii/emglken)

gha_language: JavaScript


text:
# clock-division-converter
A calculator for converting common beat divisions into milliseconds

## Developing

A global installation of parcel, typescript and tslint is expected.
Install these first if not already installed, and then install the project
with `npm i -D` and run the local development server with `npm start`.

To build, simply `npm run build`.

## Deploying

On deploying to GH Pages `npm run deploy`, it is necessary to edit the
index.html file to point to the correct `src.<hash>.js`.

By default parcel builds the index.html to point to `/src.<hash>.js`,
but this file is hosted at `...github.io/clock-division-converter` _not_
`...github.io/` (where index.html is hosted). An easy fix is to simply edit the
index.html file to point to `/clock-division-converter/src.<hash>.js`.


text:
## Project: Perception Pick & Place

---

# Required Steps for a Passing Submission:
1. Extract features and train an SVM model on new objects (see `pick_list_*.yaml` in `/pr2_robot/config/` for the list of models you'll be trying to identify).
2. Write a ROS node and subscribe to `/pr2/world/points` topic. This topic contains noisy point cloud data that you must work with.
3. Use filtering and RANSAC plane fitting to isolate the objects of interest from the rest of the scene.
4. Apply Euclidean clustering to create separate clusters for individual items.
5. Perform object recognition on these objects and assign them labels (markers in RViz).
6. Calculate the centroid (average in x, y and z) of the set of points belonging to that each object.
7. Create ROS messages containing the details of each object (name, pick_pose, etc.) and write these messages out to `.yaml` files, one for each of the 3 scenarios (`test1-3.world` in `/pr2_robot/worlds/`).  [See the example `output.yaml` for details on what the output should look like.](https://github.com/udacity/RoboND-Perception-Project/blob/master/pr2_robot/config/output.yaml)
8. Submit a link to your GitHub repo for the project or the Python code for your perception pipeline and your output `.yaml` files (3 `.yaml` files, one for each test world).  You must have correctly identified 100% of objects from `pick_list_1.yaml` for `test1.world`, 80% of items from `pick_list_2.yaml` for `test2.world` and 75% of items from `pick_list_3.yaml` in `test3.world`.
9. Congratulations!  Your Done!

---

## [Rubric](https://review.udacity.com/#!/rubrics/1067/view) Points

## Writeup / README

### Exercise 1, 2 and 3 pipeline implemented

The perception pipeline is implemented as described in the [walkthrough exercises](https://github.com/bkecskemeti/RoboND-Perception-Exercises):

*RGB-D image ==> Statistical outlier filter ==> Downsampling ==> Passthrough filter ==> RANSAC plane segmentation ==> Euclidean clustering ==> Object recognition*

The pipeline is implemented in [project_template.py](pr2_robot/scripts/project_template.py).

#### 1. Statistical outlier filter

First remove the noise present in the input image, using a statistical outlier filter.

I found the parameters for the statistical outlier filter experimentally, setting the number of neighboring points to `10` and threshold factor `0.2`. Data points with distance larger than `mean distance + 0.2 * std dev` will be removed as outliers:

```python
cloud_filtered = cloud.make_statistical_outlier_filter()
cloud_filtered.set_mean_k(10)
cloud_filtered.set_std_dev_mul_thresh(0.2)
cloud_filtered = cloud_filtered.filter()
```

#### 2. Downsampling

I used `LEAF_SIZE = 0.01` to reduce the image resolution.

```python
vox = cloud_filtered.make_voxel_grid_filter()
LEAF_SIZE = 0.01
vox.set_leaf_size(LEAF_SIZE, LEAF_SIZE, LEAF_SIZE)
cloud_filtered = vox.filter()
```

#### 3. Passthrough filter

To exclude areas which are of no interest, I defined passthrough filters along the `x` and `z` axes.

This confines the space into the area `[0.4 .. 0.8, -inf .. \inf, 0.5 .. 0.8]`.

```python
passthrough = cloud_filtered.make_passthrough_filter()
passthrough.set_filter_field_name('z')
axis_min, axis_max = 0.5, 0.8
passthrough.set_filter_limits(axis_min, axis_max)

cloud_filtered = passthrough.filter()

passthrough = cloud_filtered.make_passthrough_filter()
passthrough.set_filter_field_name('x')
axis_min, axis_max = 0.4, 0.8
passthrough.set_filter_limits (axis_min, axis_max)
cloud_filtered = passthrough.filter()
```

#### 4. RANSAC plane segmentation

RANSAC plane fitting will separate the points belonging to the table and to the objects:

```python
seg = cloud_filtered.make_segmenter()

seg.set_model_type(pcl.SACMODEL_PLANE)
seg.set_method_type(pcl.SAC_RANSAC)

max_distance = 0.01
seg.set_distance_threshold(max_distance)

inliers, coefficients = seg.segment()

cloud_table = cloud_filtered.extract(inliers, negative=False)
cloud_objects = cloud_filtered.extract(inliers, negative=True)
```

#### 5. Euclidean clustering

The goal is to find clusters in the data points using Euclidean clustering. Points close to each other are identified as belonging to distinct objects, which can be labelled later on.

```python
white_cloud = XYZRGB_to_XYZ(cloud_objects)
tree = white_cloud.make_kdtree()

ec = white_cloud.make_EuclideanClusterExtraction()

ec.set_ClusterTolerance(0.01)
ec.set_MinClusterSize(100)
ec.set_MaxClusterSize(10000)

ec.set_SearchMethod(tree)

cluster_indices = ec.Extract()
```

#### 6. Object recognition

The steps to classify the clustered data points are the following:
1. Generate training data using [capture_features.py](./pr2_robot/scripts/capture_features.py). For each possible pick list item, `100` sample instances were generated in random orientation.
2. Train the SVM using [train_svm.py](./pr2_robot/scripts/train_svm.py)
3. Extract features from the point clusters and classify them using the trained SVM, in [project_template.py](pr2_robot/scripts/project_template.py).

##### Training the SVM classifier

Features are extracted using [features.py](./pr2_robot/scripts/features.py). The feature vector is a concatenation of the HSV color histogram (#bins=32, range=0..256) and the surface normal histogram (#bins=32, range=-1..1). I tried also with 16 bins, but the results were not so good.

The original and normalized confusion matrices are:

##### Classify point clusters

For each cluster, extract the feature vector:

```python
chists = compute_color_histograms(ros_cluster, using_hsv=True)
normals = get_normals(ros_cluster)
nhists = compute_normal_histograms(normals)
feature = np.concatenate((chists, nhists))
```

Use the trained model for predicting a label:
```python
prediction = clf.predict(scaler.transform(feature.reshape(1,-1)))
label = encoder.inverse_transform(prediction)[0]
detected_objects_labels.append(label)
```

Publish the labels to a topic to be displayed in RViz:
```python
label_pos = list(white_cloud[pts_list[0]])
label_pos[2] += .4
object_markers_pub.publish(make_label(label,label_pos, index))
```

### Pick and Place Setup

#### 1. For all three tabletop setups (`test*.world`), perform object recognition, then read in respective pick list (`pick_list_*.yaml`). Next construct the messages that would comprise a valid `PickPlace` request output them to `.yaml` format.

Steps to generate the `PickPlace` requests:

1. Read pick list:
```python
pick_list = rospy.get_param('/object_list')
```

2. Read stow locations (to a map by `group` as identifier key):
```python
dropbox_map = dict([dropbox['group'], dropbox] for dropbox in rospy.get_param('/dropbox'))
```

3. For each pick list item, see if we have it in the object list given by perception:
```python
matches = [do for do in object_list if do.label == item_name]
```

If there are no objects in the scene, which are perceived to be the pick list item, log the missing item and go to the next pick list item.

If there are multiple matching objects, take the first one.

4. Calculate pick pose, place pose, and other necessary output

* The pick pose is the centroid of the cluster,
* The place pose is the position of the dropbox assigned to the picklist item,
* The arm name is the one closer to the dropbox assigned to the picklist item (left or right).

```python
object_name = String()
object_name.data = str(target_object.label)

arm_name = String()
arm_name.data = dropbox_map[item_group]['name']

pick_coords = np.mean(ros_to_pcl(target_object.cloud).to_array(), axis=0)[:3]

place_coords = dropbox_map[item_group]['position']

yaml_dict = make_yaml_dict(test_scene_num, arm_name, object_name, pose(pick_coords), pose(place_coords))
output.append(yaml_dict)

rospy.loginfo("Pick item = %s, arm = %s, pick_pos = %s, place_pos = %s" % (item_name, arm_name.data, pick_coords, place_coords))
```

#### Results

world | identified | total | success ratio | link
--- | --- | --- | --- | ---
1 | 3 | 3 | 100% | [output_1.yaml](./output/output_1.yaml)
2 | 5 | 5 | 100% | [output_2.yaml](./output/output_2.yaml)
3 | 6 | 8 |  75% | [output_3.yaml](./output/output_3.yaml)

### Possible improvements

* Improve robustness: objects are not always identified consistently, sometimes the labels change or disappear. Some logic could be developed which tracks objects and their labels and establishes a confidence level for each object relative to each label.

repository: bkecskemeti/RoboND-Perception-Project

repo_name: bkecskemeti/RoboND-Perception-Project


text:
# Lego NXT [![Build Status](https://github.com/nathankleyn/lego-nxt/workflows/Tests/badge.svg)](https://github.com/nathankleyn/lego-nxt/actions?query=workflow%3ATests) [![Coverage Status](https://coveralls.io/repos/github/nathankleyn/attr_combined_accessor/badge.svg?branch=master)](https://coveralls.io/github/nathankleyn/lego-nxt?branch=master) [![RubyGems Version](https://img.shields.io/gem/v/lego-nxt.svg)](https://rubygems.org/gems/lego-nxt)

> **This gem is under heavy development!** A lot of the below code may not work, and is certainly not guranteed to be reliable if it does! If you need to base a working project on this, I recommend [going back to the `ruby-nxt` gem this work is inspired by](https://github.com/zuk/ruby-nxt) for the time being.

Control a Lego NXT 2.0 brick using Ruby code. This library works by piping commands over a Bluetooth or USB connection to the brick, allowing you to write Ruby scripts to control your NXT brick.

This project used to be based on "ruby-nxt", and Tony Buser's subsequent rewrite "nxt". It is now a complete rewrite, based heavily in some parts on the aforesaid projects internally, but with a brand new external API that should prove cleaner and easier to work with.

This code implements direct command, as outlined in "Appendix 2-LEGO MINDSTORMS NXT Direct Commands.pdf". Not all functionality is implemented yet!

## Getting Started

### Installing This Library

Install the gem:

```sh
gem install lego-nxt
```

Add it as a Bundler dependency as you see fit!

### Connect to Your NXT Brick

In order to start coding with your NXT, you'll need to set up either a USB or Bluetooth connection to it. Follow one of the below sets of steps; if you go for a Bluetooth connection, you'll need to remember the `/dev/*` address you end up using, as you'll need to provide it when making a connection with this library.

#### Connecting Via USB

Simply plug in the NXT, and that's it! This library will take care of enumerating the USB host devices to find the NXT device for you, no effort required on your behalf!

#### Connecting Via Bluetooth

##### Linux

Make sure you have the `bluez` package installed, which should include the `rfcomm` and `hcitool` commands. We start by searching for the MAC address of our NXT:

```sh
$ hcitool scan
  Scanning ...
      90-8E-E0-C1-2A-7B       NXT
```

Then open the `/etc/bluetooth/rfcomm.conf` file and add an entry as follows:

```
rfcomm0 {
  bind yes;
  # Bluetooth address of the device
  device 90-8E-E0-C1-2A-7B;
  # RFCOMM channel for the connection
  channel 1;
  # Description of the connection
  comment "NXT";
}
```

If you're on a distro which has a Bluetoth daemon running automatically, you can simply restart it. For Ubuntu, that will look something like:

```sh
$ sudo /etc/init.d/bluez-utils
```

On other distros where you manage the Bluetooth daemon yourself, you'll need to do the bind calls yourself:

```sh
$ sudo rfcomm bind /dev/rfcomm0 '90-8E-E0-C1-2A-7B'
```

After that, the Bluetooth connection should be established. Check that by running the `rfcomm` command with no arguments:

```sh
$ rfcomm
rfcomm0: 90-8E-E0-C1-2A-7B channel 1 clean
```

The NXT should now be accessible from `/dev/rfcomm0`!

##### Mac OS X

Turn on the NXT and make sure Bluetooth is turned on. Click the bluetooth icon in the menubar of your Mac and select "Setup bluetooth device". It will prompt you for a device type; choose "Any device". Select the NXT from the list and click continue.

The NXT will beep and ask for a passkey. Choose `1234` and press orange button. Enter the `1234` passcode on your Mac when promted. The NXT will beep again; press the orange button to use `1234` again.

Your Mac will then alert you that "There were no supported services found on your device". Ignore and click "Continue", followed by "Quit".

Now click the Bluetooth icon and select "Open bluetooth preferences"; you should see the NXT listed. Select it, then click "Edit Serial Ports".
It should show `NXT-DevB-1`; if not, click "Add", and use:

```
Port Name: NXT-DevB-1
Device Service: Dev B
Port type: RS-232
```

Click "Apply". The NXT should now be accessible from `/dev/tty.NXT-DevB-1`!

## Documentation and Examples

The NXT project has been heavily documented using nice, clean, human readable markdown. YARD is used to generated the docs, and the options have been included in our `.yardopts` file, so simply run a YARD server to read them:

```sh
$ yard server
```

This documents the API, both internal and external. For bite-sized chunks of NXT code that is much more appropriate for beginners, [have a look at the examples](https://github.com/nathankleyn/nxt/tree/master/examples).

In addition to this, you might find the tests quite helpful. There are currently only RSpec unit tests, which can be found in the [`spec`](spec) directory; the plan is to add some decent feature tests soon.

## License

This project is licensed [via MIT license](LICENSE).

repository: nathankleyn/lego-nxt

gha_language: Ruby

repo_name: nathankleyn/lego-nxt


text:
## jsx-to-string webpack loader

[![npm version](https://badge.fury.io/js/jsx-to-string-loader.svg)](https://badge.fury.io/js/jsx-to-string-loader)
[![Build status](https://badge.buildkite.com/7b06f4a0e69daeeaddf022521fe20202dc99ad1399cb2e0f8c.svg)](https://buildkite.com/ammo/jsx-to-string-loader)

Easily convert code between delimiters to string. Pairs well with projects like [react-live](https://github.com/FormidableLabs/react-live) and [react-simple-code-editor](https://github.com/satya164/react-simple-code-editor).

### Installation

`yarn add jsx-to-string-loader --dev`

or

`npm install jsx-to-string-loader --save-dev`

### Configuration

Add loader to `webpack.config.js`

Example:

```js
module: {
  rules: [
    {
      test: /\.jsx$/,
      use: {
        loader: 'jsx-to-string-loader',
      },
    },
  ];
}
```

Make sure `jsx-to-string-loader` comes **after** loaders such as `babel-loader` or `ts-loader`.

### Usage

Usage example with [react-simple-code-editor](https://github.com/satya164/react-simple-code-editor)

```jsx
import Editor from 'react-simple-code-editor';

const code = (
  /* jsx-to-string:start */
  <strong>Hello World!</strong>
  /* jsx-to-string:end */
);

function App() {
  return <Editor value={code} />;
}
```

Will be transformed to:

```js
import Editor from 'react-simple-code-editor';

const code = `<strong>Hello World!</strong>`;

function App() {
  return <Editor code={code} />;
}
```

The idea is that you keep writing JSX instead of template strings. It makes more sense when writing more involved components. This next one is using [react-live](https://github.com/FormidableLabs/react-live) to show an example of a component with state.

```jsx
import React, { useState } from 'react';
import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live';

const exampleCode = (
  /* jsx-to-string:start */
  function Example() {
    const [count, setCount] = useState(0);

    return (
      <div>
        <p>You clicked {count} times</p>
        <button onClick={() => setCount(count + 1)}>Click me</button>
      </div>
    );
  }
  /* jsx-to-string:end */
);

const scope = { useState };

function App() {
  return (
    <LiveProvider code={code} scope={scope}>
      <LiveEditor />
      <LiveError />
      <LivePreview />
    </LiveProvider>
  );
}
```

You can also use it inside of JSX
```jsx
function App() {
  return (
    <Example>
      <div>
        <p>Hello world</p>
      </div>
    </Example>
  );
}
```

Will be transformed to:

```jsx
function App() {
  return (
    <Example>
{`<div>
  <p>Hello world</p>
</div>`}
    </Example>
  );
}
```

repository: deini/jsx-to-string-loader

repo_name: deini/jsx-to-string-loader


text:
---
jupyter:
  jupytext:
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.3'
      jupytext_version: 1.14.7
  kernelspec:
    display_name: Python 3 (ipykernel)
    language: python
    name: python3
---

# Integrals

Ressources :
 - https://medium.com/math-simplified/the-trapezoidal-rule-on-steroids-romberg-integration-4a24fba8d751
 - wikipedia on trapezoidal rule and Romberg

There are several ways to compute integrals :
 - from a np.array, using the `.integrate()` that relies on `np.trapz`
 - use `np.trapz`
 - use `scipy.integrate.romb` or `scipy.integrate.simps`  or `scipy.integrate.trapz`
 - use `physipy.quad`, that just wraps `scipy.integrate.quad` (or dblquad or tplquad)

```python
import physipy
from physipy import m, units, s, K
import numpy as np
mm = units["mm"]
```

```python
distances = np.linspace(1, 3, num=3)*m
distances
```

## Trapezoidal rule

Split the interval in N points, including min and max, then evaluate the function you want to integrate at thoses points. Then join each point with the x-axis to create trapezoids. Those trapezoid have widths :
$$\Delta x= \frac{b-a}{N}$$
The area of each trapezoid is just the width times the average of the function points :
$$S_i = \frac{b-a}{N} \frac{f(x_i)+f(x_{i+1})}{2}$$
The integral is then just :
$$I_N = \sum_{i=0}^{N-1} S_i =  \sum_{i=0}^{N-1} \frac{b-a}{N} \frac{f(x_i)+f(x_{i+1})}{2} =\frac{b-a}{N} \sum_{i=0}^{N-1} \frac{f(x_i)+f(x_{i+1})}{2} $$

Where $x_0=a$ and $x_{N-1}=b$

But notice that all points except a and b appear twice so we can factor the expression :
$$I_N = \frac{b-a}{N} \left( \frac{f(a)+f(b)}{2} + \sum_{i=1}^{N-2}f(x_i) \right) $$

It can be shown that the error is:
$$E = \int_a^b f(x)dx - I = -\frac{(b-a)^3}{12N^2}f^{''}(\xi)$$
where $\xi$ is a number between a and b. Notice that the Error is of the opposite sign of the concavity of f between a and b (if there is no inflexion point between a and b), ie the trapezoidal rule overestimates the integral if the function is concave up.
Keep in mind that the trapezoidal error is dependent with
$$E\propto \frac{1}{N^2}$$

```python
# computes ((1+2)/2 + (2+3)/2)
distances.integrate()
```

```python
np.trapz(distances)
```

```python
# use specific, constant spacing
dx = 1*s
# with float dx
print(np.trapz(distances, dx=1))
# with quantity dx
print(np.trapz(distances, dx=1*m))

# raw implementation
def my_trapez(f, a, b, N):
    dx = (b - a) / N
    x = np.linspace(a, b, N+1)
    y = f(x)
    area = 0.5 * (y[0] + y[-1])
    area += y[1:-1].sum()
    area *= dx
    return area

my_trapez(lambda x:x, 1*m, 3*m, N=2).into(m**2)
```

This will work for integration of nd arrays. For example, computing several integrals :

```python
# sampling
ech_t = np.linspace(1, 100)*s
# params
ech_v = np.linspace(10, 20)*m/s
Ts, Vs = np.meshgrid(ech_t, ech_v)
D = Ts*Vs
D.integrate(axis=1, x=ech_t)
```

## Roomberg
The idea of Romberg integration is to use several time the trapezoidal rule, with various number of samples N : N, 2N, and so on. The error of the trapezoidal rule being proportionnal to $\frac{1}{N^2}$  with $\Delta x = \frac{b-a}{N}$, so the error of the trapezoidal rule is propoertionnal to $(\Delta x)^2$ :
$$I = I_N + \alpha (\Delta x)^2$$
We can rewrite the same with 2N samples :
$$I = I_{2N} + \alpha (\frac{\Delta x}{2})^2 = I_{2N} + \alpha (\Delta x)^2/4 $$
So equaling both :
$$I_N + \alpha (\Delta x)^2 =  I_{2N} +  \alpha (\Delta x)^2/4 $$

So we get $\alpha$:
$$\alpha (\Delta x)^2/4 = \frac{1}{3}(I_{2N}-I_N)$$
So the integral expression with 2N is :
$$I = I_{2N} + \frac{1}{3}(I_{2N}-I_N) $$

The error of this method is quite less than that of the trapezoidal rule, while relying only on the trapezoidal integrals N and 2N.

```python
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import numpy as np

def romberg(f, a, b, N):

    I_N = my_trapez(f, a, b, N)
    I_2N = my_trapez(f, a, b, 2*N)

    return I_2N + 1/3. * (I_2N - I_N)

print(my_trapez(lambda x:x, 1*m, 3*m, N=2).into(m**2))
print(romberg(lambda x:x, 1*m, 3*m, N=2).into(m**2))
```

## Simpson's 1/3 rule

http://nm.mathforcollege.com/topics/simpsons_13rd_rule.html

The trapezoidal rule apprixmates the function by a first order polynom : Simpson 1/3 rule uses a 2nd order polynom, say :
$$P(x)=p_0 + p_1 x + p_2 x^2$$
such that
$$P(a)=f(a)=p_0 + p_1 a + p_2 a^2$$
$$P(b)=f(b)=p_0 + p_1 b + p_2 b^2$$
$$P(m)=f(m)=p_0 + p_1 m + p_2 m^2$$
where m=(b-a)/2.

Solving for $p_0$, $p_1$, $p_2$ gives :
$$p_0 = \frac{a^2f(b)+abf(b)-4abf(m)+abf(a)+b^2f(a)}{a^2-2ab+b^2}$$
$$p_1 = -\frac{af(a)-4af(m)+3af(b)+3bf(a)-4bf(m)+bf(b)}{a^2-2ab+b^2}$$
$$p_2 = \frac{2(f(a)-2f(m)+f(b)}{a^2-2ab+b^2}$$

On the other hand, the integral of the polynom is :
$$ \int_{a}^b p_0 + p_1 x + p_2 x^2 dx= [xp_0 + \frac{p_1}{2}x^2 + \frac{p_2}{3}x^3]_a^b = (b-a)p_0 + \frac{p_1}{2}(b^2-a^2) + \frac{p_2}{3}(b^3-a^3)$$

Substituting $p_0$, $p_1$ and $p_2$ leads to :
$$\int_{a}^{b}f(x)dx \approx \int_{a}^{b} P(x)dx = \frac{b-a}{6}\left[f(a)+4f(\frac{a+b}{2})+f(b) \right]$$
with $h=(b-a)/2$
$$\int_{a}^{b}f(x)dx \approx \int_{a}^{b} P(x)dx = \frac{h}{3}\left[f(a)+4f(\frac{a+b}{2})+f(b) \right]$$
hence the "1/3" rule.

Another way to write the function as a polynom to integrate between a and b using a parabol, ie a second-order polynom, that has same values as the function at a, b, and middle point (a+b)/2 is using the Lagrangian interpolation:
$$\text{On [a,b]:}f(x)\approx P(x)=f(a)\frac{(x-m)(x-b)}{(a-m)(a-b)}+f(m)\frac{(x-a)(x-b)}{(m-a)(m-b)}+f(b)\frac{(x-a)(x-m)}{(b-a)(b-m)}$$

## Simpson's 3/8 rule
Similar to the quadratic approximation of 1/3 rule, but uses a cubic interpolation, which yields to :
$$\int_{a}^{b}f(x)dx \approx \int_{a}^{b} P(x)dx = \frac{b-a}{8}\left[f(a)+3f(\frac{2a+b}{3})+3f(\frac{a+2b}{3})+f(b) \right]$$
with $h=(b-a)/3$
$$\int_{a}^{b}f(x)dx \approx \int_{a}^{b} P(x)dx = \frac{3h}{8}\left[f(a)+3f(\frac{2a+b}{3})+3f(\frac{a+2b}{3})+f(b) \right]$$
hence the "3/8" rule.

# Trapz for 2D integral

```python
from physipy.quantity.calculus import trapz2
```

```python
#sample a 2 squared meter, in both direction with different spacing
nx = 12
ny = 30
ech_dx = np.linspace(0*m, 2*m, num=nx)
ech_dy = np.linspace(0*m, 1*m ,num=ny)
X, Y = np.meshgrid(ech_dx, ech_dy)
# make a uniform ponderation
Zs = np.ones_like(X)
print(trapz2(Zs, ech_dx, ech_dy))
```

# Scipy

```python
import scipy
```

```python
# scipy.integrate.trapz just wraps numpy's trapz
print(scipy.integrate.trapz(distances, dx=1))
print(scipy.integrate.trapz(distances, dx=1*m))
```

```python
# scipy.integrate.simps : simpson's method : approximate function's interval by polynome
# https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Simpson
scipy.integrate.simps(distances)
scipy.integrate.simps(distances, dx=1*m)
```

```python
# scipy.integrate.romb : Romberg's method
# https://en.wikipedia.org/wiki/Romberg%27s_method
scipy.integrate.romb(distances)
scipy.integrate.romb(distances, dx=1*m)
```

## quad

```python
def f(t):
    return t + 1*s

integ, err = physipy.quad(f, 0*s, 10*s)
integ
```

## dblquad

```python
def f(t, d):
    return (t + 1*s) * (d + 1*m)

integ, err = physipy.dblquad(f, 0*m, 10*m, 0*s, 10*s)
integ
```

## tplquad

```python
def f(t, d, deg):
    return (t + 1*s) * (d + 1*m) * (deg + 1*K)

integ, err = physipy.tplquad(f, 0*K, 10*K, 0*m, 10*m, 0*s, 10*s)
integ
```

```python

```

repository: mocquin/physipy

repo_name: mocquin/physipy


text:
# xxhash

Go implementation of [xxHash][1] (XXH32, XXH64).

## benchmark (Air/M1)

	BenchmarkXXH32-8   	 7964274	       150.5 ns/op	       0 B/op	       0 allocs/op
	BenchmarkXXH64-8   	11149471	       104.4 ns/op	       0 B/op	       0 allocs/op

[1]: https://cyan4973.github.io/xxHash/

license: ISC


text:
# Petrus

A JavaScript library that can simply search and grab magnet link from The Pirate Bay :anchor: (or TPB clones).

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Wifsimster/petrus/blob/master/LICENSE)
[![npm version](https://badge.fury.io/js/petrus.svg)](https://www.npmjs.com/package/petrus)
[![Install size](https://packagephobia.now.sh/badge?p=petrus)](https://packagephobia.now.sh/result?p=petrus)

## Install

```
$ npm install petrus
```

## Usage

```js
import { Petrus } from 'petrus'

async function main() {
  let petrus = new Petrus()

  let data = await petrus
    .search('Final Space S01E01')
    .catch(err => { console.error(err) })

  if(data) {
    console.log(data)
  }
}

main()
```

## Documentation

#### Petrus([url])

- `url` `<string>` Hostname to load, default is : `https://thepiratebay.org`

Instantiate a new `Petrus` class.

#### search([query], [category])

- `query` `<string>` Query to search
- `category` `<string>` Optional, precise the category to search. Default is all categories. [`Music`, `Movies`, `TV shows`, `HD - Movies`, `HD - TV shows`]

Response is a list of object : `[{ magnetLink, name, quality, seeder, size, uploaded }]`

repository: Wifsimster/petrus

repo_name: Wifsimster/petrus


text:
# Upgrade notes for 8.0

These notes give additional information about changes.
Please always follow the main [upgrade guide](./upgrade.md).

## Important release changes

From 8.0, ccnet-server component is removed. But ccnet.conf is still needed.

There are no special steps needed when upgrading from 7.1 to 8.0.

## FAQ

repository: seafile-data/seafile-manual

gha_language: Shell

repo_name: seafile-data/seafile-manual


text:
# Read 19 - Automation

#### 2020-08-01

## RESOURCES:
#### Python Regular Expressions Tutorial

https://www.datacamp.com/community/tutorials/python-regular-expression-tutorial

#### shutil

https://pymotw.com/3/shutil/

#### Video: Automation Ideas

https://www.youtube.com/watch?v=qbW6FRbaSl0&t=69s

#### Optional: Automating Your Browser and Desktop Apps

https://www.youtube.com/watch?v=dZLyfbSQPXI

#### Watchdog

https://pythonhosted.org/watchdog/

https://pythonhosted.org/watchdog/quickstart.html#quickstart

### Python Regular Expressions Tutorial

A long read, covering how to work with the __`re`__ library, deal with __pattern matching__, learn about __greedy and non-greedy__ matching, and more.

This is a very good tutorial that I wish had been used in 301 for the first regex assignment - it explains things well enough for cheat sheets to be usable. Also discussed are __Wild Card__ and __Special Characters__, __Grouping__, __Greedy__ vs. __Non-Greedy__ Matching, regex __functions__ and __Compilation Flags__.

### shutil

A moderately long read describing what is and how to use the shutil module.

The __`shutil`__ module includes high-level file operations such as copying and archiving.

This reading describes examples of __copying portions of or complete files__, copying not only the file contents, but also ways of __including metadata__ from the source file, including __permissions__, etc. It can also be used to manipulate __directory trees__, __find files__, and for __creating or extracting archives__.

### Video: Automation Ideas

A brief video suggesting four sample projects to automate common tasks using python; __Automate moving files__ (from one directory to another, using watchdog), __Automatically move and rename files__ (expands the first program), __Open YouTube when favorite YouTuber uploads new video__ (uses selenium, with suggestions for other uses), and __calculate compounding interest__.

### Optional: Automating Your Browser and Desktop Apps

Al Sweigart's 42 minute presentation at PyBay 2016, hyping his then-new book '__*Automate the Boring Stuff with Python*__', and discussing using __Selenium__ for web automation and __pyautogui__ for *GUI Automation*, with demo examples of each.

### Watchdog

__*"A cross-platform Python API library and shell utilities to monitor file system events."*__ This library is used in some examples shown in the Automation Ideas video.

repository: vorSherer/cf-reading-notes

repo_name: vorSherer/cf-reading-notes


text:
# TodoMVC Benchmark

## Installation

### Debian and Ubuntu based Linux distributions

```text
sudo apt-get install -y nodejs git-core
```

### Enterprise Linux and Fedora

Official **Fedora** [Node.js](https://apps.fedoraproject.org/packages/nodejs) and [npm](https://apps.fedoraproject.org/packages/npm) packages are available in Fedora 18 and later.  Install with:

```text
sudo yum install nodejs npm git
```

**Enterprise Linux** (RHEL and CentOS) users may use the Node.js and npm packages from the [EPEL](https://fedoraproject.org/wiki/EPEL) repository.

Install the appropriate *epel-release* RPM for your version (found on the [EPEL](https://fedoraproject.org/wiki/EPEL) repository homepage), then run:

```text
sudo yum install nodejs npm --enablerepo=epel
sudo yum install git
```
### Windows

Not supported for now.

### NodeJS from source

See this [guide](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager).

## Setup

```
git clone https://github.com/Herve-M/todomvc-bench-latece.git &&
cd todomvc-bench-latece && git checkout master &&
npm install &&
grunt setup
```
## Workflow

You must first choose a version to work with, Master or 1.3.0.
After do `grunt generate-*version*`, (replace version with master or 130).
At end launch the test with `grunt test-advanced-phjs`

If you launch many time the test and ended it not carefully, you will have
some memory problem. So you can generate "cleaners".

`grunt generate-*version*-clean && grunt clean-todo`

## Commands

To see all available commands use `grunt`

* `grunt setup` : Clone TodoMVC Git repo && setup nmp/bower on master branch
* `grunt setup-130` : Clone TodoMVC Git repo && setup npm/bowwer on 1.3.0 tag
* `grunt generate-master` : Generate test scripts for master branch
* `grunt generate-130-all` : Generate test scripts for all Framework on 1.3.0 tag
* `grunt generate-130-tested` : Generate test scripts for all tested Framework on 1.3.0 tag
* `grunt generate-clean` : Generate cleaning scripts for master branch
* `grunt generate-130-clean` : Generate cleaning scripts for 1.3.0 tag
* `grunt test-advanced-phjs` : Launch all test with PhantomJS

## Known limitations

### Stopping on failure
Do a [bug](https://github.com/iamchrismiller/grunt-casper/issues/56) in
[grunt-casper](https://github.com/iamchrismiller/grunt-casper) using "parallel" option
stop tests set on first failure.

### Saving XUnit XML
Do a [bug](https://github.com/iamchrismiller/grunt-casper/issues/68) in [grunt-casper](https://github.com/iamchrismiller/grunt-casper) no Xunit file can be saved.
This is only because the option "parallel" must be off to bypass another bug.

repository: Herve-M/todomvc-bench-latece

repo_name: Herve-M/todomvc-bench-latece


text:
# vehicle-tracking-microservices
a vehicle tracking system (microservices architecture [CI/CD])

# Epic story
A vehicles company have a number of connected vehicles that belongs to a number of customers.
- They would like be able to view the status of the connection among these vehicles on a monitoring display.
- The vehicles send the status of the connection one time per minute; no request from the vehicle means no connection.
- The company would like to create a data store that keeps these vehicles with their status and the customers who own them, as well as a web-based that displays the status.
- dessign and architecture should follows microservices, CI/CD principals, as well API/ cloud first.

# Domain
Domain defintion following swagger (YAML) format
```
vehicle:
    type: object
    properties:
      correlatId:
        type: string
        example: 0729a580-2240-11e6-9eb5-0002a5d5c51b
      status:
        type: string
        enum:
        - active
        - inactvie
        - warning
        - danger
        - information
      detailes:
        type: string
        example: an issue with the engine.

  vehicleResponse:
    type: object
    properties:
      response:
        $ref: '#/definitions/responseModel'
      data:
        type: string
        enum:
        - ok
        - failed
        description: ok in case of successful, otherwise failed.

  vehicleStatusResponse:
    type: object
    properties:
      vehicle:
        type: string
        example: vkfbvfbd03423
      owner:
        type: string
        example: mohamed abdo
      vehicleRef:
        type: string
        example: 0729a580-2240-11e6-9eb5-0002a5d5c51b
      ownerRef:
        type: string
        example: 0729a580-2240-11e6-9eb5-0002a5d5c51b
      status:
        type: string
        example: warning
      lastUpdate:
        type: string
        format: date-time
        example: 2017-04-12T23:20:50.52Z
      message:
        type: string
        example: {engine:.97, oil:344000}

  responseModel:
    type: object
    properties:
      executionId:
        type: string
        example: 0729a580-2240-11e6-9eb5-0002a5d5c51b
      correlationId:
        type: string
        example: 0729a580-2240-11e6-9eb5-0002a5d5c51b
      issucceed:
        type: boolean
      code:
        type: integer
        example: 1034034
        description: response code, 0 in case of succeed, else positive integer.
      hint:
        type: object
        properties:
          action:
            type: string
            enum:
            - ok
            - retry
            - correct-inputs
            - in-maintenance
            - system-error
            - obsoleted
      messages:
        type: string
        example: vehicle Id is not registered
```
https://app.swaggerhub.com/domains/soft-ideas/autonomous-vehicle/1.0

# Features scope

# Vehicles ping
As a vehicle (IoT device), device shall be able to submit it's status over http for a certain end-point, along with http header header   contains authorization key, on the request body optionaly, device can submit more details about the status, witch correlation Id for      this status to support future device features scaling.
  # Behaviors
  - Device decicdes when to call the end-point.
  - Device doesn't have further functionlity to act according to end-point response.
  - Authourzation token verfication is out of scope for the current implementation.
  # API contract
    swagger API documentation
https://app.swaggerhub.com/apis/soft-ideas/vehicle-tracking/1.0.0

# Vehicle tracking
As a vehicle tracker role owner, i would like to view vehicles along with their status, as well filter resuls by customer, and vehicle status; an addition to will able to find detailed link to view customer page, or vehicle page.
  # Behaviors
  - Page will auto refresh each minute.
  - link for the customer, and vehicle page is out of scope for the current implementation.
  - Authourzation token verfication is out of scope for the current implementation.
  # API contract
    swagger API documentation
https://app.swaggerhub.com/apis/soft-ideas/vehicle-tracking/1.0.0


text:
+++
title = "aws_batch_job_definition Resource"
platform = "aws"
draft = false
gh_repo = "inspec-aws"

[menu.inspec]
title = "aws_batch_job_definition"
identifier = "inspec/resources/aws/aws_batch_job_definition Resource"
parent = "inspec/resources/aws"
+++

Use the `aws_batch_job_definition` InSpec audit resource to test the properties of a single specific Batch job definition.

The AWS::Batch::JobDefinition resource specifies the parameters for an AWS Batch job definition.

For additional information, including details on parameters and properties, see the [AWS documentation on Batch Job Definition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html).

## Installation

{{% inspec_aws_install %}}

## Syntax

Ensure that a job definition name exists.

```ruby
describe aws_batch_job_definition(job_definition_name: 'JOB_DEFINITION_NAME') do
  it { should exist }
end
```

## Parameters

`job_definition_name` _(required)_

: The name of the job definition.

## Properties

`job_definition_name`
: The name of the job definition.

`job_definition_arn`
: The ARN of the job definition.

`revision`
: The revision of the job definition.

`status`
: The status of the job definition.

`type`
: The type of the job definition.

`parameters`
: The parameters of the job definition.

`container_properties (image)`
: The container image in the job definition.

`container_properties (vcpus)`
: The number of vCPUs reserved for the container in the job definition.

`container_properties (memory)`
: The hard limit of the container's memory in the job definition.

`container_properties (command)`
: The command passed to the container in the job definition.

`container_properties (job_role_arn)`
: The ARN of the IAM role that the container can assume for AWS permissions in the job definition.

`container_properties (execution_role_arn)`
: The execution role ARN that the AWS Batch can assume in the job definition.

`container_properties (volumes)`
: The list of the data volumes in the job definition.

`container_properties (environment)`
: The environment variables to pass to a container in the job definition.

`container_properties (mount_points)`
: The mount points for the data volumes in the container in the job definition.

`container_properties (readonly_root_filesystem)`
: Whether the container is given read-only access to its root file system in the job definition.

`container_properties (privileged)`
: Whether the container is given elevated permissions on the host container instance.

`container_properties (ulimits)`
: The list of ulimits to set in the container in the job definition.

`container_properties (user)`
: The user name to use in the container in the job definition.

`container_properties (instance_type)`
: The instance type to use for a multi-node parallel job.

`container_properties (resource_requirements)`
: The type and amount of resources to assign to a container in the job definition.

`container_properties (linux_parameters (shared_memory_size))`
: The value in MiB of the `/dev/shm` volume for the container in the job definition.

`container_properties (linux_parameters (tmpfs))`
: The container path, mount options, and size (in MiB) of the tmpfs mount for the container in the job definition.

`container_properties (linux_parameters (max_swap))`
: The total amount of swap memory (in MiB) a container can use.

`container_properties (linux_parameters (swappiness))`
: The container's memory swappiness behavior in the job definition.

`container_properties (linux_parameters (shared_memory_size))`
: The shared_memory_size of the log configuration of the container properties of the job definition.

`container_properties (log_configuration (options))`
: The log configuration options to send to the log driver for the container in the job.

`container_properties (secrets)`
: The secrets for the job that are exposed as environment variables.

`timeout (attempt_duration_seconds)`
: The timeout duration in seconds of the job definition.

`node_properties (num_nodes)`
: The number of nodes that are associated with a multi-node parallel job in the job definition.

`node_properties (main_node)`
: The node index for the main node of a multi-node parallel job.

`node_properties (node_range_properties)`
: A list of node ranges and their properties that are associated with a multi-node parallel job.

`tags`
: The tags of the job definition.

`propagate_tags`
: Whether to propagate tags from the job definition to the ECS task.

`platform_capabilities`
: The platform capabilities required by the job definition.

## Examples

**Ensure a job definition name is available.**

```ruby
describe aws_batch_job_definition(job_definition_name: 'JOB_DEFINITION_NAME') do
  its('job_definition_name') { should eq 'JOB_DEFINITION_NAME' }
end
```

**Ensure that the status is `ACTIVE`.**

```ruby
describe aws_batch_job_definition(job_definition_name: 'JOB_DEFINITION_NAME') do
    its('status') { should eq 'ACTIVE' }
end
```

## Matchers

{{% inspec_matchers_link %}}

The controls will pass if the `describe` method returns at least one result.

### exist

Use `should` to test that the entity exists.

```ruby
describe aws_batch_job_definition(job_definition_name: 'JOB_DEFINITION_NAME') do
  it { should exist }
end
```

Use `should_not` to test the entity does not exist.

```ruby
describe aws_batch_job_definition(job_definition_name: 'JOB_DEFINITION_NAME') do
  it { should_not exist }
end
```

### be_available

Use `should` to check if the job definition name is available.

```ruby
describe aws_batch_job_definition(job_definition_name: 'JOB_DEFINITION_NAME') do
  it { should be_available }
end
```

## AWS Permissions

{{% aws_permissions_principal action="Batch:Client:DescribeJobDefinitionsResponse" %}}

repository: inspec/inspec-aws

repo_name: inspec/inspec-aws


text:
### Pillow Changelog

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

* Format based on [Keep A Change Log](https://keepachangelog.com/en/1.0.0/)
* This project adheres to [Semantic Versioning](http://semver.org/).

#### [0.1.1] - 2020-Mar-22.
##### Added
- Pillow logo from icons8

##### Changed
- Updated README

##### Deprecated
-

##### Removed
-

##### Fixed
-

##### Security
-

#### [0.1.0] - 2020-Mar-22.
##### Added
- TextTable transform for test results
- TestSuiteResult
- Update TestCaseResult for failures
- default file for Test Results
- check for xcode usage to pass with xcode and swift test
- Encode/Decode TestCaseResult
- CLI

##### Changed
- PillowKitTests to have more complete asserts per model
- projectDirectory is now packageDirectory
- fixturesDirectory is now testFixturesDirectory

##### Deprecated
-

##### Removed
-

##### Fixed
-

##### Security
-


text:
---
layout: post
title:  "First steps with Titanium"
date:   2013-12-29 12:39
categories: titanium appcelerator ios webview
---

First of all I recommend you to go check and start [Dawson Toth][dawson-toth] awesome Titanium tutorial. So, source:[Learning Titanium (Created by Dawson Toth)][source-inspiration].

The first thing to know in Titanium is that all applications start creating a window so we are going to create a window and store a reference to it in the variable `win`:

```javascript
var win = Ti.UI.createWindow();
```

Windows take a single argument: a *dictionary* which is another variable that will be send as an argument in the `createWindows()` method:

```javascript
var dictionary = {};
```

As we only use our dictionary variable once, we can mix both ideas in just one:

```javascript
var win = Ti.UI.createWindow({});
```

The dictionary variable can contain any [windows property][windows-properties-doc], for instance the property `backgroundColor`:

```javascript
var win = Ti.UI.createWindow({ backgroundColor: 'green' });
```
Other properties that goes in the window object can be:

```javascript
var win = Ti.UI.createWindow({
  backgroundColor: 'white',
  exitOnClose: true,
  fullscreen: false,
  title: 'title text' });
```

Next, we are already ready to make our window visible, to do so we can call the `open` method:

```javascript
win.open();
```

###Views

The power of an application in Titanium is, amongst other important things, is the option of creating views on top of a window. In fact, [views][titanium-view-doc] are like an empty drawing canvas or a container. It is the base of all visible elements in Titanium. So let's define a `view` and add it to our window:

```javascript
var view = Ti.UI.createView({
  backgroundColor: 'green',
  width: 100, height: 100
});
win.add(view);
```

As you think, views can be added inside other views like this:

```javascript
var outerView = Ti.UI.createView({
  backgroundColor: 'red',
  width: 100, height: 100
});

var innerView = Ti.UI.createView({
  backgroundColor: 'white',
  width: 20, heigth: 20
});
outerView.add(innerView);
win.add(outerView);
```

Views can be positioned inside windows (or other views) in different ways:

I. Placing it using distances:

```javascript
win.add(Ti.UI.createView({
  backgroundColor: 'green', width: 20, height: 20, top: 10, left, 10
}));
```
II. Placing it using percentages:

```javascript
win.add(Ti.UI.createView({
  backgroundColor: 'red', width: 20, height: 20, right: '20%', top: 20
}));
```
III. By explicitly defining the unit:

```javascript
win.add(Ti.UI.createView({
  backgroundColor: 'blue', width: 20, height: 20, bottom: '1in'
}));
```
###Labels

A [label][titanium-label-doc] is a type of view that lets you display text. Similar to views, we can create a label using `Ti.UI.createLabel()` method:

```javascript
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });

win.add(Ti.UI.createLabel({
  text: 'Text inside the label', textAlign: 'center', color: '#000'
});
```

###Buttons

A [button][titanium-button-doc] is just a type of view which can be clicked, so we use the `Ti.UI.createButton()` method and then we add the button to our window:

```javascript
var button = Ti.UI.createButton({ title: "Click me, I'm a button!", textAlign: 'center', color: '#000'; });
```

Notice that we can change the alignment and color of our text button. Also, we can set *EventListeners* to our buttons to execute some Javascript code inside the web view:

```javascript
button.addEventListener('click', function(event){
  alert('This is the alert JS code executed when you click this button');
});
```

###Graphics

Graphics can be displayed in different ways:

I. Using Image Views:

The `ImageView` object is used to display a single image or series of animated images.

```javascript
win.add(Ti.UI.createImageView({
  image: 'images/buttonImage.png',
  width: 100, height: 50, top: 10, left: 10
}));
```

II. Using the [backgroundImage][titanium-backtroundimage-doc] property of views:

```javascript
win.add(Ti.UI.createView({
  backgroundImage: 'images/button.png',
  width: 100, height: 50, top: 90, left:10
}));
```

##Webviews

Let's build a simple web application based on a `webview`. First go to *File, New, Mobile Project, Classic, Single Windows Application*. Then, in *Project name* introduced **ExampleSingleWebApplication** and in *App id* type **com.examplesinglewebapplication.com**. Titanium SDK Version should be **3.1.3.GA** (at the time of writing this). And selected *Deployment Targets* checkboxes should be **iPad, iPhone, Mobile Web**. Click finish and close the first window that you see called *TiApp Editor* (you can load this info by clicking in `tiapp.xml` file later). The files in the project should be these:

```bash
ExampleSingleWebApplication/
├── CHANGELOG.txt
├── LICENSE
├── LICENSE.txt
├── README
├── Resources
│   ├── KS_nav_ui.png
│   ├── KS_nav_views.png
│   ├── app.js
│   ├── iphone
│   │   ├──<EMAIL_ADDRESS>│   │   ├── Default-Landscape.png
│   │   ├── Default-Portrait.png
│   │   ├── Default.png
│   │   ├──<EMAIL_ADDRESS>│   │   └── appicon.png
│   ├── mobileweb
│   │   ├── appicon.png
│   │   ├── apple_startup_images
│   │   │   ├── Default-Landscape.jpg
│   │   │   ├── Default-Landscape.png
│   │   │   ├── Default-Portrait.jpg
│   │   │   ├── Default-Portrait.png
│   │   │   ├── Default.jpg
│   │   │   ├── Default.png
│   │   │   └── README
│   │   └── splash
│   │       ├── README
│   │       ├── appc.png
│   │       ├── splash.css
│   │       ├── splash.html
│   │       └── titanium.png
│   └── ui
│       ├── common
│       │   └── FirstView.js
│       ├── handheld
│       │   ├── ApplicationWindow.js
│       │   └── android
│       │       └── ApplicationWindow.js
│       └── tablet
│           └── ApplicationWindow.js
├── i18n
│   ├── en
│   │   └── strings.xml
│   └── ja
│       └── strings.xml
├── manifest
└── tiapp.xml
```

As you can see, there is a `i18n` folder in charge of location languages and then we have our `Resources` folder containing our application (with 3 specific folders regarding the iPhone, Android and Mobile versions). Let's open `app.js`, it is the starting point where we take care of:

1. Bootstrap the application with any data we need
2. Check for dependencies like device type, platform version or network connection
3. Require and open our top-level UI components.

###Loading Google in a webview

So we can go to `app.js` and erase all its content and just write this code to get google loaded into our webview:

```javascript
var win = Ti.UI.createWindow({
    backgroundColor: 'white'
});

var web = Ti.UI.createWebView({
    url: 'http://www.google.com'
});

win.add(web);

win.open();
```

As you can see, the code is easy, we define our window then define our webview and finally add the webview to our window.

###Loading our own HTML page in a webview

Right click in your project folder, select *New File* and name it **index.html**, then we type our very basics into our index.html:

```html
<TYPE HTML>
<html>
<body>
<h1>This is my own HTML page</h1>
</body>
</html>
```

And then the only thing you have to change is `www.google.com` and type in our `index.html:

```javascript
var web = Ti.UI.createWebView({
    url: 'index.html'
});
```
###Understanding more about our `app.js` template code

When we first create our project, there is already code in our `app.js`, let's understand what it does. First of all, we bootstrap and check dependencies, to do so we check `Ti.version` property to know our version:

```javascript
if (Ti.version < 1.8 ) {
  alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');
}
```

Next we have to understand that as we've created a *Single Window Application*, we are going to stack our windows in a single context application, that is why we create a javascript anonymous function with the usual wrapper:

```javascript
(function(){
...
})();
```
Then we render the appropriate components based on the platform and form factor:

```javascript
    var osname = Ti.Platform.osname,
        version = Ti.Platform.version,
        height = Ti.Platform.displayCaps.platformHeight,
        width = Ti.Platform.displayCaps.platformWidth;
```

Next we have to take into account if the user agent comes from a tablet. Considering a tablet to have one dimension over 900px, this is imperfect, so you should feel free to decide yourself what you consider a tablet form factor for android:

```javascript
var isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899));
```

Now it's time to define our window as we already know and since we've defined what a tablet view should be we can also check if we are loading our page in what we have decided to be a tablet:

```javascript
var Window;
if (isTablet){
    Window = require('ui/tablet/ApplicationWindow');
}
else {
...
}
```

Finally, if it's not a tablet, it is a mobile device which can be an android or an ios device, so that is what we are going to check in the `else` section. However, don't forget that Android uses platform-specific properties to cretae windows and all other platforms follow a similar UI pattern:

```javascript
if (osname === 'android') {
    Window = require('ui/handheld/android/ApplicationWindow');
}
else {
    Window = require('ui/handheld/ApplicationWindow');
}
new Window().open();
```

#**[Post in process]**
----------------------

[dawson-toth]: https://twitter.com/dawsontoth
[windows-properties-doc]: http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.Window
[titanium-view-doc]: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.View
[titanium-label-doc]: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.Label
[titanium-button-doc]: http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.Button
[titanium-backtroundimage-doc]: http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.View-property-backgroundImage

[source-inspiration]: http://appc.me/learn/