text:
# Multiple Object Detectors Sample App
This app utilizes two object detection models, with the option of adding additional detection models. This may be helpful for including models that comprise very different libraries. In this example, one model detects numerous objects of small to medium size, and the other has a more limited library but detects some larger objects, such as airplanes, trains, and sofas. As there is some overlap between models, for instance they both detect people, you can compare the prediction confidences. Additionally, the output for each model appears in a separate video frame.

## Requirements
To run this app, you will need an alwaysAI account. Please register at https://alwaysai.co/auth?register=true

## Setup
Easy start up guides can be found following registration. Please see the docs page for more information: https://alwaysai.co/docs/getting_started/introduction.html

### Models
The models used in this app are "alwaysai/mobilenet_ssd" and "alwaysai/ssd_inception_v2_coco_2018_01_28". You can find out more about these models at the following pages:
(alwaysai/mobilenet_ssd): https://alwaysai.co/model-catalog?model=alwaysai/mobilenet_ssd

(alwaysai/ssd_inception_v2_coco_2018_01_28): https://alwaysai.co/model-catalog?model=alwaysai/ssd_inception_v2_coco_2018_01_28

You can alter the code to use different detection models: https://alwaysai.co/docs/application_development/changing_the_model.html

### Colors
For convenience, there is a variable called 'colors' included in the code. Should you alter 'models' to include more than two detection models, also include a new list of tuples to be used as the color to mark up the detected objects in the new model. In the included code, each 'list' contains only one tuple, so all detection boxes for a given model will appear with that color.

## Troubleshooting
If you are having trouble connecting to your edge device, use the CLI configure command to reset the device. Please see the following page for more details: https://alwaysai.co/docs/reference/cli_commands.html

You can also post questions and comments on our Discord Community at: https://discord.gg/alwaysai

repository: alwaysai/multiple-object-detectors

repo_name: alwaysai/multiple-object-detectors


text:
# Select

