text:
# Urban Airship Titanium Module

## Contributing Code

We accept pull requests! If you would like to submit a pull request, please fill out and submit a
[Code Contribution Agreement](http://docs.urbanairship.com/contribution-agreement.html).

## Requirements:
 - Android [GCM Setup](http://docs.urbanairship.com/reference/push-providers/gcm.html#android-gcm-setup)
 - iOS [APNS Setup](http://docs.urbanairship.com/reference/push-providers/apns.html)

## Setup

Modify the `tiapp.xml` file to include the Urban Airship Config:

```
  <!-- Production credentials -->
  <property name="com.urbanairship.production_app_key" type="string">Your Production App Key</property>
  <property name="com.urbanairship.production_app_secret" type="string">Your Production App Secret</property>

  <!-- Development credentials -->
  <property name="com.urbanairship.development_app_key" type="string">Your Development App Key</property>
  <property name="com.urbanairship.development_app_secret" type="string">Your Development App Secret</property>

  <!-- Selects between production vs development credentials -->
  <property name="com.urbanairship.in_production" type="bool">false</property>

  <!-- Android -->
  <property name="com.urbanairship.gcm_sender" type="String">GCM Sender ID or Project Number</property>
  <property name="com.urbanairship.notification_icon" type="string">Name of an icon in /project_name/platform/android/res/drawable folders, e.g. ic_notification.png</property>
  <property name="com.urbanairship.notification_accent_color" type="string">Notification accent color, e.g. #ff0000</property>

  <!-- iOS 10 alert foreground notification presentation option -->
  <property name="com.urbanairship.ios_foreground_notification_presentation_alert" type="bool">true</property>
  <!-- iOS 10 badge foreground notification presentation option -->
  <property name="com.urbanairship.ios_foreground_notification_presentation_badge" type="bool">true</property>
  <!-- iOS 10 sound foreground notification presentation option -->
  <property name="com.urbanairship.ios_foreground_notification_presentation_sound" type="bool">true</property>
```

For iOS, enable background remote notifications in the `tiapp.xml` file:

```
  ...
  <ios>
  <plist>
  <dict>
      ...
       <key>UIBackgroundModes</key>
       <array>
           <string>remote-notification</string>
       </array>
  </dict>
  </plist>
  </ios>
  ...
```

## Accessing the urbanairship Module

To access this module from JavaScript, you would do the following:

```
    var UrbanAirship = require("com.urbanairship");
```

## Events

#### EVENT_CHANNEL_UPDATED

Listens for any channel updates. Event contains the following:
 - channelId: The channel ID of the app instance.
 - deviceToken: (iOS only) The device token.

```
    UrbanAirship.addEventListener(UrbanAirship.EVENT_CHANNEL_UPDATED, function(e) {
        Ti.API.info('Channel Updated: ' + UrbanAirship.channelId)
    });
```

#### EVENT_PUSH_RECEIVED

Listens for any push received events. Event contains the following:
 - message: The push alert message.
 - extras: Map of all the push extras.
 - notificationId: (Android only) The ID of the posted notification.

```
    UrbanAirship.addEventListener(UrbanAirship.EVENT_PUSH_RECEIVED, function(e) {
        Ti.API.info('Push received: ' + e.message);
    });
```

## Properties

#### channelId

Returns the app's channel ID. The channel ID might not be immediately available on a new install. Use
the EVENT_CHANNEL_UPDATED event to be notified when it becomes available.

```
    Ti.API.info('Channel ID: ' + UrbanAirship.channelId);
```

#### userNotificationsEnabled

Enables or disables user notifications. On iOS, user notifications can only be enabled and enabling
notifications the first time will prompt the user to enable notifications.

```
    UrbanAirship.userNotificationsEnabled = true;
```

#### tags

Sets or gets the channel tags. Tags can be used to segment the audience.

```
    UrbanAirship.tags = ["test", "titanium"];

    UrbanAirship.tags.forEach(function(tag) {
        Ti.API.info("Tag: " + tag);
    });
```

#### namedUser

Sets the namedUser for the device.

```
    UrbanAirship.namedUser = "totes mcgoats";
```

## Methods

### getLaunchNotification([clear])

Gets the notification that launched the app. The notification will have the following:
 - message: The push alert message.
 - extras: Map of all the push extras.
 - notificationId: (Android only) The ID of the posted notification.

`clear` is used to prevent getLaunchNotification from returning the notification again.

```
    Ti.API.info("Launch notification: " + UrbanAirship.getLaunchNotification(false).message);
```

### displayMessageCenter()

Displays the message center.

```
    UrbanAirship.displayMessageCenter();
```

### associateIdentifier(key, identifier)

Associate a custom identifier.
Previous identifiers will be replaced by the new identifiers each time associateIdentifier is called.
It is a set operation.
 - key: The custom key for the identifier as a string.
 - identifier: The value of the identifier as a string, or `null` to remove the identifier.

```
    UrbanAirship.associateIdentifier("customKey", "customIdentifier");
```

### addCustomEvent(eventPayload)

Adds a custom event.
 - eventPayload: The custom event payload as a string.

```
    var customEvent = {
      event_name: 'customEventName',
      event_value: 2016,
      transaction_id: 'customTransactionId',
      interaction_id: 'customInteractionId',
      interaction_type: 'customInteractionType',
      properties: {
        someBoolean: true,
        someDouble: 124.49,
        someString: "customString",
        someInt: 5,
        someLong:<PHONE_NUMBER>,
        someArray: ["tangerine", "pineapple", "kiwi"]
      }
    };

    var customEventPayload = JSON.stringify(customEvent);
    UrbanAirship.addCustomEvent(customEventPayload);
```

repository: eliegkassouf/titanium-module

repo_name: eliegkassouf/titanium-module


text:
# back-end

BASE URL: https://bw-expat-journal-ls.herokuapp.com/api/

postgres database deployed on heroku

=== REGISTER ===

POST users/register
    - accepts a new user object

    {
	    "username": "example",  - required
	    "password": "password", - required
	    "first_name": "name", - optional
	    "last_name": "lastname" - optional
    }

   - returns an object with a welcome message, user id and token

        {
            "message": "Thanks for registering, first_name",
            "token": "abcdefg",
            "id": 8
        }

=== LOGIN ===

POST users/login
    - accepts a credentials object

    {
        "username": "example", - required
        "password": "password" - required
    }

-  returns an object with welcome message, token and user id

        {
        "message": "Welcome example! have a token...",
        "token": "abcdefg",
        "id": 5
        }

=== USERS ===

GET /users
    - returns an array of all users

GET /users/:id - token required
    - returns a user object by id.
    - contains a `trips` key with an array of that user's trips

GET /users/:id/trips
    - returns an array of the user's trips

=== TRIPS ===

GET /trips
    - returns an array of all trips

GET /trips/:id
    - returns a trip object by id
    -contains a `photos` key with an array of that trip's photos

POST /trips
    - accepts a new trip object

    {
    "trip_title": "A super fun vacation",
    "country": "Portugal", - required
    "city": "Lisbon",
    "trip_desc": "We went to Lisbon. It was fun.",
    "user_id": 3 - required
 }

PUT /trips/:id - token required
    - accepts a modified trip object
    - returns updated trip object

DELETE /trips/:id - token required
    - returns a deleted message with the id of the deleted trip

        {
        "message": "Deleted trip with id 1"
        }

=== PHOTOS ===

GET /photos
    - returns an array of all photos

GET /photos/:id
    - returns a photo object

    {
        "id": 1,
        "trip_id": 1,
        "user_id": 1,
        "img_caption": "the colosseum",
        "img_url": "https://images.unsplash.com/photo-1515542622106-78bda8ba0e5b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80"
    }

GET /trips/trip_id/photos
    - returns an array of a trip's photos

POST /photos
    - accepts a new photo object

    {
        "trip_id": 5, - required
        "img_url": "wwww.unsplash.com/photo", - required
        "img_caption": "Vegas from Hotel",
        "user_id": 4 - required
    }

DELETE /photos/:id
     - deletes a photo by id
     - returns a deleted message

license: MIT

repository: lorenzosimpson/back-end

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: lorenzosimpson/back-end


text:
---
title: Multi-zone Layout
seo-title: Multi-zone Layout
description: Multi-zone Layout allows you to create multiple zone content and use various assets such as videos, images, and text that can be combined in a single screen. Follow this page to learn more.
seo-description: Multi-zone Layout allows you to create multiple zone content and use a variety of assets such as videos, images and text that can be combined in a single screen. Follow this page to learn more.
uuid: 2ad689ef-700a-4eed-b5e2-fc57f2288388
contentOwner: jsyal
products: SG_EXPERIENCEMANAGER/6.5/SCREENS
content-type: reference
topic-tags: authoring
discoiquuid: 4c073172-d93c-4b73-87ab-0b08789193a3
noindex: true
feature: Authoring Screens
role: Admin, Developer
level: Intermediate
exl-id: 901ed50e-d3f0-4c85-ad79-6c4595382759
---
# Multi-zone Layout {#multi-zone-layout}

The following page describes the usage of multi-zone layout and covers the following topics:

* Overview
* Creating Multi-zone Layout
* Prerequisites
* Using Single Assets in one or more Zones
* Using Sequenced Content in one or more Zones

## Overview {#overview}

***Multi-zone Layout*** allows you to create multiple zone content and use various assets such as videos, images, and text that can be combined in a single screen. You can pull in images, videos, and text allowing it all to blend together and create an intuitive digital experience.

As per the project requirements, sometimes you need multiple zones in a channel and edit them as one comprehensive unit. For example, a product sequence with a related social media feed that runs in three separate zones on a single channel.

### Prerequisites {#prerequisites}

Before you start implementing this functionality, please make sure you have the conceptual knowledge on:

* [Creating an AEM Screens Project](https://experienceleague.adobe.com/docs/experience-manager-screens/user-guide/authoring/setting-up-projects/creating-a-screens-project.html)
* [Creating a Display](https://experienceleague.adobe.com/docs/experience-manager-screens/user-guide/authoring/setting-up-projects/managing-displays.html)
* [Assigning a Channel to a Display](/help/user-guide/channel-assignment.md)

## Creating Multi-zone Layout {#creating-multi-zone-layout}

While creating a channel, you can use different templates in order to create zones in your channel. You can add a single image, video, or an embedded channel which allows for multiple assets to be shown in a sequence.

**Creating a Channel**

1. Select the Adobe Experience Manager link (top left) and then **Screens**. Alternatively, you can go directly to: `http://localhost:4502/screens.html/content/screens`.
1. Navigate to **Channels** folder and click **Create** from the action bar.

1. Select **1x2 Split Screen Channel** from the **Create** wizard.

1. Click **Next** and enter the **title** as **MultiZone**.

1. Click **Create** to complete the channel creation.

### Using Single Assets in one or more Zones {#using-single-assets-in-one-or-more-zones}

You can use single assets such as an image or a video in all individual zones. Follow the steps below for implementation:

1. **Adding Content to the Channel**

    1. Navigate to **Zones** --> **Channels**--> **MultiZone**.
    1. Select the **MultiZone** channel and click **Edit** from the action bar to open the editor.

1. **Adding Images to the Channel**

   To play a single image or a video in two zones, simply drag and drop an image to each zone in the channel editor, as shown in the figure below:

   ![image](/help/user-guide/assets/multi-zone/multizone-img3.png)

### Using Sequenced Content in one or more Zones {#using-sequenced-content-in-one-or-more-zones}

If you want the zones to display sequence of images and a video in the different zones, follow steps below for details.

1. **Creating a Channel Folder**

    1. Navigate to **Zones** --> **MultiZone** --> **Channels** and click **Create** from the action bar.
    1. Select **Channels Folder** from the **Create** wizard and click **Next**.
    1. Enter the title as **EmbeddedChannels** and click **Create**.

   ![screen_shot_2018-12-19at125428pm](assets/screen_shot_2018-12-19at125428pm.png)

1. **Adding two more channels to Channel Folder**

    1. Navigate to **Zones** --> **Channels** --> **EmbeddedChannels** and click **Create** from the action bar.
    1. Select **Sequence Channel** from the **Create** wizard to create a channel titled as **Zone1**.
    1. Select **Zone1** and click **Edit** from the action bar to open the editor.
    1. Drag and drop few images to this channel.
    1. Similarly, create another sequence channel titled as **Zone2** in **EmbeddedChannels** folder.
    1. Drag and drop a video to this channel.

    The following figure shows the channels **Zone1** and **Zone2**:

   ![screen_shot_2018-12-19at125930pm](assets/screen_shot_2018-12-19at125930pm.png)

   The images added to editor of **Zone1** sequence channel are shown below:

   ![screen_shot_2018-12-19at125930pm](/help/user-guide/assets/multi-zone/multizone-img4.png)

   The video added to editor of **Zone2** sequence channel is shown below:

   ![screen_shot_2018-12-19at125930pm](/help/user-guide/assets/multi-zone/multizone-img5.png)

1. **Adding Embedded Sequences (component) to main channel (MultiZone)**

    1. Navigate to **Zones** --> **Channels** --> **MultiZone**.
    1. Click **Edit** from the action bar to open the editor.
    1. Drag and drop the **Embedded Sequence** component to both the zones.
    1. Select the embedded sequence in one of the zones.
    1. Click the **Configure** (wrench) icon to one of the embedded sequences in the editor.
    1. Select the channel path as **Zones** --> **Channels** --> **EmbeddedChannels** --> **Zone1**, as shown in the figure below.
    1. Similarly, add the **Zone2** to another embedded sequence component in the editor.

       ![image](/help/user-guide/assets/multi-zone/multizone-3.png)

### Creating a Location and a Display {#creating-location}

Create a location and a display to view the content in the Screens player.

1. **Creating a Location**

   1. Navigate to **Zones** --> **Locations** folder.
   1. Select the **Locations** folder and click **Create** from the action bar.
   1. Select **Location** from the **Create** wizard and click **Next**.
   1. Enter the **Title** as **SanJose** and click **Create**.

1. **Creating a Display**

   1. Navigate to **Zones** --> **Locations** folder.
   1. Select the **SanJose** location and click **Create** from the action bar.
   1. Select **Display** from the **Create** wizard and click **Next**.
   1. Enter the **Title** as **Lobby** and click **Create**.

### Assigning Channels to the Display {#channel-channel}

Assign the channels to the display to view the content. Follow the steps below to assign the channel to the display.

1. **Assigning Channel to the Display**

   1. Navigate to **Zones** --> **Locations** --> **SanJose**--> **Lobby**.
   1. Select the **Lobby** display and click **Assign Channel** from the action bar.
   1. Enter the path to the **MultiZone** channel in **Channel Path**.
   1. Set the **Supported Events** as **Initial Load**, **Idle Screen**, and **Timer**.
   1. Click **Save**.

      ![image](/help/user-guide/assets/multi-zone/multizone-img9.png)
   1. Similarly, you must assign the other two embedded channels (**Zone1** and **Zone2**) to this display.
   1. Once you assign all three channels to the **Lobby** display, you should be able to view the assigned channels from the display dashboard.

      ![image](/help/user-guide/assets/multi-zone/multizone-img8.png)

      >[!IMPORTANT]
      >
      > Once you assign the main channel (in this case, **MultiZone**) to the display, it is mandatory to assign the other two embedded channels **Zone1** and **Zone2** also to the same display.

### Registering the Device {#registering-device}

Once you have set up a location and a display, follow the steps below to register the device and assign display to the device.

1. **Registering the Device**

   1. Navigate to **Zones** --> **Devices** folder.
   1. Select the **Devices** folder and click **Device Manager** from the action bar.
   1. Click **Device Registration** and select the pending device from the list.
      >[!NOTE]
      > The title of the device must match the device token (**Token** field) displayed in the **Device Registration** tab.
   1. If the title matches the device token, then select the device and click **Register Device** from the action bar.
   1. If the registration code matches the code in the Screens player **Device Registration** tab, click **Validate** from the action bar.
      ![image](/help/user-guide/assets/multi-zone/multizone-img6.png)
   1. Enter the **Title** as **Chrome-Device1** and click **Register**.
   1. Select **Assign Display** and select the path to the device config.

    >[!NOTE]
    >If you are trying to view the content in the Screens player, make sure you click **Update Offline Content** from the channel dashboard for each of the channels assigned to the display.

### Viewing the Result {#viewing-the-result}

Once you implement multi-zone layouts using the preceding steps, the following output displays.

Check the Screens player to view the output that displays the content in two different zones. The left and the right zones (both use an embedded sequence as a component).

The left zone is a sequence channel and the right zone includes a video.

![new2-1](/help/user-guide/assets/multi-zone/Multi-gif.gif)

branch_name: refs/heads/main


text:
# node-api-starter
[![CircleCI](https://circleci.com/gh/akinmaurice/node-api-starter.svg?style=svg)](https://circleci.com/gh/akinmaurice/node-api-starter)

This repository contains a Node JS Postgres DB starter pack with authorization and authentication.

## How to use

[Documentation](/docs/README.md)

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://opensource.org/licenses/MIT) file for details

repository: akinmaurice/node-api-starter

gha_language: JavaScript

repo_name: akinmaurice/node-api-starter


text:
# CryptoSigner

`CryptoSigner` is a modern replacement for the legacy `securesystemslib.keys`
module. It can be used via the `Signer.from_priv_key_uri` API to load private
*rsa*, *ecdsa* and *ed25519* keys from file. It also provides API to generate
in-memory signers for ad-hoc signing.

## Code examples

### Example 1: Ad-hoc signing

`CryptoSigner` provides `generate_{rsa, ed25519, ecdsa}` methods for ad-hoc
signing and signature verification, e.g. in tests or demos.

```python
from securesystemslib.signer import CryptoSigner

signer = CryptoSigner.generate_ed25519()
signature = signer.sign(b"data")
signer.public_key.verify_signature(signature, b"data")
```

### Example 2: Asynchronous key management and signing

The typical Signer API usage is described in
[this blog post](https://theupdateframework.github.io/python-tuf/2023/01/24/securesystemslib-signer-api.html)
and outlined below for a file-based signer.

#### 1. Generate key files
*`CryptoSigner` does not provide API to generate key files. Compatible
keys can be generated with standard tools like `openssl genpkey` (CLI) or
`pyca/cryptography` (Python).*

```python
from cryptography.hazmat.primitives import asymmetric, serialization

# Generate key pair
private_key = asymmetric.ed25519.Ed25519PrivateKey.generate()

# Serialize private key as encrypted PEM/PKCS8
private_pem = private_key.private_bytes(
    encoding=serialization.Encoding.PEM,
    format=serialization.PrivateFormat.PKCS8,
    encryption_algorithm=serialization.BestAvailableEncryption(b"hunter2"),
)

# Serialize public key as encrypted PEM/subjectPublicKeyInfo
public_pem = private_key.public_key().public_bytes(
    encoding=serialization.Encoding.PEM,
    format=serialization.PublicFormat.SubjectPublicKeyInfo,
)

# Write key files
with open("private.pem", "wb") as f:
    f.write(private_pem)
with open("public.pem", "wb") as f:
    f.write(public_pem)
```

#### 2. Prepare signing environment

```python
import os
from securesystemslib.signer import SSlibKey

with open("public.pem", "rb") as f:
    public_bytes = f.read()

# Make public key, signer URI, and key decryption password available to the
# signer, e.g. via environment variables. The private key file must also be
# available to the signer at the specified path.
os.environ.update({
    "SIGNER_URI":  "file:private.pem?encrypted=true",
    "SIGNER_PUBLIC": public_bytes.decode(),
    "SIGNER_SECRET": "hunter2"
})
```

#### 3. Load and use signer

```python
import os
from securesystemslib.signer import SSlibKey, Signer, CryptoSigner, SIGNER_FOR_URI_SCHEME

# NOTE: Registration becomes obsolete once CryptoSigner is the default file signer
SIGNER_FOR_URI_SCHEME.update({CryptoSigner.FILE_URI_SCHEME: CryptoSigner})

# Read signer details
uri = os.environ["SIGNER_URI"]
public_key = SSlibKey.from_pem(os.environ["SIGNER_PUBLIC"].encode())
secrets_handler = lambda sec: os.environ["SIGNER_SECRET"]

# Load and sign
signer = Signer.from_priv_key_uri(uri, public_key, secrets_handler)
signer.sign(b"data")
```

repository: secure-systems-lab/securesystemslib

gha_language: Python

repo_name: secure-systems-lab/securesystemslib


text:
It mainly focuses on easy deployment via automated
scripts. By automagically copying plugins from
multiple configurable folders, it makes your
life much easier: You can just drop the latest
plugins in your central plugin folder, and
Polypocket will pull them to your instanes
as they restart.

Polypocket was created for the [MinoTopia German PvP Server](https://github.com/minotopiame)
and is licensed under the MIT License, a copy of which
can be found in the `LICENSE` file bundled
with this repository.

If this helped you, consider checking out [Spigotctl](https://gist.github.com/literalplus/f3327e2642a07fe2fac42597b583e929),
which provides integration between Systemd, Tmux, and Spigot.

# Concept

You need:

 * A Linux box with shell access
 * Some kind of wrapper (e.g. legacy [Remote Toolkit](https://bukkit.org/threads/remotetoolkit-restarts-crash-detection-auto-saves-remote-console.674/),
    a custom solution, or the shipped `startloop.sh` file)
 * Polypocket
 * Some Minecraft server software based on Bukkit (e.g. [Paper](https://aquifermc.org/))
 * A lot of plugins which you update sometimes
 * Many folders and loads of symlinks

So, basically, the idea is that your wrapper script takes
care of launching Polypocket and also restarting it
from time to time. Polypocket then takes care of keeping
your server binary and plugins up to date.

By copying the server binary and plugin jars over before
starting the server, but never while it is running,
Polypocket effectively prevents those nasty
`NoClassDefFoundError`s that usually occur when you
replace `jar`s in place, requiring you to reload
or restart immediately.

# Folders

## Polypocket template folder

This folder. This is where you keep your `start.sh` script,
your default config, an your template config. It is usually
a good idea to keep this a Git repository so you can
incorporate upstream changes.

You can also put some server config templates here.

When you need to spin up a new instance, you copy this
whole folder over and just change `config.sh`.

## Central server binary folder

This is where you keep your server binary jars. Ideally,
you would frequently update your server jar. Polypocket
makes sure that all instances get the latest version
once they restart.

## Central plugins folder

This is where you keep your plugins. You can have as many of
these as you want.

At MinoTopia, we keep external plugins
in folders by categories. We symlink common plugins that
all servers need into a `common` folder that all
instances use. Every instance also has a separate
`extra/$SERVER_NAME` folder, which keeps additional
plugins and override plugins that we want different
from the common folder.

Your Continuous Integration server can now just
drop new versions into your category folders, and
Polypocket would automatically pull them to your
instances once they restart.

Also note that it's possible to override plugins
with newer versions for testing servers.

# Setup

 1. Clone this repository:
     ```bash
     git clone https://github.com/literalplus/polypocket
     ```

 2. Copy `template-config.sh` to `config.sh` and
     adjust your custom template config

 3. You can now start spinning up instances by
     copying the `polypocket` folder!

# Drawbacks

This might not be entirely suitable for your situation.
Further, this does require a wrapper script that does
quite a lot.

repository: literalplus/polypocket

repo_name: literalplus/polypocket


text:
# Weather Progressive Web Application
![Weather Data](https://i.imgur.com/3csowzj.png)

### [Live Demo](https://tender-noyce-3fd95a.netlify.app/)

## Introduction

Progressive Web App made in React.js and Evergreen-UI to display COVID-19 statistics

Check out the API [here](https://covid19.mathdro.id/api/daily)

Setup:
- run ```npm i && npm start``` for both client and server side to start the development server

## Screenshots

# License

    Copyright 2020 Chetan Nimbalkar

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


text:
Updated 7/17/2018.

## Get the Brown docker image:

 - reference: https://gitlab.datadrivendiscovery.org/zshang/Brown/blob/master/ta3_ta2_pair.yml
 - login is the same as gitlab credentials

```
docker login registry.datadrivendiscovery.org
docker pull registry.datadrivendiscovery.org/zshang/docker_images:ta2-new
```

## Run it with env variable

Within a Terminal:
1. `cd` into the top-level `TwoRavens` directory
1. Start the virtualenv:
    ```
    workon 2ravens
    ```
1. make config files
    ```
    fab make_d3m_configs_from_files
    ```
1. Show a list of datasets to run with the TA2
    ```
    fab run_ta2_brown_choose_config
    ```
1. Choose a dataset:
    ```
    fab run_ta2_brown_choose_config:[number of chosen dataset]
    ```

- *Note*: To stop the server:
    ```
    docker stop ta2_server
    ```

## Run everything else....

- Please follow the `ta3_run.md` instructions in this folder

repository: TwoRavens/TwoRavens

branch_name: refs/heads/develop

repo_name: TwoRavens/TwoRavens


text:
![State Toggle Logo](docs/images/state-toggle_logo.png "State Toggle Logo")

*A utility to create relationships between elements without writing any custom Javascript.*

* [Quick Start](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#quick-start "Quick Start")
* [About State Toggle](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#about-state-toggle "About State Toggle")
* [Quick Reference Table](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#state-toggle-attributes---quick-reference-table "Quick Reference Table")
* [Detailed Reference](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#state-toggle-attributes---detailed-reference "Detailed Reference")
* [Roadmap](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#roadmap "Roadmap")
* [Credits](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#credits "Credits")
* [License](https://github.com/BNOTIONS/state-toggle/tree/feature/docs#license "License")

----
## Quick Start
Control the visual state of related Interface Elements using class-based CSS properties.

### 1. Create the HTML elements that affect each other
#### Trigger
```html
<button>Button</button>
```
#### Target
```html
<div>Target</div>
```

### 2. Create the CSS for the before and after state of the target

#### Before
```css
div {
    width: 100px;
    height: 100px;
    background: black;
}
```

![HTML and CSS for demo creating Trigger and Target Elements](docs/images/elements.png "Creating Trigger and Target Elements")

#### After
```css
div.active {
   background: yellow;
}
```
![HTML and CSS for demo 'After' state](docs/images/elements_active.png "Creating the 'After' state for the Target Element")

### 3. Apply State Toggle Attributes to the Elements to take care of the toggle
#### Apply st-group to the trigger and target

```html
<button st-group="demo">Button</button>
```

```html
<div st-group="demo">Target</div>
```

#### Define the roles of the trigger and target
```html
<button st-group="demo" st-role="trigger">Button</button>
```

```html
<div st-group="demo" st-role="target>Target</div>
```

#### Define the state that is being toggled on the target element
```html
<button st-group="demo" st-role="trigger" st-state="active">Button</button>
```

![HTML and CSS for demo with State Toggle attributes applied](docs/images/elements_full_code.png "Applying the State Toggle attributes to make the interaction work")

## About State Toggle

It is a routine situation to have an Interface that features two or more interface elements that have an effect on each other.

> *Click __this__ element, and something happens to __that__ element.*

Think:

* lightboxes
* dropdown menus
* tooltips

In order to facilitate these common interactions, there are a number of utilities and plugins that can be used, but the interesting thing is that there is a common interaction to all of these situations:

> *When a user interacts with element __a__, something happens to element __b__*

 **State Toggle** remedies this situation by providing a single declarative solution that works for all of these scenarios without needing to write any Javascript.

All you need to do is:

* create your HTML as you normally would
* prepare your CSS for your *'before'* and *'after'* states
* implement some **State Toggle** attributes

... and let the **State Toggle** tool look after the rest.

## Features

Behind the scenes, **State Toggle** handles:

* event binding of click events
* management of the state of the toggled element
* management of whether the trigger of the toggled element has been activated
* provision of hooks to control the appearance of triggers that have been activated
* scope control to be able to create multiple instances in an interface, or contain the scope of interaction for whatever reason
* ability to control the default state of a toggle group

## State Toggle Attributes - Quick Reference Table

### Required Attributes
| Attribute | Function |
| --------- | -------- |
| st-group | Declares elements are in a related group. Elements in the same group must have the same value set to this attribute. |
| st-role | Declares the role that the element plays in the interactive group. Value can be set to either __trigger__ or __target__. |
| st-state | Declares the state that should be toggled as a __class__ attribute on the *target*. This can be set to any value valid for a class | attribute. |

### Optional Attributes
| Attribute | Function |
| --------- | -------- |
| st-remove | Declares which __class__ attribute *state* should be removed from other elements in the interface when an element is triggered. This should be set to any relevant class attribute. |
| st-contain | Declares whether a State Toggle relationship has been scoped or contained (other elements not within the declared scope will not be affected). This can be set to any value (or left with no value). |
| st-ready | Declares whether or not the trigger is 'active' (if the trigger is able to toggle the target). This attribute can be set to the 'trigger' element and set to __false__ if disabled, or __true__ if enabled. |
| st-restrict | This can be applied to a trigger to declare whether the trigger is only able to toggle a target to either the 'off' or 'on' state. Valid values that this attribute can be set to are __on__ or __off__. |
| st-default | This can be set to the trigger element to declare whether the trigger should be in its __activate__ or __inactive__ state by default. Active triggers have the __class__ attribute set to __st-activated__. |

## State Toggle Attributes - Detailed Reference

### st-group

Declares elements are in a related group. Elements in the same group must have the same value set to this attribute.

### st-role

Declares the role that the element plays in the interactive group. Value can be set to either __trigger__ or __target__.

### st-state

Declares the state that should be toggled as a __class__ attribute on the *target*. This can be set to any value valid for a class attribute.

### st-remove

Declares which __class__ attribute *state* should be removed from other elements in the interface when an element is triggered. This should be set to any relevant class attribute.

### st-contain

Declares whether a State Toggle relationship has been scoped or contained (other elements not within the declared scope will not be affected). This can be set to any value (or left with no value).

### st-ready

Declares whether or not the trigger is 'active' (if the trigger is able to toggle the target). This attribute can be set to the 'trigger' element and set to __false__ if disabled, or __true__ if enabled.

### st-restrict

This can be applied to a trigger to declare whether the trigger is only able to toggle a target to either the 'off' or 'on' state. Valid values that this attribute can be set to are __on__ or __off__.

### st-default

This can be set to the trigger element to declare whether the trigger should be in its __activate__ or __inactive__ state by default.

## Roadmap
There are a few things on the roadmap right now:
* finish the detailed version of these docs
* see if Zach wants to improve the logo
* get rid of the dependency on jQuery (even though we like jQuery)
* add a minified version of the latest code to the repo
* support events other than 'click'
* assess touch events vs click events for touchscreens
* continue testing performance of event binding
* assemble more literature around planning interactive states in interfaces
* more demos

## Credits
The crew at [BNOTIONS](http://bnotions.com "BNOTIONS") put this together. We build a lot of Interfaces, and this tool got us all excited and has saved us boatloads of time.

This tool was born from a perfect storm of sorts:
* we are always looking faster ways to build prototypes
* we got tired of using a bunch of slightly different tools and implementations for things like lightboxes, tooltips, dropdowns, tabs, modals, etc that all fundamentally did the same thing - we were looking for one solution that could handle everything
* our product designers are not shy about getting their hands in the code, and we like to provide them with more ways to express themselves
* we do a lot of Hackathons, and we like the idea of building a tool that could excel in both a Hackathon and Production environment
* AngularJS brought some thoughts about how else we could take advantage of the declarative power of attributes on HTML elements
* we run a lot of workshops and recognize that people who want to build cool, interactive stuff may not need to learn Javascript (*gasp*)

Big ups to Shawn Connors, Zach Forrester, Peter Organa, Azhar Khan, Andy Fang, Nick Karch, Liane Reale, Solomon Hsu, and Mark Reale for putting this together, kicking the tires, building demos, and providing insights.

If you are using this tool, we would love to hear your thoughts and feedback.

## License
__State-Toggle__ is available under the MIT License.

Please see the [LICENSE](/LICENSE "MIT License") for full details.

repository: BNOTIONS/state-toggle

repo_name: BNOTIONS/state-toggle


text:
# Chulapa 101

Click [**Use this template**](https://github.com/dieghernan/chulapa-101/generate) button above for cloning this repo and get started with [Chulapa Jekyll theme](https://github.com/dieghernan/chulapa).

Contains basic configuration to get you a site with:

- [Sample posts](./_posts/) and [paginated blog index](./blog/index.html).
- [Sample collection](./_cheatsheet/) with Markdown and kramdown cheatsheets and [collection index](./_pages/cheatsheet.md).
- Archive pages for posts grouped by year, category, and tag.
- Demo page with the different Bootstrap components and how they look with the actual skin settings.
- Sample 404 page.
- Site search with Lunr.
- Sample [`_config`](_config.yml) with minimal configuration.
- Sample [`algolia-search.yml`](algolia-search.yml) for using Algolia+GitHub Actions. More guidance in the top of the file.
- Sample files for extending the theme with your [own scripts](./_includes/custom/) and [css](./assets/css/).

[Configure as necessary](https://dieghernan.github.io/chulapa/docs/02-config) and replace sample content with your own.


text:
# jsonapi-normalizer

[![CircleCI](https://circleci.com/gh/stevenpetryk/jsonapi-normalizer.svg?style=shield)](https://circleci.com/gh/stevenpetryk/jsonapi-normalizer)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

A tool similar to [normalizr](https://github.com/paularmstrong/normalizr), but which leverages the
self-describing schemas present in [JSONAPI](http://jsonapi.org) to automatically normalize without
hand-written schema definitions.

## TL;DR

Turns this:

```js
{
  data: [{
    type: 'articles',
    id: '1',
    attributes: {
      title: 'title',
      body: 'body'
    },
    relationships: {
      author: {
        data: {
          id: '42',
          type: 'users'
        }
      }
    }
  }],

  included: [
    {
      type: 'users',
      id: '42',
      attributes: {
        name: 'John'
      }
    }
  ]
}
```

Into this:

```js
{
  result: {
    articles: ['1']
  },
  entities: {
    articles: {
      '1': {
        id: '1',
        title: 'title',
        body: 'body',
        author: { type: 'users', id: '42' } // see Caveats below!
      }
    },
    users: {
      '42': {
        id: '42',
        name: 'John'
      }
    }
  }
}
```

## Usage

```js
import normalize from 'jsonapi-normalizer'

normalize(someJsonApiObject)
```

That's all there is to it! No options or schema definitions.

## Caveats

Note that, unlike `normalizr`, this library will *always* point to associations using the format
`{ type: 'users', id: 4 }`. This behavior is intended to prevent the discontinuity present in
`normalizr` where polymorphic associations are referenced differently than regular associations. It
will also help you ensure you're retrieving the correct object when resolving the association.

Similarly, `result` will always have keys that reference the name of the schema. This is also for
the sake of consistency across all responses.

If either of these behaviors significantly hinders app development and you'd prefer `normalizr`'s
behavior, open an issue to discuss. Better yet, submit a PR that allows this behavior as an option.

## Installation

```bash
npm install --save jsonapi-normalizer
```

## Contributing

To run on your own machine, clone the project and install dependencies using [Yarn](https://yarnpkg.com/).

```bash
git clone git@github.com:stevenpetryk/jsonapi-normalizer.git
cd jsonapi-normalizer
yarn install
```

Testing is as simple as:

```bash
yarn test
```

Please ensure that your tests pass before requesting that a pull request is reviewed.

repository: CredderApp/jsonapi-normalizer

repo_name: CredderApp/jsonapi-normalizer


text:
# Tree-Talk
> A tree in the merkle-forest where you can just hang around and talk

![](./screenshot.png)

## What is this?

Tree-Talk is a forum that works over [IPFS](https://ipfs.io), mainly the pubsub part. There is no
servers involved in sending the threads/posts to other users but there is a
signaling server for helping peers to discover each others.

Tree-Talks data is completely distributed among the peers that are using the
application, with no central storage/database for threads and posts.

## Running

* Official IPFS link: https://ipfs.io/ipfs/QmdsQExVDxp2EgERDZFn2Q7Q6Ldi3uH4XSpQTu4L7aUeTU/#/
* Locally: http://localhost:8080/ipfs/QmdsQExVDxp2EgERDZFn2Q7Q6Ldi3uH4XSpQTu4L7aUeTU/#/

## Installing

**Requirements**

* node
* npm

**Setup**

* `git clone https://github.com/victorbjelkholm/tree-talk`
* `cd tree-talk`
* `npm install`
* `npm start`
* Visit http://localhost:3000

## Publishing your own copy

**Requirements**

* IPFS https://ipfs.io
* IPFS daemon running

**Setup**

Make sure you're running the IPFS daemon somewhere

```
$ ipfs daemon

Initializing daemon...
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/<IP_ADDRESS>/tcp/5001
Gateway (readonly) server listening on /ip4/<IP_ADDRESS>/tcp/8080
Daemon is ready
```

Then run `npm run publish` to build a production build, add it to IPFS and publish
on IPNS.

You can then visit `https://ipfs.io/ipfs/:hash` or `https://ipfs.io/ipns/:ipnfs-name`

## Architecture

Tree-Talk is using the pubsub and DAG API in js-ipfs to publish and retrieve content.

It publishes resources in a pubsub channel and also listens on the same channel.

There is also a implementation of a caching server who listens to a pubsub channel
and reshares all the content it can find.

## Open Problems

- Spam - Anyone can publish events on a pubsub channel and spam the network
	- Possible Solutions:
		- Every client keeps track of how many threads/posts they received from another
		client and if 2 posts > 1 minute, put the client on cooldown

- Messaging
  - Should always one message per second

- Authenticity
  - All messages should be signed
    - UI needs to show if message is signed or not

## Testing

Should include a acceptance testing suite for making sure everything is always
working as it should.

- Start signal server
- Start browser 1
- Start browser 2

Scenarios:
- Browser 1 & 2 are connected, showing "1 peer" each

## License

MIT 2017 - Victor Bjelkholm

repository: victorb/tree-talk

repo_name: victorb/tree-talk


text:
# ML Examples

Source code for machine learning tutorials and examples used in [Arm's ML developer space](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material).

## Projects and tutorials

### Arm NN MNIST
Deploy a TensorFlow MNIST model with the Arm NN inference engine.

* [Tutorial on Arm's developer site](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/)
* [Source code on GitHub](armnn-mnist/README.md)

### Yeah, World
Explore gesture recognition with TensorFlow and transfer learning on the Raspberry Pi 4 Model B, Pi 3 and Pi Zero.

* [Tutorial on Arm's developer site](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/teach-your-raspberry-pi-yeah-world)
* [Source code on GitHub](yeah-world/README.md)

### Multi-Gesture Recognition
Train a convolutional neural network from scratch to recognize multiple gestures in a wide range of conditions with TensorFlow and a Raspberry Pi 4 Model B or Pi 3.

* [Tutorial on Arm's developer site](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/teach-your-pi-multi-gesture)
* [Source code on GitHub](multi-gesture-recognition/README.md)

### CMSIS-NN CIFAR10 model
Deploy a Caffe CIFAR10 model on Arm Cortex-M CPUs.

* [Source code on Github](cmsisnn-cifar10/README.md)

repository: baoshijie/ML-examples

repo_name: baoshijie/ML-examples


text:
---
layout: post
title: We are thoughtram
date: 2014-06-06T00:00:00.000Z
summary: >-
  We enjoy learning new stuff every day and we love teaching it to others even
  more.
imageUrl: ../assets/images/banner/we-are-thoughtram.jpg
redirect_from:
  - /posts/we-are-thoughtram/
categories:
  - announcements
tags:
  - announcements
  - company
author: pascal_precht
authors:
  - pascal_precht
  - christoph_burgdorf
related_posts:
  - Company offsite in Spain 2017
  - Dominic joins thoughtram
  - Thomas joins thoughtram
  - Upcoming events in 2015
  - Around the globe
  - More GDE power at thoughtram
related_videos:
  - '175255006'
  - '193524896'
  - '189792758'
  - '189785428'
  - '175218351'
  - '189618526'

---

Hey there,

introducing [Pascal Precht](https://twitter.com/PascalPrecht) and [Christoph Burgdorf](https://twitter.com/cburgdorf). We are [thoughtram](https://twitter.com/thoughtram).

Since our first mysterious [announcement on twitter](https://twitter.com/thoughtram/status/471040173565042688) people
have been wondering what the heck [thoughtram.io](http://thoughtram.io) is.

![more ram](../assets/images/more_ram.png)

Sorry, folks. No fancy dropbox competitor here. Our mission is something completely different.

We enjoy learning new stuff every day and we love teaching it to others even more. In fact, we love it so much that we started the [HannoverJS](https://twitter.com/HannoverJS) meet-up years ago. From then on we began to discuss tech stuff regularly at meet-ups, conferences and in-company workshops.

The purpose of [thoughtram](https://twitter.com/thoughtram) is to create a package of training material including workshops (online and offline), webinars, screencasts and scripts with a *very* strong focus on quality. If you aren't satisfied with our material, then we aren't either. Learning new things with [thoughtram](https://twitter.com/thoughtram) should be both fun and efficient.

We will soon launch our website with a lot more information and the first workshop available for booking. But for now, if you're interested in boosting your skills - and as someone working in tech you definitely should be - go and subscribe at [thoughtram.io](http://thoughtram.io) for notification of the launch.

-- Pascal Precht & Christoph Burgdorf

repository: thoughtram/blog

gha_language: SCSS

repo_name: thoughtram/blog


text:
# Vanilla Scroll Appear

A simple Vanilla JS library to reveal elements on vertical scroll (1.2 KB minified and gzipped, no dependencies).

Check the [live demo](https://www.sfertons.dev/lab/scroll-appear).

## Installation

### npm

Install the package:
```
$ npm install --save scroll-appear
```

Import the class:
```jsx
import ScrollAppear from "scroll-appear";
```

### HTML script tag
Download the `lib/scroll-appear.min.js` file and include it in your HTML:
```html
<script src="scroll-appear.min.js"></script>
```

## Usage

In your HTML, set a [`data-appear-offset`](#integer-offset) attribute to your elements and choose an "appearing" class.

In your JavaScript, instantiate the `ScrollAppear` class:
```js
new ScrollAppear(".appear");
```

By default, an `hidden` class will be added/removed whenever the scroll reaches the given offset. Read the [Configuration](#configuration) section to change this class name.

### Integer offset
```html
<button data-appear-offset="800" class="appear hidden">Appearing button</button>
```

### Element based offset
```html
<button data-appear-offset="#element+100" class="appear hidden">Appearing button</button>
```
Uses (`#element`'s height `+ 100`)  as offset.

**Operators available:** `+` `-` `/` `*`

## Configuration

The `ScrollAppear` class accepts an options hash as second argument. Available options:

Option               | Type   | Default  | Description
-------------------- | ------ | -------- | -----------
`defaultToggleClass` | string | `hidden` | Name of the added/removed class when the element scroll offset is reached/unreached.

Some data attributes are also available for the **DOM elements**:

Option               | Type    | Default         | Description
-------------------- | ------- | --------------- | -----------
`data-appear-offset` | integer, string | null (required) | Whenever the scroll height is equal to this value, the default class (`hidden` if not changed in global options) is removed.
`data-appear-toggle-class` | string | null | Name of the added/removed class when the element scroll offset is reached/unreached. Overrides the global options.

## Browser Compatibility
- Chrome 24+
- Safari 6.1+
- iOS Safari 7.1+
- Firefox 23+
- Opera 15+
- IE10+

## Development
- Clone this repo
- `npm install`
- `gulp` or `gulp watch` if you prefer to launch a livereload server

repository: Spharian/scroll-appear

repo_name: Spharian/scroll-appear


text:
---
layout: default
---

# 1995-09-15 - Re: DD, pedophiles, and Terrorists, oh my

## Header Data

From: Bill Stewart<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: f4d5bcba5ca04f54d529769c61c580bcec0a51366ae8cccbc708b83c4d8638b3

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-09-15 09:08:39 UTC

Raw Date: Fri, 15 Sep 95 02:08:39 PDT

## Raw message

```
{% raw  %}From: Bill Stewart<EMAIL_ADDRESS>Date: Fri, 15 Sep 95 02:08:39 PDT
To<EMAIL_ADDRESS>Subject: Re: DD, pedophiles, and Terrorists, oh my
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 11:21 PM 9/14/95 -0400, Phill wrote:
>Yes, I was specificaly refering to hard core images depicting intercourse with
>minors, including very young children. This was injected into the USEnet
over a
>period of about 3 months from a number of sites. I do not know if the persons
>arrested today are the alledged source.

Anybody interesting in doing a FOIA to find out whether the government is
posting them?  For that matter, is the Post Office, as a semi-non-governmental
organization, subject to FOIA?
#---
# Bill Stewart, Freelance Information Architect<EMAIL_ADDRESS># Phone +1-510-247-0664 Pager/Voicemail 1-408-787-1281
#---

{% endraw %}
```

## Thread

+ Return to [September 1995](/archive/1995/09)

+ Return to "[Bill Stewart <stewarts@ix.netcom.com>](/authors/bill_stewart_stewarts_at_ix_netcom_com_)"
+ Return to "[Michael Froomkin <mfroomki@law.miami.edu>](/authors/michael_froomkin_mfroomki_at_law_miami_edu_)"

+ 1995-09-15 (Fri, 15 Sep 95 02:08:39 PDT) - Re: DD, pedophiles, and Terrorists, oh my - _Bill Stewart<EMAIL_ADDRESS>  + 1995-09-15 (Fri, 15 Sep 95 08:15:42 PDT) - [Re: DD, pedophiles, and Terrorists, oh my](/archive/1995/09/842470bc290110b8331191082d51e9ab56c793369689f98832621d65fc9fd84e) - _Michael Froomkin<EMAIL_ADDRESS>


text:
# Tools for Idlescape

https://MrTekilla.github.io

Using API from https://idlescape.xyz/ to fetch data from https://idlescape.com

* Calculate which recipe is the best to level up Craft at a lower cost.

* Calculate which recipe is the best to level up Enchanting by using Scrollcrafting at a lower cost.

* Calculate which seed is the best to level up Farming at a lower cost. (You can sort by "Price per xp" and "Xp per bloc per minute by clicking" on them).

gha_language: HTML


text:
# Vue Core Directory Visualization

🎋 Often when we're excited about contributing to a project, it takes a little while to understand the codebase even before we get started. It's estimated that developers spend 70% of their time reading code and only 30% writing. This project documents how Vue.js is set up with special notes taken from a Vue core meeting with Evan You. This should help guide people through the directory structure and give context to how and why things are set up the way that they are so that they can get set up to contribute as soon as possible.

Shows the whole Vue.js repo directory structure, with only the sections with notes shown initially. Any files that we have more info on have a note (exposed on hover). All notes and open directories are in the Vuex store.

![demo-image](https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/vue-directory.png)

🎋 Demo site! [https://sdras.github.io/vue-directory-tree/](https://sdras.github.io/vue-directory-tree/)

When I first created this, I wrote this [bit of code](https://gist.github.com/sdras/f5665c5bcd98b48b4a3a9aed1312fd37) to create the tree.

🎋 After it was done, I thought it might be best for everyone to create a CLI tool to generate this kind of documentation. You can find this project and use it here: [Project-Explorer](https://github.com/sdras/project-explorer)

```
yarn
yarn serve
```

repository: Uvacoder/vue-directory-tree

repo_name: Uvacoder/vue-directory-tree


text:
---
translatedFrom: de
translatedWarning: If you want to edit this document please delete "translatedFrom" field, elsewise this document will be translated automatically again
editLink: https://github.com/ioBroker/ioBroker.docs/edit/master/docs/en/downloads/ioBroker_Image_Tinker_piVCCU3_20190813_stretch.md
title: ioBroker Image for Tinkerboard (S) with piVCCU 20190813
hash: 1SCL2XASshAYgQH+eZvQbYb/unN6Uo3fEWCpN2W2/zw=
---
# IoBroker Image for Tinkerboard (S) with piVCCU 20190813
## Creating a μ-SD card
This is an all-in-one SD card image for Homematic with ioBroker on the Asus Tinkerboard or Tinkerboard S.

The image was created on a Tinkerboard, but should also run on all mentioned. It is suitable for 4 GB cards and larger. However, an 8 GB is the recommended minimum size. 16GB cards are recommended anyway so that not always the same cells are described, which would lead to a faster wear of the SD card.

The image is unpacked and then written to the SD card using the Balena Etcher program. Etcher is available for different operating systems.

## Components of the image
The image contains the Raspbian lite, based on Debian 9 "Stretch" from 03.04.2019 after download from https://dl.armbian.com/tinkerboard/Debian_stretch_default.7z.

In addition, packages that are necessary for some adapters were installed.

Also included is piVCCU3 dated 19.07.2019 after download from https://www.pivccu.de/images/?dir=piVCCU3

The following user is created:

* User: `pi`,
* Password: `raspberry`

Node-js is installed in version 10.16.2 and of course iobroker via the installer with the js-controller according to the stable repository of 13.08.2019.

It is a **minimal installation** which contains **only the admin and the discovery adapter** additional adapters and their instances still have to be created and configured.

Creating additional adapters and their instances is described in [here](/tutorial/adapter.md).

** Note! ** The following instructions have been made to the best of our knowledge with the information at the time of the creation of the image. Updates to packages or the kernel can change anything at any time.

The image is localized for Germany. If using in other environments please adjust accordingly. (`sudo raspi-config`; 4.) `Localisation Options`)

## After the first start
If you are not prompted to create a new password for the root and a new user after the first start of the Tinkerboard, please proceed as follows for security reasons:

- To use the full size of the memory card you have to start the file system with `sudo / usr / lib / armbian / armbian-resize-filesystem`

  to the size of the SD card.

- There may already be updates to the underlying Linux and to nodejs. To bring this up to date

on the console, proceed as follows: `sudo apt-get update && sudo apt-get upgrade -y`

- Be sure to change the root password with `sudo passwd root` Then enter the default password` 1234` and then

enter a new password and confirm in the next step.

- This also applies to the user `pi`. This is changed with `sudo passwd pi` followed by the default password` raspberry`

and then enter a new password and confirm in the next step.

Further settings can be made with the configuration utility that calls:

`sudo armbian-config`

More information about this utility under [https://docs.armbian.com/User-Guide_Armbian-Config/](https://docs.armbian.com/User-Guide_Armbian-Config/)

## System Update
As it may have been some time since the image was created at the time of the download, you should first update the system.

To bring Linux and nodejs up to date versions, you can do the following on the console:

```sudo apt-get update && sudo apt-get upgrade -y```

In addition, you should check whether there are already updates to the already installed adapters and the js controller (see tab Hosts).

In addition to the smallest possible size of an image, this is also the reason that only a few adapters are already pre-installed.

In such cases always first run the js-controller via the console according to the instructions in the tab Hosts, then if necessary the adapter Admin and then all other adapters.

## Installation of Redis
These images no longer contain the database Redis to save the states. With weak computers and low RAM, the use of Redis increases the performance in some cases considerably. With faster computers, it reduces the write access and thus prolongs the life of the SD card.

If you want to install Redis you have to proceed with the current images as follows.

### Installing the Redis server
After the command:

`sudo apt install redis-server`

Is the Redis server ready and available at port 6379?

### Switching States to Redis
The use of Redis to store the states in ioBroker must be configured in the console with:

`iobroker setup custom`

In the dialog that follows, enter the following (Attention in the 4th line):

```
Type of objects DB [file, couch, redis], default [file]: ENTER
Host of objects DB(file), default[<IP_ADDRESS>]: ENTER
Port of objects DB(file), default[9001]: ENTER
Type of states DB [file, redis], default [file]: r ENTER
Host of states DB (file), default[HostName]:ENTER
Port of states DB (file), default[9000]: ENTER
Host name of this machine [hostname]: ENTER
```

Special features when installing in a multi-host system are described here:

[Click here](config/multihost.md)

Release of redis for the user iobroker the backitup adapter can also access redis, the user must be given the necessary rights with:

`sudo usermod -a -G redis iobroker`

## The installed piVCCU3
In this image also a virtualized CCU3 is installed, which makes it possible to control Homematic and HM-IP devices without further separate hardware.
Only the radio module HM-MOD-RPI-PCB or RPI-RF-MOD must be plugged onto the pin header of the Raspberry Pi.

The piVCCU receives from the DHCP server a different IP address than the RaspberryPi itself. This is obtained with the command `sudo pivccu-info`

If you call this IP address, you can log on to the interface of the CCU3.


text:
# Introduction #

This how-to guide was originally written by Elliott Slaughter and posted on the mailing list. It has been reproduced here so that others can make use of it. The guide describes how to connect the Emacs/SLIME IDE to Lisp and simultaneously run a game while using the interactive console, debugger, and editor features of SLIME.

# How To: Portable Interactive Development with SLIME #

Interactive development is one of the frequently touted reasons to do game development in Lisp. That said, I've found it difficult to interactive development in a portable way across different Lisp implementations, especially ones which lack multi-threading. I now believe I have found a fairly robust and portable solution, which I would like to share. First, however, a little bit on why I don't like other solutions I've seen:

One solution I've seen many use is to simply use the implementation's REPL and spawn either the REPL or game loop in a thread. The problem with this is that getting this to work is implementation specific, and can't possibly work without threads. (SBCL on Windows is one of my major development platforms, and doesn't support threads.) Also, I tend not to like the implementation-specific IDEs that come with various Lisp, which tend not to be as full-featured as Emacs with SLIME.

Another solution which I used in my last game was to write a REPL into the main game loop of the game. While this worked, it added a lot of unnecessary complexity to the game engine. Also, a REPL is not a replacement for an IDE, and doesn't make it easy to edit source files and see those changes instantaneously. Adding readline-like support was extra work, and the minimal debugger I implemented wasn't really useful for more that selecting restarts.

What I realized is that I really wanted just to have a SLIME connection to the game, and use that as my REPL/IDE. Unfortunately, although SLIME has a :spawn option for multi-threaded Lisps, this won't work on single-threaded Lisps, where requests will just get pipelined until after the main game loop has terminated. After discussing this with the SLIME developers, I came up with the following:

```
(let ((connection
       (or swank::*emacs-connection* (swank::default-connection))))
  (when (and connection (not (eql swank:*communication-style* :spawn)))
    (swank::handle-requests connection t)))
```

Calling the above in your main game loop will allow SLIME to process requests, even on single-threaded Lisps, which would otherwise be blocked until main returns.

Also, it would probably be desirable to use conditional compilation to avoid having this compiled into your application when delivering a final product. I use the following:

```
(eval-when (:compile-toplevel :load-toplevel :execute)
  (when (find-package :swank)
    (pushnew :my-game-debug *features*)))

#+my-game-debug
... ; handle requests
```

This way, you can just start the game in SLIME and use REPL, debugger, and even modify the source code while the game is running and see changes immediately!

Finally, here are a couple of practical suggestions for making the most of interactive development.

  * Use defvar rather than defparameter for global data. That way the current game data won't accidentally get overridden if you recompile a file.
  * Use defmethod rather than defun for functions you might want to recompile at runtime. That way, if you keep a reference to a generic function, associated methods will be updated automatically when you recompile. Recompiling a normal function will create a new function object, so references kept to normal functions won't update automatically in this manner.
  * Learn SLIME keybindings! C-c C-c (compile function) and C-c C-k (compile file) are very useful!

repository: priyadarshan/wiki

gha_license_id: NOASSERTION

repo_name: priyadarshan/wiki


text:
# Wrapping Progressive Web Application
- wrapping is needed to publish in application market that only accept native application (example: google play store, apple app store)
- wrapping creates android studio project / xcode project, that can later be built into apk

## Methods to Wrap PWA as Android Application

### bubblewrap

##### About
- wrap the application in Trusted Web Activity (a kind of activity in android)
- needs digital assets link verification
- bubblewrap is the backend of PWABuilder.com (the backend seems to be run by Microsoft in Azure cloud?)

##### Source
- https://github.com/GoogleChromeLabs/bubblewrap
- https://github.com/GoogleChromeLabs/bubblewrap/tree/master/packages/cli
- https://developers.google.com/web/android/trusted-web-activity/quick-start

##### Note
- install node.js and android studio
- run ```npm i -g @bubblewrap/cli``` (please see link above to install without sudo, OR just chmod /usr/lib/node_modules/ and /usr/bin/ add o+w, after installation turn it back to o-w)
- create and enter new directory/folder
- run ```bubblewrap init --manifest https://your.web.com/some/optional/directory/manifest.json```
- open the resulting directory in android studio, then publish as signed apk
- see documentation above for other commands

### svgomg-twa

##### About
- proof of concept/prototype of wrapping in Trusted Web Activity
- needs digital assets link verification

##### Source
- https://dev.to/jumpalottahigh/how-to-publish-a-pwa-on-the-google-play-store-2bid
- https://github.com/GoogleChromeLabs/svgomg-twa

##### Note
- git clone https://github.com/GoogleChromeLabs/svgomg-twa
- edit app/src/build.gradle
- add icons
- open the resulting directory in android studio, then publish as signed apk

### xtools-at/Android-PWA-Wrapper

##### Source
- https://github.com/xtools-at/Android-PWA-Wrapper

##### Note
- git clone https://github.com/xtools-at/Android-PWA-Wrapper
- the maintainer also have iOS and Electron wrapper
- open the resulting directory in android studio
- follow tutorial in README.md (edit some config, change some icons)
- result in small (1.4mb) apk
- wrapped in WebView rather than TrustedWebActivity

## Trusted Web Activity
- TWA will show notification "Running in Chrome" "You'll see your web.domain.here.com sign-in status, browsing data, and site data in Chrome"
- on older android version it might show "toast" or "snackbar" saying "running in chrome"
- result in very small apk file (900kb)
- PWA with custom install button will not show the install button if it's already installed as TWA (won't fire ```beforeinstallprompt```)

### Digital Assets Link Verification
- Trusted Web Activity needs to be verified so that it can be 'Trusted'
- process: create keystore file in android studio (default location is ```~/.android/keystore.jks```)
- process: note/keep/write the keystore's KEY_PASSWORD, KEYSTORE_PASSWORD, FILE_PATH, ALIAS; note that there's two password to be remembered here
- process: view it's fingerprint: ```keytool -list -v -keystore YOUR_KEYSTORE_FILE_PATH -alias YOUR_ALIAS -storepass YOUR_KEYSTORE_PASSWORD -keypass YOUR_KEY_PASSWORD```, example output:
```
Alias name: LaptopDevelopment
Creation date: Dec 2, 2000
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Kristian Tanuwijaya, OU=me, O=me, L=me, ST=me, C=US
Issuer: CN=Kristian Tanuwijaya, OU=me, O=me, L=me, ST=me, C=US
Serial number: 74a431ac
Valid from: Wed Dec 02 09:34:43 2000 until: Sun Nov 26 09:34:43 2999
Certificate fingerprints:
         SHA1: D8:D6:FF:7A:54:41:99:8A:51:4D:D9:BD:50:76:EA:E9:EC:DF:64:0D
         SHA256: 5E:8E:29:ED:3C:DA:C8:17:AA:06:CB:75:1D:51:D4:FC:4A:6A:BF:9F:DC:6E:4F:09:C5:40:E9:58:38:CE:68:F8
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3

Extensions:

#1: ObjectId: <IP_ADDRESS> Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 9D 63 AD 1C D5 C8 E6 59   B0 C8 D9 AD 88 3A 8D 4F  .c.....Y.....:.O
0010: 5D B1 5D EC                                        ].].
]
]
```
- process: take note of SHA256 fingerprint
- process: make ```https://web.domain.here.com/.well-known/assetlinks.json``` return 200 and this kind of text:
```json
[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.here.domain.web.myapp",
    "sha256_cert_fingerprints":
    ["5E:8E:29:ED:3C:DA:C8:17:AA:06:CB:75:1D:51:D4:FC:4A:6A:BF:9F:DC:6E:4F:09:C5:40:E9:58:38:CE:68:F8"]
  }
},
{
  "relation": ["delegate_permission/common.get_login_creds"],
  "target": {
    "namespace": "web",
    "site": "https://web.domain.here.com"
  }
},
{
  "relation": ["delegate_permission/common.get_login_creds"],
  "target": {
    "namespace": "android_app",
    "package_name": "web.domain.here.com",
    "sha256_cert_fingerprints":
    ["5E:8E:29:ED:3C:DA:C8:17:AA:06:CB:75:1D:51:D4:FC:4A:6A:BF:9F:DC:6E:4F:09:C5:40:E9:58:38:CE:68:F8"]
  }
}]
```
- the file tells the android OS that ```web.domain.here.com``` authorize application with package name ```com.here.domain.web.myapp``` to open links inside it as trusted web activity, if the application is signed with key with signature defined in ```sha256_cert_fingerprints```
- there seems to be a lot of pitfalls (windows line ending / CF LF, byte-order mark / BOM, SSL certificate, HTTP code must be 200, etc.)
- tools to help developing/debugging digital assets link verification:
    - debugging if signature verification failed: ```adb logcat -v brief | grep -e OriginVerifier -e digital_asset_links```
    - checking if google _approves_ your DALV: https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://web.domain.here.com&relation=delegate_permission/common.handle_all_urls (remember to allow your webserver to accept request with ```User-Agent: GoogleAssociationService``` header)
    - android studio -> Tools -> App Links Assistant
- sources:
    - https://developer.android.com/training/app-links/verify-site-associations
    - https://developers.google.com/digital-asset-links/v1/create-statement

repository: Kristian-Tan/notes

repo_name: Kristian-Tan/notes


text:
Table of Contents
=================

   * [Azure Docker Datacenter](#azure-docker-datacenter)
      * [Deploy and Visualize](#deploy-and-visualize)
      * [Topologies](#topologies)
         * [The Minimal Topology (Minimum 3 Worker Manager Nodes for valid Raft HA and minimum 2 worker nodes with 2 extra for DTR and Replica)](#the-minimal-topology-minimum-3-worker-manager-nodes-for-valid-raft-ha-and-minimum-2-worker-nodes-with-2-extra-for-dtr-and-replica)
      * [Reporting bugs](#reporting-bugs)
      * [Patches and pull requests](#patches-and-pull-requests)
      * [Pre-Req and or Optional](#pre-req-and-or-optional)
         * [Fluentd usage](#fluentd-usage)

### Azure Docker Datacenter

* Azure Docker DataCenter Templates for the to-be GAed Docker DataCenter with  **ucp:2.0.0-Beta4** (native Swarm with Raft) and **dtr:2.1.0-Beta4** initially based on the "legacy" Docker DataCenter 1.x Azure MarketPlace Gallery Templates (1.0.9).
* For Raft, please view [Docker Orchestration: Beyond the Basics](http://events.linuxfoundation.org/sites/events/files/slides/Docker_Orchestration-Aaron_Lehmann.pdf) By Aaron Lehmann at the [ContainerCon, Europe](http://events.linuxfoundation.org/events/containercon-europe/program/slides) - Berlin, October 4-9, 2016.
and [Swarm Raft Page](https://docs.docker.com/engine/swarm/raft/).
*  Apps may leverage [swarm mode orchestration on engine 1.12](https://docs.docker.com/engine/swarm/).
* Please see the [LICENSE file](https://github.com/Azure/azure-dockerdatacenter/blob/master/LICENSE) for licensing information.
 * Docker DataCenter License as used as-is (~~parameterized or~~ to be uploaded license - lic file) in this project for UCP 2.0.0 Beta4 and DTR 2.1.0 Beta4 can only be obtained presently for the private beta. Please refer to [this post](https://forums.docker.com/t/docker-datacenter-on-engine-1-12-private-beta/23232/1) in the docker forum. Please sign up [here](https://goo.gl/UTG895) for GA Waiting list.
* This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode<EMAIL_ADDRESS>with any additional questions or comments.
* This project is hosted at: https://github.com/Azure/azure-dockerdatacenter
* **This repo is initially based on the "legacy" [Docker DataCenter 1.x Azure MarketPlace Gallery Templates (1.0.9)](https://gallery.azure.com/artifact/20151001/docker.dockerdatacenterdocker-datacenter.1.0.9/Artifacts/mainTemplate.json)**
 * **Uses the 14.04 LTS Images as per docker MarketPlace offer for the above**.
* **Uses the new public tar.gz from ~~[here](https://packages.docker.com/caas/ucp-2.0.0-beta1_dtr-2.1.0-beta1.tar.gz)~~ ~~[here](https://s3.amazonaws.com/packages.docker.com/caas/ucp-2.0.0-beta3_dtr-2.1.0-beta3.tar.gz)~~ ~~[here](https://packages.docker.com/caas/ucp-2.0.0-beta3_dtr-2.1.0-beta3.tar.gz)~~ [here](https://packages.docker.com/caas/ucp-2.0.0-beta4_dtr-2.1.0-beta4.tar.gz) for changes using the Raft Protocol and Auto HA for private beta (to be GAed DDC) and native swarm mode orchestration on MS Azure. DDC Private Beta docs are [here](https://beta.docker.com/docs/ddc)**
* New [Go-based Linux CustomScript Extension being used](https://github.com/Azure/custom-script-extension-linux)
* Uses the [Docker CS 1.12 Engine support for OMS Linux Agents](https://github.com/Microsoft/OMS-Agent-for-Linux/releases)
* Latest [docker-compose](https://github.com/docker/machine/releases) and [docker-machine](https://github.com/docker/machine/releases) available.
* Dashboard URL
 * http://{{UCP Controller Nodes LoadBalancer Full DNS IP name}}.{{region of the Resource Group}}.cloudapp.azure.com
   * The Above is the FQDN of the LBR or Public IP for UCP Controller or Managers
 * http://{{DTR worker Nodes LoadBalancer Full DNS IP name}}.{{region of the Resource Group}}.cloudapp.azure.com
   * The Above is the FQDN of the LBR or Public IP for DTR
* All passwords have been disabled in the nodes and one can only use public rsa_id to ssh to the nodes.

#### Deploy and Visualize

#### Topologies

A Minimal Fresh topology with minimum 3 Worker Managers, minimum 2 worker nodes, one DTR with local storage and another as replica would look like the following

![Azure DDC Miminal Topology](https://raw.githubusercontent.com/Azure/azure-dockerdatacenter/master/MinimalFresh1.png)

##### The Minimal Topology (Minimum 3 Worker Manager Nodes for valid Raft HA and minimum 2 worker nodes with 2 extra for DTR and Replica)
 As from https://resources.azure.com

#### Reporting bugs

Please report bugs  by opening an issue in the [GitHub Issue Tracker](https://github.com/Azure/azure-dockerdatacenter/issues)

#### Patches and pull requests

Patches can be submitted as GitHub pull requests. If using GitHub please make sure your branch applies to the current master as a 'fast forward' merge (i.e. without creating a merge commit). Use the `git rebase` command to update your branch to the current master if necessary.

#### ~~Pre-Req and or~~ Optional
**OMS Setup is optional and the OMS Workspace Id and OMS Workspace Key can either be kept blank or populated post the steps below.**

[Create a free account for MS Azure Operational Management Suite with workspaceName](https://login.mms.microsoft.com/signin.aspx?signUp=on&ref=ms_mms)
* Provide a Name for the OMS Workspace.
* Link your Subscription to the OMS Portal.
* Depending upon the region, a Resource Group would be created in the Sunscription like "mms-weu" for "West Europe" and the named OMS Workspace with portal details etc. would be created in the Resource Group.
* Logon to the OMS Workspace and Go to -> Settings -> "Connected Sources"  -> "Linux Servers" -> Obtain the Workspace ID like ba1e3f33-648d-40a1-9c70-3d8920834669 and the "Primary and/or Secondary Key" like xkifyDr2s4L964a/Skq58ItA/M1aMnmumxmgdYliYcC2IPHBPphJgmPQrKsukSXGWtbrgkV2j1nHmU0j8I8vVQ==
* Add The solutions "Agent Health", "Activity Log Analytics" and "Container" Solutions from the "Solutions Gallery" of the OMS Portal of the workspace.
* While Deploying the DDC Template just the WorkspaceID and the Key are to be mentioned and all will be registered including all containers in any nodes of the DDC auto cluster.
* Then one can login to https://OMSWorkspaceName.portal.mms.microsoft.com and check all containers running for Docker DataCenter and use Log Analytics and if Required perform automated backups using the corresponding Solutions for OMS.
 * Or if the OMS Workspace and the Machines are in the same subscription, one can just connect the Linux Node sources manually to the OMS Workspace as Data Sources
 * New nodes to be added to the cluster as worker needs to follow the [Docker Instructions for OMS](https://github.com/Microsoft/OMS-Agent-for-Linux/blob/master/docs/Docker-Instructions.md) manually.

* All Docker Engines in this Azure DDC autocluster(s) are automatically instrumented via ExecStart and Specific DOCKER_OPTIONS to share metric with the OMS Workspace during deployment as in the picture below.

![OMS Container](https://raw.githubusercontent.com/Azure/azure-dockerdatacenter/master/OMSContainer.png)

##### Fluentd usage
![OMS Fluentd](https://raw.githubusercontent.com/Azure/azure-dockerdatacenter/master/OMS.png)

:heart: ![Azure Subscription Icon](https://raw.githubusercontent.com/Azure/azure-dockerdatacenter/master/Azure.png) :penguin: :whale:

repository: Powdor/azure-dockerdatacenter

repo_name: Powdor/azure-dockerdatacenter


text:
[![PyPI version](https://badge.fury.io/py/segmentation-models.svg)](https://badge.fury.io/py/segmentation-models) [![Documentation Status](https://readthedocs.org/projects/segmentation-models/badge/?version=latest)](https://segmentation-models.readthedocs.io/en/latest/?badge=latest)
# Segmentation models Zoo
**Segmentation models** is python library with Neural Networks
for [Image Segmentation](https://en.wikipedia.org/wiki/Image_segmentation) based on [Keras](https://keras.io)
([Tensorflow](https://www.tensorflow.org/)) framework.

**The main features** of this library are:

-  High level API (just two lines to create NN)
-  **4** models architectures for binary and multi class segmentation (including legendary **Unet**)
-  **15** available backbones for each architecture
-  All backbones have **pre-trained** weights for faster and better convergence

Latest **documentation** is avaliable on [Read the Docs](https://segmentation-models.readthedocs.io/en/latest/)

### Avaliable models:
 - [Unet](https://arxiv.org/abs/1505.04597)
 - [FPN](http://presentations.cocodataset.org/COCO17-Stuff-FAIR.pdf)
 - [Linknet](https://arxiv.org/abs/1707.03718)
 - [PSPNet](https://arxiv.org/abs/1612.01105)

### Avaliable backbones:
| Backbone model      |Name| Weights    |
|---------------------|:--:|:------------:|
| VGG16               |`vgg16`| `imagenet` |
| VGG19               |`vgg19`| `imagenet` |
| ResNet18            |`resnet18`| `imagenet` |
| ResNet34            |`resnet34`| `imagenet` |
| ResNet50            |`resnet50`| `imagenet`
`imagenet11k-places365ch` |
| ResNet101           |`resnet101`| `imagenet` |
| ResNet152           |`resnet152`| `imagenet`
`imagenet11k` |
| ResNeXt50           |`resnext50`| `imagenet` |
| ResNeXt101          |`resnext101`| `imagenet` |
| DenseNet121         |`densenet121`| `imagenet` |
| DenseNet169         |`densenet169`| `imagenet` |
| DenseNet201         |`densenet201`| `imagenet` |
| Inception V3        |`inceptionv3`| `imagenet` |
| Inception ResNet V2 |`inceptionresnetv2`| `imagenet` |

### Requirements
1) Python 3.6 or higher
2) Keras >=2.1.0
3) Tensorflow >= 1.4

### Installation

#### Installing via pip
`$ pip install segmentation-models`

#### Using latest version in your project
```bash
$ pip install git+https://github.com/qubvel/segmentation_models
```

### Code examples

Train Unet model:
```python
from segmentation_models import Unet
from segmentation_models.backbones import get_preprocessing

# prepare data
x, y = ...

preprocessing_fn = get_preprocessing('resnet34')
x = preprocessing_fn(x)

# prepare model
model = Unet(backbone_name='resnet34', encoder_weights='imagenet')
model.compile('Adam', 'binary_crossentropy', ['binary_accuracy'])

# train model
model.fit(x, y)
```
Train FPN model:
```python
from segmentation_models import FPN

model = FPN(backbone_name='resnet34', encoder_weights='imagenet')
```

#### Useful trick
Freeze encoder weights for fine-tuning during first epochs of training:
```python
from segmentation_models import FPN
from segmentation_models.utils import set_trainable

model = FPN(backbone_name='resnet34', encoder_weights='imagenet', freeze_encoder=True)
model.compile('Adam', 'binary_crossentropy', ['binary_accuracy'])

# pretrain model decoder
model.fit(x, y, epochs=2)

# release all layers for training
set_trainable(model) # set all layers trainable and recompile model

# continue training
model.fit(x, y, epochs=100)
```

### TODO
- [x] Update Unet API
- [x] Update FPN API
- [x] Add Linknet models
- [x] Add PSP models
- [ ] Add DPN backbones

### Change Log

**Version 0.1.2**

###### Areas of improvement

 - Added PSPModel
 - Prepocessing functions for all backbones:
```python
from segmentation_models.backbones import get_preprocessing

preprocessing_fn = get_preprocessing('resnet34')
X = preprocessing_fn(x)
```
###### API changes
- Default param `use_batchnorm=True` for all decoders
- FPN model `Upsample2D` layer renamed to `ResizeImage`

**Version 0.1.1**
 - Added `Linknet` model
 - Keras 2.2+ compatibility (fixed import of `_obtain_input_shape`)
 - Small code improvements and bug fixes

**Version 0.1.0**
 - `Unet` and `FPN` models


text:
# Unix-Type-Shell
***
The bash developed is a Unix type shell developed in C language. It performs all the tasks that can be done by a normal shell.
***
### Instructions
To use this shell run the `Makefile`, which genereates the executable `shell`.
```
make
```
followed by
```
./shell
```
to enter into this shell. Once in the shell, you can run all the commands that you ran run on a bash. Apart from that this shell also supports a host of custom user commands to interact with the shell. The user commands are :
* `HISTN` : view the last N commands executed using this shell.
* `!HISTN` : execute the Nth command executed on this shell.
* `pid` : get the process id of this shell.
* `pid all` : get the process ids of all the processes spawned from this shell.
* `pid current` : get the process ids of all the processes spawned from this shell and currently active.
* `HELP` : get the instructions for this shell.
* `STOP` : exit from this shell.

This shell also supports I/O redirection via piping. Some sample screen shots :

***

### License

This project is distributed under [MIT license](https://opensource.org/licenses/MIT). Any feedback, suggestions are higly appreciated.


text:
![CI](https://github.com/Kexplx/scrapestar/workflows/CI/badge.svg)

# ⭐ Scrapestar ⭐

HTML scraping made easy. Schedule recurring jobs and fetch their results from a simple REST API.

See the Demo on YouTube.

## Prerequisites

In order to run the project you'll need docker and docker-compose installed.

Because of a modern `docker-compose.yml` format, you need a docker-compose version >= 1.6.

### Usage

#### Run the application

```shell
docker-compose up
```
Open the UI at http://localhost:5005 and configure your jobs 🚀.
## Contribute

Please use `npm run format` inside `/ui` or `/api` before pushing to apply our style guidelines and make the linter pass.

repository: Kexplx/scrapestar

repo_name: Kexplx/scrapestar


text:
# Solr MapReduce
[![Build Status](https://secure.travis-ci.org/RiskIQ/solr-map-reduce.png?branch=master)](http://travis-ci.org/RiskIQ/solr-map-reduce)

## What?
This library provides utilities for creating Solr indexes using mapreduce.

## Why?
The code contained in this repository was initially taken from [version 6.5.1](https://github.com/apache/lucene-solr/tree/releases/lucene-solr/6.5.1)
of the [apache lucene-solr](https://github.com/apache/lucene-solr) codebase.  Starting with version 6.6.0, these modules
were dropped from the codebase, as its maintainers were no longer interested in supporting them.

As heavy users of this library, we feel that these tools are still useful and valuable, and that they should continue to
be maintained and made available to the open-source community.

## How?
Maven:
```xml
<dependency>
    <groupId>com.riskiq</groupId>
    <artifactId>solr-map-reduce</artifactId>
    <version><IP_ADDRESS></version>
</dependency>
```

Gradle:
```groovy
compile group: 'com.riskiq', name: 'solr-map-reduce', version: '<IP_ADDRESS>'
```

Example lifted from [the original readme](https://github.com/apache/lucene-solr/tree/releases/lucene-solr/6.5.1/solr/contrib/map-reduce):

```bash
# Build an index with map-reduce and deploy it to SolrCloud

source $solr_distrib/example/scripts/map-reduce/set-map-reduce-classpath.sh

$hadoop_distrib/bin/hadoop --config $hadoop_conf_dir jar \
$solr_distrib/dist/solr-map-reduce-*.jar -D 'mapred.child.java.opts=-Xmx500m' \
-libjars "$HADOOP_LIBJAR" --morphline-file readAvroContainer.conf \
--zk-host <IP_ADDRESS>:9983 --output-dir hdfs://<IP_ADDRESS>:8020/outdir \
--collection $collection --log4j log4j.properties --go-live \
--verbose "hdfs://<IP_ADDRESS>:8020/indir"
```

repository: RiskIQ/solr-map-reduce

gha_language: Java

repo_name: RiskIQ/solr-map-reduce


text:
# Trading Competition 2020 - IB Client Portal

Some basic information about how to use the IB Client Portal.

## Menu

[License](LICENSE)

[Main Readme](README.md)

[Trading Tips](TRADING.md)

## Overview

Interactive Broker has various options for connecting to their API, none of which are particularly pretty.  It seems like the Client-Portal is the easiest to use.  It is essentially a standard HTTP REST API.

The difference is (and I assume this is for security reasons), you cannot access the API directly.  It must be accessed via a client running locally on your system.  The client connects to the remote IB API for you, and acts like a proxy.  You then send your requests to the local client which forwards your requests to IB for you and returns the results.

## Pre-requisites

As mentioned in the main readme, the IB Client Portal is written in Java.

The examples are written in Ruby.

## Starting the Client Portal

You must be in the

```bash
/ib-client-portal
```

directory.  You can then run the following command:

```bash
./bin/run.sh /root/conf.yaml
```

if you are on Mac / Linux, or:

```bash
./bin/run.bat /root/conf.yaml
```

if you are on Windows.

You can alter the basic config by editing the conf.yaml file.  You can change the port it is listening on.  The Client Portal also uses a self-signed certificate, so I prefer to disable the SSL by changing:

```yaml
  listenSsl: false
```

Otherwise you will likely get warnings about the SSL connection.  This only refers to the local port and the communication to IB is still encrypted.

## Authentication

You must login to the API by going to:

```url
https://localhost:5000
```

And the IB Client Portal will present you with a login form to use.  You put your credentials in there and after that any requests to the local API will be forwarded to the remote IB API.

The connection will be dropped unless you continually call the /tickle endpoint.

## Client Web App

The Client Portal can serve web apps up, so I have included a basic example Vue app which it will serve up.  You could if you want to code your entire algorithm in Javascript and configure it through the Vue App.

You can access the demo app by going to /vue on your local connection.

## Ruby Script

Another example of how to access the API is with a ruby script which is available at:

```bash
ib-example.rb
```

which could be run as a background process without a GUI.  I've just given a few random examples of how you could make API calls to the Client Portal.  This could be done better I imagine depending on your requirements.

## Official Documentation

I'll admit that the IB docs are not the greatest, but here they are nonetheless:

[Interactive Broker API Docs](https://www.interactivebrokers.com/api/doc.html)


text:
Description
===========

Trout is a Tiny ROUTer in PHP that routes HTTP requests to your PHP controller code.

Features
--------

* No dependencies, no enforced conventions.

* It's not a framework! You are free to put your views, your controllers etc ... where you want. You don't need to subclass any 'base' controller class to provide controller objects.

* Very light-weight: Only 1 file to require, less than 200 lines of code

* Very few methods to learn

* RESTful (nested or not) resource routing

* Routes use RegExp

* Nice routes output for debugging

* Tested on PHP 5+

License
-------

MIT License (see below)

Copyright (C) 2012 Thierry Passeron

Basics
======

1) Require the file and create a new Trout:

	require 'lib/Trout.php';
	$trout = new Trout();

2) Add routing rules:

	// Either require a php file
	$trout->get('/', function () { require_once "inc/home.php"; });

	// Or directly output the content
	$trout->get('/about', function () {
		echo "Please contact us at<EMAIL_ADDRESS>	});

3) Need more ?

	// How about a route for POSTing stuff ?
	$trout->post('/events', function () { require_once "inc/create_event.php"; });

	// Or PUT ?
	$trout->put('/avatar/([^/]+)', function ($avatar_id) { require_once "inc/update_avatar.php"; });

	// Or DELETE ?
	$trout->delete('/events/([^/]+)', function ($event_id) { require_once "inc/delete_event.php"; });

	// Or a set of routes that map to a RESTful resource
		require_once "inc/CommentsController.php";
	$trout->resource('/comments', "CommentsController");

4) Let it go...

You need to call the #swim() method to let the routing start.

	if (!$trout->swim()) { require_once "inc/routing_error.php; }

Advanced
========

Routing methods
---------------

		any(<Regexp-string>, <Callback-function> [, <Hint-string>]) 	# will be triggered before any (get()/post()/put()/delete()) rule
		get(<Regexp-string>, <Callback-function> [, <Hint-string>]) 	# will be triggered if the GET request matches
		put(<Regexp-string>, <Callback-function> [, <Hint-string>]) 	# will be triggered if the PUT request matches
		post(<Regexp-string>, <Callback-function> [, <Hint-string>]) 	# will be triggered if the POST request matches
		delete(<Regexp-string>, <Callback-function> [, <Hint-string>]) 	# will be triggered if the DELETE request matches

			<Regexp-string> is a pattern string that will be used to match the current request
				No need to put ^ or $ in the rule as they are assumed, so a rule like '/products' will be considered '@^/product$@i'
				Note that because we often use slashes (/) in rules, Trout uses '@' as regexp delimiter.
				So if you need to use '@' in your rules, you need to escape it.
			<Callback-function> is a function that will be called when the rule is matched
			<Hint-string> is optional and is used to output a human readable explanation of the rule
				when dump() is used to dump the rules

* The order of rules declaration (within the same class of routes i.e. within 'get', or 'post' etc...) is important because Trout will try to match them in their declaration order.

* The first rule to output something (on the output buffer) is considered the last rule.

* You may need to call #lastRule() if you are only sending headers.

Example:

			$trout->get('/?', function () { require_once "main.php"; }, "The site's main page");

RESTful Resource routing
------------------------

You may declare a RESTful resource if you provide a controller class.

Example:

			require "inc/controllers/products.php"; # declares class ProductsController
			$trout->resource('/products', "ProductsController");

The controller class should implement any or all of the public methods expected by trout to map HTTP requests to controller actions, that is:

				public function index() { ... }
				public function form() { ... }
				public function show($id) { ... }
				public function edit($id) { ... }
				public function update($id) { ... }
				public function create() { ... }
				public function delete($id) { ... }

Note that some actions expect a parameter '$id' (name it accordingly).

Trout will only create resource routing rules for actions that are implemented. You can for example implement a controller class with only #index() public instance method, in which case only one (corresponding) routing rule will be created by Trout.

If you want to change the request to controller actions mappings you may override Trout
to provide a custom protected $_resource_actions

Examples
========

	require 'lib/Trout.php';
	$tr = new Trout();

	// Now declare some routes...
	$tr->any('.*', function() { / * ... * / }, 'Login required');
	$tr->get('/applications/?', function() { echo "Applications list\n"; }, "List Applications");
	$tr->get('/applications/new', function() { echo "New application form\n"; }, "New Application form");
	$tr->get('/applications/([^/]+)', function($id) { echo "Get Application '$id'\n"; }, "Show Application");
	$tr->put('/applications/([^/]+)', function($id) { echo "Update Application '$id'\n"; }, "Update Application");
	$tr->post('/applications/?', function() { echo "Create an Application\n"; }, "Create an Application");
	$tr->delete('/applications/([^/]+)', function($id) { echo "Delete Application '$id'\n"; }, "Delete Application");

	$tr->dump(); // Shows the routes

	// This will output something like:
		*ANY* .*                                   Login required
		   GET /applications/?                   List Applications
		   GET /applications/new              New Application form
		   GET /applications/([^/]+)              Show Application
		  POST /applications/?                Create an Application
		   PUT /applications/([^/]+)            Update Application
		DELETE /applications/([^/]+)            Delete Application

	// Declare a controller class...
	class StoresController {
		public function index() { echo "Index\n"; }
		public function show($id) { echo "Show '$id'\n"; }
		public function form() { echo "New form\n"; }
		public function update($id) { echo "Update '$id'\n"; }
		public function create() { echo "Create\n"; }
		public function delete($i) { echo "Delete '$i'\n"; }
	}

	// REM: only implemented methods will trigger the creation of resource rules

	// And then declare the resource...
	$tr->resource('/stores', "StoresController");

	// which would generate these routes:
	   GET /stores                                 Stores list
	   GET /stores/new                         new Stores form
	   GET /stores/([^/]+)                         Stores show
	  POST /stores                               Stores create
	   PUT /stores/([^/]+)                       Stores update
	DELETE /stores/([^/]+)                       Stores delete

	// Now let's test the routes

	$verbose = false;
	$tr->swim("GET", "/applications/", $verbose);
	$tr->swim("GET", "/applications/new", $verbose);
	$tr->swim("GET", "/applications/123", $verbose);
	$tr->swim("PUT", "/applications/123", $verbose);
	$tr->swim("POST", "/applications/", $verbose);
	$tr->swim("DELETE", "/applications/123", $verbose);

	// This will output:
		Applications list
		New application form
		Get Application '123'
		Update Application '123'
		Create an Application
		Delete Application '123'

Web server configuration
========================

Apache configuration
--------------------

Set the "One-index-file" scheme in .htaccess

	Options +FollowSymlinks

	RewriteEngine On
	RewriteBase /

	RewriteCond %{REQUEST_FILENAME} !^(.+)\.(css|js|jpg|gif|png|ico|html)$
	# OR
	# RewriteCond %{REQUEST_FILENAME} !-f
	# RewriteCond %{REQUEST_FILENAME} !-d

	RewriteRule ^(.*) index.php [QSA,L]

Declare an apache vhost:

	<VirtualHost *:80>
	    ServerName trout.local
	    DocumentRoot "/path/to/Trout-site"
	    <Directory /path/to/Trout-site>
	        Order allow,deny
	        Allow from all
	    </Directory>
	</VirtualHost>

Set name resolution in /etc/hosts

	[...]
	fe80::1%lo0	trout.local # REM: on OSX, it helps a lot to set the ipv6 local address!
	<IP_ADDRESS>	trout.local
	[...]

Don't forget to restart your web server!

Now you can browse http://trout.local

Customization
=============

Subclassing Trout
-----------------

You can subclass Trout to provide a custom isLastRule() method.
This method is used after swimming each routes to determine if we stop swimming and flush the outputs.
The default behavior is to consider any rule that outputs something as the last rule.

	class MyTrout extends Trout {
		function isLastRule() {
			[...]
			return $true_or_false;
		}
	}

Layout
------

By default the flush function just outputs contents captured during execution of the rules.
The flush() is called when a rule is the last rule.
You can set a custom flush method without needing to subclass like this:

	$tr = new Trout();
	$tr->flush(function () use ($tr) {
		require_once "layout.php"; // layout.php uses $tr to access the $tr->out_buffer (an array of outputs)
	});

Example layout.php:
-------------------

	<!DOCTYPE html>
	<html lang="en">
		<head>
	    	<meta charset="utf-8">
			<title>Trout site;)</title>
		</head>

		<body>

		  	<div class="container">
		  		<?= implode("", $tr->out_buffer); ?>
		  	</div>
		</body>
	</html>

Headers
-------

Sometimes you just need to set a response header for example when redirecting to an uri. In this case you will not output anything.
But the Trout needs to be aware that the current route should be treated as the last rule.
You use the lastRule() method to do so. Example:

	$tr = new Trout();
	function redirect_to ($uri) {
		global $tr;
		$tr->lastRule();
		header('Location: ' + $uri);
	}

Public ivars
------------

	$out_buffer: 	an array of rules outputs
	$method: 		the method of the current request
	$uri: 			the uri of the current request
	$error: 		contains the error message and code in case swim() did not succeed

	$error = array(
		'code' => <error-code-string>,
		'message' => <error-message-string>
	)

example usage of ivars:

	$tr->any('.*', function() use ($tr) {
		/ * Login is REQUIRED * /
		if (!isset($_SESSION['user']) && !preg_match('@^/login@i', $tr->uri)) {
			redirect_to('/login/new');
			return;
		}
	});

Return status
-------------

The "swim loop" is triggered by the swim() method which should be written after routes declaration.
swim() returns false if an error occured or no route was found as last rule else it returns true.
If false, you may look at the $error.
I usually do things like this:

	if (!$tr->swim()) { require_once "error.php"; } // error.php displays the content of $tr->error etc...

Debugging
=========

When something is not working as expected you may:

* set swim() in verbose mode

	$tr->swim(null, null, true);

* test a rule with a custom-made request

	$tr->swim('PUT', '/product/1234', $verbose);

* output the rules to see if they are okay

	$tr->dump();

* check the swim error if any

	var_dump($tr->error);

TODO:
=====

* have a test-suite to test the class. (help appreciated)

Contact:
========

If you find Trout useful drop me a line ;).
If you'd like some new features implemented, feel free to ask me and feel free to fork the project on github.
If you don't like Trout, it's not a problem, try Salmon.

License terms:
==============

The MIT License

Copyright (C) 2012 Thierry Passeron

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.