text:
# THIS PLUGIN IS DEPRECATED! PLEASE, USE [REDMINE_2CHAT](https://github.com/southbridgeio/redmine_2chat) INSTEAD

# redmine_chat_telegram

[Русская версия](README.ru.md)

Redmine plugin is used to create Telegram group chats.

The `redmine_chat_telegram` can be used to create a group chat associated with a ticket and record its logs to the Redmine archive. Associated group chats can be easily created via the `Create Telegram chat` link on the ticket page. You can copy the link and pass it to anyone you want to join this Telegram chat.

![Create telegram chat](https://github.com/southbridgeio/redmine_chat_telegram/raw/master/assets/images/create-link.png)
![Chat links](https://github.com/southbridgeio/redmine_chat_telegram/raw/master/assets/images/chat-links.png)

Please help us make this plugin better telling us of any [issues](https://github.com/southbridgeio/redmine_chat_telegram/issues) you'll face using it. We are ready to answer all your questions regarding this plugin.

## Installation

### Requirements

* **Ruby 2.3+**
* Configured [redmine_telegram_common](https://github.com/southbridgeio/redmine_telegram_common)
version 1.4.1 has problems with archive sync.
* You should have Telegram bot account
* Install [Redis](https://redis.io) 2.8 or higher. Run Redis and add it to autorun.
* Install the [redmine_sidekiq](https://github.com/ogom/redmine_sidekiq) plugin
* You need to configure Sidekiq queues `default` and `telegram`. [Config example](https://github.com/centosadmin/redmine_chat_telegram/blob/master/extras/sidekiq.yml) - place it to `redmine/config` directory (Or copy from plugins/redmine_chat_telegram/extras/sidekiq.yml to config/sidekiq.yml).

* Standard install plugin:

```
cd {REDMINE_ROOT}
git clone https://github.com/southbridgeio/redmine_chat_telegram.git plugins/redmine_chat_telegram
bundle install RAILS_ENV=production
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
```

*Note: each of our plugins requires separate bot. It won't work if you use the same bot for several plugins.*

### Upgrade from 2.1.0 to 2.2.0+

From 2.2.0 redmine_chat_telegram (as well as other Southbridge telegram plugins) is using bot from redmine_telegram_common.
In order to perform migration to single bot you should run `bundle exec rake telegram_common:migrate_to_single_bot`.
Bot token will be taken from one of installed Southbridge plugins in the following priority:

* redmine_chat_telegram
* redmine_intouch
* redmine_2fa

Also you should re-initialize bot on redmine_telegram_common settings page.

### Upgrade to 2.0.0

Since version 2.0.0 this plugin uses [redmine_telegram_common](https://github.com/southbridgeio/redmine_telegram_common)
0.1.0 version, where removed Telegram CLI dependency. Please, take a look on new requirements.

## Usage

Make sure you have running sidekiq, turn on module in project, also connected Redmine and Telegram accounts (see /connect below).

Open the ticket. You'll see the new link `Create Telegram chat` on the right side of the ticket. Click on it and the Telegram group chat associated with this ticket will be created. The link will change to `Enter Telegram chat`. Click on it to join the chat in your Telegram client. You'll be able to copy and pass the link to anyone you want to invite to the Group Chat.

*Note: a new user in group will became group administrator, if his Telegram account connected to Redmine (see /connect below) and have proper permissions*

### Available commands in dedicated bot chat

- `/connect<EMAIL_ADDRESS>- connect Telegram account to Redmine account
- `/new` - create new issue
- `/cancel` - cancel current command

### Available commands in issue chat

- `/task`, `/link`, `/url` - get link to the issue
- `/log` - save message to the issue

#### Hints for bot commands

Use command `/setcommands` with [@BotFather](https://telegram.me/botfather). Send this list for setup hints:

```
start - Start work with bot.
connect - Connect account to Redmine.
new - Create new issue.
hot - Assigned to you issues updated today.
me - Assigned to you issues.
deadline - Assigned to you issues with expired deadline.
spent - Number of hours set today.
yspent - Number of hours set yesterday.
last - Last 5 issues with comments.
help - Help.
chat - Manage issues chats.
task - Get link to the issue.
link - Get link to the issue.
url - Get link to the issue.
log - Save message to the issue.
issue - Change issues.
```

# Author of the Plugin

The plugin is designed by [Southbridge](https://southbridge.io)


text:
Scio REPL
=========

# Getting started

The Scio REPL is an extension of the Scala REPL, with added functionality that allows you to
interactively experiment with Scio. Think of it as a playground to try out things.

# Quick start

The easiest way to start with Scio REPL is to assembly jar and run it:

```
$ sbt 'project scio-repl' assembly
$ java -jar scio-repl/target/scala-2.11/scio-repl*-fat.jar
Loading ...
System property 'bigquery.project' not set. BigQueryClient is not available.
Set it with '-Dbigquery.project=<PROJECT-NAME>' command line argument.
Scio context available as 'sc'
Welcome to Scio REPL!

scio>
```

Scio context is available as `sc`, this is the starting point, use `tab` completion, history and
all the other goods of REPL to play around. Ignore the BigQuery warning for now.

# Tutorial

## Local pipeline

Let's start with simple local-mode word count example:

```
scio> val wordCount = sc.textFile("README.md").flatMap(_.split("[^a-zA-Z']+").filter(_.nonEmpty)).countByValue.map(_.toString).saveAsTextFile("/tmp/local_wordcount")
scio> sc.close
scio> wordCount.waitForResult().value.take(3).foreach(println)
(but,4)
(via,4)
(Hadoop,6)
```

Make sure to have text file `README.md` in current directory (the directory where you start REPL from).
 This example counts words in local file using local Dataflow runner and outputs result in local file.
The pipeline/computation starts on `sc.close()`. The last command take 3 lines from results and prints
 them.

## Local pipeline ++

In the next example we will spice things up a bit - and read data from GCS:

```
scio> :newScio
scio> val shakespeare = sc.textFile("gs://dataflow-samples/shakespeare/*")
scio> val wordCount = shakespeare.flatMap(_.split("[^a-zA-Z']+").filter(_.nonEmpty)).countByValue.map(_.toString).saveAsTextFile("/tmp/gcs-wordcount")
scio> sc.close()
scio> wordCount.waitForResult().value.take(3).foreach(println)
(frown'st,1)
(comfortable,13)
(diversity,1)
```

We are still performing computations locally, but data comes from Google Cloud Storage (it might as
 well be BigTable, BigQuery etc). This example may take a minute or two due to transfer between GCS
 and your machine.

## Dataflow service pipeline

To create a ScioContext for Google Cloud Dataflow service, pass Dataflow pipeline options on
 REPL startup - `:newScio` will use those arguments when creating new Scio contexts. For example:

```
$ java -jar scio-repl/target/scala-2.11/scio-repl*-fat.jar \
> --project=<project-id> \
> --stagingLocation=<stagin-dir> \
> --runner=BlockingDataflowPipelineRunner
Loading ...
System property 'bigquery.project' not set. BigQueryClient is not available.
Set it with '-Dbigquery.project=<PROJECT-NAME>' command line argument.
Scio context available as 'sc'
Welcome to Scio REPL!

scio> val shakespeare = sc.textFile("gs://dataflow-samples/shakespeare/*")
scio> val wordCount = shakespeare.flatMap(_.split("[^a-zA-Z']+").filter(_.nonEmpty)).countByValue.map(_.toString).saveAsTextFile("gs://<gcs-output-dir>")
scio> sc.close
scio> wordCount.waitForResult().value.take(3).foreach(println)
(decreased,1)
('shall',2)
(War,4)
```

In this case we are reading data from GCS and performing computation in Dataflow service. Last line
 is an example of reading data from GCS file/tap.

## Adhoc local mode

Sometimes you may start in distributed mode get small enough results, and play around the results
 in local mode. At any point in time you can create a local Scio context using
 `:newLocalScio <name>` and use it to perform local computations.

```
scio> :newLocalScio lsc
Local Scio context available as 'lsc'
```

## BigQuery example

In this example let's try to read some data from BigQuery and massage it in Dataflow. We shall find
 relationship between months and numbers of detected tornado from public Dataflow dataset:

```
$ java -jar -Dbigquery.project=<project-id> \
> scio-repl/target/scala-2.11/scio-repl*-fat.jar \
> --project=<project-id> \
> --stagingLocation=<stagin-dir> \
> --runner=BlockingDataflowPipelineRunner
Loading ...
BigQuery client available as 'bq'
Scio context available as 'sc'
Welcome to Scio REPL!

scio> val tornadoes = sc.bigQuerySelect("SELECT tornado, month FROM [clouddataflow-readonly:samples.weather_stations]")
scio> val forcast = tornadoes.flatMap(r => if (r.getBoolean("tornado")) Seq(r.getInt("month")) else Nil).countByValue().map(kv => TableRow("month" -> kv._1, "tornado_count" -> kv._2))
scio> val someData = forcast.take(3).materialize
scio> sc.close
scio> someData.waitForResult().value.foreach(println)
{month=4, tornado_count=5}
{month=3, tornado_count=6}
{month=5, tornado_count=6}
```

In this example we combine power of BigQuery and flexibility of Dataflow. We first query BigQuery
 table, perform a couple of transformations to find out relationship between months and number of
 tornadoes. We take (`take(3)`) some data back locally (`materialize`) to check the results.

# Tips

## Use `:paste` for multiline code

While in the REPL, use `:paste` magic command to past/write multi line code

```
scio> :paste
// Entering paste mode (ctrl-D to finish)
def myWordFilter(word: String) = word.startsWith("rav")
val importantNames = sc.parallelize(List("ravioli", "rav", "jbx")).filter(myWordFilter)
// Exiting paste mode, now interpreting.
myWordFilter: (word: String)Boolean
importantNames: com.spotify.scio.values.SCollection[String] = com.spotify.scio.values.SCollectionImpl@75882ac2
scio> importantNames.saveAsTextFile("/tmp/ravs")
scio> sc.close
```

## `DataflowPipelineRunner` = more interactive Dataflow service

When using REPL and Dataflow service consider using the non-blocking `DataflowPipelineRunner` to get
more interactive experience. To start:

```
java -jar scio-repl/target/scala-2.11/scio-repl*-fat.jar \
> --project=<project-id> \
> --stagingLocation=<stagin-dir> \
> --runner=DataflowPipelineRunner
Loading ...
System property 'bigquery.project' not set. BigQueryClient is not available.
Set it with '-Dbigquery.project=<PROJECT-NAME>' command line argument.
Scio context available as 'sc'
Welcome to Scio REPL!

scio> sc.parallelize(List(1,2,3)).map( _.toString ).saveAsTextFile("gs://<output>")
res0: scala.concurrent.Future[com.spotify.scio.io.Tap[String]] = scala.concurrent.impl.Promise$DefaultPromise@1399ad68
scio> val futureResult = sc.close
[main] INFO com.google.cloud.dataflow.sdk.runners.DataflowPipelineRunner - Executing pipeline on the Dataflow Service, which will have billing implications related to Google Compute Engine usage and other Google Cloud Services.
[main] INFO com.google.cloud.dataflow.sdk.util.PackageUtil - Uploading 28 files from PipelineOptions.filesToStage to staging location to prepare for execution.
[main] INFO com.google.cloud.dataflow.sdk.util.PackageUtil - Uploading PipelineOptions.filesToStage complete: 2 files newly uploaded, 26 files cached
Dataflow SDK version: 1.4.0
scio> futureResult.state
res1: com.google.cloud.dataflow.sdk.PipelineResult.State = RUNNING
```

When you decide to close the Scio context, you won't have to wait for the job to finish but instead
get control back in REPL - use futures/taps to check for results, triggers and plumbing.

## Use multiple Scio contexts

You can use multiple Scio context objects to work with multiple pipelines at the same time, simply
use magic `:newScio <context name>`, for example:

```
scio> :newScio c1
Scio context available as 'c1'
scio> :newScio c2
Scio context available as 'c2'
scio> :newLocalScio lc
Scio context available as 'lc'
```

You can use those in combination with `DataflowPipelineRunner` to run multiple pipelines at the same
 session or pipe them together etc.

## Asynchronously close Scio context

Especially if working in distributed mode one may want to schedule a job and continue experimenting
in REPL. `DataflowPipelineRunner` is helpful but just the startup of the job can take minutes.
`asyncClose` can be used to asynchronous close both `BlockingDataflowPipeline` and `DataflowPipeline`
 runners, for example:

```
$ java -jar -Dorg.slf4j.simpleLogger.logFile=<async-exec-log-file> \
> scio-repl/target/scala-2.11/scio-repl*-fat.jar \
> --project=<project-id> \
> --stagingLocation=<stagin-dir> \
> --runner=DataflowPipelineRunner
Loading ...
System property 'bigquery.project' not set. BigQueryClient is not available.
Set it with '-Dbigquery.project=<PROJECT-NAME>' command line argument.
Scio context available as 'sc'
Welcome to Scio REPL!

scio> sc.parallelize(List(1,2,3)).map( _.toString ).saveAsTextFile("gs://<output-dir>")
scio> val result = sc.asyncClose()
scio> result.isCompleted
res0: Boolean = false
scio> :newScio nextSc
```

Keep in mind tho that currently `BlockingDataflowPipelineRunner` is still pretty noisy on stdout,
thus, currently, it's recommended to use `DataflowPipelineRunner` with `asyncClose`.

## Using BigQuery client

Whenever possible leverage BigQuery! `@BigQueryType` annotations enable type safe and civilized
 integration with BigQuery inside Scio. Here is example of using `@BigQueryType` annotations and
 BigQuery client to read and write typed data directly without Scio context.

```
$ java -jar -Dbigquery.project=<project-id> \
> scio-repl/target/scala-2.11/scio-repl*-fat.jar
Loading ...
BigQuery client available as 'bq'
Scio context available as 'sc'
Welcome to Scio REPL!

scio> @BigQueryType.fromQuery("SELECT tornado, month FROM [clouddataflow-readonly:samples.weather_stations]") class Row
scio> val tornadoes = bq.getTypedRows[Row]()
scio> tornadoes.next.month
res0: Option[Long] = Some(5)
scio> bq.writeTypedRows("project-id:dataset-id.table-id", tornadoes.take(100).toList)
```

repository: gitter-badger/scio

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: gitter-badger/scio


text:
# skope-api

[![DOI](https://zenodo.org/badge/338436138.svg)](https://zenodo.org/badge/latestdoi/338436138)
[![skope-api build](https://github.com/openskope/skope-api/actions/workflows/test.yml/badge.svg)](https://github.com/openskope/skope-api/actions/workflows/test.yml)

Backend services for dataset metadata and timeseries data extracted from SKOPE datasets - see https://api.openskope.org/docs for API details and examples

## Project Setup

### Dataset Metadata

Dataset metadata currently needs to be specified twice and should :

- `timeseries/metadata.yml` contains the full dataset metadata exposed by the [metadata endpoint](https://api.openskope.org/docs#/metadata/metadata_metadata_get) and consumed by the [skopeui](https://github.com/openskope/skopeui) app
- `timeseries/deploy/metadata/prod.yml` contains a subset of the dataset metadata used by the backend services to handle timeseries extraction (time ranges, time resolution, and available variables) from the datacubes available in the store (runtime settings for the store dynamically generated at build time at `timeseries/deploy/settings/config.yml`)

### Development

Set up `dev` configuration

```bash
./configure dev
```

Build the project & run the backend server and geoserver

```bash
make deploy
```

Try out the analysis endpoint

```bash
http --json POST localhost:8002/datasets/yearly < yearly.json
http --json POST localhost:8002/datasets/monthly < monthly.json
```

Run the tests

```bash
make test
```

## Production

Set up for `prod` deployment

```bash
./configure prod
```

build & deploy

```bash
make deploy
```

license: MIT

repository: openskope/skope-api

branch_name: refs/heads/main

gha_language: Python

gha_license_id: MIT

repo_name: openskope/skope-api


text:
# NetRoute
## iOS networking framework.

goforit.pro/netroute

## NetRoute Features

- [x] Simple to use
- [x] Keeps your code clean and consistent
- [x] Built-in JSON support
- [x] Support for unit testing

---

## NetRoute requires:

- Swift 3.0+
- Xcode 8.0+

## Supported platforms

- iOS 8.2+
- OS X 10.9+
- tvOS 9.0+
- watchOS 2.0+

## Installation

- Get the latest release here `(link unavaliable)`.
- Drag it to your target's files in Xcode.
- Select your target settings and navigate to 'General'
- Add `NetRoute` to Embeded Binaries list.

---

## Usage of NetRoute

### Making a request

Meking a request with NetRoute is very easy.

```swift
import NetRoute

// First step is to create the URL of the request.
let requestUrl = URL(string: "https://httpbin.org/get")!

// Here is where you run your request.
NetRequest(url: requestUrl, type: .GET).run()
```
> When setting up the request URL be consider using `https` instead of `http`. Using insecure connections is unrecommended by Apple and causes different problems with Application Transport Security

### Handle the response

Use `completionHandler` to handle the response when the request is done.

```swift
import NetRoute

// First step is to create the URL of the request.
let requestUrl = URL(string: "https://httpbin.org/get")

// Here is where you run your request.
NetRequest(url: requestUrl!, type: .GET).run() { (response) in
    print(response)
}
```
> Requests are done in asyncronios way, and to interrupt with UI elements be sure to use DispatchQueue.main

#### Response parsing

You can use diffirent properties of `NetResponse` to get what you want.

**Response properties**

- `response.string`
- `response.dictionary`

repository: AcrylicMadness/NetRoute

repo_name: AcrylicMadness/NetRoute


text:
# MultiSub
Javascript library for watching two subtitles at the same time in any HTML5 video. Ideally created for showing two subtitles, one
in a foreign language, and another in native language in case that you had understanding context problems.

You just need to add the "data-multisub" attribute to any html5 video with tracks:
```Html
<video width="500" height="400" data-multisub="pink,yellow" controls>
    <source src=http://techslides.com/demos/sample-videos/small.mp4 type=video/mp4>
    <track kind="subtitles" src="../sub.vtt">
    <track kind="subtitles" src="../sub2.vtt">
    <track kind="subtitles" src="../sub2.vtt"><!--This subtitle won't be load (max=2)-->
</video>
  ```
Just add the name of the css class separated by commas in the attribute for css customization:
```Html
<video width="500" height="400" data-multisub="yellow,green,red" controls>
  ```
The css class will be applied to the subtitles in order, first class (yellow in this example) will be applied to the first subtitle, second to second...
The multisub.css file can be edited, so anyone can create their custom css classes.

Behavior:

  -Right clicking make showing/hiding all tracks except first, so it's perfect for watching some video in a foreign language, and in case of understanding context problems right clicking to see the translation.

  -The maximum of simultaneous subtitles is 2, more subtitles at the same time is possible, but not practical, so this is the config for now.

  -If you drag a .srt or .vtt subtitle file into a video, it will be loaded automatically. If there were 2 subtitles before the load, the last will be substituted.

  -Only works in chrome for now.

repository: brapifra/MultiSub

gha_language: JavaScript

repo_name: brapifra/MultiSub


text:
# Search-and-Rescue
### COMP329 Assignment2

### Members: Samuel David Brundell, Chaoyi Han, Cong Bao

## TODO (06 Dec):
1. Jason:
    - [X] Path finding methods didn't invoked on real robot.
    - [X] Optimize localization algorithm.
2. LeJOS:
    - [X] Test localization on robot.
3. Communication:
    - Done.

## TODO (02 Dec):
1. Jason:
    - [X] Take use of the back cell of robot.
    - [X] Add a method to obtain percepts.
    - [X] Beliefs will not fire if percepts with same content added.
2. LeJOS:
    - [X] Create some basic classes and methods.
    - [X] Update arena information on LCD screen.
    - [X] Build an emulator.
3. Communication:
    - [X] Add interfaces on both Jason side and LeJOS side.
    - [X] Test communication with emulator.

## TODO (30 Nov):
1. Jason:
    - [X] Stop the scout after all victims detected.
    - [X] Add counts of arrived cells.
    - [ ] Potential problem that it may travel in a cycle during localization.
    - [X] Pathfinding algorithm is not optimal.
    - [X] Add more kinds of victims.
    - [X] Some issues in visibility of possible location and heading.
    - [X] There's a small possibility that the localization algorithm will end with 0.
2. LeJOS:
    - Haven't started.
3. Communication:
    - Haven't started.

## TODO (27 Nov):
1. Jason:
    - [X] Localization algorithm.
    - [X] Organize perceptions and beliefs.
    - [X] Improve communications between doctor and scout -> try to remove .wait actions
    - [X] Build an emulator.
    - [X] Test using emulator.
2. LeJOS:
    - Haven't started.
3. Communication:
    - Haven't started.

repository: CongBao/Search-and-Rescue

branch_name: refs/heads/cong

gha_language: Java

repo_name: CongBao/Search-and-Rescue


text:
# menubar

This plugin provides access to a native menubar.

This is a prototype, and in the long term will either be replaced by functionality
within the Flutter framework itself, or a published plugin (likely part of
flutter/plugins). Either way, the API will change significantly.

## Supported Platforms

- [x] macOS
- [x] Windows
- [x] Linux

## Caveats

### macOS

Currently there is no way to interact with existing top-level menus, only add new ones.
E.g., the Window menu cannot be extended from Flutter code.

## Use

See [the plugin README](../README.md) for general instructions on using FDE plugins.

repository: google/flutter-desktop-embedding

repo_name: google/flutter-desktop-embedding


text:
-*- coding: utf-8 -*-

Changes with Apache 2.4.27

  *) SECURITY: CVE-2017-9789 (cve.mitre.org)
     mod_http2: Read after free. When under stress, closing many connections,
     the HTTP/2 handling code would sometimes access memory after it has been
     freed, resulting in potentially erratic behaviour.
     [Stefan Eissing]

  *) SECURITY: CVE-2017-9788 (cve.mitre.org)
     mod_auth_digest: Uninitialized memory reflection.  The value placeholder
     in [Proxy-]Authorization headers type 'Digest' was not initialized or
     reset before or between successive key=value assignments.
     [William Rowe]

  *) COMPATIBILITY: mod_lua: Remove the undocumented exported 'apr_table'
     global variable when using Lua 5.2 or later. This was exported as a
     side effect from luaL_register, which is no longer supported as of
     Lua 5.2 which deprecates pollution of the global namespace.
     [Rainer Jung]

  *) COMPATIBILITY: mod_http2: Disable and give warning when using Prefork.
     The server will continue to run, but HTTP/2 will no longer be negotiated.
     [Stefan Eissing]

  *) COMPATIBILITY: mod_proxy_fcgi: Revert to 2.4.20 FCGI behavior for the
     default ProxyFCGIBackendType, fixing a regression with PHP-FPM. PR 61202.
     [Jacob Champion, Jim Jagielski]

  *) mod_lua: Improve compatibility with Lua 5.1, 5.2 and 5.3.
     PR58188, PR60831, PR61245. [Rainer Jung]

  *) mod_http2: Simplify ready queue, less memory and better performance. Update
     mod_http2 version to 1.10.7. [Stefan Eissing]

  *) Allow single-char field names inadvertently disallowed in 2.4.25.
     PR 61220. [Yann Ylavic]

  *) htpasswd / htdigest: Do not apply the strict permissions of the temporary
     passwd file to a possibly existing passwd file. PR 61240. [Ruediger Pluem]

  *) core: Avoid duplicate HEAD in Allow header.
     This is a regression in 2.4.24 (unreleased), 2.4.25 and 2.4.26.
     PR 61207. [Christophe Jaillet]

  [Apache 2.3.0-dev includes those bug fixes and changes with the
   Apache 2.2.xx tree as documented, and except as noted, below.]

Changes with Apache 2.2.x and later:

  *) http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=markup

Changes with Apache 2.0.x and later:

  *) http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/CHANGES?view=markup

repository: brunobuzzo/DevOps

path: /Apache HTTP Server-2017-08-08.md

filename: Apache HTTP Server-2017-08-08.md

repo_name: brunobuzzo/DevOps


text:
ocaml-raft Simulator
==========
[![Build Status](https://travis-ci.org/heidi-ann/ocaml-raft.svg?branch=master)](https://travis-ci.org/heidi-ann/ocaml-raft)

This is a complete implementation of base Raft consensus algorithm (not inc. membership changes and log compation). This project is described in detail in this [tech report](http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-857.pdf)

The simulator runs as either a discrete event simulator or a realtime simulator, in a range of network conditions.

To build run ```build.sh  ``` and to learn how to use the command line run ``` ./cmdstart.byte --help ```.
If you are familiar with OCaml, using an OCaml configure file for your simualation is your best bet.

### JS trace viewer ###
The following is an example of how to generate a trace from the command line and run through the output in javascript
```bash
$ cd ocaml-raft
$ make
$ /cmdstart.byte discrete -nodes 3  -follower Uniform-150-155 -candidate Uniform-11-22 -leader Fixed-75 -delay Fixed-7 -termOnTimeout 50000 -termOnElec -cmds 0 -backoff -json > output.json
$ cat output.json | python vis/parseJSON.py > vis/data.json
$ cd vis
$ python -m SimpleHTTPServer 8000
```

repository: bosconi/ocaml-raft

repo_name: bosconi/ocaml-raft


text:
# xennode
A quickly thrown together script to get Xenserver stats into a InfluxDB database

# Installation
To install you will need to have git and NodeJS/npm installed on your system. This code has been tested against a CentOS box but should work on Windows and maybe Mac too.
```
git clone https://github.com/adamxp12/xennode.git
cd xennode
npm install
(edit index.js. Set InfluxDB settings at top, and XenServer IP and login details near line 20)
node index (to start in debug mode)
```

# Daemonize with Forver-service
```
npm install -g forever
npm install -g forever-service
forever-service install xennode --script index.js
```
You can then use your operating systems choice of service management to autostart this script or manually start. For CentOS 7
```
systemctl enable xennode
systemctl start xennode
```


text:
# Specifications for the Sinatra Assessment

Specs:
- [x] Use Sinatra to build the app (Yup)
- [x] Use ActiveRecord for storing information in a database (Yup, all models inherit from ActiveRecord::Base and tables are set up by migration)
- [x] Include more than one model class (list of model class names e.g. User, Post, Category) (See them in app/models/)
- [x] Include at least one has_many relationship (x has_many y e.g. User has_many Posts) (User has many tribes, tribe has many resources, has many buildings, etc.)
- [x] Include user accounts (Yup)
- [x] Ensure that users can't modify content created by other users (Yup, sensitive routes are condition-blocked by logged_in and current_user_tribe)
- [x] Include user input validations (Happens in user signup, tribe management, etc.)
- [x] Display validation failures to user with error message (example form URL e.g. /posts/new) (Errors are flashed to the top of the screen)
- [x] Your README.md includes a short description, install instructions, a contributors guide and a link to the license for your code (Yup)

Confirm
- [x] You have a large number of small Git commits (Yup)
- [x] Your commit messages are meaningful (Yup)
- [x] You made the changes in a commit that relate to the commit message (Yup)
- [x] You don't include changes in a commit that aren't related to the commit message (Yup)

repository: kjleitz/sinatribes

repo_name: kjleitz/sinatribes


text:
# cloudflare-operator

[![Build](https://github.com/arikkfir/cloudflare-operator/actions/workflows/build.yml/badge.svg)](https://github.com/arikkfir/cloudflare-operator/actions/workflows/build.yml)

Operate Cloudflare resources as Kubernetes objects.

## Roadmap

- [x] Add APIKey object
- [ ] Support custom sync interval for `DNSRecord` objects
- [ ] Add tests that use a local cluster
- [x] Detect deletion of `DNSRecord` and delete the associated DNS record
- [ ] Update `Status` of `DNSRecord` objects
- [ ] Verify thread-safety for DNSRecordReconciler `loops` map

license: Unlicense

repository: arikkfir/cloudflare-operator

gha_language: Go

gha_license_id: Unlicense

repo_name: arikkfir/cloudflare-operator


text:
# ETS-Project parser
### Parse an ETS-Project
1) Import the parser
```
import etsProjParser from './etsProjParser'
```
2) Initialize the parser
```
const retVal = await etsProjParser(pathToProjectFile, pathToWorkdir)
```
- The initialization process mainly consists of the unpacking of the project
    - ETS-Project files are simple ZIP files containing XML files
- ```pathToProjectFile``` is the path of the ETS-Project file
- ```pathToWorkdir``` is the path to the directory the project will be unpacked to
    - The directory can be deleted after parsing is done - It should be deleted before parsing another project
3) Check if the initialization succeeded
- If everything went fine, ```retVal``` will be the parser-function
- On error, ```retVal``` will be an object of the ```Error``` type
```
if (retVal.constructor === Error) {
    console.error(retVal)
    process.exit(-1)
}
```
4) Start the actual parsing project
```
const result = await retVal(parseDeviceApplicationInformation)
```
- ```parseDeviceApplicationInformation``` (```Boolean```) enables/disables parsing information about the applications running on KNX devices (See ```result.deviceApplicationLookupTable```)
- NOTE that it can take more than 30 seconds for bigger projects
5) Check if parsing the project succeeded
```
if (result.constructor === Error) {
    console.error(result)
}
```
### The structure of a parsed project
- ```result``` is the result returned from the parser
- All the values below are example values
```
result = {
    projectInformation: {
        ID: "P-05A5",
        name: "ProjectXYZ",
        groupAddressStyle: "ThreeLevel",
        deviceCount: 33,
        lastModified: "1998-02-17T15:22:02.1918306Z",
        lastUsedPuid: 1234,
        GUID: "11c2cac3-4ab4-4548-8661-667a6c387cd9",
        completionStatus: "Editing",
        projectStart: "1996-06-18T22:22:42Z",
        etsVersion: {
            application: "ETS5",
            version: "5.4.953"
        }
    },
    topology: {
        areas: [
            ..., {
                ID: "P-05A5-0_A-1",
                name: "AreaABC",
                address: "1",
                lines: [
                    ..., {
                        ID: "P-05A5-0_L-1",
                        name: "Line123",
                        address: "1.0",
                        __referenceIDs: {
                            mediumTypeRefID: "MT-0"
                        },
                        devices: [
                            ..., {
                                ID: "P-05A5-0_DI-20",
                                name: "DeviceDEF",
                                description: "Is Green",
                                address: "1.0.13",
                                isCommunicationVisibilityCalculated: true,
                                programmingStatus: {
                                    serialNumber: "ABCDEFGH",
                                    applicationProgramLoaded: true,
                                    communicationPartLoaded: true,
                                    individualAddressLoaded: true,
                                    parametersLoaded: true,
                                    mediumConfigLoaded: true,
                                    lastUsedAPDULength: 40,
                                    maxReadAPDULength: 55,
                                    lastModified: "2009-01-24T20:25:11.7929688Z",
                                    lastDownload: "2010-12-24T22:30:00.7929688Z"
                                },
                                communicationObjectReferences: [
                                    ..., {
                                        __communicationObjectRefID: "M-0002_A-A062-11-180E_O-11_R-1426",
                                        description: "XYZ",
                                        readFlag: true,
                                        transmitFlag: false,
                                        updateFlag: true,
                                        writeFlag: true,
                                        isActive: true,
                                        channelID: "",
                                        connectors: [
                                            ..., {
                                                send: [
                                                    ..., {
                                                        __groupAddressRefID: "P-05A5-0_GA-17"
                                                    }, ...
                                                ],
                                                receive: [
                                                    ..., {
                                                        __groupAddressRefID: "P-05A5-0_GA-110"
                                                    }, ...
                                                ]
                                            }, ...
                                        ]
                                    }, ...
                                ],
                                parameterReferences: [
                                    ..., {
                                        __parameterRefID: "M-0002_A-A05C-32-3F16_P-24515_R-24515",
                                        parameterValue: "1"
                                    }, ...
                                ],
                                security: {
                                    sequenceNumber: 0,
                                    sequenceNumberTimestamp: "2011-02-29T18:03:03.0102982Z"
                                },
                                __referenceIDs: {
                                    productRefID: "M-0002_H-2CDG.20110.2011…CDG.20110.20113.20R0011",
                                    hardware2ProgramRefID: "M-0002_H-2CDG.20110.2011…R0011-1_HP-A05C-32-3F16"
                                }
                            }, ...
                        ]
                    }, ...
                ]
            }, ...
        ],
        unassignedDevices: [
            ..., contains the same type of objects as devices[], ...
        ]
    },
    buildings: [
        ..., {
            ID: "P-02A1-0_BP-1",
            name: "Building123",
            type: "Building",
            deviceReferences: [
                ..., {
                    __deviceRefID: "P-02A1-0_DI-1"
                }, ...
            ],
            functions: [
                ..., {
                    ID: "P-02A1-0_F-1",
                    name: "FunctionABC",
                    type: "SwitchableLight",
                    groupAddressReferences: [
                        ..., {
                            ID: "P-02A1-0_GF-5",
                            name: "GAReference123",
                            __groupAddressRefID: "P-02A1-0_GA-5"
                        }, ...
                    ]
                }, ...
            ],
            buildingParts: [
                ..., same type as the contents of buildings[] buf with another type, ...
            ]
        }, ...
    ],
    groupAddresses: {
        groupRanges: [
            ..., {
                ID: "P-02A1-0_GR-1",
                name: "New main group",
                rangeStart: 1,
                rangeEnd: 2047,
                passTroughLineCoupler: true,
                groupRanges: [
                    ..., GARanges can contain other GARanges, ...
                ],
                groupAddresses: [
                    ..., {
                        ID: "P-02A1-0_GA-1",
                        name: "GAName123",
                        address: 1,
                        description: "GroupAddressOfABC",
                        datapointType: "DPST-1-1",
                        passTroughLineCoupler: true,
                        centralFlag: false
                    }, ...
                ]
            }, ...
        ]
    },
    productLookupTable: [
        ..., {
            ID: "M-0002_H-2CDG.20110.20152.20R0011-1",
            name: "SA/S<IP_ADDRESS>",
            busCurrent: 12,
            serialNumber: "2CDG 110 152 R0011",
            flags: {
                isAccessory: false
                isPowerSupply: false
                isChoke: false
                isCoupler: false
                isPowerLineRepeater: false
                isPowerLineSignalFilter: false
                isCable: false
                isIPEnabled: false
                hasApplicationProgram1: true
                hasApplicationProgram2: false
                hasIndividualAddress: true
                noDownloadWithoutPlugin: false
            },
            products: [
                ..., {
                    ID: "M-0002_H-2CDG.20110.20152.20R0011-1_P-2CDG.20110.20152.20R0011",
                    text: "SA/S<IP_ADDRESS> Switch Actuator,4-fold,6A,MDRC",
                    orderNumber: "2CDG 110 152 R0011",
                    visibleDescription: "ProductDescriptionABC"
                }, ...
            ],
            __referenceIDs: {
                originalManufacturerID: "M-00C5",
                manufacturerID: "M-00C8",
                applicationProgramRefID: "M-0083_A-000D-11-501B"
            }
        }, ...
    ],
    manufacturerLookupTable: [
        ..., {
            ID: "M-0001",
            KNXmanufacturerID: "1",
            manufacturerName: "Siemens"
        }, ...
    ],
    datapointLookupTable: [
        ..., {
            ID: "DPT-1",
            dptNumber: 1,
            dptName: "1.xxx",
            dptText: "1-bit",
            dptSizeInBit: 1,
            datapointSubtypes: [
                ..., {
                    ID: "DPST-1-1",
                    subDptNumber: 1,
                    subDptName: "DPT_Switch",
                    subDptText: "switch"
                }, ...
            ]
        }, ...
    ],
    mediumTypeLookupTable: [
        ..., {
            ID: "MT-1",
            number: 1,
            name: "PL",
            text: "PowerLine",
            domainAddressLength: 8
        }, ...
    ],
    deviceApplicationLookupTable: [
        ..., {
            ID: "M-0002_A-A088-32-C0B5",
            name: "Switch 4f 6A/3.2b",
            number: 41096,
            version: "50",
            programType: "ApplicationProgram",
            maskVersion: "MV-0701",
            __manufacturerRefID: "M-0002"
        }, ...
    ],
    deviceMaskversionLookupTable: [
        ..., {
            ID: "MV-0010",
            maskVersion: 16,
            managementModel: "Bcu1",
            unloadedIndividualAddress: 65280,
            maxIndividualAddress: 32767,
            maxGroupAddress: 4095,
            __mediumTypeRefID: "MT-0",
            __otherMediumTypeRefID: "MT-1",
            resources: [
                ..., {
                    name: "ManagementStyle",
                    access: "remote local1",
                    addressSpace: "StandardMemory",
                    startAddress: 1,
                    ptrResource: "GroupObjectTablePtr",
                    interfaceObjectRef: 2,
                    propertyID: 5,
                    occurrence: 1,
                    length: 2,
                    flavour: "GroupObjectTable_Bcu11",
                    readRights: "Runtime",
                    writeRights: "Configuration"
                }, ...
            ],
            compatibleMaskVersionIDs: [
                ..., "MV-0910", ...
            ]
        }, ...
    ],
    // Functions
    getProjectInformation: Function,
    getAreas: Function,
    getAreaByKey: Function,
    getLines: Function,
    getLineByKey: Function,
    getUnassignedDevices: Function,
    getUnassignedDeviceByKey: Function,
    getDevices: Function,
    getDeviceByKey: Function,
    getBuildingParts: Function,
    getBuildingPartByKey: Function,
    getFunctions: Function,
    getFunctionByKey: Function,
    getGroupAddresses: Function,
    getGroupAddressByKey: Function,
    getProductsFamilies: Function,
    getProductFamilyByKey: Function,
    getProducts: Function,
    getProductByKey: Function,
    getManufacturers: Function,
    getManufacturerByKey: Function,
    getDatapointTypes: Function,
    getDatapointTypeByKey: Function,
    getDatapointSubTypes: Function,
    getDatapointSubTypeByKey: Function,
    getMediumTypes: Function,
    gedMediumTypeByKey: Function,
    getDeviceApplicationInformation: Function,
    getDeviceApplicationInformationByKey: Function,
    getMaskversions: Function,
    getMaskversionByKey: Function,
    exportToJson: Function
}
```
---
### The parts of a parsed project
- Single objects of the structure (above) are explained here
- Some objects lack explanation, due to missing information
- Normally, a whole tree is contained in one section below. But there are some exceptions, like the topology tree, that are split up because they are to complex for one section
### ```result.projectInformation```
- It contains general information about the project parsed from the project information file
    - This file is contained in the project directory inside the unpacked project:
        ```
        path/to/unpacked/project/P-*/project.xml
        ```
    - ```.ID``` stores the id of the project (```String```). Same name as the project directory inside the unpacked project. Normal format:
    ```
    "P-####"        Where '#' is replaced with other characters or numbers
    ```
    - ```.name``` stores the name of the project. (```String```)
    - ```.groupAddressStyle``` stores the group address representation style used in the project (```String```). Possible values:
    ```
    "Free"          No preferred group address representation is set        (both x/y and x/y/z)
    "TwoLevel"      Group addresses are represented in two-level-style      (only x/y)
    "ThreeLevel"    Group addresses are represented in three-level-style    (only x/y/z)
    ```
    - ```.deviceCount``` stores the number of devices contained in the project (```Number```)
    - ```.lastModified``` stores a date string representing the date the project was last modified (```String```)
    - ```.lastUsedPUID``` ... (```Number```)
    - ```.GUID``` ... (```String```)
    - ```.completionStatus``` stores the completion status of the project (```String```). Possible values:
    ```
    "FinishedDesign"
    "Locked"
    "Accepted"
    "Tested"
    "FinishedCommissioning"
    "Editing"
    "Unknown"
    ```
    - ```.projectStart``` stores a date string representing the starting date of the project (```String```)
    - ```.etsVersion``` stores information about the used version of ETS
        - ```.application``` store the name of the used application (```String```). Normally one of:
        ```
        "ETS5"          For all variations of ETS five
        "ETS4"          For all variations of ETS four
        ```
        - ```.version``` stores the more precise sub-version of the ETS version used (```String```)
---
### ```result.topology```
- It contains the project topology which contains all areas, lines and devices with their attributes stored in relation to each other
- ```.areas[]``` stores information about all areas contained in the project
#### ```result.topology.unassignedDevices[]```
- It contains devices that aren't designated to any area (and line)
- The device objects contained in it are the same as those in ```result.topology.areas[n].lines[n1].devices[]``` (see below)
#### ```result.topology.areas[]```
- (Described below is a single element of ```result.topology.areas[]```)
- ```.ID``` stores the ID of the area (```String```). Normally like:
    ```
    "[PROJECT_ID]-n_A-x"
    ```
    - ```[PROJECT_ID]``` is the ID of the project (see ```result.projectInformation.ID```)
    - ```n``` some number
    - ```A``` stands for "```A```rea"
    - ```x``` is the area index, starting for one
- ```.name``` stores the name of the area (```String```)
- ```.address``` stores the ares part of the individual address of a device (```String```)
    ```
    "AA.LL.DDD"
    ```
    - ```AA``` is the area part
    - < 4²
- ```.lines[]``` stores all line contained in the area
#### ```result.topology.areas[n].lines[]```
- (Described below is a single element of ```result.topology.areas[n].lines[]```)
- ```.ID``` stores the ID of the line (```String```). Normally like:
    ```
    "[PROJECT_ID]-n_L-x"
    ```
    - ```[PROJECT_ID]``` is the ID of the project (see ```projectInformation.ID```)
    - ```n``` some number
    - ```L``` stands for "```L```ine"
    - ```x``` is the line index, starting for one
- ```.name``` store the name of the line (```String```)
- ```.address``` stores the area and the line part of the individual address of a device (```String```)
    ```
    "AA.LL.DDD"
    ```
    - ```LL``` is the line part
    - < 4²
- ```.__referenceIDs``` contains IDs referencing other objects
    - ```.mediumTypeRefID``` stores the reference ID of the used physical medium (```String```). Can be resolved using:
    ```
    result.getMediumTypeByKey('ID', .mediumTypeRefID)
    ```
- ```.devices[]``` stores all devices contained in the line
#### ```result.topology.areas[n].lines[n1].devices[]```
- (Described below is a single element of ```result.topology.areas[n].lines[n1].devices[]```)
- ```.ID``` stores the ID of the device (```String```). Normally like:
    ```
    "[PROJECT_ID]-n_DI-x"
    ```
    - ```[PROJECT_ID]``` is the ID of the project (see ```projectInformation.ID```)
    - ```n``` some number
    - ```DI``` stands for "```D```evice" (forget about the ```I```)
    - ```x``` is the device index
- ```.address``` stores the whole individual address of a device (```String```)
    ```
    "AA.LL.DDD"
    ```
    - ```DDD``` is the device part
    - < 8²
- ```.isCommunicationVisibilityCalculated``` ...
- ```.programmingStatus``` stores device-programming related information
    - ```.serialNumber``` Stores the serial number of the device (```String```)
    - ```.applicationProgramLoaded``` (```Boolean```) Possible values:
    ```
    true        The application program is loaded onto the device
    false       The application program is not loaded onto the device
    ```
    - ```.communicationPartLoaded``` (```Boolean```) Possible values:
    ```
    true        The communication part is loaded onto the device
    false       The communication part is not loaded onto the device
    ```
    - ```.individualAddressLoaded``` (```Boolean```) Possible values:
    ```
    true        The individual address is loaded onto the device
    false       The individual address is not loaded onto the device
    ```
    - ```.parametersLoaded``` (```Boolean```) Possible values:
    ```
    true        The application parameters are loaded onto the device
    false       The application parameters are not loaded onto the device
    ```
    - ```.mediumConfigLoaded``` (```Boolean```) Possible values:
    ```
    true        The medium config is loaded onto the device
    false       The medium config is not loaded onto the device
    ```
    - ```.lastUsedAPDULength```  (```Number```) ...
    - ```.maxReadAPDULength``` (```Number```) ...
    - ```.lastModified``` (```String```) stores the date of the last time the devices programming was changed
    - ```.lastDownload``` (```String```) stores the data of the last time something was written to the device
- ```.security``` ...
    - ```.sequenceNumber``` (```Number```)
    - ```.sequenceNumberTimestamp``` (```String```) stores the date of the origin of the sequenceNumber
- ```.__referenceIDs```
    - ```.productRefID``` (```String```) stores the reference to the product/hardware this device is. Can be resolved with:
        ```
        result.getProductByKey('ID', .productRefID)
        ```
    - ```.hardware2ProgramRefID``` (```String```) stores the reference to the application running on this device
- ```.parameterReferences[]``` explained below
- ```.communicationObjectReferences[]``` explained below
#### ```result.topology.areas[n].lines[n1].devices[n2].parameterReferences[]```
- (Described below is a single element of ```result.topology.areas[n].lines[n1].devices[n2].parameterReferences[]```)
- It stores information about device parameters/settings
- ```.__parameterRefID``` (```String```) stores the ID of the referenced parameter
    - No parameter reference resolving supported
- ```.parameterValue``` stores the value of the referenced parameter
    - No static type can be determined
#### ```result.topology.areas[n].lines[n1].devices[n2].communicationObjectReferences[]```
- (Described below is a single element of ```result.topology.areas[n].lines[n1].devices[n2].communicationObjectReferences[]```)
- A communication object is an object that describes how and with whom the device communicates linked to a specific property of the device
- It also contains the group addresses used and the read, transmit and update flag of the property
- It is the data behind 'Group Objects' tab of a device in ETS
- ```.__communicationObjectRefID``` (```String```) stores the ID of the referenced communication object
- ```.description``` (```String```) stores the description
- ```.readFlag``` (```Boolean```) if the object is readable or noht
- ```.transmitFlag``` (```Boolean```) if the object is transmittable (?) or not
- ```.updateFlag``` (```Boolean```) if the object is updateable (?) or not
- ```.writeFlag``` (```Boolean```) if the object is writable or not
- ```.isActive``` (```Boolean```) if the object is active or not
- ```.channelID``` (```Unknown```) ...
- ```.connectors``` stores information about where data is sent to and where data will be received from
    - ```.send[]``` stores group addresses to which data will be sent to
        - ```.__groupAddressRefID``` (```String```) stores the ID of the referenced group address
    - ```receive[]``` stores group addresses from which data will be received
        - ```.__groupAddressRedID``` (```String```) stores the ID of the referenced group address
---
### ```result.buildings[]```
- (Described below is a single element of ```result.buildings[]```)
- It contains all buildings, building parts, devices and functions of the project stored in relation to each other
- It is important to notice that a building is technically a building part like a floor, a stairway, ...
- ```.ID``` (```String```) stores the ID of the building part
    ```
    "[PROJECT_ID]-n_BP-x"
    ```
    - ```[PROJECT_ID]``` is the ID of the project (see ```projectInformation.ID```)
    - ```n``` some number
    - ```BP``` stands for ```B```uilding```P```art
    - ```x``` is the buildings index
- ```.name``` (```String```) the name of the building part
- ```.type``` (```String```) the type of the building part. Normally one of:
    ```
    "Building"
    "BuildingPart"
    "Room"
    "DistributionBoard"
    "Floor"
    "Stairway"
    ```
- ```.deviceReferences[]```
    - ```.__deviceRefID``` (```String```) stores the ID of the referenced device. Can be resolved with:
    ```
    result.getDeviceByKey('ID', .__deviceRefID)
    ```
- ```.functions[]```
    - ```.ID``` (```String```) the ID of the function
        ```
        "[PROJECT_ID]-n_F-x"
        ```
        - ```[PROJECT_ID]``` is the ID of the project (see ```projectInformation.ID```)
        - ```n``` some number
        - ```F``` stands for ```F```unction
        - ```x``` is the functions index
    - ```.name``` (```String```) stores the name of the function
    - ```.type``` (```String```) stores the type of the function. Normally one of:
        ```
        "DimmableLight"
        "SwitchableLight"
        "SunProtection"
        "HeatingRadiator"
        "HeatingFloor"
        "Custom"
        ```
    - ```.groupAddressReferences[]```
        - ```.ID``` (```String```) stores the ID of the group address reference
            ```
            "P-02A1-0_GF-5"
            ```
        - ```.name``` (```String```) stores the name of the GAF
        - ```.role``` (```String```) stores the role of the GAF. Examples:
            ```
            "SwitchOnOff"
            "RelativeSetvalueControl"
            "ActualDimmingValue"
            "InfoOnOff"
            ```
        - ```.__groupAddressRefID``` (```String```) stores the ID of the referenced GroupAddress. Can be resolved with:
            ```
            result.getGroupAddressByKey('ID', .__groupAddressRefID)
            ```
- ```.buildingParts[]``` stores more building parts ("recursive")
---
### ```result.groupAddresses[]```
- (Described below is a single element of ```result.groupAddresses[]```)
- Contains a structure of GroupRanges which contain GroupAddresses
- ```.groupRanges[]```
- ```.ID``` (```String```) stores the ID of the GroupRange
    ```
    "[PROJECT_ID]-n_GR-x"
    ```
    - ```[PROJECT_ID]``` is the ID of the project (see ```projectInformation.ID```)
    - ```n``` some number
    - ```GR``` stands for ```G```roup```R```ange
    - ```x``` is the group ranges index
- ```.name``` (```String```) stores the name of the GroupRange
- ```.rangeStart``` (```Number```) stores the start group address of the range
- ```.rangeEnd``` (```Number```) stores the end group address of the range
- ```.passTroughLineCoupler``` (```Boolean```) Possible values:
    ```
    true        Messages with group addresses in this range will be passed trough a line coupler
    false       Messages with group addresses in this range won't be passed trough a line coupler
    ```
- ```.groupAddresses[]```
    - ```.ID``` (```String```) stores the ID of the GroupAddress
        ```
        "[PROJECT_ID]-n_GA-x"
        ```
        - ```[PROJECT_ID]``` is the ID of the project (see ```projectInformation.ID```)
        - ```n``` some number
        - ```GA``` stands for ```G```roup```A```ddress
        - ```x``` is the group addresses index
    - ```.name``` (```String```) stores the name of the GroupAddress
    - ```.address``` (```Number```) stores the actual GroupAddress
    - ```.description``` (```String```) stores the description of the GroupAddress
    - ```.datapointType``` (```String```) stores the datapoint type ID associated with this address.
        - There are two possible ```.datapointType``` "variations":
        ```
        DPT-n
        DPST-n-n1
        ```
        - ```DP(S)T``` stands for ```D```ata```p```oint(```S```ub)```T```ype
        - ```n``` is the number of the datapoint type
        - ```n1``` is the number of the datapoint sub-type
        ```
        result.getDatapointTypeByKey('ID', .datapointType)
        ```
        - The first variation can be resolved with:
        ```
        result.getDatapointType('ID', .datapointType)
        ```
        - ... and the second one can be resolved with:
        ```
        result.getDatapointSubTypeByKey('ID', .datapointType)
        ```
    - ```.passTroughLineCoupler``` (```Boolean```) Possible values:
        ```
        true        Messages with group addresses in this range will be passed trough a line coupler
        false       Messages with group addresses in this range won't be passed trough a line coupler
        ```
        - If ```.passTroughLineCoupler``` is set in the GroupRange above, it is inherited from it
    - ```.centralFlag``` (```Boolean```) ...
---
### ```result.productLookupTable[]```
- (Described below is a single element of ```result.productLookupTable[]```)
- It contains product families containing products
- ```.ID``` (```String```) stores the ID of the product family
    ```
    "[MANUFACTURER_ID]_[PRODUCT/MANUFACTURER_SPECIFIC]"
    Example:   "M-0002_H-2CDG.20110.20152.20R0011-1"
    ```
    - For information about MANUFACTURER_IDs, see ```result.manufacturerLookupTable[]```
- ```.name``` (```String```) stores the name of the product family
- ```.busCurrent``` (```Number```) ...
- ```.serialNumber``` (```String```) stores the serial number of the product family
- ```.flags```
    - ```.isAccessory``` (```Boolean```)
    - ```.isPowerSupply``` (```Boolean```)
    - ```.isChoke``` (```Boolean```)
    - ```.isCoupler``` (```Boolean```)
    - ```.isPowerLineRepeater``` (```Boolean```)
    - ```.isPowerLineSignalFilter``` (```Boolean```)
    - ```.isCable``` (```Boolean```)
    - ```.isIPEnabled``` (```Boolean```)
    - ```.hasApplicationProgram1``` (```Boolean```)
    - ```.hasApplicationProgram2``` (```Boolean```)
    - ```.hasIndividualAddress``` (```Boolean```)
    - ```.noDownloadWithoutPlugin``` (```Boolean```) One of:
        ```
        true        All devices in this family can't be programmed without using a manufacturer specific plugin
        false       All devices in this family can be programmed the normal way
        ```
- ```.products[]``` Contains the actual products contained in the product family
    - ```.ID``` (```String```) stores the ID of the product
        - Same structure as the ```.ID``` field of the overlaying product family, but with more data appended to it
    - ```.text``` (```String```) stores a short name-like description of the product
    - ```.orderNumber``` (```String```) ...
    - ```.visibleDescription``` (```String```) stores a description of the product
- ```.__referenceIDs[]```
    - ```.originalManufacturerID``` (```String```) stores the ID of the manufacturer who originally produced this product
    - ```.manufacturerID``` (```String```) stores the ID of the manufacturer who sold this product
    - ```.applicationProgramRefID``` (```String```) the ID of the application program used for this product family
    - ```.originalManufacturerID``` and ```.manufacturerID``` can be resolved with:
        ```
        result.getManufacturerByKey('ID', .originalManufacturerID or .manufacturerID)
        ```
    - ```.applicationProgramRefID``` can be resolved with:
        ```
        result.getDeviceApplicationInformationByKey('ID', .applicationProgramRefID)
        ```
---
### ```result.manufacturerLookupTable[]```
- (Described below is a single element of ```result.manufacturerLookupTable[]```)
- It contains information about KNX device manufacturers
- ```.ID``` (```String```) stores the ID of the manufacturer
    ```
    "M-0001"
    ```
    - ```M``` standing for "```M```anufacturer"
    - ```0001``` being the manufacturer ID, this one standing for Siemens
- ```.KNXmanufacturerID``` (```Number```) being the KNX manufacturer number/ID
- ```.manufacturerName``` (```String```) stores the name of the manufacturer
---
### ```result.datapointLookupTable[]```
- (Described below is a single element of ```result.datapointLookupTable[]```)
- It contains information about datapoint types and their sub-types
- ```.ID``` (```String```) stores the ID of the datapoint type
    ```
    "DPT-1"
    ```
    - ```DPT``` stands for "```D```ata```P```oint```T```ype"
    - ```1``` is the ID/number of the DPT
- ```.dptNumber``` (```Number```) stores the number of this DPT
- ```.dptName``` (```String```) stores the name of this DPT
- ```.dptText``` (```String```) stores a short describing string about this DPT
- ```.dptSizeInBit``` (```Number```) stores the size of the data transmitted labeled with this DPT
- ```.datapointSubtypes```
    - ```.ID``` (```String```) stores the ID of the datapoint sub-type
        ```
        "DPST-1-1"
        ```
        - ```DPST``` stand for ```D```ata```P```oint```S```ub```T```ype
        - ```1``` is the ID/number of the DPT
        - ```1``` is the ID/number of the DPST
    - ```.subDptNumber``` (```Number```) stores the number of the DPST
    - ```.subDptName``` (```String```) stores the name of the DPST
    - ```.subDptText``` (```String```) stores a short describing string about this DPST
---
### ```result.mediumTypeLookupTable[]```
- (Described below is a single element of ```result.mediumTypeLookupTable[]```)
- It contains information about physical KNX mediums
- ```.ID``` (```String```) stores the ID of the KNX medium
    ```
    "MT-1"
    ```
    - ```MT``` stands for ```M```edium```T```ype
    - ```1``` is the MT number
- ```.number``` (```Number```) stores the number of the MT
- ```.name``` (```String```) stores the name of the MT
- ```.text``` (```String```) stores a short describing string about this MT
- ```.domainAddressLength``` (```Number```) ...
---
### ```result.deviceApplicationLookupTable```
- (Described below is a single element of ```result.deviceApplicationLookupTable```)
- It contains information about device application programs
- ```.ID``` (```String```) stores the ID of the device application program
- ```.name``` (```String```) stores the name of the DAP
- ```.number``` (```Number```) stores the DAP number (also stored on the KNX device)
- ```.version``` (```String```) stores the version of the DAP (-||-)
- ```.programType``` (```String```) stores a string describing the type of the DAP. Possible values:
    ```
    ...
    ```
- ```.maskVersion``` (```String```) stores the mask version for the application program
- ```.__manufacturerRefID``` (```String```) stores the ID of the manufacturer of the device family this application program should run on. Can be resolved with:
    ```
    result.getManufacturerByKey('ID', .__manufacturerRefID)
    ```
### ```result.deviceMaskversionLookupTable```
- (Described below is a single element of ```result.deviceMaskversionLookupTable```)
    ```
    "MV-0010"
    ```
    - ```MV``` stand for ```M```ask```V```ersion
    - ```0010``` represents the maskversion number in hex (see ```.maskVersion```)
- ```.ID``` (```String```) stores the ID of the device maskversion
- ```.name``` (```String```) stores the name of the maskversion
- ```.maskVersion``` (```Number```) the number of the maskversion
- ```.managementModel``` (```String```) stores the management model of this maskversion. Some examples:
    ```
    "None"
    "Bcu1"
    "Bcu2"
    "PropertyBased"
    "BimM112"
    "SystemB"
    ```
- ```.unloadedIndividualAddress``` (```Number```) stores the individual address the device would use when it isn't programmed to use another address
- ```.maxIndividualAddress``` (```Number```) stores the highest individual address usable with devices (device applications) with this maskversion
- ```.maxGroupAddress``` (```Number```) stores the highest group address usable with devices (device applications) with this maskversion
- ```.__mediumTypeRefID``` (```String```) stores the reference ID of the medium type device applications with this maskversion can run on
- ```.__otherMediumTypeRefIDs``` (```String```) stores a reference ID of an alternative medium type
- ```.compatibleMaskVersionIDs[]``` (```String[]```) stores strings (like ```.__mediumTypeRefID```)
- ```.resources[]```
### ```result.deviceMaskversionLookupTable.resources```
(Described below is a single element of ```result.deviceMaskversionLookupTable.resources```)
- A resource describes a resource available on KNX devices with the corresponding maskversion
    - Normally, the resource is a value than can be read/written from/to the device like the ```ProgrammingMode``` resource, which can be read to check if the device is in programming mode. It can also be set into programming mode by writing a value to the resource
    - There are (mostly) two ways of accessing a resource:
        - Via direct memory reading/writing - for this ```.startAddress```, ```.length``` and ```.addressSpace``` must be given
        - Via property read/write requests - for this ```.propertyID```, ```.length```
- ```.name``` (```String```) stores the name of the resource
- ```.access``` (```String```) stores a string describing how/from where the resource is accessible. Examples:
    ```
    "remote local1"
    "remote local2"
    "local1"
    "remote local1 local2"
    ```
- ```.addressSpace``` (```String```) stores a string describing describing in which address space the resource is stored on the KNX device. Normally one of:
    ```
    "SystemProperty"
    "StandardMemory"
    "RelativeMemory"
    "RelativeMemoryByObjectType"
    "Pointer"
    "Property"
    "LcFilterMemory"
    "Constant"
    "ADC"
    "None"
    ```
    - ``````
- ```.startAddress``` (```Number```) stores the address of the first byte to read when using direct memory access
- ```.ptrResource``` (```String```) stores the name of the resource that points to this resource
    - Will only be set if ```.addressSpace``` equals
        ```
        "Pointer"
        ```
    - Usually one of:
        ```
        "GroupAddressTablePtr"
        "GroupAssociationTablePtr"
        "GroupObjectTablePtr"
        ```
- ```.interfaceObjectRef``` (```Number```) ...
- ```.propertyID``` (```Number```)
- ```.occurrence``` (```Number```) stores the property ID when using property based access
- ```.length``` (```Number```) stores the length of the resource, independent from the method used to access the resource
- ```.flavour``` (```String```) stores the flavour/type of the resource. (Usually) one of:
    ```
    "AddressTable_Bcu1",
    "AddressTable_Bcu1PL",
    "AddressTable_SystemB"
    "AssociationTable_Bcu1"
    "AssociationTable_Bcu2"
    "AssociationTable_M112"
    "AssociationTable_SysteB"
    "FrequencyChannel_Bcu1PL"
    "GroupObjectTable_Bcu10"
    "GroupObjectTable_Bcu11"
    "GroupObjectTable_Bcu1PL"
    "GroupObjectTable_Bcu2"
    "GroupObjectTable_M112"
    "GroupObjectTable_System300"
    "GroupObjectTable_SystemB"
    "HardwareConfig_Identical"
    "HardwareConfig_Version"
    "Lc_10"
    "Lc_11"
    "Lc_12"
    "LoadControl_Bcu2"
    "LoadControl_M112"
    "ManagementStyle_Bcu2"
    "PeiType_Adc"
    "PeiType_Prop"
    "PlMc"
    "ProgrammingMode_Bcu1"
    "ProgrammingMode_Prop"
    "Ptr_StandardMemory"
    "Ptr_StandardMemory100"
    "ReConfig_Bcu1PL"
    "ReConfig_Rf"
    "RunControl_Bcu1"
    "Runerror_Bcu1"
    "Sensitivity_Bcu1PL"
    "Stamp_SystemB"
    "Voltage_Adc"
    ```
- ```.readRights``` (```String```) stores a string describing the "situation" in which the resource can be read. Examples:
    ```
    "Configuration"
    "None"
    "Runtime"
    ```
- ```.writeRights``` (```String```) stores a string describing the "situation" in which the resource can be written. Examples:
    ```
    "Configuration"
    "None"
    "Runtime"
    ```
## Functions
- For information on the returned values, see above
### ```result.get*ByKey(key, value)```
- Function of this type (see below) are used to get an element which matches the key-value pair
    ```
    let a = [
        {
            b: 1,
            c: 2,
            e: 5
        },
        {
            b: { c: 3 },
            e: 5
        },
        {
            d: 4,
            e: 5
        }
    ]

    // If there would be a function result.getAByKey()
    //      result.getAByKey('b', 1) would return [{b: 1, c: 2, e: 5}]
    //      result.getAByKey(['b', 'c'], 3) would return [{b: { c: 3 }, e: 5}]
    //      result.getAByKey('e', 5) would return all members of the array a
    ```
#### ```result.getProjectInformation()```
- Returns ```result.projectInformation```
#### ```result.getAreas()```
- Returns ```result.topology.areas[]```
#### ```result.getAreaByKey(key, value)```
- Returns an array of matching elements of ```result.topology.areas[]```
#### ```result.getLines()```
- Returns ```result.topology.areas[n].lines[]```
#### ```result.getLineByKey(key, value)```
- Returns an array of matching elements of ```result.topology.areas[n].lines[]```
#### ```result.getUnassignedDevices()```
- Returns ```result.topology.unassignedDevices[]```
#### ```result.getUnassignedDeviceByKey(key, value)```
- Returns an array of matching elements of ```result.topology.unassignedDevices[]```
#### ```result.getDevices()```
- Returns ```result.topology.areas[n].lines[n1].devices[]```
#### ```result.getDeviceByKey(key, value)```
- Returns an array of matching elements of ```result.topology.areas[n].lines[n1].devices[]```
#### ```result.getBuildingParts()```
- Returns ```result.buildings[]```
#### ```result.getBuildingPartByKey(key, value)```
- Returns an array of matching elements of ```result.buildings[]```
#### ```result.getFunctions()```
- Returns ```result.buildings[n].functions[]```
#### ```result.getFunctionByKey(key, value)```
- Return an array of matching elements of ```result.buildings[n].functions[]```
#### ```result.getGroupAddresses()```
- Returns ```result.groupAddresses[]```
#### ```result.getGroupAddressByKey(key, value)```
- Returns an array matching elements of ```result.groupAddresses[0-n].groupAddresses[]```
#### ```result.getProductFamilies()```
- Returns ```result.productLookupTable[]```
#### ```result.getProductFamilyByKey(key, value)```
- Returns an array of matching elements of ```result.productLookupTable[]```
#### ```result.getProducts()```
- Returns ```result.productLookupTable[n].products[]``` with a modification:
    - Every product contained in the returned array got an extra field:
        ```
        result.productLookupTable[n].products[n1].productFamilyInformation
        ```
        - which represents the ```result.productLookupTable[n]``` object the product was originally contained in
        - NOTE that the ```.products``` field of the ```.productFamilyInformation``` field is deleted
#### ```result.getProductByKey(key, value)```
- Returns ```result.productLookupTable[n].products```
    - All elements are altered as described above (```result.getProducts()```)
#### ```result.getManufacturers()```
- Returns ```result.manufacturerLookupTable[]```
#### ```result.getManufacturerByKey(key, value)```
- Returns an array of matching elements of ```result.manufacturerLookupTable[]```
#### ```result.getDatapointTypes()```
- Returns ```result.datapointLookupTable[]```
#### ```result.getDatapointTypeByKey(key, value)```
- Returns an array of matching elements of ```result.datapointLookupTable[]```
#### ```result.getDatapointSubTypes()```
- Returns ```result.datapointLookupTable[n].datapointSubtypes[]```
#### ```result.getDatapointSubTypeByKey(key, value)```
- Returns an array of matching elements of ```result.datapointLookupTable[n].datapointSubtypes[]```
#### ```result.getMediumTypes()```
- Returns ```result.mediumTypeLookupTable[]```
#### ```result.getMediumTypeByKey(key, value)```
- Returns an array of matching elements of ```result.mediumTypeLookupTable[]```
#### ```result.getDeviceApplicationInformation()```
- Returns ```result.deviceApplicationLookupTable```
#### ```result.getDeviceApplicationInformationByKey(key, value)```
- Returns an array of matching elements of ```result.deviceApplicationLookupTable```
#### ```result.exportToJson(outputFilePath)```
- Writes the parsed project (```result```) into ```outputFilePath``` in JSON format
- Functions are obviously not written into that file
## Import a parsed project
- An exported parsed project (in JSON format) can be imported like this:
    ```
    import readProject from './readProjectFromJson'

    let result = await readProject(pathToExportedParsedProject).catch(e => {
        ...
    })
    ```
- ```pathToExportedParsedProject``` is a path a parsed exported project (a file written by ```result.exportToJson()```)
- The returned value ```result``` is a promise that resolves into the same structure as the ```result``` structure returned from the parser (see above)
# Examples
- An example can be found in ```test.js```
- It contains the initialization of the parser, how to use it and how to work with the parsed project
- To run the test/example:
    ```
    yarn test path/to/knx/project/file.knxproj
    ```


text:
# xpoll

**xpoll(3)** is a simple abstraction of **poll(2)** with underlying
implementations provided by **poll(2)**, **epoll(7)**, and **kqueue(2)**.
It is loosely modeled on Linux's **epoll(7)** as _epoll_ has fewer
capabilities than FreeBSD's kqueue.
While it's not a drop-in replacement for **poll(2)**, it should prove fairly
easy to retrofit **poll(2)** based programs to use **xpoll(3)**.

# Build and Test
_**main.c**_ is a simple test program to demonstrate the power and
efficiency of **epoll(7)/kqueue(2)** vs **poll(2)**.

First, it creates an array of n pipes and makes all pipe fds (both
read and write ends) known to _xpoll_ (i.e., it sets **POLLIN**
on each read-end and disables all write-ends).  We start things off
by writing to the write-end of the first pipe.

Next, we enter a timed loop which calls _xpoll()_ until the timer fires.
When _xpoll()_ returns, the "ready for read" pipe is read and then the
next pipe in the array is enabled for **POLLOUT** (circling back to the
first pipe once the end of the array is reached).  When _xpoll()_ returns
that the "ready for write" pipe is ready, we disable **POLLOUT** on that
fd and then write to it.  On the next iteration _xpoll()_ will return
that it is ready to read, and we'll repeat the entire process over
with the next pipe in the array.

Repeating the test with successively larger number of pipes (n)
shows that **poll(2)** performs much worse as n goes up, while
**epoll(7)/kqueue(2)** produce consistent results regardless of n
(until n becomes very large).

## FreeBSD
Build and run the **kqueue(2)** based test (FreeBSD 13.0-RELEASE-p2 amd64):

```
$ gmake
cc -Wall -O2 -g3 -I. -DNDEBUG  -c -o xpoll.o xpoll.c
cc -Wall -O2 -g3 -I. -DNDEBUG  -c -o main.o main.c
cc   xpoll.o main.o   -o xpoll

$ ./xpoll
     8 10.001  14739959  7369980   1473887.72
           8 connections
      10.001 total run time
    14739959 total iterations
     7369980 total read operations
  1473887.72 reads/sec

$ ./xpoll 1000
  1000 10.001  13928585  6964293   1392773.82
        1000 connections
      10.001 total run time
    13928585 total iterations
     6964293 total read operations
  1392773.82 reads/sec
```

Build and run the **poll(2)** based test:

```
$ gmake clean poll
cc -Wall -O2 -g3 -I. -DNDEBUG -DXPOLL_POLL=1  -c -o xpoll.o xpoll.c
cc -Wall -O2 -g3 -I. -DNDEBUG -DXPOLL_POLL=1  -c -o main.o main.c
cc   xpoll.o main.o   -o xpoll

$ ./xpoll
     8 10.005   3920108  1960054    391819.20
           8 connections
      10.005 total run time
     3920108 total iterations
     1960054 total read operations
   391819.20 reads/sec

$ ./xpoll 1000
  1000 10.001     20518    10259      2051.60
        1000 connections
      10.001 total run time
       20518 total iterations
       10259 total read operations
     2051.60 reads/sec
```

Comparing the _reads/sec_, we see that for 8 pipes **kqueue(2)**
is roughly 3.7 times faster than **poll(2)** in responding
events, while for 1000 pipes **kqueue(2)** is over _679_ times
faster than **poll(2)**.

## Linux
Build and run the **epoll(2)** based test (Fedora 34 5.11.12-300.fc34.x86_64
in a VirtualBox VM on the host used for the FreeBSD test):

```
$ gmake
cc -Wall -O2 -g3 -I. -DNDEBUG  -c -o xpoll.o xpoll.c
cc -Wall -O2 -g3 -I. -DNDEBUG  -c -o main.o main.c
cc   xpoll.o main.o   -o xpoll

$ ./xpoll
     8 10.001  10265379  5132690   1026485.04
           8 connections
      10.001 total run time
    10265379 total iterations
     5132690 total read operations
  1026485.04 reads/sec

$ ./xpoll 1000
  1000 10.001   8821735  4410868    882090.23
        1000 connections
      10.001 total run time
     8821735 total iterations
     4410868 total read operations
   882090.23 reads/sec
```

Build and run the **poll(2)** based test:

```
$ gmake clean poll
cc -Wall -O2 -g3 -I. -DNDEBUG -DXPOLL_POLL=1  -c -o xpoll.o xpoll.c
cc -Wall -O2 -g3 -I. -DNDEBUG -DXPOLL_POLL=1  -c -o main.o main.c
cc   xpoll.o main.o   -o xpoll

$ ./xpoll
     8 10.001   5773675  2886838    577317.68
           8 connections
      10.001 total run time
     5773675 total iterations
     2886838 total read operations
   577317.68 reads/sec

$ ./xpoll 1000
  1000 10.001     57978    28989      5797.41
        1000 connections
      10.001 total run time
       57978 total iterations
       28989 total read operations
     5797.41 reads/sec
```

Comparing the _reads/sec_, we see that for 8 pipes **epoll(2)**
is roughly 1.8 times faster than **poll(2)** in responding
events, while for 510 pipes **epoll(2)** is roughly 152 times
faster than **poll(2)**.  Note that I would expect much
better numbers when not run within a VM, so YMMV.  I will
try to gather some numbers from a real machine when I get
a chance, and maybe bump up the open fd limits as well...

repository: beckerg/xpoll

repo_name: beckerg/xpoll


text:
# UI-licious Command Line Interface

![Example](https://github.com/uilicious/uilicious-cli/raw/main/readme-img/uilicious-cli-help.png)

[UI-licious](https://uilicious.com) is a tool for development teams to rapidly create and run end-to-end user journey tests for their web applications.

This command line interface allows you to run and manage your UI-licious tests through the command line.

> Note that the UI-licious CLI can only be used with an active subscription of UI-licious.

## Installation

You may install the CLI by downloading the recommended binary distribution, or via NPM.

### Download binaries directly from our github release page (recommended)

* [all releases](https://github.com/uilicious/uilicious-cli/releases)

### Download via npm

Before installing this package, ensure that npm is updated to the latest version:
```
$ npm install npm@latest -g
```

Run the following to install uilicious-cli globally:
```
$ npm install uilicious-cli -g
```

## Using `--help`

Use the `--help` option to list the available top level commands:
```
$ uilicious-cli --help
```

To get more information about a single command, use `--help` after the command:

```
$ uilicious-cli <command> --help
```

![Run Help](https://github.com/uilicious/uilicious-cli/raw/main/readme-img/uilicious-cli-run-help.png)

## Authentication

You can use your access key or username and password to authenticate yourself.

### Authentication with access key

> **Where can I get my access key?**

> Login to UI-licious Studio, go to "[Account and Billing > Access Key](https://user.uilicious.com/profile/accessKeys)"  to view and regenerate your access key

You can set your access key with the `--key` option when using the cli, e.g.:
```
$ uilicious-cli run "demo" "/login/test 1" --key <acccess_key>
```

Alternatively, you can set the environment variable `UILICIOUS_ACCESSKEY`

### Authentication with username and password

Alternative you can authenticate with your username and password, using the `--user` and `--pass` options e.g.
```
$ uilicious-cli run "demo" "/login/test 1" --user <username> --pass <password>
```

You can also use the short form `-u` or `-p`, e.g.:
```
$ uilicious-cli run "demo" "/login/test 1" -u <username> -p <password>
```

## Running a test

![Run Example](https://github.com/uilicious/uilicious-cli/raw/main/readme-img/uilicious-cli-run-example.png)

```
$ uilicious-cli project run  <project_name> <script_path> [--browser] [--width] [--height]
```
* `<project_name>` - Name for the project being tested.
* `<script_path>` - Name of the test script being executed.

**Additional Options**
+ `--browser <browser_name>` options :  e.g. chrome, firefox, edge, safari, ie11 (default "chrome")
+ `--height <browser_height>` height of browser (default "960")
+ `--width <browser_width>` width of browser (default "1280")
+ `--testCodeDir <browser_dir>` Directory to use for test code, this is used instead of the existing uilicious project code.

> For more additional options, please refer to the `uilicious-cli project run --help` output

### Setting the `DATA` object

The `DATA` object is a special object you can use in the test script for dynamic test data.

You can use the `DATA` object in your script like this:
```javascript
// Here's an example to help you get started!
I.goTo("https://github.com")
I.click("Sign up")
I.see("Join GitHub")
I.fill("Username", DATA.username)
I.fill("Email", DATA.email)
I.fill("Password", DATA.password)
I.click("Create an account")
```

You can set the `DATA` using a json string using `--dataObject` or by reading from json file using `--dataFile`.

E.g.
```
$ uilicious-cli run "github" "Login" --dataObject<EMAIL_ADDRESS>$ uilicious-cli run "github" "Login" --dataFile "./user-brucewayne.json"
```

### Dataset
You can now configure variables for running tests on different environments.

You can manage the datasets in Uilicious Project editor. To run a test using dataset, you need to specify the name of dataset using `--dataset`.

E.g.
```
uilicious-cli run Demo demo --dataset "PROD"
```

## Upload files to a project

You can upload files from a local directory to an UI-licious project using the `upload` command. If the project does not exists, it will be automatically created:
```bash
uilicious-cli upload <project_name> <local_directory>
```

## Download files from a project

You can download files from a UI-licious project to a local directory using the `download` command. Files will be overwritten in the destination folder if they already exist.

```bash
uilicious-cli download <project_name> <local_directory>
```

### To test your local web applications

Plese use services such as

- https://www.cloudflare.com/products/tunnel/
- https://ngrok.com/ (warning, free tier maybe rate limited)

Native ngrok support is deprecated from v3.0.0

## Deprecated Commands

> **Warning**: Please avoid using deprecated aliases for the commands, as they may be removed in the future.

Command  | **Deprecated** aliases | Removal Schedule | Purpose
------   | ---------------------- | ---------------- | ------------------
run      |                        | none             | Run a test
download | export                 | none             | Download a project to a local directory
upload   | import                 | none             | Upload files from a local directory to a project

> Commands with removal schedule of "none" will have atleast 6 months notice warning, when we plan its removal. And will be treated as a major CLI version upgrade.

## Reporting issues with the CLI / Need help ?

Find us on [discord](https://discord.gg/DZCmSRFwq8)
Or contact us at [hello<EMAIL_ADDRESS>
Note: We **do not** actively monitor our github issues - as such its much more reliable to reach out to us on discord / our support email.

---

Copyright © 2022 Uilicious Private Limited

repository: uilicious/uilicious-cli

repo_name: uilicious/uilicious-cli


text:
# git-pre-commit

This repository has code to demo the Git pre-hooks. Git pre-commit hook is configured with Gradle Project.

How to use it? follow below commands:
```SHELL
./gradlew build
git commit -m "Any Message"

```

Files to follow:
- scritps/pre-commit
- build.gradle (line no 24 - 30)

repository: giuseppegargani/git-pre-commit

repo_name: giuseppegargani/git-pre-commit


text:
# MPD client library

MPD client library for [Nim](https://nim-lang.org)

## Installation

`nimble install mpdclient`

## Example usage

```nim
import mpdclient

let mpd = newMPDClient()
for song in mpd.playlistId:
  echo song.tags["Album"]
```

repository: SolitudeSF/mpdclient

gha_language: Nim

repo_name: SolitudeSF/mpdclient


text:
# whatdidilearn
https://whatdidilearn.org/

Research database built to keep track of papers read.

It is possible to:
- save papers to your personal library
- add tags to group papers
- add comments/notes
- add scores on benchmarks (either public, eg. Imagenet or your own personal benchmarks)

Library and tags are always public.  Comments and benchmarks default to public, but can be set to private if you do not want to share.

You can browse other users' library and for a given paper check the public notes and benchmarks of others.

This was a personal side-project, as I needed a way to organise my research.  I'm releasing it online because I feel that there is value in seeing what other's are reading and what their take-aways from papers are.

repository: PieterBlomme/whatdidilearn

gha_language: HTML

repo_name: PieterBlomme/whatdidilearn


text:
# FileDuplicatedFinder
Find duplicate files under the folder specified using MD5 hashing (C# Windows .NET 4.5)

The purpose of this program is to elminate duplicate files in a user folder such as Downloads or Pictures.
This program does this by keeping track of all the MD5 hashes of the files located under the foler specified.
When it detects a identical MD5 hash, it tracks this and attempts to determine if the file is a automaticly named copy.
If it is a automatically named copy, it is cosidered a copy and this is tracked. If the program can not determine
if it is an automatically generated copy it is cosidered a duplicate.

The delete button will delete (Send to recycle bin) all copies and duplicates encounted after the first hash.
The undo option will read undo information from a log file that is generated in the base directory upon deletion.
It will then replace every copy that was deleted by copying and renaming files as necessary.

Future work:

Error handling - file access issues not handled right now

Deletion optoins - delete vs send to recycle bin and duplicates/copies

Restore option - duplicates/copies or both.


text:
---
title: Beacon Probe Installation
tags:
article_header:
  type: overlay
  background_image:
    gradient: 'radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%);'
layout: article
key: 2023-02-23-Beacon-Probe
embed:
  send: false
  remove: true
share: true
---
<!--more-->
## Did someone say Bacon?
The Beacon probe is a bed plate surface scanner that can create a thousand point bed mesh with sub-micron accuracy at 500mm/sec. It also acts as a Z end-stop switch which can be used for Z homing and bed leveling.

## Mount specifications
```
Bolt hole centerline : 31.6mm
Bolt Hole Mounting center line to pcb tip:  12mm
Distance of pcb tip (of the board) to sensor CL:  8.5mm

Distance of board to hotend:
-----   3mm is the absolute closest
-----   5mm would be recommended minimum
-----   8mm would be recommended
-----   more is up to you

Gap of board to nozzle tip:
-----  2mm is the smallest realistic gap due to fasteners
-----  2.5-3mm ideal design gap?
-----  4mm is the largest recommended gap
-----  more loses resolution, but still works
```

## Klipper setup and config
[Documentation – Beacon](https://beacon3d.com/documentation/)

[Quick Start - Beacon Docs](https://docs.beacon3d.com/quickstart/#5-configure-klipper-for-beacon)

### Install beacon software
```
ssh<EMAIL_ADDRESS>pi@mainsail:~ $ git clone https://github.com/beacon3d/beacon_klipper
pi@mainsail:~ $ ./beacon_klipper/install.sh
```

Power off the RaspberryPi and connect the probe to a USB port, power up the RaspberryPi. Beacon probe is not 'hot pluggable' and connecting while RaspberryPi is powered on may fry the board.

### Get the serial ID of the Beacon
```
ssh<EMAIL_ADDRESS>pi@mainsail:~ $ ls /dev/serial/by-id/*
/dev/serial/by-id/usb-Beacon_Beacon_RevD_452CB565515137474C202020FF0C3628-if00
```

### Update printer.cfg
If your printer presently has a `[probe]` section, you will need to remove it, `[beacon]` replaces it.
* Also look in the klipper managed configuration area - I had to remove BLTOUCH section containing dynamic probe offset

```
[beacon]
serial: /dev/serial/by-id/usb-Beacon_Beacon_RevD_452CB565515137474C202020FF0C3628-if00
x_offset: 0 # update for machine specific mount position
y_offset: 27
mesh_main_direction: x
mesh_runs: 2
backlash_comp: 0.005
cal_nozzle_z: 0.2 # <--- This value is dependent on what you use to determine Z Offset, I use a 0.2mm feeler guage - paper will be smaller than 0.2
```

```
[safe_z_home]
home_xy_position: 120,120
speed: 50
z_hop: 3
z_hop_speed: 5
```

```
[stepper_z]
endstop_pin: probe:z_virtual_endstop # use beacon as virtual endstop
homing_retract_dist: 0               # beacon needs this to be set to 0
```

## Hardware installation and testing
1. After mounting probe verify that it's got appropriate bed clearance - I had to switch from cap head screws to flush mount screws to avoid bed collision
2. Ensure back of probe isn't protruding so that it impedes X homing / end-stop switch
3. Update `printer.cfg` with Beacon config
4. Make sure Klipper can see the probe
	```
	BEACON_QUERY
	Last reading: 3046029.45Hz, 20.30C, 3.03470mm
	```
5. Home XY:  `G28 XY`
6. Move the nozzle to the center of the bed
7. Calibrate Z-Offset by running `BEACON_CALIBRATE` - `ACCETP` and `SAVE_CONFIG`
8. Home Z (*with a hand over the power off button!*):  `G28 Z`

### Evaluate Probe accuracy
`PROBE_ACCURACY` results:` maximum 1.995843, minimum 1.994951, range 0.000892, average 1.995549, median 1.995626, standard deviation 0.000111`

### Evaluate Backlash
From the Mainsail console:
```
BEACON_ESTIMATE_BACKLASH
Median distance moving up 1.99644, down 2.00293, delta 0.00649 over 20 samples
```
Record this value in your `printer.cfg`

### Calibrate Bed Mesh `BED_MESH_CALIBRATE`
- May need to update `mesh_min` and `mesh_max` values to account for new probe offset location (different from BLTouch location)

> [!Update Z_Tilt config]
> I had to update my [z_tilt] points to account for new probe offset

Old BLTouch Mesh
![Pasted image<PHONE_NUMBER>0416.png](../assets/images/Pasted%20image%2020230225100416.png)
Beacon 20x20 Mesh
![Pasted image<PHONE_NUMBER>0408.png](../assets/images/Pasted%20image%2020230225100408.png)

gha_language: SCSS


text:
# grunt-parse-templates

> Parser for Angular style guide templates

## Getting Started
This plugin requires Grunt `~0.4.5`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-parse-templates --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-parse-templates');
```

## The "parsetemplates" task

This plugin is part of a larger project to create an Angular-based style guide / pattern library generator.
The end goal is to be able to create a fully functional guide by simply dropping Angular templates representing style blocks
into a folder structure.

The result of running this task is an Angular config file that sets up basic routing for the application.

### Overview
In your project's Gruntfile, add a section named `parsetemplates` to the data object passed into `grunt.initConfig()`.

The fileDir property should include the relative path to your template directory. This plugin will parse all subdirectories looking for templates
and create a JSON array of them.

The directory structure is important here and should look like this:

fileDir > page folder > section folders > files

Each page folder will correspond to an application page. Each section folder beneath that will be a section on that page with a header and each file will be a subsection beneath that.

The dataDir property should be the relative path of the directory you want to save the JSON output in. The file will be saved as templates.json.

The configDir should point to the location for your Angular application config.

The appName property should be the name of your Angular application (as defined in the app.js).

The baseTemplate property should point to the template file which will generate your style guide.

```js
grunt.initConfig({
  parsetemplates: {
    fileDir: '',
    dataDir: '',
    configDir: '',
    appName: '',
    baseTemplate: ''
  },
});
```

### Options

TBD

## Release History
_(Nothing yet)_

repository: gabezeck/grunt-parse-templates

repo_name: gabezeck/grunt-parse-templates


text:
# Lazy Intercom Widget Plugin for WordPress

Lazy load Intercom Widget

## Prerequisites
* php v7.1
* WordPress v5.0.0 or above
* [Intercom](https://www.intercom.com/) `APP_ID`

## How it works?
* This plugin will place a custom floating chat button in page footer.
* Clicking on that button will load intercom script on demand.
* This way user will save lots of his important bandwidth thus improve page speed.

## References
* [Intercom Javascript](https://developers.intercom.com/installing-intercom/docs/intercom-javascript)

### License
* MIT [License](LICENSE.txt)

repository: robin-scott/wp-lazy-intercom

repo_name: robin-scott/wp-lazy-intercom


text:
---
layout: page
title: Learning by Ear
permalink: /learning_by_ear/
navigation_weight: 25
---

* TOC
{:toc}

When learning to play an instrument, many begin by reading music.  This frequently develops into the idea that the “offical version"" of a tune is the one printed on the pages of books, and when people play, they are doing their best to approximate the music on the page.  Any variations are either accidents or embellishments.  That may be true of some kinds of music, but it is definitely not true in Irish traditional music.  The true versions of the tunes only exist in the oral or auditory tradition, and the notes on the page are the approximation.

Written music can help with the order of the notes, but the "feel" or swing only comes in listening and playing.  It is vitally important it is to listen to the tunes, and to play along with other musicians or recordings.  If it helps to read the music to learn the order of the notes, that is fine, but there is no substitute for listening to the tunes under the fingers of players who have learned the tunes by using their ears.  This music is an oral tradition, and the only way to be a part of that tradition is to use your ears.

We reckon that the best way to learn this music is **by ear** - listen to the tune until you can hum or lilt it and then start playing it.  A method that works for many players is to play a recording of the tune slowly, over and over, and keep trying to play along with more and more of it. Once you can play a tune slowly, playing it fast is much easier.

If you have a patient teacher who will sit with you and teach you tunes, that’s great, but it’s not an option for many of us. The next best option is to listen to recordings and try to learn that way.  Learning tunes by ear from recordings is much easier when the tunes are played more slowly and by playing tricky sections over and over again in a loop while you play along.   We hope that you find that useful.

What about learning tunes by reading the music?
-----------------------------------------------

We’ve attempted to provide “dots” and “chords” for the tunes as well as recordings, but be aware that these may/will not match the recordings exactly, although they probably match some version of the tune played somewhere at some time.  When there is a conflict between the dots, and what you hear, go with what you hear.  If in doubt, slow the tune down and listen!

When you’re in a session, the tunes change fast, and frequently 4 or 5 tunes are played in a row.  It’s almost impossible to find the name of the tune and turn to the right page in your music when the next tune starts. Also, when you learn tunes by reading, the **triggers** to remember the tunes are the notes on the page.  When you learn tunes by ear, the **triggers** are hearing the first few notes.  That’s what happens in session playing, you hear the first few notes and you recall the tune.

  It gets much easier with practice, and it is a skill worth learning.

Accompanists and rhythm players
-------------------------------

All of the advice above applies to guitar, bouzouki and other non-melody players and percussionists. You need to hear the tunes in your head - listen to the tune until you can hum or lilt it! Use the slow down options and play along with the tunes until you’re happy that what you’re playing fits.  There are many chord choices for the tunes, and what is suggested in the written music is only one of a number of choices.  When more than one accompanist is in a session it is important to listen to each other and coordinate the chord choices.

In Irish Traditional music, the melody is the boss.  Rhythm players and accompanists must follow, not drive.  Remember it is much easier for you to speed up than it is for melody players (they have lots more notes to play).  And remember that the melody players will forgive the odd wrong chord or note but playing out of time is much harder to forgive.

When in doubt, less is more.  There is no need to strum, or beat a drum with every beat.  You are not providing the rhythm, you are embellishing the music, with the tempo set by the melody players.

Learning from your own music
----------------------------

You will probably have recordings of your own that you'd like to do this with and there are some options below for slowing down other recordings you have on your computer, tablet or phone.

### Free software

If you have a *Windows* desktop you can use **Windows Media Player version 10**

*Instructions:*

> Load the track into Windows Media Player, select **View** at the top, and under
> **Enhancements**, select **Show Enhancements**. Then go to the **Now Playing** tab,
> and you can use the slider to slow the piece down.

If you have a *Macintosh* desktop you can use **Quicktime version 7**

*Instructions:*

> Load the track into QuickTime Player, and on the **Window** menu select **Show A/V
> Controls**. There is a **Playback Speed** slider in this window. You can also alter
> the **Pitch** (or Key) here as well.

You can download a copy of Quicktime 7 at <https://support.apple.com/en-nz/HT201288>

QuickTime X, released with OS 10.6 Snow Leopard and later versions, is **not capable** of doing this. You can install QuickTime 7 alongside Quicktime X if you want to.

### Commercial software

While the options listed above will slow down the music for you there are commercial packages for around US$30 which work better at really slow speeds (50% or slower) and also have a number of other useful options such as picking out sections to loop and saving parts of a file for later. Members of the Wellington Slow session have experience with these packages:

  * Ted  -> Amazing Slow Downer (Windows, Mac and iOS)
  * Andy -> Capo (Mac and iOS)
  * Andy -> Music Speed Changer (Android)
   * Andy -> Maple Player Classic (Android)

If anyone else uses a different package and you're happy to answer questions about it, let us know. There's a very comprehensive list of software at:

<http://www.seventhstring.com/resources/transcription.html>

You can try some of the packages for free for a limited period before you buy e.g. Transcribe!

repository: deanpemberton/music

repo_name: deanpemberton/music