![NPM<EMAIL_ADDRESS>![npm<EMAIL_ADDRESS>![GitHub top language](https://img.shields.io/github/languages/top/enso-ui/select.svg)
![GitHub issues](https://img.shields.io/github/issues/enso-ui/select.svg)
![npm<EMAIL_ADDRESS>
Vue Select Component

## Usage

Unless where specified otherwise, the components can be used outside of the Enso ecosystem.

### Demo

For live examples and demos, you may visit [laravel-enso.com](https://www.laravel-enso.com)

Check the full documentation at  [docs.laravel-enso.com](https://docs.laravel-enso.com).

### Installation

Install the package:
```
npm i @enso-ui/select
```
Import the desired component(s):
```js
import { VueSelect, EnsoSelect } from '@enso-ui/select/bulma';
import CoreSelect from '@enso-ui/select/renderless';
```

### Exports

`@enso-ui/card/renderless`:
- `VueSelect`,

`@enso-ui/card/bulma`:
- `VueSelect`,
- `EnsoSelect`,

## Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

## License

[ISC](https://opensource.org/licenses/ISC)

license: ISC,MIT

branch_name: refs/heads/master

detected_licenses: ISC MIT

extension: md

gha_license_id: MIT

license_type: permissive


text:
---
layout: post
title: On Keras, Theano, Tensorflow and Transfer Learning
---

*The thread for this issue on github can be found [here](https://github.com/fchollet/keras/issues/6989).*

If you're hearing it for the first time, [Keras](https://keras.io/) is a wrapper that is built on top of [Theano](http://deeplearning.net/software/theano/) and [Tensorflow](https://www.tensorflow.org/), two of the most popular **Deep Learning** libraries for Python. It makes it really easy to build and train Deep Neural Networks without letting us worry about a ton of different issues that might creep up while coding explicitly in Theano or Tensorflow.

Today, I was trying to compare the time taken by Python's Keras module and Matlab's [matconvnet](http://www.vlfeat.org/matconvnet/) package (which is not so widely used) to extract features for a gray-scale image from one of VGG-16's fully connected layers for **Transfer Learning** (more on this later).

**VGG-16** is one of the Deep CNN architectures used by the VGG group for the ImageNet ILSVRC-2014 competition where it won the top honors.
You can read more on that [here](http://www.robots.ox.ac.uk/~vgg/research/very_deep/). The authors have made the models and the weights trained on the ImageNet data readily available and hence VGG16 implementations can now be used out-of-the-box.

Ok, coming to the main topic of this blog post, after I ran my tests it was clear that matconvnet was behaving better than Keras running on Tensorflow Backend. So, I tried running Keras with Theano Backend and the results were even worse, but almost every [issue](https://github.com/fchollet/keras/issues/2156) out there on github pointed out that Tensorflow with Keras was slower than Theano.

Well, so now I got down to checking which performed better on Keras on my machine, Tensorflow or Theano. I recorded how long it took for Keras to load the model, preprocess the image, and extract features from it.

First Tensorflow Backend, `$ python extractvgg.py`
```
{
  "image_data_format": "channels_last",
  "predict time": 1.0201201179997952,
  "preprocessing time": 0.012538709999716957,
  "load time": 2.1383959619997768,
  "image_dim_ordering": "tf"
}
```

Now with Theano Backend, `$ KERAS_BACKEND="theano" python extractvgg.py`
```
{
  "image_data_format": "channels_last",
  "predict time": 3.185495815000195,
  "preprocessing time": 0.016582568000103493,
  "load time": 8.029607248000048,
  "image_dim_ordering": "tf"
}
```

Clearly, Theano is slower. But there's a catch. If you observe, the `image_data_format` and the `image_dim_ordering` are set to **"channel_last"** and **"tf"** respectively, because my default backend is Tensorflow.

Now what's this?

Basically how Tensorflow reads data is *`(N, height, width, channels)` (i.e **channels_last**) and how Theano reads it is `(N, channels, height, width)` (**channels_first**) and because the backend is set to Theano but the image orderings don't match, Keras has to perform extra work shuffling the data dimensions everywhere, and maybe that's what's causing the time burden.

<sub> * N - number of images,  channels = no. of color channels </sub>

So I explicitly set these values.

```python
from keras import backend as K
K.set_image_data_format("channels_first")
K.set_image_dim_ordering("th")
```

Now on running `$ KERAS_BACKEND="theano" python extractvgg.py`, it should've performed better than Tensorflow, but alas, what I got was a long list of errors.

But all works fine when I don't explicitly set the values. I haven't been able to figure out what's causing it, I'll try looking into it when I'm free over the next few days. I've raised an [issue on Github](https://github.com/fchollet/keras/issues/6989), we'll wait and see if someone can reproduce the error and find a solution,or if you can go through it and give it a try, that'd be great too!

The code to the experiments can be found [here](https://gist.github.com/kaushiksk/e6975b9afdff5bbe73e7a703c715b8c6) and I ran these on a CPU with 8GB RAM inside an anaconda environment.

And I just realized I haven't spoken about Transfer Learning here. Well, I'll try to do that in detail in the coming posts! I realize this post might seem erratic to a few but I just thought I'll put it out there. See you next time.

license: MIT


text:
# Atlassian JIRA Service Desk in a Docker container

> Project name: docker-atlassian-jira-service-desk

This project exists in order to enable the deployment of JIRA Service Desk in
the UK Home Office Kubenetes cluster.

This project is based on [Martin Aksel Jensen's](https://github.com/cptactionhank)
project and borrows heavily from that project - many thanks to Martin for Open
Sourcing his work under the MIT License. His project can be found
[on GitHub here](https://github.com/cptactionhank/docker-atlassian-jira-service-desk).

This project is not forked from Martin's project as some modifications may be
required to the `Dockerfile` to ensure certain configuration settings are
maintained and any updates are controlled.

gha_language: Standard ML


text:
![Wealthy Laughing Duck Logo](img/logo.png "Wealthy Laughing Duck Logo")

# Introduction

Wealthy Laughing Duck is a simple logic model that can be adapted by various
applications and platforms. It's supposed to be a **personal finance managing
system**. All duck components are just implementations of this model, e.g. web
interface implemented with JavaScript, Java Thrift server / PHP Thrift client,
python RESTful API (consumed by JavaScript interface) and so on.

Most of duck components are in early development phase so far, but the aim is
to make them mature, stable systems that would rely on different technologies
used. Developers would clone and easily deploy github repositories and examine
the implementation to learn the technologies.

# Contribution

This is more than welcome :) The more contributions and group members there
are, the more the duck project will improve. If you wish to make some commits
to existing repositories - or even create your own repository that illustrates
a technology that's not present in the duck project yet - just contact the
@wealthy-laughing-duck.

# List of duck components

 * [wealthy laughing duck (original project)](https://github.com/wealthy-laughing-duck/wealthy-laughing-duck):

    * Java Thrift server
    * PHP Thrift client
    * JavaScript interface

 * [Backbone/Marionette interface](https://github.com/wealthy-laughing-duck/duck-interface)

 * [Python/Django API](https://github.com/wealthy-laughing-duck/duck-api-rip)

# Standards

As each duck component relies on the same logic model, different systems should
be able to access the same resources, such as: databases, files, file formats,
api designs, etc. To ease components communication with each other, some
standards were introduced:

## Database

 * type: `mysql`
 * host: `localhost`
 * port: `3306`
 * database user: `duck_user`
 * database name: `duck_database`
 * password: `wXyqhWzlF0uO20j8`

Duck components will connect the database according to above parameters by
default.

## Other standards (to be added)

Those will include: database schema, thrift definitions, JSON api design, file
formats.


text:
Converting DLLs
===============

Overview
--------
The code for shared-objects libraries in gcc is simpler than the code for Windows DLLs. For example, Windows has a DllMain() function and DLL_EXPORT declaration on functions. The code needed for a Windows DLL will not directly compile under gcc. So you have to do some conditional compilation to remove some of the extra stuff that Windows needs but gcc does not.

DLL_EXPORT
----------
You need to undefine DLL_EXPORT for gcc builds. Include these lines before DLL_EXPORT is used. For example in header files that declare exported functions:

```
#ifdef WIN32

#undef DLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)

#else

#undef DLL_EXPORT
#define DLL_EXPORT

#endif
```

stdafx.h
--------
You do not need many (if any) of the things in stdafx.h, so you can conditionally only compile them under Windows. For example:

```
#ifdef WIN32

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#include "targetver.h"

// Exclude rarely-used stuff from Windows headers
#define WIN32_LEAN_AND_MEAN

// Windows Header Files:
#include <windows.h>

#endif
```

dllmain.cpp
-----------
You do not need the DllMain() function in gcc, so you can conditionally compile it only under Windows. For example:

```
#ifdef WIN32

BOOL APIENTRY DllMain(
    HMODULE hModule,
    DWORD   ul_reason_for_call,
    LPVOID  lpReserved)
{
  switch (ul_reason_for_call) {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
      break;
  }

  return TRUE;
}

#endif
```

repository: veganaize/make-it-so

repo_name: veganaize/make-it-so


text:
---
description: JSON Web Tokens configurations
---

# 🌐 JWT

## Global Configuration

Here is the default configuration for our JSON Web Tokens integration:

```javascript
cbsecurity : {
    /**
     * --------------------------------------------------------------------------
     * Json Web Tokens Settings
     * --------------------------------------------------------------------------
     * Here you can configure the JWT services for operation and storage.  In order for your firewall
     * to leverage JWT authentication/authorization you must make sure you use the `JwtAuthValidator` as your
     * validator of choice; either globally or at the module level.
     */
    jwt                     : {
        // The issuer authority for the tokens, placed in the `iss` claim
        issuer                          : "",
        // The jwt secret encoding key, defaults to getSystemEnv( "JWT_SECRET", "" )
        // This key is only effective within the `config/Coldbox.cfc`. Specifying within a module does nothing.
        secretKey               : getSystemSetting( "JWT_SECRET", "" ),
        // by default it uses the authorization bearer header, but you can also pass a custom one as well.
        customAuthHeader        : "x-auth-token",
        // The expiration in minutes for the jwt tokens
        expiration              : 60,
        // If true, enables refresh tokens, token creation methods will return a struct instead
        // of just the access token. e.g. { access_token: "", refresh_token : "" }
        enableRefreshTokens        : false,
        // The default expiration for refresh tokens, defaults to 30 days
        refreshExpiration          : 10080,
        // The Custom header to inspect for refresh tokens
        customRefreshHeader        : "x-refresh-token",
        // If enabled, the JWT validator will inspect the request for refresh tokens and expired access tokens
        // It will then automatically refresh them for you and return them back as
        // response headers in the same request according to the customRefreshHeader and customAuthHeader
        enableAutoRefreshValidator : false,
        // Enable the POST > /cbsecurity/refreshtoken API endpoint
        enableRefreshEndpoint      : true,
        // encryption algorithm to use, valid algorithms are: HS256, HS384, and HS512
        algorithm               : "HS512",
        // Which claims neds to be present on the jwt token or `TokenInvalidException` upon verification and decoding
        requiredClaims          : [] ,
        // The token storage settings
        tokenStorage            : {
            // enable or not, default is true
            "enabled"       : true
            // A cache key prefix to use when storing the tokens
            "keyPrefix"     : "cbjwt_",
            // The driver to use: db, cachebox or a WireBox ID
            "driver"        : "cachebox",
            // Driver specific properties
            "properties"    : {
                cacheName : "default"
            }
        }
    }
}
```

### `issuer`

The issuer authority for the tokens is placed in the `iss` claim of the token. If empty, we will use the `event.buildLink()` to create the issuer. By default, our validators also check that tokens are created by the same issuer.

### `secretKey`

The secret key is used to sign the JWT tokens. By default, it will try to load an environment variable called `JWT_SECRET` , if that setting is also empty, we will auto-generate a secret token that will last as long as the ColdFusion application scope lasts. So technically, your secret will rotate only if a secret is not specified.

Also, this key is ignored in modules. To specify a fixed key to be used in your modules, you will have to configure it by adding a cbsecurity key settings in the `moduleSettings` structure within the `config/Coldbox.cfc`.

{% hint style="success" %}
Your secret key will auto-rotate every application scope rotation. Please note that all tokens used after that scope rotation will automatically become invalid.

Please note that we use the `jwt-cfml` library for encoding/decoding tokens. Please [refer to it's documentation](https://forgebox.io/view/jwt-cfml) in order to leverage RS and ES algorithms with certificates.

[https://forgebox.io/view/jwt-cfml](https://forgebox.io/view/jwt-cfml)
{% endhint %}

### `customAuthHeader`

By default, our jwt services will look into the `authorization` header for a bearer token. However, it can also look in a custom header by this name, which defaults to `x-auth-token`. Finally, if not found, it will also look into the `rc` scope for a `rc[ 'x-auth-token' ]` as well.

### `expiration`

The default expiration in minutes for the JWT tokens. Defaults to 60 minutes

### `algorithm`

The encryption algorithm to use for the tokens. The default is **HS512**, but the available ones for are:

* HS256
* HS384
* **HS512**
* RS256
* RS384
* RS512
* ES256
* ES384
* ES512

In the case of the `RS` and `ES` algorithms, asymmetric keys are expected to be provided in unencrypted PEM or JWK format (in the latter case, first deserialize the JWK to a CFML struct). When using PEM, private keys must be encoded in PKCS#8 format.

If your private key is not currently in this format, conversion should be straightforward:

```
$ openssl pkcs8 -topk8 -nocrypt -in privatekey.pem -out privatekey.pk8
```

When decoding tokens, either a public key or certificate can be provided. (If a certificate is provided, the public key will be extracted.)

{% embed url="https://forgebox.io/view/jwt-cfml" %}

### `requiredClaims`

This is an array of claim names that each token MUST have in order to be authenticated. If a token comes in but does not have these claims in the payload structure, it will be deemed invalid.

### `tokenStorage`

By default, our JWT services will store tokens in CacheBox for you in order to be able to invalidate them. We ship with two providers for token storage: `db` and `cachebox`.

#### `Enabled`

By default, the token storage is enabled.

#### `KeyPrefix`

The key prefix to use when storing the keys in permanent storage. Defaults to `cbjwt_`

#### `Driver`

The driver to use. It can be either **db** or **cachebox** or your own WireBox Id for using custom storage.

#### `Properties`

A struct of properties to configure each storage with.

## Refresh Token Configuration

Refresh tokens have several configuration items; check them out in our [refresh token configuration section](../../jwt/refresh-tokens.md#refresh-token-configuration).

repository: ortus-docs/cbsecurity-docs

repo_name: ortus-docs/cbsecurity-docs


text:
![RsFreeBSD](libzfs.png)
[![Build Status](https://travis-ci.org/Inner-Heaven/libzfs-rs.svg?branch=master)](https://travis-ci.org/Inner-Heaven/libzfs-rs)
[![codecov](https://codecov.io/gh/Inner-Heaven/libwzfs-rs/branch/master/graph/badge.svg)](https://codecov.io/gh/Inner-Heaven/libzfs-rs)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FInner-Heaven%2Flibzfs-rs.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FInner-Heaven%2Flibzfs-rs?ref=badge_shield)

> Use ZFS from Rust. (very expiremental)

## Installation
Not yet. Won't be on crate.io until 1.0.

## Usage
Public API for `zpool` interface is almost stable, but until I start work on `zfs` portion I don't want to call it stable.

## How it works
ZFS doesn't have stable API at all. There is `libzfs_core` which supposed to be it, but it really isn't. While `libzfs_core` is somewhat stable `libnvpair` used in it isn't and `libnv` isn't available on Linux. I might embed portable `libnv`. Now the tricky part — `libzfs_core` is just for zfs, there is not `libzpool_core` which means you either have to rely on unstable (in terms of API) `libzpool` or use `zpool(8)`. I decided to use `zpool(8)` because that's a recommended way of doing it.

## Usage
Yeah, not today.

## LICENSE

[BSD-2-Clause](LICENSE).

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FInner-Heaven%2Flibzfs-rs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FInner-Heaven%2Flibzfs-rs?ref=badge_large)

repository: fossabot/libzfs-rs

repo_name: fossabot/libzfs-rs


text:
# Troubleshooting

Below you'll find a collection of answers to commonly reported problems.

## My workflow isn't working because

### Scripts have compiler errors.

#### Error

```plaintext
Scripts have compiler errors.
(Filename: ./Runtime/Utilities/Argv.cpp Line: 361)

Aborting batchmode due to failure:
Scripts have compiler errors.
```

#### Solution

Likely you have a missing script or assembly.

Make sure your branch is clean and all files are indeed present:

- No accidentally ignored files (i.e. ignored `.tmp` might match text mesh pro);
- No tracked files that you expected to be ignored;
- All packages listed;
- No pre-build steps that change your project differently from how that happens locally;

A good way to verify this, is to (locally) clone the Unity project in a new folder and run the build from there.

### Gradle error

#### Error

```plaintext
Error: 3.690 [ERROR] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Command execution: started DaemonCommandExecution[command = Build{id=69dbd5b3-10f2-488e-8640-977da68733f9, currentDir=/github/workspace/Temp/gradleOut/launcher}, connection = DefaultDaemonConnection: socket connection from /<IP_ADDRESS>:33657 to /<IP_ADDRESS>:43866] after 0.0 minutes of idle
```

#### Solution

There are 2 possible solutions:

- Remove emojis from all environment variables (and thus workflow files), or
- Upgrade your project and workflow to use Unity editor version 2020.2 or later.

## I cannot activate because

### 'Non-whitespace before first tag. Line: 0 Column: 1 Char: 㼼' during manual activation

When activating a license on [license.unity3d.com](https://license.unity3d.com/), you may encounter the following error message:

> Non-whitespace before first tag. Line: 0 Column: 1 Char: 㼼

Here's Unity's workaround:

> Unfortunately, this is a known issue our end. The relevant team are in the process of working on a fix as we speak, in the meantime there is a workaround. Try renaming the `alf` file with a command to convert characters on it with a `iconv` command.

#### Solution

```bash
version=v2020.1.12f1 # update this according to your version and file name
iconv -f UTF-8 -t utf-16BE Unity_${version}.alf > Unity_${version}.utf16be.alf
```

### I use my google account to login to Unity, how do I get my username and password?

If you are using google account you can have some issue with activating unity. You just need to go on the unity website, settings, security and change your password. Then use your google email and your new password and it will work just fine ;)

[Source](https://gitlab.com/gableroux/unity3d-gitlab-ci-example/-/issues/149)

repository: edencakir/documentation

branch_name: refs/heads/main

repo_name: edencakir/documentation


text:
# MicroPython Display Driver for SSD1309 monochrome OLED
The library supports drawing lines, shapes, text, sprites and images.  All code is documented and there are demo examples.

Sample XGLCD fonts are included in the fonts folder.  Additional fonts can generated from TTF fonts using a free utility called MikroElektronika [GLCD Font Creator](https://www.mikroe.com/glcd-font-creator).

There are sample images in monoHMSB format.  I’ve included a python app in the utils folder to convert images in common formats such as JPEG and PNG to monoHMSB.

Tutorial on my website [Rototron](https://www.rototron.info/projects/wi-fi-caller-id-blocking/) or click picture below for a YouTube video:

[![SSD1309 Tutorial](https://img.youtube.com/vi/GhXtQNxpKeo/sddefault.jpg)](https://youtu.be/GhXtQNxpKeo)

repository: emerye/bone

repo_name: emerye/bone


text:
# Dice model and supporting classes

A simple dice model is offered as part of the project, including not only a representation for dice groups, but also a way to generate random values from them.

## Dice model

![Dice class diagram][dice-class_diagram]

The [Dice][dice] interface represents its namesake.

[dice-class_diagram]: ./images/dice_class_diagram.png

[dice]: ./apidocs/com/bernardomg/tabletop/dice/Dice.html

repository: Bernardo-MG/dice-notation-java

gha_language: Java

repo_name: Bernardo-MG/dice-notation-java


text:
### Debugging windows

In `Source\WTF\wtf\win\DbgHelperWin.cpp` replace

```#if !defined(NDEBUG)``` with ```#if 1```

Then regular `WTFReportBacktrace()` works.

### Enable core dumps on Linux

```bash
mkdir -p /tmp/coredumps
sudo bash -c 'echo "/tmp/coredumps/core-pid_%p.dump" > /proc/sys/kernel/core_pattern'
ulimit -c unlimited
```

Then to read stack traces run the following command:
```bash
# To find out crashing process name
file core-pid_29652.dump
# Point gdb to the local binary of the crashed process and the core file
gdb $HOME/.cache/ms-playwright/webkit-1292/minibrowser-gtk/WebKitWebProcess core-pid_29652
# Inside gdb update .so library search path to the local one
set solib-search-path /home/yurys/.cache/ms-playwright/webkit-1292/minibrowser-gtk
# Finally print backtrace
bt
```

repository: aslushnikov/playwright

gha_language: TypeScript

repo_name: aslushnikov/playwright


text:
# maven-shade-executable

Example Java application packed to an executable Jar using the [Maven Shade Plugin](http://maven.apache.org/plugins/maven-shade-plugin/).

Create the executable with:

```
mvn package
```

Run the application with:

```
java -jar target/maven-shade-executable-1.0.jar
```

repository: njmittet/java-uber-jar

repo_name: njmittet/java-uber-jar


text:
# Add telemetry agent functions to your Aira instance
Aira source package to input data from sensors. ROS-enabled telemetry agent

# Module For Your Aira Instance. Add Telemetry Agent

The Aira package allows you to read data from a SDS011 sensor and publish to different output channels.
That said Aira is able to form Demand and Result messages and a few other channels.
Also it includes Datalog feature which is still experimental. It could be used to publish data to Substrate based blockchain by Robonomics.

## Get a Package And Build

Assuming you work under [AIRA](https://wiki.robonomics.network/docs/aira-installation-on-vb/) do the following:

```
su - liability
git clone https://github.com/airalab/sensors-connectivity
cd sensors-connectivity
nix build -f release.nix
```

> **Allow liability user to open port `/dev/ttyUSB0`**
>
> Most probably a user liability is not in the dialout group
>
> Either do `sudo adduser liability dialout` or add the line to `/etc/nixos/configuration.nix` on NixOS:
> `users.users.liability.extraGroups = [ "dialout" ];`

## Configuration

Basically you can think of the package as a black box with one input (sensor data) and many outputs.
For now only SDS011 sensor is supported but if you are familiar with Python it'd be easy to add other sensors as well.

Have a look at [configuration](config/default.yaml) file:

```yaml
# Please DO NOT edit this file
# Make a copy instead, make changes and pass the absolute path to the copy in arguments
general:
  publish_interval: 300 # time between two published messages
comstation:
  port: "/dev/ttyUSB0"  # COM port of the device
  work_period: 300      # time between two measurements in seconds
  geo: ""               # Geo coordinates as latitude,longitude
  public_key: ""        # If not provided, COMStation creates itself
tcpstation:
  address: ""           # IP and PORT to listen to, for example <IP_ADDRESS>:31313
  acl:                  # list of known addresses. If not specified accepts from everyone
  # -
  # -
luftdaten:
  enable: true          # whether or not publish to https://luftdaten.info/
robonomics:
  enable: true          # enable use of Robonomics Network
  ipfs_provider: ""     # ipfs endpoint
  ipfs_topic: "airalab.lighthouse.5.robonomics.eth"
datalog:
  enable: false         # enable use of Datalog Robonomics subcommand
  path: ""              # path to Robonomics execution file
  suri: ""              # private key of publisher account
  remote: "wss://substrate.ipci.io"
  dump_interval: 3600   # time between two transactions in seconds
dev:
  sentry: ""
```

At the moment it's possible to publish data to [Luftdaten](https://luftdaten.info/), [Robonomics Network](https://robonomics.network/) and [Datalog](https://github.com/airalab/robonomics).
The last one is experimental!

> DO NOT edit `config/default.yaml` file. Instead make a copy

Play around with the configuration!

Explanation of options:

* `general/publish_interval` - integer number from 1 and above. Tells how often send measurements. Keep in mind that if measurements from sensors come less often than this number connectivity sends last data
* `comstation/port` - valid path to com port, for example `/dev/ttyUSB0`. It is where a sensor is connected to
* `comstation/work_period` - integer from 0 to 1800. For SDS011 sensor 0 means continuous work. Recommended period is 300 seconds
* `comstation/geo` - `lat,lon` a string with two floats separated by a comma. It represents latitude and longitude of a sensor
* `comstation/public_key` - Ed25519 verifying key in hex format. If not provided connectivity generates a new one
* `tcpstation/address` - what address and port listen to. If you are willing to make it open for external connections put `<IP_ADDRESS>` as an address. `31313` is a port chosen by developers. You can pick any port you want but don't forget to change the port in an ESP firmware.
* `tcpstation/acl` - a list of known public keys in hex format
* `luftdaten/enable` - true/false. Whether or not publish data to [Luftdaten](https://devices.sensor.community/). Don't forget to register sensor's mac address on the site
* `robonomics/enable` - true/false. Whether or not publish data to IPFS topic according to Robonomics communication protocol
* `robonomics/ipfs_proveder` - an endpoint for IPFS daemon. By default it's `/ip4/<IP_ADDRESS>/tcp/5001/http` that means local daemon. The endpoint must by in multiaddr format. For example for [Infura.io](https://infura.io/) it would be `/dns/ipfs.infura.io/tcp/5001/https`
* `robonomics/ipfs_topic` - IPFS topic's name. If you want to use [DApp](sensors.robonomics.network) provided by Robonomics team leave it untouched
* `datalog/enable` - true/false. Enable/Disable saving log to [Robonomics on Substrate chain](https://ui.ipci.io/)
* `datalog/path` - full path to `robonomics` executable file. You can find the latest release on [this](https://github.com/airalab/robonomics/releases) page
* `datalog/suri` - a private key from substrate chain account
* `datalog/remote` - an endpoint to substrate instance
* `datalog/dump_interval` - specify a period of time for collecting log in seconds
* `dev/sentry` - for development purpose. If you have a [Sentry.io](https://sentry.io/) account you can put sentry's credentials in here

## Scenario #1: Connect SDS011 to serial port

The easiest and the most straight forward way to connect your sensor to the network is using serial port

Connect you SDS011 sensor to a USB port, let's assume it got `/dev/ttyUSB0` address. Copy configuration file:

```
cp config/default.yaml config/my.yaml
```

and make it look like:

```yaml
general:
  publish_interval: 15 # time between two published messages
comstation:
  port: "/dev/ttyUSB0"  # COM port of the device
  work_period: 300      # time between two measurements in seconds
  geo: "59.944954,30.294534"  # Geo coordinates as latitude,longitude
  public_key: ""        # If not provided, COMStation creates itself
tcpstation:
  address: ""           # IP and PORT to listen to, for example <IP_ADDRESS>:31313
  acl:                  # list of known addresses. If not specified accepts from everyone
  # -
  # -
luftdaten:
  enable: true          # whether or not publish to https://luftdaten.info/
robonomics:
  enable: true          # enable use of Robonomics Network
  ipfs_provider: ""     # ipfs endpoint
  ipfs_topic: "airalab.lighthouse.5.robonomics.eth"
datalog:
  enable: false         # enable use of Datalog Robonomics subcommand
  path: ""              # path to Robonomics execution file
  suri: ""              # private key of publisher account
  remote: "wss://substrate.ipci.io"
  dump_interval: 3600   # time between two transactions in seconds
dev:
  sentry: ""
```

Launch the agent:

```
source result/setup.bash
roslaunch sensors_connectivity agent.launch config:=/var/lib/liability/sensors-connectivity/config/my.yaml
```

## Scenario #2: Connect SDS011 via TCP

### ESP Board Preparation

First you need to generate a signing/verifying keys pair. To do so:

```
source result/setup.bash
./utils/generate_secrets.py -o ./boards/esp/ESP_TCP/
```

Now you have a `./boards/esp/ESP_TCP/secrest.h` file. The script also outputs verifying key, let's say it is `49de10e0762517d209b7e61d8fe47e3fc06d08609707aeb290b425847cd2ce56`

Now open `./boards/esp/ESP_TCP/ESP_TCP.ino` file in Arduino IDE. Install dependencies:

* [ESP Boards](https://arduino-esp8266.readthedocs.io/en/latest/installing.html)
* [SdsDustSensor library](https://github.com/lewapek/sds-dust-sensors-arduino-library). Could be installed by searching SdsDustSensor in `Sketch -> Include library -> Manage libraries` (Hotkey: `Ctrl + Shift + I`)
* Extract [Crypto](https://github.com/rweather/arduinolibs/tree/master/libraries/Crypto) folder to `~/Arduino/libraries`

You need to set `STASSID`, `STAPSK`, `HOST`, `GEO_LAT`, `GEO_LON`. Optional: `rxPin`, `txPin`, `work_period`, `port`

```
#ifndef STASSID
#define STASSID ""
#define STAPSK  ""
#endif

#define rxPin 2     // D2 on ESP TX of the sensor is connected to RX of the board
#define txPin 3     // D3 on ESP and vice versa sensor's rx is connected to boards's tx

const char* host = "HOST";
const uint16_t port = 31313;

const float GEO_LAT = 0.0;
const float GEO_LON = 0.0;

const byte work_period = 5;     // minutes
```

Upload the firmware

### Connectivity Configuration

```
cp config/default.yaml config/my.yaml
```

```yaml
general:
  publish_interval: 15 # time between two published messages
comstation:
  port: ""              # COM port of the device
  work_period: 300      # time between two measurements in seconds
  geo: ""               # Geo coordinates as latitude,longitude
  public_key: ""        # If not provided, COMStation creates itself
tcpstation:
  address: "<IP_ADDRESS>:31313"  # IP and PORT to listen to, for example <IP_ADDRESS>:31313
  acl:                  # list of known addresses. If not specified accepts from everyone
    - 49de10e0762517d209b7e61d8fe47e3fc06d08609707aeb290b425847cd2ce56 # PUT YOUR VERIFYING KEY HERE
luftdaten:
  enable: true          # whether or not publish to https://luftdaten.info/
robonomics:
  enable: true          # enable use of Robonomics Network
  ipfs_provider: ""     # ipfs endpoint
  ipfs_topic: "airalab.lighthouse.5.robonomics.eth"
datalog:
  enable: false         # enable use of Datalog Robonomics subcommand
  path: ""              # path to Robonomics execution file
  suri: ""              # private key of publisher account
  remote: "wss://substrate.ipci.io"
  dump_interval: 3600   # time between two transactions in seconds
dev:
  sentry: ""
```

> Do not forget to open the port in system firewall
>
> On NixOS you can do:
> ```
> networking.firewall.allowedTCPPorts = [ 31313 ];
> ```

Launch connectivity:

```
roslaunch sensors_connectivity agent.launch config:=/var/lib/liability/sensors-connectivity/config/my.yaml
```

When initialization passed power your board or reset it. It's needed because the very first data from the board is header.
If connectivity doesn't receive the header it drops the connection.

If you need to connect more sensors to a single instance of connectivity repeat [ESP Board Preparation](#esp-board-preparation) for every sensor.
Then add all the keys to the configuration file, restart connectivity and power up/reset every board.

## Scenario #3: Connect Multiple Sensors and Publish to Datalog

In order to upload a firmware to ESP board read [ESP Board Preparation](#esp-board-preparation) section.

Connect SDS011 to a serial port.

### Install Robonomics

From `root` user do:

```
echo "https://github.com/airalab/airapkgs/archive/nixos-unstable.tar.gz nixos" > /root/.nix-channels
nix-channel --update
```

Then edit `/etc/nixos/configuration.nix` and add:

```
  environment.systemPackages = with pkgs; [
        substrate-node-robonomics-bin
  ];
```

Run rebuild and find out where `robonomics` is:
```
nixos-rebuild switch
whereis robonomics
```

Let's assume you got the following path: `/nix/store/2gz2ik17w5xad8w819bsb05a23pbjbya-system-path/bin/robonomics`

### Configuration

```yaml
general:
  publish_interval: 15 # time between two published messages
comstation:
  port: "/dev/ttyUSB0"  # COM port of the device
  work_period: 300      # time between two measurements in seconds
  geo: "59.944954,30.294534"  # Geo coordinates as latitude,longitude
  public_key: ""        # If not provided, COMStation creates itself
tcpstation:
  address: "<IP_ADDRESS>:31313"  # IP and PORT to listen to, for example <IP_ADDRESS>:31313
  acl:                  # list of known addresses. If not specified accepts from everyone
    - 49de10e0762517d209b7e61d8fe47e3fc06d08609707aeb290b425847cd2ce56 # PUT YOUR VERIFYING KEY HERE
luftdaten:
  enable: true          # whether or not publish to https://luftdaten.info/
robonomics:
  enable: true          # enable use of Robonomics Network
  ipfs_provider: ""     # ipfs endpoint
  ipfs_topic: "airalab.lighthouse.5.robonomics.eth"
datalog:
  enable: false         # enable use of Datalog Robonomics subcommand
  path: "/nix/store/2gz2ik17w5xad8w819bsb05a23pbjbya-system-path/bin/robonomics"              # path to Robonomics execution file
  suri: "0x....."       # private key of publisher account
  remote: "wss://substrate.ipci.io"
  dump_interval: 3600   # time between two transactions in seconds
dev:
  sentry: ""
```

Start connectivity first and then all your boards:
```
su - liability
cd sensors-connectivity
source result/setup.bash
roslaunch sensors_connectivity agent.launch config:=/var/lib/liability/sensors-connectivity/config/my.yaml
```

## Make a Service

It's way more convenient to launch the code as a systemd service. Add the following in `/etc/nixos/configuration.nix`:

```
systemd.services.connectivity = {
    requires = [ "roscore.service" ];
    after = ["roscore.service" ];
    wantedBy = [ "multi-user.target" ];
    environment.ROS_MASTER_URI =  "http://localhost:11311";
    script = ''
        source /var/lib/liability/sensors-connectivity/result/setup.bash \
        && roslaunch sensors_connectivity agent.launch config:=/var/lib/liability/sensors-connectivity/config/my.yaml
    '';
    serviceConfig = {
        Restart = "on-failure";
        StartLimitInterval = 0;
        RestartSec = 60;
        User = "liability";
    };
};
```

Technically it's not necessary to specify the `default.yaml` configuration file, but if you did changes please put the absolute path to `config` parameter.

After that run `nixos-rebuild switch`. The service should be up and running

## Check Your Connectivity Service

Usually log files are stored in `/var/lib/liability/.ros/log/latest/connectivity-worker-1.log`
To view logs do:
```
tail -f /var/lib/liability/.ros/log/latest/connectivity-worker-1.log
```

Also you can use `journalctl` but remember output is buffered so it could take some time before output appears
```
journalctl -u connectivity -f
```

Example of output:
```bash
root@hq-nuc-sds011> tail /var/lib/liability/.ros/log/latest/connectivity-worker-1.log -f
[rosout][INFO] 2020-06-02 13:55:48,427: Starting process...
[rosout][INFO] 2020-06-02 13:55:48,430: airalab-com-v0.1.0: [{MAC: 94c6911b42d6, Uptime: 0:00:30.997699, M: {Public: 4aebc455889ee993a615c479eb069079f643a8210aca0c866f0a7d126b8160f2, PM2.5: 8.3, PM10: 16.7, geo: (0.0,0.0), timestamp:<PHONE_NUMBER>}}]
[rosout][INFO] 2020-06-02 13:55:48,520: new connection from ('<IP_ADDRESS>', 57336)
[rosout][INFO] 2020-06-02 13:55:48,865: LuftdatenFeeder: sent successfuly
[rosout][INFO] 2020-06-02 13:55:48,868: RobonomicsFeeder: {"4aebc455889ee993a615c479eb069079f643a8210aca0c866f0a7d126b8160f2": {"model": 2, "timestamp":<PHONE_NUMBER>, "measurement": {"pm25": 8.3, "pm10": 16.7, "geo": "0.0,0.0"}}}
[rosout][INFO] 2020-06-02 13:55:48,877: airalab-tcp-v0.1.0: []
[rosout][INFO] 2020-06-02 13:55:50,524: Peer name: ('<IP_ADDRESS>', 57336)
[rosout][INFO] 2020-06-02 13:55:50,527: Unknown peer yet
[rosout][INFO] 2020-06-02 13:55:50,531: Welcome to the party: (5dff08595b74db99a997dab6cab851092d27373168f5b04c1035fd2c0a520ee3,2)
[rosout][INFO] 2020-06-02 13:56:03,880: Starting process...
[rosout][INFO] 2020-06-02 13:56:03,884: airalab-com-v0.1.0: [{MAC: 94c6911b42d6, Uptime: 0:00:46.451368, M: {Public: 4aebc455889ee993a615c479eb069079f643a8210aca0c866f0a7d126b8160f2, PM2.5: 8.3, PM10: 16.7, geo: (0.0,0.0), timestamp:<PHONE_NUMBER>}}]
[rosout][INFO] 2020-06-02 13:56:04,241: LuftdatenFeeder: sent successfuly
[rosout][INFO] 2020-06-02 13:56:04,246: RobonomicsFeeder: {"4aebc455889ee993a615c479eb069079f643a8210aca0c866f0a7d126b8160f2": {"model": 2, "timestamp":<PHONE_NUMBER>, "measurement": {"pm25": 8.3, "pm10": 16.7, "geo": "0.0,0.0"}}}
[rosout][INFO] 2020-06-02 13:56:04,266: airalab-tcp-v0.1.0: []
[rosout][INFO] 2020-06-02 13:56:14,330: Peer name: ('<IP_ADDRESS>', 57336)
[rosout][INFO] 2020-06-02 13:56:14,334: I know you buddy!
[rosout][INFO] 2020-06-02 13:56:14,340: {Public: 5dff08595b74db99a997dab6cab851092d27373168f5b04c1035fd2c0a520ee3, PM2.5: 3.8, PM10: 7.1, geo: (53.507675,49.252785), timestamp:<PHONE_NUMBER>}
```

repository: KiichiSugihara/sensors-connectivity

repo_name: KiichiSugihara/sensors-connectivity


text:
# bench-rs

![Rust](https://github.com/juzi5201314/bench-rs/workflows/Rust/badge.svg)
[![docs.rs](https://docs.rs/bench-rs/badge.svg)](https://docs.rs/bench-rs)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/juzi5201314/bench-rs)
![Downloads](https://img.shields.io/crates/d/bench-rs)
![GitHub](https://img.shields.io/github/license/juzi5201314/bench-rs)
[![Crates.io](https://img.shields.io/crates/v/bench-rs)](https://crates.io/crates/bench-rs)

A benchmark library.

- [x] Stable rust (no black_box)
- [x] Beautiful output
- [x] Async support
- [x] Custom async runtime
- [x] Memory usage
- [x] Custom formatting
- [ ] Intuitive numerical units
- [x] Support custom memory allocator

### Examples
```
$ cargo test --release --color=always -q --package bench-rs --test bench --no-fail-fast -- --test-threads=1 --nocapture
```
Look `./tests/bench.rs`

![image.png](https://i.loli.net/2020/09/23/RsCfvr4OIVyj9Lc.png)

### black_box
I don't know how to implement the black box.

Please use [core::hint::black_box](https://doc.rust-lang.org/core/hint/fn.black_box.html). (unstable)

If you have a better idea, welcome to submit a pull request or open an issue

### global_allocator
In order to detect Memory usage, `bench-rs` modified global_allocator.
This will make it impossible to use other allocators.
If you need to use other allocator:

Change your allocator: (if your allocator is `std::alloc::System`)
```
use std::alloc::System;
use bench_rs::{TrackAllocator, new_allocator};

#[global_allocator]
pub static GLOBAL: TrackAllocator<System> = new_allocator!(System);
```

Turn off default features:
```
[dependencies]
bench-rs = { version = "*", default-features = false }
```

Import the allocator named `GLOBAL`:
```
use bench_rs::bench;
use yourlib::GLOBAL;

#[bench]
fn ...
```
If your allocator name is not `GLOBAL`, please set its alias to `GLOBAL`:

`use yourlib::OtherAllocator as GLOBAL`

Because the bencher-macro will look for `GLOBAL.counter()` and `GLOBAL.peak()`
at the same level of the bench function.

---

> I am a rust beginner, please correct me if the code is bad. Thank you
>
> Contributions welcome

repository: frankfanslc/bench-rs

repo_name: frankfanslc/bench-rs


text:
# homebrew-besu
 [![RocketChat chat](https://open.rocket.chat/images/join-chat.svg)](https://chat.hyperledger.org/channel/besu)
 [![Documentation Status](https://readthedocs.org/projects/hyperledger-besu/badge/?version=latest)](https://besu.hyperledger.org/en/latest/?badge=latest)
 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/hyperledger/homebrew-besu/blob/master/LICENSE)
Homebrew Tap for besu.

## Getting started
Add the tap, and install:

```
brew tap hyperledger/besu
brew install besu
```
Run the besu executable:

```
besu --help
```

Refer to the [besu docs](https://besu.hyperledger.org) for further information.

To upgrade besu:
```
brew tap hyperledger/besu
brew upgrade besu
```

repository: sambacha/homebrew-besu

repo_name: sambacha/homebrew-besu


text:
![Banner](/docs/beta-banner.png)

# BETA release Overview
This page contains information about current public beta's of the Jabra Browser SDK, which customers can use to test and prepare for new versions in advance.

**Warning**: The software released here is considered **unstable**, possibly **untested** and **might be updated at any time**. Use at **your own risk**. If you want to use something stable and tested please use our stable [non-beta version](README.md).

For general information about the library please refer to our [main documentation page](README.md)

# BETA Documentation
* [Typescript API definition/documentation](https://gnaudio.github.io/jabra-browser-integration/JavaScriptLibrary/jabra.browser.integration-3.0.d.ts)
* [Changelog](CHANGELOG.md)

# BETA Javascript API
* [Javascript API 3.0 file download link](https://gnaudio.github.io/jabra-browser-integration/JavaScriptLibrary/jabra.browser.integration-3.0.js).

*For the API we adheres to semantic versioning
so increases in the major version component of the version number between releases indicate breaking changes where developers using the software
may need to change their code when updating. Increases in minor version indicates that all changes ought to be backwards compatible.*

# Native Chromehost BETA downloads
| Operating systems             | Chrome host native download             | Description                             |
| ----------------------------- | --------------------------------------- | --------------------------------------- |
| Windows (Windows 7 or newer)  | [JabraChromeHost2.1.0-beta11](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-browser-integration/download/JabraChromeHost2.1.0-beta11.msi) | Chromehost 2.1.0-beta11 Beta |
| macOS (10.x)                  | [JabraChromeHost2.1.0-beta11](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-browser-integration/download/JabraChromeHost2.1.0-beta11.dmg) | Chromehost 2.1.0-beta11 Beta |
| Windows (Windows 7 or newer)  | [JabraChromeHost2.1.0-beta9](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-browser-integration/download/JabraChromeHost2.1.0-beta9.msi) | Chromehost 2.1.0-beta9 Beta |
| macOS (10.x)                  | [JabraChromeHost2.1.0-beta9](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-browser-integration/download/JabraChromeHost2.1.0-beta9.dmg) | Chromehost 2.1.0-beta9 Beta |

# WebExtension BETA
[![Banner](/docs/ChromeWebStoreBadge.png)](https://chrome.google.com/webstore/detail/jabra-browser-integration/igcbbdnhomedfadljgcmcfpdcoonihfe)

**Important notes about BETA web extension **:
1. The BETA browser extension should not be active at the same time as the standard release version of the browser extension. Please deactivate or uninstall the stable browser extension before installing the BETA browser extension. Running both extensions simultaneously are NOT supported.

# BETA Development tools/demos
* [Call control test](https://gnaudio.github.io/jabra-browser-integration/beta/development/) - test page to try out basic call control in the library
* [Library api test](https://gnaudio.github.io/jabra-browser-integration/beta/test/) - advanced test page that allows detailed testing of individual API calls)
* [Playback demo with auto selection](https://gnaudio.github.io/jabra-browser-integration/beta/playback/) - demo page showing auto selection of jabra device with simple audio playback example
* [Amazon Connect client demo](https://gnaudio.github.io/jabra-browser-integration/beta/amazonconnectclient/) - demo showing Jabra and Amazon Connect integration

repository: kevinmiles/jabra-browser-integration

repo_name: kevinmiles/jabra-browser-integration


text:
# controller_configuration.job_templates
## Description
An Ansible Role to create Job Templates on Ansible Controller.

## Requirements
ansible-galaxy collection install  -r tests/collections/requirements.yml to be installed
Currently:
  awx.awx
  or
  ansible.tower

## Variables

### Authentication
|Variable Name|Default Value|Required|Description|Example|
|:---:|:---:|:---:|:---:|:---:|
|`controller_state`|"present"|no|The state all objects will take unless overriden by object default|'absent'|
|`controller_hostname`|""|yes|URL to the Ansible Controller Server.|<IP_ADDRESS>|
|`controller_validate_certs`|`True`|no|Whether or not to validate the Ansible Controller Server's SSL certificate.||
|`controller_username`|""|yes|Admin User on the Ansible Controller Server.||
|`controller_password`|""|yes|Controller Admin User's password on the Ansible Controller Server.  This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook.||
|`controller_oauthtoken`|""|yes|Controller Admin User's token on the Ansible Controller Server.  This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook.||
|`controller_templates`|`see below`|yes|Data structure describing your job template or job templates Described below.||

### Secure Logging Variables
The following Variables compliment each other.
If Both variables are not set, secure logging defaults to false.
The role defaults to False as normally the add job_template task does not include sensitive information.
controller_configuration_job_templates_secure_logging defaults to the value of controller_configuration_secure_logging if it is not explicitly called. This allows for secure logging to be toggled for the entire suite of configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_job_templates_secure_logging`|`False`|no|Whether or not to include the sensitive Job Template role tasks in the log.  Set this value to `True` if you will be providing your sensitive values from elsewhere.|
|`controller_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared accross multiple roles, see above.|

## Data Structure
### Variables
|Variable Name|Default Value|Required|Type|Description|
|:---:|:---:|:---:|:---:|:---:|
|`name`|""|yes|str|Name of Job Template|
|`new_name`|""|str|no|Setting this option will change the existing name (looked up via the name field).|
|`copy_from`|""|no|str|Name or id to copy the job template from. This will copy an existing credential and change any parameters supplied.|
|`description`|`False`|no|str|Description to use for the job template.|
|`execution_environment`|""|no|str|Execution Environment to use for the job template.|
|`job_type`|`run`|no|str|The job type to use for the job template(run, check).|
|`inventory`|""|no|str|Name of the inventory to use for the job template.|
|`organization`|""|no|str|Organization the job template exists in. Used to help lookup the object, cannot be modified using this module. The Organization is inferred from the associated project|
|`project`|""|no|str|Name of the project to use for the job template.|
|`playbook`|""|no|str|Path to the playbook to use for the job template within the project provided.|
|`credentials`|""|no|list|List of credentials to use for the job template.|
|`forks`|""|no|int|The number of parallel or simultaneous processes to use while executing the playbook.|
|`limit`|""|no|str|A host pattern to further constrain the list of hosts managed or affected by the playbook|
|`verbosity`|""|no|int|Control the output level Ansible produces as the playbook runs. 0 - Normal, 1 - Verbose, 2 - More Verbose, 3 - Debug, 4 - Connection Debug .|
|`extra_vars`|""|no|dict|Specify extra_vars for the template.|
|`job_tags`|""|no|str|Comma separated list of the tags to use for the job template.|
|`force_handlers`|""|no|bool|Enable forcing playbook handlers to run even if a task fails.|
|`skip_tags`|""|no|str|Comma separated list of the tags to skip for the job template.|
|`start_at_task`|""|no|str|Start the playbook at the task matching this name.|
|`diff_mode`|""|no|bool|Enable diff mode for the job template |
|`use_fact_cache`|""|no|bool|Enable use of fact caching for the job template.|
|`host_config_key`|""|no|str|Allow provisioning callbacks using this host config key.|
|`ask_scm_branch_on_launch`|""|no|bool|Prompt user for scm branch on launch.|
|`ask_diff_mode_on_launch`|""|no|bool|Prompt user to enable diff mode show changes to files when supported by modules.|
|`ask_variables_on_launch`|""|no|bool|Prompt user for extra_vars on launch.|
|`ask_limit_on_launch`|""|no|bool|Prompt user for a limit on launch.|
|`ask_tags_on_launch`|""|no|bool|Prompt user for job tags on launch.|
|`ask_skip_tags_on_launch`|""|no|bool|Prompt user for job tags to skip on launch.|
|`ask_job_type_on_launch`|""|no|bool|Prompt user for job type on launch.|
|`ask_verbosity_on_launch`|""|no|bool|Prompt user to choose a verbosity level on launch.|
|`ask_inventory_on_launch`|""|no|bool|Prompt user for inventory on launch.|
|`ask_credential_on_launch`|""|no|bool|Prompt user for credential on launch.|
|`survey_enabled`|""|no|bool|Enable a survey on the job template.|
|`survey_spec`|""|no|dict|JSON/YAML dict formatted survey definition.|
|`survey`|""|no|dict|JSON/YAML dict formatted survey definition. Alias of survey_spec|
|`become_enabled`|""|no|bool|Activate privilege escalation.|
|`allow_simultaneous`|""|no|bool|Allow simultaneous runs of the job template.|
|`timeout`|""|no|int|Maximum time in seconds to wait for a job to finish (server-side).|
|`instance_groups`|""|no|list|list of Instance Groups for this Job Template to run on.|
|`job_slice_count`|""|no|int|The number of jobs to slice into at runtime. Will cause the Job Template to launch a workflow if value is greater than 1.|
|`webhook_service`|""|no|str|Service that webhook requests will be accepted from (github, gitlab)|
|`webhook_credential`|""|no|str|Personal Access Token for posting back the status to the service API|
|`scm_branch`|""|no|str|Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true.|
|`labels`|""|no|list|The labels applied to this job template|
|`custom_virtualenv`|""|no|str|Local absolute file path containing a custom Python virtualenv to use.|
|`notification_templates_started`|""|no|list|The notifications on started to use for this organization in a list.|
|`notification_templates_success`|""|no|list|The notifications on success to use for this organization in a list.|
|`notification_templates_error`|""|no|list|The notifications on error to use for this organization in a list.|
|`state`|`present`|no|str|Desired state of the resource.|

### Surveys
Refer to the [controller Api Guide](https://docs.ansible.com/ansible-tower/latest/html/towerapi/api_ref.html#/Job_Templates/Job_Templates_job_templates_survey_spec_create) for more information about forming surveys
|Variable Name|Variable Description|
|:---:|:---:|
|`name`|Name of the survey|
|`description`|Description of the survey|
|`spec`|List of survey items, each a dictionary containing the following fields|
|`question_name`|Name of the field/item|
|`question_description`|Longer description|
|`required`|Boolean expressing if an answer is required|
|`type`|One of `text`, `password`, `integer`, `float`, `multiplechoice`or `multiselect`|
|`variable`|Name of Ansible Variable where to put the answer|
|`default`|Default value for the variable|
|`min`|Minimum value for a number type|
|`max`|Maximum value for a number type|
|`choices`|List of choices for a "multi" type|
|`new_question`|Boolean???|

### Standard Project Data Structure
#### Json Example
```json
---
{
    "templates": [
        {
            "name": "Survey Template with vars",
            "job_type": "run",
            "inventory": "Demo Inventory",
            "survey_enabled": true,
            "survey": "{{ lookup('template', 'template_surveys/basic_survey.json') | regex_replace('\\n', '') }}",
            "project": "controller Config",
            "playbook": "helloworld.yml",
            "credentials": [
                "Demo Credential"
              ],
            "extra_vars": "{{ survey_extra_vars }}",
            "notification_templates_error": [
                "Slack_for_testing"
              ]
        },
        {
            "name": "No Survey Template no vars",
            "job_type": "run",
            "inventory": "Demo Inventory",
            "project": "controller Config",
            "playbook": "helloworld.yml",
            "credentials": [
                "Demo Credential"
              ],
            "survey": {},
            "extra_vars": "{{ empty_master_vars }}",
            "notification_templates_error": [
                "Slack_for_testing"
              ]
        }
    ]
}
```
#### Yaml Example
```yaml
---
templates:
- name: Survey Template with vars
  job_type: run
  inventory: Demo Inventory
  survey_enabled: true
  survey: "{{ lookup('template', 'template_surveys/basic_survey.json') | regex_replace('\\n', '') }}"
  project: controller Config
  playbook: helloworld.yml
  credentials:
  - Demo Credential
  extra_vars: "{{ survey_extra_vars }}"
  notification_templates_error:
  - Slack_for_testing
- name: No Survey Template no vars
  job_type: run
  inventory: Demo Inventory
  project: controller Config
  playbook: helloworld.yml
  credentials:
  - Demo Credential
  survey: {}
  extra_vars: "{{ empty_master_vars }}"
  notification_templates_error:
  - Slack_for_testing
```
### Survey Data Structure
#### Json Example
```json
{
    "name": "Basic Survey",
    "description": "Basic Survey",
    "spec": [
      {
        "question_description": "Name",
        "min": 0,
        "default": "",
        "max": 128,
        "required": true,
        "choices": "",
        "new_question": true,
        "variable": "basic_name",
        "question_name": "Basic Name",
        "type": "text"
      },
      {
        "question_description": "Choosing yes or no.",
        "min": 0,
        "default": "yes",
        "max": 0,
        "required": true,
        "choices": "yes\nno",
        "new_question": true,
        "variable": "option_true_false",
        "question_name": "Choose yes or no?",
        "type": "multiplechoice"
      },
      {
        "question_description": "",
        "min": 0,
        "default": "",
        "max": 0,
        "required": true,
        "choices": "group1\ngroup2\ngroup3",
        "new_question": true,
        "variable": "target_groups",
        "question_name": "Select Group:",
        "type": "multiselect"
      }
    ]
  }
```
## Playbook Examples
### Standard Role Usage
```yaml
---
- name: Playbook to configure ansible controller post installation
  hosts: localhost
  connection: local
  # Define following vars here, or in controller_configs/controller_auth.yml
  # controller_hostname: ansible-controller-web-svc-test-project.example.com
  # controller_username: admin
  # controller_password: changeme
  pre_tasks:
    - name: Include vars from controller_configs directory
      include_vars:
        dir: ./yaml
        ignore_files: [controller_config.yml.template]
        extensions: ["yml"]
  roles:
    - {role: redhat_cop.controller_configuration.job_templates, when: controller_templates is defined}
```
## License
[MIT](LICENSE)

## Author
[Sean Sullivan](https://github.com/sean-m-sullivan)


text:
+++
title = "Prepare Blueprint(s)"
weight = 30
+++

While the instances are being replicated, let's configure a **CloudEndure Target Machine Blueprint**, which is the specification of your Target machine (replicated instance) that will be launched in AWS. It includes parameters such as machine type (for example t3.medium), **subnet** where the machine should be running, **private IP** address and disk types.

To configure the Blueprint, go to the **Machines** tab and click on the name of the machine that you want to configure. Then navigate to the **BLUEPRINT** section.

![CE-BluePrints](/ce/CE-BluePrints.png)

Provide the following information:

| Parameter                                  | Value                                                        |
| ------------------------------------------ | ------------------------------------------------------------ |
| Machine Type                           | t3.small                                    |
| Launch Type                            | On demand
| Target subnet                          | TargetVPC-public-subnet-b                                       |
| Security group                         | Create new |
| Private IP                             | Create new |
| Tags                                    | Add a 'Name' Tag with value 'Webserver' |

Everything else will be left as default, but review it to understand the available configuration options available for your target instance.

{{% notice warning %}}
If you're going through this workshop on an AWS Event, you must select **Machine type** not larger than *.large, otherwise your IAM privileges will prevent you from operating on created instances later in the workshop.
{{% /notice %}}

{{% notice tip %}}
If you don't see input fields on the BLUEPRINT page or it's hard to scroll through them, scale down your screen (Control -).
{{% /notice %}}

When done, click the **SAVE BLUEPRINT** button at the bottom of the page.

gha_language: CSS

gha_license_id: NOASSERTION


text:
# CHANGELOG

## 1.2.0

- set `UserCmdCheckStatus` to `1` by default
- set `ssh_password` attribute to `nil` by default (fixes passwordless ssh key)
- fix Rubocop warnings

## 1.1.0

- add option to ignore partial files (`*.pem`)

## 1.0.0

- move clients building logic into ruby_block resource

## 0.9.0

- initial commit of `backuppc-server`

repository: kabisa-cookbooks/backuppc-server

repo_name: kabisa-cookbooks/backuppc-server


text:
---
title: Reflection (Android)
homepage: https://www.attachmate.com/products/reflection/unix/
license: Proprietary
first-release:
    date: 2005  # according to Wikipedia
latest-release:
    version: <IP_ADDRESS>
    date: 2016-03-28
#changelog: TODO
client: yes
server: no
platforms:
    - android
#
# TODO: They also have a client / server for Unix and Windows, called
#  Reflection for Secure IT (formerly F-Secure SSH), see
#   https://www.attachmate.com/products/reflection-security-it/
#
# https://www.attachmate.com/library/docs/reflection-for-secure-it-client-for-unix.html
# https://www.attachmate.com/library/docs/reflection-for-secure-it-client-for-windows-tech-specs.html
# https://www.attachmate.com/library/docs/reflection-for-secure-it-server-for-unix-tech-specs.html
# https://www.attachmate.com/library/docs/reflection-for-secure-it-server-for-windows-tech-specs.html
#
#
# Beyond that, they even have a "web client"?

protocols:
    cipher:
        - aes128-ctr
        - aes192-ctr
        - aes256-ctr
        - aes256-cbc
        -<EMAIL_ADDRESS>        - aes192-cbc
        - aes128-cbc
        - blowfish-cbc
        - arcfour128
        - arcfour
        - cast128-cbc
        - 3des-cbc
    compression:
        - none
    hostkey:
        - ssh-rsa
        - ssh-dss
    kex:
        - diffie-hellman-group14-sha1
        - diffie-hellman-group-exchange-sha1
        - diffie-hellman-group1-sha1
    mac:
        - hmac-sha1
        - hmac-sha1-96
        - hmac-md5
        - hmac-md5-96
        - hmac-ripemd160
        -<EMAIL_ADDRESS>#    userauth:
#        - unknown

first_kex_packet_follows: 0
ident: "SSH-2.0-libssh2_1.4.3"
based-on: "[libssh2](/impls/libssh2.html)"
---
* Mobile client for Android.
* There is also an [iOS version](/impls/reflection-ios.html).
* Available on
    [Google Play](https://play.google.com/store/apps/details?id=rTablet.Android).
* They also offer clients and servers for Unix and Windows, under the name Reflection for Secure IT
  (formerly known as F-Secure SSH). These should be covered by a separate entry.
* 2015-12-05: Version <IP_ADDRESS> identifies itself on the wire as `SSH-2.0-libssh2_1.4.3`
* 2016-05-11: Version <IP_ADDRESS> identifies itself on the wire as `SSH-2.0-libssh2_1.4.3`

repository: kruton/ssh-comparison

branch_name: refs/heads/gh-pages

gha_language: SCSS

repo_name: kruton/ssh-comparison


text:
# Hask

https://wiki.haskell.org/Hask
https://wiki.haskell.org/Category_theory/Natural_transformation
https://wiki.haskell.org/Category:Theoretical_foundations
https://www.stephendiehl.com/posts/monads.html
https://en.wikibooks.org/wiki/Haskell/Category_theory

𝗛𝗮𝘀𝗸 is a category of Haskell types as objects and Haskell functions as morphisms. Because Haskell types also include bottom value, Hask is called quasi-category. The usual "convention" is to ignore bottom and pretend Haskell functions are total.

The objects of Hask are Haskell types, and the morphisms from objects `A` to `B` are Haskell functions of type `A -> B`. The identity morphism for object `A` is the polymorphic function `id :: A -> A` that takes care of identity function/morphism of all objects/types. The composition of morphisms is the composition of Haskell functions and the composition is associative.

Functors are mapping between categories and in the case of Hask category that means mappings between categories that include the Hask category and any of its subcategories.

license: Unlicense


text:
# Exercise 9.5 (P281)

Write a program with two gotoutines that send messages back and forth over two unbuffered channels in ping-pong fashion.
How many communications per second can the program sustain?

## Result

```text
2.1975286807808625e+06 rounds per second
```

repository: zkcpku/gopl

repo_name: zkcpku/gopl


text:
---
layout: post
title: Address Normalization with Python and NLTK
categories: data science, nltk, natural language processing
---

Addresses in databases, especially ones that are inserted by human operators, are prone to a wide range of forms and errors.
To be able to correctly identify a location from a address and to compare two entities we need to normalize them.
(We're calling normalization both the entire process and one of the processing steps.)

Two problems: first is to identify address on a string by field, with errors; second is to match with existing address database to remove uncertanty.

## Preparation steps

To start tackling the problem we have first to prepare the data. The usual steps for that are:

- normalization
- stemming
- lemmatization
- segmentation (tokenization)
- text rebuild

### Normalization
Normalization consists on transforming the text to a canonical form (equal to all entries) so they can be compared.
The usual steps are

- standardize encoding
- remove punctuation
- transform to lowercase
- remove stopwords and punctuation (with care!)
- separate prefixes and suffixes that doesn't contain information

### Stemming
Stemming is the process of reducing words in different forms (conjugated verbs, plural) to a radical form.
This step is not useful for addresses because most of the addresses are not in different forms.
Proper names, for example, are very common in addresses and don't benefit a lot from stemming.

## Lemmatization
As we're not going to stem the words, we also don't need to lemmatizate them.
Lemmatization is the process of grouping together the flexionated forms of the words so they can be analysed together.

### Segmentation
Segmentation is the task of breaking up the text into tokens, so each token can be analysed separately.
In our case, the tokenization can be done by address field: preffixes, location, complements and suffixes. For example, the address

`Rua Nove de Julho, 2983 ap 33 bloco 1 CEP 00043-424 São Paulo SP`

can be break up into

- Preffix: `Rua`
- Location: `Nove de Julho 2983`
- Complements: `ap 33 bloco 1 CEP 00043-424`
- Suffixes: `São Paulo SP`

This is helpful because now we can match each part of the address with an existing canonical form without a lot of noise.
Each of the fields can be further processed to extract more information, like the postal code number.

### Parsing
The next step is to parse the address.
Parsing consists in break up the address string into fields that compose the address, the breaking up of the fields
mentioned above. To parse we have to assume a structure for the address, either by rules or by some techiques like
 Named Entity Recognization.

### Rebuild text
This task consists in rebuild the normalized and annotated text to a final form. This will be done after the match phase.

## Identification and Match

After cleaning up and normalizing the text we need to check if the value of the address exists in our canonical database. Two approaches:

1. Match with existing database
2. Name Entity Recognition on address

### Match with canonical database

If we have a canonical database with the data considered correct, our job is to match the target addresses with the ones
on this canonical database. This is a *match problem*. We can attack this problem following these steps:

- split address by field (prefix, location, suffixes)
- retrieve match candidates (search engine)
- Match address with candidates by similarity

For this approach we're going to work directly on the text patterns, without any kind of machine learning.
The canonical database is usually provided by the Post Office.

The match between two addresses is a way to check if two addresses are the same.
For example, let's say that we have in our canonical database the entry

| CEP  | Location | City | State |
|------|----------|------|-------|
|00043243 | Nove de Julho | São Paulo | SP |
|00032312 | Nove de Setembro | São Paulo | SP |

and we need to compare with the address above. Which one is the best match?
We could try to do an exact match: only the location strings that are exactly same are the same address.
But this would miss lots of entries that could have typing errors but are otherwise valid addresses, like

`Rua nov de Julho, 2938`

So how do we compensate for these errors?

### Match

One approach is to retrieve candidates from the canonical database that are similar to the address we want to normalize. Search engines do that using different strategies. We're not going to detail this process, so let's just say that our search engine returned candidates to be compared.

For each of these candidates we do a comparison with our target address using some metric of similarity. There are several of such metrics:

- Jaro distance
- Jaro-Winkler distance
- Cosine distance

For now we're going to use Jaro-Winkler distance. We compare the target address with each of the candidates and rank by the similarity between them.

#### Search engines

Search engines usually already make the string similarity comparison to retrive the candidates, so it could, in principle, already compute the similarity score withou the need to program it by ourselves. But sometimes the search engine similarity algorithm cannot be tuned to the type of text, like addresses. We also have more information than only the Location string, like the postal code and suffixes. This could help in the decision process.

### NER
Instead of using regular expressions to break up the address text into components we could create a Named Entity Recognizer and let it separate the address by fields.

- tag canonical database with relevant tags
- train CRF with tagged database
- classify each address
- match classified entity with canonical base

## Decision process

After the text normalization and match we hopefully have a list of candidates with a similarity score between the target and a canonical address. How we decide if the address is indeed the correct address? We can set a score threshold, for example, based on our experience, and test the error rate. We also can create a classification model and train manually with some entries.

## In Python

Let's show the steps above now with some Python and the Natural Language Toolkit [here](https://github.com/ispmarin/text_norm).


text:
One Page SEO
===========
Serve static content of a one-page website to crawlers.

Installation
============
## Via Composer
```
composer require vdaguenet/one-page-seo
```

Usage
============
Add the following line on top of your `index.php`
```php
include_once __DIR__ . '/OnePage-SEO/BotDetector.php';

$detector = new BotDetector();
$detector->setServerOS($detector::LINUX);
if($detector->isBot()) {
    $detector->displayStaticContent();
}
```

In your javascript, add the following line when you are sure **your content is appended**
```js
if(typeof window.callPhantom === 'function') window.callPhantom();
```

What is included ?
==================
PhantomJS:
- for mac in version 2.0.0
- for linux in version 1.9.8

You can download other build from [official reposiory](https://bitbucket.org/ariya/phantomjs/downloads)

repository: vdaguenet/one-page-seo

repo_name: vdaguenet/one-page-seo


text:
---
title: Release Notes for Cloud Manager 2023.2.0 in Adobe Experience Manager as a Cloud Service
description: These are the release notes for Cloud Manager 2023.2.0 in AEM as a Cloud Service.
feature: Release Information
exl-id: b8c08c1f-3d23-4c34-956c-ac0c99bbd5e9
---
# Release Notes for Cloud Manager 2023.2.0 in Adobe Experience Manager as a Cloud Service {#release-notes}

This page documents the release notes for Cloud Manager release 2023.2.0 in AEM as a Cloud Service.

>[!NOTE]
>
>See [this page](/help/release-notes/release-notes-cloud/release-notes-current.md) for the current release notes for Adobe Experience Manager as a Cloud Service.

## Release Date {#release-date}

The release date for Cloud Manager release 2023.2.0 in AEM as a Cloud Service is 16 February 2023. The next release is planned for 16 March 2023.

## What's New {#what-is-new}

* Users can download [custom UI test](/help/implementing/cloud-manager/ui-testing.md) results from the UI.
* [Rapid Development Environments](/help/implementing/developing/introduction/rapid-development-environments.md) (RDEs) are a new type of Cloud Environment intended as a fast, consistent, and extensible way to validate that code that works locally also functions as expected in the Cloud.
  * RDEs enable developers to rapidly troubleshoot issues and deploy new features on AEM as a Cloud Service.
  * Using command line tools, developers can quickly sync content packages, bundles, content files, OSGi configurations, or dispatcher configurations to RDEs.

## API Changes {#api-changes}

* API changes were made to support [RDEs.](https://developer.adobe.com/experience-cloud/cloud-manager/reference/api/#tag/Rapid-Development-Environments)
* The API now allows retrieval of [execution artifacts.](https://developer.adobe.com/experience-cloud/cloud-manager/reference/api/#tag/Execution-Artifacts)


text:
---
layout: default
title: Typescript
nav_order: 11
---

# Typescript

The [standard way types are handled in mobx-state-tree](https://mobx-state-tree.js.org/tips/typescript#using-a-mst-type-at-design-time) applications is by explicitly defining your types via extending the `Instance` interface provided by mobx-state-tree.

With **mobx-store-provider** you do not have to do this, your type definitions are inferred for you:

```javascript
import { types } from "mobx-state-tree";

// Define the AppStore
const AppStore = types.model({
  user: types.optional(types.string, ""),
});

// This is a component which uses the AppStore
function UserDisplay() {
  // With this declaration, mobx-store-provider correctly infers the type for AppStore
  const appStore = useStore(AppStore);

  /**
   * The following will not compile, it will cause a typescript error
   * because `foobar` is not a property of an `AppStore`
   */
  return <div>{appStore.foobar}</div>;
}
```

[Next: **Testing**](/testing){: .btn .btn-blue }

repository: jonbnewman/mobx-store-provider

repo_name: jonbnewman/mobx-store-provider


text:
A simple python tool for creating an info dashboard in my hallway. It runs on an raspberry pi and is shown on an old 19'' TFT which is activated by a standard motion sensor (http://bit.ly/1j3lVSB).
It was my first python project and needs to be revised. Actually it should be considered as an example of bad coding. Anyway: Feel free to correct and contribute!

![threeoptions_focused](https://dl.dropboxusercontent.com/u/2193334/Screenshot_Flurview.png)

### How it works

Flurview.py fetches some useful information on weather and traffic conditions as well as Google Calendar entries from the web and creates a html file to show the results in a concise fashion.

- Flurview.py (python script that creates index.html every ~60 sec.)
- index_template.html (template file with text markers that are replaced by Flurview.py)
- Flurview.html (master file - refreshes the index.html iframe every 45sec.)

### License

The MIT License (MIT)

Copyright (c) 2013 Conveyal

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.

repository: AchimTack/Flurview

repo_name: AchimTack/Flurview


text:
# Kafka Data Service

We provide support for Kafka which is an extensible streaming platform. Clients can manage, publish and subscribe to topics using the native Kafka protocol.

Data Pipelines can use Kafka as destination. Similarly applications can use Kafka client of their choice to access the Kafka Data Service.

## Instantiate a Kafka Data Service

Services are enabled per project to be consumed by Pipelines and Kubernetes Applications within that project. Moreover Kafka can optionally be exposed for external clients.

A sophisticated data service like Kafka has many config options which a user might want to change from their default values. We allow various settings to be tuned for throughput, latency, availability or durability reasons. We treat all Kafka brokers as equals. That is all brokers will have same configuration settings.

You can configure services by using the project service API. The CLI supports this API which we'll demonstrate shortly.

### A simple Kafka instance with default settings

Let's setup Kafka service with default settings:

```
kind: service
name: Kafka
project: KafkaTest
```

The service name must be Kafka, as we only support a single Kafka instance within a project. In that sense name is equal to type of service requested.
We automatically size the number of Kafka brokers to be equal to number of nodes in Service Domain. The Kafka cluster size adjusts if a node is added or removed.

The service can be instantiated using CLI as follows:

```
$ xi-iot create -f kafka-with-defaults.yaml
```

We can query back service instance in project Kafka:

```
xi-iot get service -p KafkaTest Kafka -o yaml
kind: service
name: Kafka
project: KafkaTest
serviceYaml: |
  null
```

You can see serviceYaml property which is null in config. That means default configuration is used. The YAML configuring Kafka is embedded into service config.

You can update the configuration after creating it. Depending on the updates, Kafka cluster availability might be affected.

```
$ xi-iot update -f changed-kafka-config.yaml
```

If you no longer require the Kafka data service, you can delete it from the project.

```
$ xi-iot delete service -p KafkaTest Kafka
```

Of course, deleting the service might affect running applications and data pipelines.

### A Kafka instance with non-default settings

Here is a more complex YAML snippet where we configure the Kafka data service:

```
kind: service
name: Kafka
project: KafkaTest
serviceYaml: |
  apiVersion: sherlock.nutanix.com/v1
  kind: Kafka
  metadata:
    name: kafka
  spec:
    # Expose Kafka on node port 32092
    nodePort: 32092
    # Retain 1 megabyte
    logRetentinBytes: 1000000
    # Give each Kafka broker 4G of memory.
    kafkaMemory: 4G
    # Allocate 2 CPU cores for each Kafka broker.
    kafkaCPU: 2000m
    # Give each Zookeeper node 2G of memory.
    zookeeperMemory: 2G
    # Allocate 0.6 CPU cores for each ZK node.
    zookeeperCPU: 600m
    # Allocate 500GB storage for each Kafka broker.
    kafkaVolumeSize: 500Gi
```

## Access Kafka Data Service from Pipelines

Data Pipelines can specify Kafka as destination. Pipelines will use Kafka cluster enabled for the project. If no Kafka cluster has been explicitly enabled for project, a new cluster will be instantiated with default settings.

## Access Kafka Data Service from Kubernetes Applications

Applications are not required to discover Kafka clusters. We rely on applications templating for injecting actual Kafka broker list into applications:

```
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: my-kafka-app
spec:
  template:
    metadata:
      labels:
        app: my-kakfa-app
    spec:
      containers:
      - name: some-container
        image: my-kafka-app
        env:
        - name: KAFKA_SERVER
          value: "{{.Services.Kafka.Endpoint}}"
        ports:
        - containerPort: 9000
```

KAFKA_SERVER will be expanded to Kafka API endpoint as a headless k8s service. That is, a DNS A entry with IPs for each broker in the cluster.

Kafka deployments come with their own Zookeeper Ensemble. Similar to Kafka API endpoint, Zookeeper's endpoint is injected into app YAML by using template parameter.

```
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: kafdrop
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: kafdrop
    spec:
      containers:
      - name: kafdrop
        image: thomsch98/kafdrop
        env:
        - name: LISTEN
          value: "9000"
        - name: ZK_HOSTS
          value: "{{.Services.KafkaZookeeper.Endpoint}}"
        ports:
        - containerPort: 9000
---
apiVersion: v1
kind: Service
metadata:
  name: kafdrop
  annotations:
    sherlock.nutanix.com/http-ingress-path: /kafdrop
spec:
  ports:
  - port: 9000
  selector:
    app: kafdrop

```

This app YAML starts Kafdrop, a Kafka UI on any Service Domain.

## Access Kafka Data Service from external clients

External clients must specify a list of Kafka brokers (IP:port) as usual for Kafka clients. We publish list of Kafka endpoints in UI.

To see externally exposed Kafka brokers for your project: From the Projects page in the Xi IoT cloud management console, click your project name. Open Data Services > Kafka and click the Deployments tab.

## Kafka settings

Following is a list of all settings and their defaults values. Change config default settings with caution since those affect availability and durability of Kafka data.

```
autoCreateTopicsEnable: true
defaultReplicationFactor: 2
deleteTopicEnable: true
kafkaCPU: 500m
kafkaMemory: 512M
kafkaVolumeSize: 6Gi
logFlushIntervalMS: 30000
logFlushIntervalMessages:<PHONE_NUMBER>854775807
logFlushOffsetCheckpointIntervalMS: 60000
logFlushSchedulerIntervalMS:<PHONE_NUMBER>854775807
logRetentionBytes: -1
logRetentionHours: 168
logRollHours: 168
logSegmentBytes:<PHONE_NUMBER>
logSegmentDeleteDelayMS: 60000
messageMaxBytes: 52428800
minInsyncReplicas: 2
numPartitions: 6
numReplicaFetchers: 1
offsetsLoadBufferSize: 5242880
offsetsMetadataMaxBytes: 4096
offsetsRetentionCheckIntervalMS: 600000
offsetsTopicNumPartitions: 6
offsetsTopicReplicationFactor: 2
offsetsTopicRetentionMinutes: 1440
offsetsTopicSegmentBytes: 104857600
replicaFetchMaxBytes: 52428800
replicaFetchMinBytes: 1
replicaFetchWaitMaxMS: 500
replicaHighWatermarkCheckpointIntervalMS: 5000
replicaLagTimeMaxMS: 10000
uncleanLeaderElectionEnable: false
zookeeperCPU: 500m
zookeeperMemory: 512M
zookeeperReplicationFactor: 3
zookeeperVolumeSize: 2Gi
```

repository: LevyForchh/xi-iot

repo_name: LevyForchh/xi-iot


text:
# js-holepunch
proof of concept TCP hole-punching server

## what
try and broker a connection between two computers behind NATs

## why
p2p

## protocol
```listen::<identifier>``` - wait for peer to connect with <identifier>
```connect::<identifier>``` - connect to any peer listening on <identifier>
```err::<error message>``` - error
```connection::<config to create connection with>``` - create a tcp connection to the address provided
```start::<server config to start server on>``` - start a tcp server on the address provided

## how
 - create a connection to a server
 - hold the connection open waiting for a peer
 - once a peer connects:
    - have the server send your host and port details to them
    - have the server tell you to start a server on the same socket
    - start a server on that socket
    - have peer connect to that socket

repository: mayidudu/js-holepunch

repo_name: mayidudu/js-holepunch


text:
# Minimal Dashboard by Relatively Productive

This is a SPA project built with [Vue.js](https://vuejs.org/) using [Vue CLI 3](https://github.com/vuejs/vue-cli). It's main jobs are to talk to the [Relatively Productive API](https://github.com/RelativelyProductive/Dashboard.API) and adhere to [Jacob's](https://github.com/jacobpretorius) unrealistic UX standards.

## Bugs and Issues

Please see the [Github issues](https://github.com/RelativelyProductive/Dashboard/issues) to see if we are aware of it already, if not please [create a new issue](https://github.com/RelativelyProductive/Dashboard/issues/new).

## Contributing

To get started first make sure to get the API running locally by following the steps outlined here.

Then clone this repo and follow these steps:

### Project setup

```!bash
yarn
```

#### Compiles and hot-reloads for development

```!bash
yarn dev
```

#### Compiles and minifies for production

```!bash
yarn build
```

#### Lints and fixes files

```!bash
yarn lint
```

### Lending a hand

Feel free to see if an Issue is on the [Ongoing Development Roadmap](https://github.com/RelativelyProductive/Dashboard/projects/1). If you decide to work on anything here remember to mark it as 'in progress'.

You're also welcome to [join our slack](https://join.slack.com/t/relativelyproductive/shared_invite/enQtNjcyODc1Nzc2Mjk1LTkwZjhjODMxZTU1MjBlY2JlYzBjMzI3NGJkOWI2MTc5N2ZhNzM1OGI0NjkyNGJjM2YyNWI5MDNmNjQ1ODZkMTE) and call out what you want to work on (or post nice ideas) on the #dashboard channel.

#### Branching

Master is the current development head. Release or Release-Candidate branches will be made for deployment.

## Resources

- [Relatively Productive API](https://github.com/RelativelyProductive/Dashboard.API)
- [Auth0 Authentication API](https://auth0.com/docs/api/authentication)
- We took some inspiration from the legend Chris Fritz's [vue-enterprise-boilerplate](https://github.com/chrisvfritz/vue-enterprise-boilerplate) boilerplate

## Tech Stack

- [Vue.js](https://vuejs.org/)
- [TailwindCSS](https://tailwindcss.com/)

repository: RelativelyProductive/Dashboard

gha_language: JavaScript

repo_name: RelativelyProductive/Dashboard


text:
# BeamQL
Seamlessly visualize your PostgreSQL database and transform your REST API into GraphQL in less than 15 minutes.
Live demo, docs, and more info [_here_](https://www.beamql.com).

## Table of Contents
* [General Info](#general-information)
* [Technologies Used](#technologies-used)
* [Features](#features)
* [Screenshots](#screenshots)
* [Usage](#usage)
* [To Do](#to-do)
* [Acknowledgements](#acknowledgements)
* [Contributors](#contact)

## General Information
- BeamQL is on a mission to improve developers' workflow by helping them visualize their databases and transform their REST APIs to GraphQL.

## Technologies Used
- React.js (React Hooks) - v17.0.2
- React-flow-renderer - v5.2.0
- Node.js - v14.17.6
- Express - v4.17.1
- jest - v27.1.0
- supertest - v6.1.6
- Docker
- AWS
- Travis.ci

## Features
- Visualize user's PostgreSQL database by instantly creating an entity relationship diagram
- Generate GraphQL complete type schema
- Create GraphQL all resolvers

## Screenshots
![Example screenshot](./assets/getstarted.gif)
<!-- If you have screenshots you'd like to share, include them here. -->

## Usage
1. Copy your PostgreSQL database URI into [beamql.com](www.beamql.com).
2. View and interact with the graphical visualization of the database and use it in API documentation to give users a better understanding of what they are working with.
3. Open NodeJS backend codebase in a code editor.
4. Use the schema and resolvers that BeamQL produces with [Apollo Server](https://www.npmjs.com/package/apollo-server-express) or a similar GraphQL server that suits your Node.js server.
5. Start server and navigate to localhost:X000/graphql
6. Behold the glory of your database accessible through the query language of the future!

## To Do
- Migrate codebase to TypeScript!
- Add support for every single SQL data type, options for custom types in GraphQL
- Integrate [GraphiQL](https://github.com/graphql/graphiql) so users can test their endpoints with the generated schema and resolvers

## Acknowledgements
- Many thanks to the tech accelerator [Open Source Labs](https://opensourcelabs.io/) for their continued support and sponsorship throughout this whole process.

## Contributors
- [Brian Grosso](https://github.com/modelB) | [LinkedIn](https://www.linkedin.com/in/newarkbg/)
- [Eric Askew](https://github.com/moonwalker5823) | [LinkedIn](https://www.linkedin.com/in/eric-askew-8a91714a/)
- [Adam Goodman](https://github.com/AdamrG1) | [LinkedIn](https://www.linkedin.com/in/adam-goodman1/)
- [Mark Liu](https://github.com/markyliu) | [LinkedIn](https://www.linkedin.com/in/markyliu1/)


text:
## LEROI SQL runner

The LEROI SQL runner has three basic functionalities

* executing SQL code in a specific order
```
sqlrunner --execute {RUNNER_FILE_1}, {RUNNER_FILE_2} ..
```
* quickly testing SQL code through temporary creation of views
```
sqlrunner --test {RUNNER_FILE_1}, {RUNNER_FILE_2} ..
```
* plotting of a dependency graph
```
sqlrunner --deps
```

The supported databases are Redshift, Snowflake and Postgres.
### Installation
Pull repository and install dependencies
```
sudo apt install git
git clone https://github.com/leroi-marketing/sql-runner.git
cd sql-runner
sudo apt install python3-pip
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install -r requirements.txt
sudo apt install graphviz
```
Make the runner executable
```
sudo ln -s /home/ubuntu/sql-runner/bin/sqlrunner /usr/local/bin/sqlrunner
chmod a+x bin/sqlrunner
```

### Configuration
Two configuration files are needed to use the sqlrunner.
* A config.json file that specifies all the necessary configuration variables.
```
{
   "sql_path": "{PATH}",
    "database_type": "{SNOWFLAKE} OR {REDSHIFT} OR {POSTGRES}",
    "auth": {
    "user": "{USERNAME}",
    "password": "{PASSWORD}",
    "account": "{SNOWFLAKE_ACCOUNT}",
    "database": "{SNOWFLAKE_DATABASE}",
    "dbname": "{POSTGRES_DATABASE} OR {REDSHIFT_DATABASE}",
    "host": "{POSTGRES_HOSTNAME} OR {REDSHIFT_HOSTNAME}",
    "port": "{POSTGRES_PORT} OR {REDSHIFT_PORT}"

   },
    "deps_schema": "{DEPENDENCY_SCHEMA_NAME}",
    "test_schema_prefix" : "{PREFIX_}",
    "exclude_dependencies": "('EXCLUDED_SCHEMA_1', 'EXCLUDED_SCHEMA_2' ..)",
    "graphviz_path": "{GRAPHVIZ_PATH_FOR_WINDOWS}"
}
```
* One or more csv files specifying the name of the the tables and views and their respective schemas.
 ```
 {SCHEMA_1};{SQL_FILENAME_1};e
 {SCHEMA_1};{SQL_FILENAME_2};e
 {SCHEMA_1};{SQL_FILENAME_3};e
 {SCHEMA_2};{SQL_FILENAME_4};e
 {SCHEMA_3};{SQL_FILENAME_5};e
 ..
 ```
Per schema one directory is expected. The name of the SQL files should correspond to thename of the respective table or view. The last columns specifies the desired action.
 ```
 e: execute the query
 t: create table
 v: create view
 m: materialize view
 ```

repository: steinmann/sql-runner

repo_name: steinmann/sql-runner


text:
# setrack

Exercise tracking utility. Eventually there will probably be some cool stuff for predicting performance.

# Usage
1. Initialize a set of files with setrack.py [name] init
2. Create an exercise database using setrack.py [name] db entry [exercise name] [exercise aliases (many allowed)]
3. Record sessions with setrack.py [name] rec entry. See the --help for options.

repository: Sandalmoth/setrack

repo_name: Sandalmoth/setrack


text:
# Uncommunicative Parameter Name

## Introduction

An _Uncommunicative Parameter Name_ is a parameter name that doesn't
communicate its intent well enough. This code smell is a case of
[Uncommunicative Name](Uncommunicative-Name.md).

## Current Support in Reek

_Uncommunicative Parameter Name_ checks for:

* single-character names
* any name ending with a number
* camelCaseParameterNames

## Configuration

Reek's _Uncommunicative Parameter Name_ detector supports the [Basic Smell Options](Basic-Smell-Options.md), plus:

| Option   | Value       | Effect  |
| ---------|-------------|---------|
| `reject` | array of strings | The set of names that Reek uses to check for bad names. Defaults to single-letter names, names containing an uppercase letter, names with a number at the end and '_'. |
| `accept` | array of strings | The set of names that Reek will accept (and not report) even if they match one of the `reject` expressions. |

An example configuration could look like this:

```Yaml
---
UncommunicativeParameterName:
  accept:
    - x
    - arg1
  reject:
    - foobar
```

Reek will convert whatever you give it as a string to the corresponding regex, so "foobar" from above will be converted to /foobar/ internally.

Applying a configuration to a source file like this:

```Ruby
def omg(x); x; end # Should not be reported
def omg(arg1); arg1; end # Should not be reported
def omg(foobar); foobar; end # Should be reported
```

Reek would report:

```
smelly.rb -- 1 warning:
  [3]:UncommunicativeParameterName: omg has the parameter name 'foobar'
```

## Advanced configuration

Sometimes just strings are not enough for configuration. E.g. consider this code sample:

```Ruby
class Klass
  def my_method(foo, foobar); end
end
```

and now imagine that you want to reject the name "foo" but not "foobar". This wouldn't be possible with just using strings.
For this reason Reek has a special syntax that allows you to use regexes by using a forward slash at the beginning and the end of the string.
Everything within the forward slashes will be loaded as a regex.

A possible configuration that allows "foobar" but rejects "foo" could look like this:

```Yaml
---
UncommunicativeParameterName:
  reject:
    - "/^foo$/"
```

## Reek 4

In Reek 4 you could also pass regexes to `accept` or `reject`, meaning this was perfectly valid as well:

```yaml
UncommunicativeParameterName:
  accept:
    - !ruby/regexp /foobar/
```

Support for this has been scrapped with Reek 5 to make the Reek configuration more yaml standard compliant.
You can still pass in regexes, you just have to wrap them into a string. Please see "Advanced configuration" above.

repository: troessner/reek

gha_language: Ruby

repo_name: troessner/reek


text:
# KpiParser
Scala Play Framework REST Endpoint that retrieves the Id of a KPI through the endpoint parameter /kpi/{id} and parses the formula defined by the KpiManager into an executable SQL Query Edit

repository: lenzzol/KpiParser

repo_name: lenzzol/KpiParser


text:
# Murphy-Machine-Learning-A-Probabilistic-Perspective-Errata-and-Notes-4th-printings

@Author: Kai Song, PhD candidate in quantum dynamics,
         ks838 at cam.ac.uk
         The newly updated errata can be downloaded from my Github: https://github.com/ks838

@Notes:
        1. In this project, I listed the printing and mathematical typos I found in the 4th printing (the 5th, 6th are the same as the 4th printing). I wish this would be helpful for other readers.
        2. A drawback, in my view, is that some of the notations and notes of the figures in the book tend to be explained not very clearly. The axes are often not labeled.
        3. I implemented some of the algorithms to do nonlinear regression, please refer to
           https://github.com/ks838/Neural-Network-nonlinear-regression-spectral-density

@Introduction of the book:
        1. This is a great book, which I have spent a lot of effort on it. I think it has a similar style as the most famous  Course of Theoretical Physics by Landau and Lifshitz.
        2. There is only one edition till now (Jan, 2018). As the author Kevin Murphy said (I emailed him), the 2nd edition would appear at the end of 2018. We believe the second edition would include more on deep learning and reinforcement learning.
        3. website of this book: http://www.cs.ubc.ca/~murphyk/MLbook/index.html