text:
OVERVIEW OF KVM-CRM
===================

FELIX KVM-based Computing Resource Manager (KVM-CRM) is a KVM-based virtual
machine (VM) management software for testbed management. It based on OFELIA
Control Framework (OCF).
It controls experimentation life-cycle; reservation,
instantiation, configuration, monitoring and uninistantiation.

KVM-CRM replaces some of components of XEX-based OCF to use KVM.
So the KVM-CRM package provides only a VT manager for KVM (KVM-VT)
and KVM-based OXAD (KVM-OXAD). KVM-VT is a master server of KVM-CRM
and KVM-OXAD is a KVM agent for virtualization purposes.

INSTALLING KVM-CRM
==================

# 1. Requirements

* KVM-VT (VT manager for KVM)
  * One (or more) GNU/Linux Debian-based distros
  * Developed and ensured to work under Debian 7.0 (Wheezy) using
    the following packages:
    * Python 2.7
    * Django 1.4.19 (automatically installed)
    * MySQL server (automatically installed)
* KVM-OXAD (KVM agent for virtualization purposes)
  * Ubuntu 14.04 or later
  * Developed and ensured to work under Ubuntu 14.04 (or later) using
    the following packages:
    * libvirt-bin
    * qemu-kvm
    * Python 2.7
    * Django 1.4.19
    * MySQL server

# 2. Installing

## 2.1 Clone the KVM-CRM repository:

    mkdir -p /opt/felix/kvm-crm
    git clone https://github.com/dana-i2cat/felix.git /opt/felix/kvm-crm
    cd /opt/felix/kvm-crm
    git checkout kvm-crm

## 2.2 For KVM-VT: choose the components to install as a root user.

    cd /opt/felix/kvm-crm/deploy
    python install.py
    pip install netaddr

    The following actions will take place:
    * Install dependencies
    * Build Certificates (see Note #1)
    * Configure Apache
    * Set file permissions
    * Modify the localsettings.py or mySettings.py depending on the
      component being installed
    * Populate database

    Note #1: When installing the component, you will need to create the
    certificates for the Certification Authority (CA) first and for the
    component later. Do not use the same Common Name (CN) for both of them,
    and make sure that the CN you use in the component later certificate
    (you can use an IP) is the same you then set in the SITE_DOMAIN field
    in the localSettings.py file.

    cd /opt/felix/kvm-crm/vt_manager_kvm/src/python/vt_manager_kvm/communication/geni/v3/settings
    cp -p vtam.py.sample vtam.py # Change "HRN" value to match your organisation name (lowercase)

## 2.3 For KVM-OXAD:

### 2.3.1 Install packages

    apt-get install openssl ssl-cert virtinst \
        python-setuptools qemu-kvm libvirt-bin tshark python-libvirt \
        python-setuptools python-mysqldb python-openssl python-m2crypto \
        python-dateutil python-decorator python-paramiko build-essential \
        python-imaging python-configobj python-pyparsing \
        python-lxml python-argparse python-pexpect python-dev libldap2-dev \
        libsasl2-dev libguestfs-tools libpython-stdlib python-pip git
    pip install --allow-external django-evolution \
        "django-evolution<=0.6.9" pytz "Django<=1.4.19" \
        "django-extensions<=1.2.5" django-autoslug django-auth-ldap \
        django-registration jinja2

### 2.3.2 Configure libvirt

- Open /etc/libvirt/qemu.conf and add (or modify) following parameters:

        user = "root"
        group = "root"

- Restert libvirt-bin

        service libvirt-bin restart

- Create bridge to connect the NICs of user VM

        brctl addbr brx0
        brctl addif brx0 eth0

### 2.3.3 Set up disk image files

#### <IP_ADDRESS> Create directories for disk image files

Most of directories created in this section should be specified
in configuration file (see section 2.3.5)

    mkdir -p /mnt/l1vm
    # Disk image template folder
    mkdir -p /mnt/l1vm/template
    # Log folder
    mkdir -p /mnt/l1vm/image/log
    # Cache folder to store VMs
    # It must be same as OXA_FILEHD_CACHE_VMS in configuration file.
    mkdir -p /mnt/l1vm/image/cache/vms
    # Remote folder to store VMs
    # It must be same as OXA_FILEHD_REMOTE_VMS in configuration file.
    mkdir -p /mnt/l1vm/image/remote/vms
    # Cache folder for templates
    # It must be same as OXA_FILEHD_CACHE_TEMPLATES in configuration file.
    mkdir -p /mnt/l1vm/image/cache/templates
    # Remote folder for templates
    # It must be same as OXA_FILEHD_REMOTE_TEMPLATES in configuration file.
    mkdir -p /mnt/l1vm/image/remote/templates

#### <IP_ADDRESS> Generate disk image template

Change directory to
`/opt/felix/kvm-crm/vt_manager/src/python/agent/utils/generate_template`
and run `generate_template` script as root. When finished,
a template file `l1vm.qcow2` is generated in `/mnt/l1vm/template` directory.

    cd /opt/felix/kvm-crm/vt_manager/src/python/agent/utils/generate_template
    ./generate_template

### 2.3.5 Create KVM-OXAD configuration files

    cd /opt/felix/kvm-crm/vt_manager/src/python/agent/
    cp mySettings-example.py mySettings.py
    vi mySettings.py

- mySettings.py

        ### Section 1: KVM-OXAD settings
        #
        # Basic settings for the KVM-OXAD
        # Settings for virtualization KVM-VT, to which the KVM-OXAD connects
        # VTAM_PORT: it is usually '8445'
        # WARNING: *same* settings as in KVM-VT's 'mySettings.py' file
        VTAM_IP = "<IP_ADDRESS>"
        VTAM_PORT = "8445"
        XMLRPC_USER = "root"
        XMLRPC_PASS = "password"

        # Password for the KVM-OXAD HTTP XML-RPC server. Use a STRONG password
        XMLRPC_SERVER_PASSWORD = "password"

        ### Section 2: Optional KVM-OXAD settings
        #
        # Optional settings for the KVM-OXAD.
        # WARNING: default values are commented. Uncomment and modify to override
        # the static settings (file at 'settings/staticSettings.py').
        #
        # Network parameters.
        # XMLRPC_SERVER_LISTEN_HOST: you should not use '' here
        # unless you have a real FQDN.
        # Defaults are as follows.
        ##XMLRPC_SERVER_LISTEN_HOST = "<IP_ADDRESS>"
        ##XMLRPC_SERVER_LISTEN_PORT = 9229

        # Enable/Disable the usage of cache.
        # Default is True.
        ##OXA_FILEHD_USE_CACHE = True

        # Use sparse disks or not while cloning.
        # Uncomment if willing to use Sparse disks.
        # Default is False.
        ##OXA_FILEHD_CREATE_SPARSE_DISK = False

        # Define machine SWAP size in MB.
        # Default is 512.
        ##OXA_DEFAULT_SWAP_SIZE_MB = 512

        # Level used for logging Agent messages.
        # Possible values = {"DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"}.
        # Default is "WARNING".
        #
        LOG_LEVEL = "DEBUG"

        #Template Image File location
        OXA_KVM_DEBIAN_TEMPLATE_IMGFILE="/mnt/l1vm/template/l1vm.qcow2"
        OXA_KVM_UBUNTU_TEMPLATE_IMGFILE="/mnt/l1vm/template/l1vm.qcow2"

        ## FileHD driver settings
        # Enable/disable file-type Hdmanager Cache FS
        OXA_FILEHD_USE_CACHE=False

        # Cache folder to store VMs (if cache mechanism is used)
        OXA_FILEHD_CACHE_VMS="/mnt/l1vm/image/cache/vms/"

        # Remote folder to store VMs
        OXA_FILEHD_REMOTE_VMS="/mnt/l1vm/image/remote/vms/"

        # Cache folder for templates (if cache is enabled)
        OXA_FILEHD_CACHE_TEMPLATES="/mnt/l1vm/image/cache/templates/"

        # Remote folder for templates
        OXA_FILEHD_REMOTE_TEMPLATES="/mnt/l1vm/image/remote/templates/"

        # Use sparse disks while cloning
        OXA_FILEHD_CREATE_SPARSE_DISK=False

        # Nice priority for Copy&untar operations
        OXA_FILEHD_NICE_PRIORITY=15

        # IONice copy&untar operations class
        OXA_FILEHD_IONICE_CLASS=2

        # IONice copy&untar operations priority
        OXA_FILEHD_IONICE_PRIORITY=5

        # /bin/dd block size(bs) for copy operations
        OXA_FILEHD_DD_BS_KB=32

### 2.3.6 Register KVM-OXAD to KVM-VT (at KVM-VT node)

    Note: Values should be changed to fit your environment.
    The followings are an example of settings.

    mysql -u root -p ocf__vt_manager

- Register KVM-OXAD

        INSERT INTO vt_manager_vtserver VALUES (\
            1,        /* id: ID of KVM-OXAD, must be unique */ \
            0,        /* available: KVM-OXAD is available or not, 1 is available */ \
            1,        /* enabled: KVM-OXAD is enable or not, 1 is enable */ \
            'test1',  /* name: Name of KVM-OXAD */ \
            'uuid1',  /* uuid: UUID of KVM-OXAD */ \
            'Linux',  /* operatingSystemType: OS type running KVM-OXAD */ \
            'Ubuntu', /* operatingSystemDistribution: OS distribution type running KVM-OXAD */ \
            '14.04',  /* operatingSystemVersion: OS version running KVM-OXAD */ \
            'kvm',    /* virtTech: Hypervisor type of KVM-OXAD, must be 'kvm' for KVM-OXAD */ \
            1,        /* numberOfCPUs: Number of CPUs in KVM-OXAD node */ \
            2000,     /* CPUFrequency: CPU clock (units in MHz) of KVM-OXAD node */ \
            1024,     /* memory: Memory (units in MB) of KVM-OXAD node */ \
            1024,     /* discSpaceGB: Disk size (units in GB) of KVM-OXAD node */ \
            'http://<IP_ADDRESS>:9229/', /* agentURL: URL of KVM-OXAD */ \
            'password',                   /* agentPassword: Password to access the URL */ \
            'http://<IP_ADDRESS>:9229/'  /* url: URL of KVM-OXAD node, normally same as agentURL */);

- Register KVM-OXAD as KVM hypervisor

        INSERT INTO vt_manager_kvmserver VALUES (\
            1 /* vtserver_ptr_id: ID of KVM-OXAD, must be same as vt_manager_vtserver.id */);

- Register IP address range to allocate to user VM

        INSERT INTO vt_manager_ip4range VALUES (\
            1,                 /* id: ID of the range, must be unique */ \
            'ip1',             /* name: Name of the range */
            1,                 /* isGlobal: 1 if the range is global IP, 0 is local */ \
            '<IP_ADDRESS>',   /* startIp: Start IP address the range */ \
            '<IP_ADDRESS>', /* endIp: End IP address the range */ \
            '<IP_ADDRESS>',   /* netMask: Subnet mask of the range */ \
            '<IP_ADDRESS>',   /* gw: Gateway of the range */ \
            '<IP_ADDRESS>',      /* dns1: DNS address for the range (optional) */ \
            '<IP_ADDRESS>',         /* dns2: Secondary DNS address for the range (optional) */ \
            '<IP_ADDRESS>',   /* nextAvailableIp: Next allocatable IP address */ \
            253                /* numberOfSlots: Number of IP addresses of the range */ \);

- Register MAC address range to allocate to user VM

        INSERT INTO vt_manager_macrange VALUES (\
            1,                   /* id: ID of the range, must be unique */ \
            'mac1',              /* name: Name of the range, must be unique */ \
            1,                   /* isGlobal: 1 if the range is global MAC, 0 is local */ \
            '52:54:01:00:00:01', /* startMac: Start MAC address the range */ \
            '52:54:01:00:00:ff', /* endMac: End MAC address the range */ \
            '52:54:01:00:00:02', /* nextAvailableMac: Next allocatable MAC address */ \
            254                  /* numberOfSlots: Number of MAC addresses of the range */);

- Register MAC address of a bridge of KVM-OXAD node as a slot

        INSERT INTO vt_manager_macslot VALUES (\
            1001,                /* id: ID of the slot, must be unique */ \
            '52:54:01:00:00:01', /* mac: MAC address of the slot */ \
            1,                   /* macRange_id: ID of the range, must be same as vt_manager_macrange.id */ \
            1,                   /* isExcluded: 1 if this slot is excluded from allocation, 0 otherwise */ \
            'comment'            /* comment: Comment of the slot */ );

- Register a bridge of KVM-OXAD node to provide for user VM

        INSERT INTO vt_manager_networkinterface VALUES (\
            101,    /* id: ID of the interface, must be unique */ \
            'brx0', /* name: Interface name, must be same as actual interface */ \
            1001,   /* mac_id: MAC address slot of the interface, must be same as vt_manager_macslot.id */ \
            1,      /* isMgmt: 1 if this interface is used for management, 0 otherwise */ \
            1,      /* isBridge: 1 if this interface is bridge, 0 is actual NIC */ \
            'brx0', /* switchID: Switch name, must be same as vt_manager_networkinterface.name if this interface is bridge */ \
            1,      /* port: Number of port on this interface, normally 1 */ \
            1       /* idForm: currently unused */);

- Allocate a bridge to KVM-OXAD node as an interface

        INSERT INTO vt_manager_vtserver_networkInterfaces VALUES (\
            1,  /* id: ID of the allocation, must be unique */ \
            1,  /* vtserver_id: ID of the KVM-OXAD, must be same as vt_manager_vtserver.id */ \
            101 /* networkinterface_id: ID of the interface, must be same as vt_manager_networkinterface.id */ );

- Allocate the IP address ranges to KVM-OXAD node

        INSERT INTO vt_manager_vtserver_subscribedIp4Ranges VALUES (\
            1, /* id: ID of the allocation, must be unique */
            1, /* vtserver_id: ID of the KVM-OXAD, must be same as vt_manager_vtserver.id*/
            1  /* ip4range_id: ID of IP address range to allocate, must be same as vt_manager_ip4range.id*/ );

# 3. Additional notes

Please have a look to Manuals [https://github.com/dana-i2cat/felix/wiki]
for further component configuration.

FURTHER READING
===============

For more information about configuration, troubleshooting, contribution and
so on please visit https://github.com/dana-i2cat/felix/wiki

COPYRIGHT
=========

Copyright (C) 2015
National Institute of Advanced Industrial Science and Technology

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

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

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

repository: ict-felix/stack

repo_name: ict-felix/stack


text:
---
title: "The Law and Order of Data Science"
author: 'simplystatistics.org'
date: '2018-08-15'
slug: the-law-and-order-of-data-scie
link: https://simplystatistics.org/2018/08/15/the-law-and-order-of-data-science/
categories:
- bloglink
tags:
  - simplystatisticsorg
---

One conversation I’ve had a few times revolves around the question, “What’s the difference between science and data science?” If I were to come up with a simple distinction, I might say that Science starts with a question; data science starts with the[... <i class="fas fa-external-link-alt"></i>](https://simplystatistics.org/2018/08/15/the-law-and-order-of-data-science/)

repository: mkearney/data-scribers

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mkearney/data-scribers


text:
# go-grep

![Go](https://github.com/nokute78/bin-grep/workflows/Go/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/nokute78/bin-grep)](https://goreportcard.com/report/github.com/nokute78/bin-grep)

A grep like tool for a binary file

## Usage

```
$ bin-grep [OPTIONS] PATTERN [FILE...]
```

### Pattern

Pattern should be hex string. e.g. `"0xaabb"` or `"aabb"`
You can use `.` as any byte.

`"0x.bb"` will be matched `"aabb"`.

### Option

|Option|Description|
|------|-----------|
|`-c`| print a count of matched case|
|`-a`| print only an matched address|
|`-s uint`|skip n bytes|
|`-h`| show help |
|`-V`| show version|

## License

[Apache License v2.0](https://www.apache.org/licenses/LICENSE-2.0)


text:
![repo logo](/assets/logo.png?raw=true 'Logo')

# node

A collection of node projects and node based APIs.

- [01 - Bootcamps API project](https://github.com/irisida/bootcamps-api) - an API project implementing stnadard REST features around the domain of bootcamps/courses.
- [02 - Pure Express mini projects](https://github.com/irisida/just-express) - A mini collection of express projects for the purpose of ficusing on express without DB/FE.

license: MIT

repository: irisida/node

branch_name: refs/heads/main

repo_name: irisida/node


text:
# Function type

All types, including function types, match the signature `a`, but only functions match the signature `a -> b`.

Therein is a function type ctor `(->)`, with fixity `(infixr -1)`
and no representable data ctors.

GHC.Prim defines it as: `data (->) (a :: TYPE q) (b :: TYPE r)`

Like other type ctors it can be partially applied, yielding `((->) r)`.

This partially applied type of functions is exactly the type we'll use to make functions instances of the Functor, Applicative and Monads.

Functions (fn types) are functors/applicatives/monads in their input type, `r`, which is fixed; they are used as ((->) r). Their output type, `a` is flexible.

(r -> a) ~~> ((r ->) a) ~~> ((->) r a)


text:
# StateV.de client_resources download/verify tool

I got sick of downloading the whole folder all the time so I made this to check for changed files or verify them.

It uses the md5 checksum provided by their API to validate the files.

What it does:

- checks for files that are not used anymore (only by name rn)
- hashes all existing files and queues all the missing/wrong ones to download
- downloads the missing files

Currently not multithreaded to allow for easier .exe compiling (most tools for that don't like multithreading)

## example usage

```
python hash_resources.py "C:\\RAGE\\client_resources\\<IP_ADDRESS>_22005\\" "http://<IP_ADDRESS>:4100/"
```

repository: Kaibu/stateV-verify-files

repo_name: Kaibu/stateV-verify-files


text:
This directory contains the JSON REST payload we will post to /mgmt/tm/sys/application/template to deploy a new iApp template. See app_f5_http_backport_template.json

Here are the steps we following for this particular iApp template:

1) Download the template from DevCentral codeshare or otherwise.
2) Make sure the iApp doesn't contain any TCL packages in the .tmpl file, if so, resolve these issues... :(
3) Import the payload via the Configuration Utility (GUI)
3.a) Export to JSON via iControlRest - https://<IP_ADDRESS>/mgmt/tm/sys/application/template/f5.http.backport.1.1.2?expandSubcollections=true
3.b) Remove extanious fields like "selfLink", "generation", etc
3.c Rename field actionsReference -> actions
4) Repost as necessary

repository: mcgonagle/aws-deployments

repo_name: mcgonagle/aws-deployments


text:
---
layout: post
title: "Writing a Web Scraper with Go (Part One - Setup Environment)"
description: This post is part one of an eight part series on how to scrape a website in Go and store specific data in Firestore.
categories: Programming
---

### Introduction

This post is part one of an eight part series on how to scrape a website in Go and store specific data in Firestore. The first three parts will focus soley on setting up a web scraper in Go. Once we have acquired the data we want to save, we will be able to store it in a Firestore database. This enables us to do the following:
 1. Acquire information from a website
 2. Store it in Firestore in our own custom data structures
 3. Efficiently query Firestore across various supported platforms such as Android, iOS (Swift or Objective-C), Python, or Node.js.

By the end, you will be able to use Go and Firestore to create your own API for any website. This guide will closely follow my work on *goctftime*, which can be found [on my Github](https://github.com/spitfire55/goctftime).

For part one, I will assume that you are starting from ground zero and have never programmed in Go before. If you are already comfortable with Go programming, you can just:
 1. Create a new subdirectory in your GOPATH src directory named *goscrape* with two files: *scraper.go* and *scraper_test.go*.
 2. Skip to [Part Two](https://spitfy.re/2018-02-14-Writing-a-Web-Scraper-in-Go-Part-Two).

### Environment Setup

In order to setup your environment, you need to first get an editor. I recommend either [Visual Studio Code](https://code.visualstudio.com/) or [Sublime Text](https://www.sublimetext.com/). Next, install the relevant plugins for Go. If you chose Visual Studio Code, open the Extensions tab on the left side of the editor, search Go, and install the first extension by lukehoban. If you chose Sublime Text, install Package Control [by following this guide](http://www.techinfected.net/2017/06/install-and-use-package-control-sublime-text.html) and then install the package GoSublime.

After you have a basic editor setup, [download and install the Go programming language](https://golang.org/dl/). Once your installation is complete, follow the [*Test your installation*](https://golang.org/doc/install#testing) guide to setup your environment and ensure everything is installed correctly. You can optionally complete the [*How to Write Go Code*](https://golang.org/doc/code.html) tutorial by Go (I recommend it, but it's not required for this tutorial).

## Create Project

For this tutorial, we will be building a library to use in multiple projects rather than a single project. In order to do this, we need to create a new folder for our package. I will be using $HOME/go/src/goscrape as my example library and name the package *goscrape*. (**NOTE:** I will be using Unix filepath notation for this tutorial.) If you are confused by what $HOME means, it is a standard environment variable on Linux for the home directory. I will use $HOME to represent my home directory (e.g /home/spitfyre or C:\Users\spitfyre) since it will obviously be different on your system.

Open $HOME/go/src/goscrape in your editor and create a new file named scraper.go. This will be the base file where we setup the basic functionality of our scraper. Create a second file named scraper_test.go. In Go, it is very easy to create tests through the testing library and a simple *go test* command. The details of how this all works is very well explained [in this blog post](https://blog.alexellis.io/golang-writing-unit-tests/). We won't implement testing until Part Two.

### In Part Two...

In Part Two, we will create the basic skeleton of our web scraper and implement our first unit test.

	Go to Part Two


text:
# azure-devops-widgets

This adds a small build time widget that measures the time of the last 30 successful builds.

## Build

Run:
```
tfx extension create --manifest-globs vss-extension.json
```

## Publish

Upload and publish using `https://marketplace.visualstudio.com/manage`.

repository: aristotelos/azure-devops-widgets

repo_name: aristotelos/azure-devops-widgets


text:
# ESP-DSP Examples

This directory contains a range of examples for ESP-DSP library.

These examples are intended to demonstrate part of ESP-DSP functionality (e.g. initialization, execution) and to provide code that you can copy and adapt into your own projects.

See the [README.md](../README.md) file in the upper level directory for more information about ESP-DSP.

# Example Layout

The examples are grouped into subdirectories by category. Each category directory contains one or more example projects:

* [Dot Product Calculation](./dotprod/README.md) Example
* [Basic Math Operations](./basic_math/README.md) Example
* [FFT](./fft/README.md) Example
* [Matrix](./matrix/README.md) Example
* [FFT Window](./fft_window/README.md) Example
* [IIR Filter](./iir/README.md) Example
* [Kalman Filter](./kalman/README.md) Example
* [FIR Filter](.fir/README.md) Example

repository: espressif/esp-dsp

gha_language: C

repo_name: espressif/esp-dsp


text:
---
layout: post
title: Data Science Minor and Certificate Approved!
---

Just received words from the Iowa State University Office of the Senior Vice President and Provost
that the Data Science Minor and Data Science Certificate are approved.

The design and approval of these two new educational programs at Iowa State University had taken
much of my time since Summer 2015. The design was done by an university-wide committee that consisted
of Raymond Arrit, Arne Hallam, Chinmay Hegde, Kevin Kane, Dengpan Liu,
Hridesh Rajan and Sriram Sundararajan.
I served as the chair of this committee.

From the proposal,
"The certificate is intended for students studying any discipline at Iowa State University
with the goal of enabling them to work in data science.
The certificate consists of nine credit hours of data science core courses,
nine credit hours of data science electives, and a three-credit data science
capstone that is expected to provide an experiential learning experience.
The courses in the data science certificate are designed to provide students
with the requisite background that would enable them to take jobs with
significant data science components, e.g., establishing and operating data
analysis pipelines. The capstone will provide an opportunity for students
to apply data science concepts to a domain problem while working in a
multi-disciplinary team setting."

[Iowa State University Data Science Minor Proposal](https://www-facsen.sws.iastate.edu/sites/default/files/uploads/16-17%20Docket%20Calendar/S16-21%20-%20Data%20Science%20Minor.pdf)

[Iowa State University Data Science Certificate](https://www-facsen.sws.iastate.edu/sites/default/files/uploads/16-17%20Docket%20Calendar/S16-22%20-%20Data%20Science%20Certificate.pdf)


text:
# Agile Cli Server

Here is the server side of AgileCli. If you need information about gem follow the link below.

# Agile Cli Client

https://github.com/rubizza-camp/AgileCli

## Contacts

[Telegram](https://t.me/agilepod)

[GoogleDrive](https://drive.google.com/drive/folders/1N7fMJFVe09M5Cjfta86SCtbWEr_sBdoe)

[Trello](https://trello.com/b/dLrdzQZp/agile-cli)

## Developers

* Sergei Kislak - Product Owner
* Nick Pridorozhko - Mentor
* 3485 - Andrew Berendeev - Scrum-Master
* 3684 - Ilya Vasilevich
* 3498 - Polina Matskevich
* 3581 - Elizaveta Shved
* 3574 - Artyom Starovoitov

## Schedule

* Daily Scram - 11:00, Daily
* Sprint Retrospective - 10:00, Monday
* Sprint Planning - 12:00 - 13:00, Monday
* Sprint Review - 11:15 - 13:00, Thurshday
* Demo - 10:00, Saturday

## Heroku Link

[Our server](https://agile-cli.herokuapp.com)

gha_language: Ruby

gha_license_id: MIT


text:
[![Build Status](https://travis-ci.org/lutianming/rustile.svg?branch=master)](https://travis-ci.org/lutianming/rustile)

# rustile
Rustile is a tiling window manager written in rust.

# configurations
The configuration file is located in $HOME/.rustile.
The format is highly inspired by i3.
There is a sample config file that you can start with.

# TODO
+ add test cases
+ add taskbar
+ theme configuration

repository: lutianming/rustile

repo_name: lutianming/rustile


text:
# gateway3dwest
Open Source St. Louis Game Dev Comunity Project 3D Summer 2015

Slack Setup @ https://igda-stl.slack.com/

Send a direct message through the meetup group to Brian for an invite:

Go to: http://www.meetup.com/St-Louis-Game-Developers/members/106239522

Click on message, ask for an invite to the slack team and include an email address that I can send the invite too.

#Goals for 8/3/2015
*Get something moving when you press buttons
*Determine some possible ways to go that we can decide on next time
*Demonstrate how people can fork the project next time

##7/13/2015 Meeting Goals
*Kick of project
*Establish genre
*make technology decision


text:
---
layout: post
title: "A Study on Topological Descriptors for the Analysis of 3D Surface Texture"
date: 2017-10-29 18:27:35
categories: arXiv_CV
tags: arXiv_CV Face CNN Classification
author: Matthias Zeppelzauer, Bartosz Zielinski, Mateusz Juda, Markus Seidl
mathjax: true
---

* content
{:toc}

##### Abstract
Methods from computational topology are becoming more and more popular in computer vision and have shown to improve the state-of-the-art in several tasks. In this paper, we investigate the applicability of topological descriptors in the context of 3D surface analysis for the classification of different surface textures. We present a comprehensive study on topological descriptors, investigate their robustness and expressiveness and compare them with state-of-the-art methods including Convolutional Neural Networks (CNNs). Results show that class-specific information is reflected well in topological descriptors. The investigated descriptors can directly compete with non-topological descriptors and capture complementary information. As a consequence they improve the state-of-the-art when combined with non-topological descriptors.

##### Abstract (translated by Google)
计算拓扑方法在计算机视觉中越来越受欢迎，并显示出在几项任务中改进了最新的技术。在本文中，我们研究拓扑描述符在三维表面分析的背景下适用于不同表面纹理的分类。我们提出了一个关于拓扑描述符的综合研究，研究它们的鲁棒性和表达性，并将其与包括卷积神经网络（CNN）在内的最先进的方法进行比较。结果表明，特定于类的信息在拓扑描述符中得到很好的反映。被调查的描述符可以直接与非拓扑描述符竞争并捕获补充信息。因此，当与非拓扑描述符组合时，他们改进了现有技术。

##### URL
[https://arxiv.org/abs/1710.10662](https://arxiv.org/abs/1710.10662)

##### PDF
[https://arxiv.org/pdf/1710.10662](https://arxiv.org/pdf/1710.10662)


text:
# What's this?

This is a set of functions specialized in comparing and merging arrays of elements signed by unique set of IDs.
This is typically used in scenario in which client-side data-sets with changes coming from the an SQL server (server > client replication).

## How to install?

Simply open up a terminal, go to your project directory and run:
```
npm i --save array-merge-by-id
```

## Try it before you buy it

You can try out all the examples (listed below) in your browser at [RunKit](https://npm.runkit.com/array-merge-by-id).

# Functions by category

Comparing, merging, linking elements of two arrays:

* [`mergeA`](#mergeA) - merges new/changed elements into an existing array
* [`compareA`](#compareA) - compares elements of two arrays and returns an object containing common elements and differences
* [`linkA`](#linkA) - extends each child array element with a reference to it's parent element
* [`eachPair`](#eachPair) - calls a callback method for each matched elements of provided arrays

Searching & filtering:

* [`filterByKeys`](#filterByKeys) - extract all the array elements which match the given key values (or are indicated by a comparer function)
* [`findFirstById`](#findFirstById) - returns the first matched element of the given type
* [`indexOf`](#indexOf) - returns index of first matching element in the given array
* [`uniqueA`](#uniqueA) - copies unique elements from source to a new array, which is then returned

Modifying, sorting, adding, removing elements of a single array:

* [`concat`](#concat) - does an in-place concatination of elements of the source array at the end of target array
* [`clear`](#clear) - removes all the elements of the given array
* [`purgeA`](#purgeA) - removes elements indicated by a hit list from the provided array
* [`overwrite`](#overwrite) - removes all the elements of target and replaces them with elements from source
* [`sortOn`](#sortOn) - sorts the given array based on the given key name array (or comparer function)

Other helper functions:

* [`compileC`](#compileC) - compiles and returns a function which compares two data elements and detects which comes before which in an orderd list
* [`stringifyIDs`](#stringifyIDs) - creates CSV containing values of all the keys ending with "ID". It's usefull for debugging

## TypeScript typings

This lib was written in TypeScript, which is good news for people using TypeScript - all the typing information is included in the build (don't worry - it can still be used in vanilla JavaScript ... etc).

## Functions

compareA(leftA, rightA, key_columns, config) ⇒ ArrayDiffResult

Compares elements of two arrays and returns an object containing common elements and differences (see comparisson results object).

filterByKeys(aSearch, key_columns, key_values, findFirstOnly) ⇒ Array

Extract all the array elements which match the given key values (or are indicated by a comparer function)

findFirstById(aSearch, key_columns, key_values) ⇒ Object

Returns the first matched element of the given type

indexOf(aSearch, key_columns, key_values) ⇒ number

Returns index of first matching element in the given array

linkA(parentA, childA, key_columns, linkName, config) ⇒ ArrayLinkResult

Extends each child array element with a reference to it's parent element (in parentA array). Optionally it can extend parane element with a map of it's children.

mergeA(currData, newData, key_columns, config) ⇒ ArrayDiffResult

Merges new/changed elements into an existing array

purgeA(aTarget, aHitList, key_columns, config) ⇒ Array

Removes elements indicated by a hit list from the provided array

uniqueA(source, key_columns, config) ⇒ Array

Copies unique elements from source to a new array, which is then returned

compileC(key_columns) ⇒ function

Compiles and returns a function which compares two data elements and detects which comes before which in an orderd list.
The compiled function expects the compared values to be numeric

eachPair(leftA, rightA, key_columns, callbackFn, config) ⇒ ArrayDiffResult

Calls a callback method for each matched elements of provided arrays

sortOn(source, key_columns) ⇒ Array

Sorts the given array based on the given key name array (or comparer function)

clear(target) ⇒ Array

Removes all the elements of the given array

overwrite(target, source) ⇒ Array

removes all the elements of target and replaces them with elements from source

concat(target, source) ⇒ Array

Does an in-place concatination of elements of the source array at the end of target array

stringifyIDs(data) ⇒ string

Creates CSV containing values of all the keys ending with "ID". It's usefull for debugging

## compareA(leftA, rightA, key_columns, config) ⇒ ArrayDiffResult
Compares elements of two arrays and returns an object containing common elements and differences (see [comparisson results object](#arraydiffresult)).

**Kind**: global function
**Returns**: ArrayDiffResult - comparisson results object (see [ArrayDiffResult](#arraydiffresult))

| Param | Type | Description |
| --- | --- | --- |
| leftA | Array | first array be compared |
| rightA | Array | second array be compared |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| config | ArrayDiffConfig | (optional) additional config parameters (see [ArrayDiffConfig](#arraydiffconfig)) |

**Example**
```js
let leftA = [
  {cityID:1, cityName:'New York', weather:"windy"},
  {cityID:2, cityName:'London',   weather:"raining"}
];

let rightA = [
  {cityID:2, cityName:'London', weather:"thunderstorm"},
  {cityID:3, cityName:'Moscow', weather:"snowing"}
];

let diff = compareA(leftA, rightA, ["cityID"]);

// statment below will print:
// {
//   leftDiff: [{cityID:1, cityName:'New York', weather:"windy"}],        <= New York doesn't exist in the `rightA`
//   leftCommon: [{cityID:2, cityName:'London', weather:"raining"}],      <= London does exist in `rightA`
//   rightDiff: [{cityID:3, cityName:'Moscow', weather:"snowing"}],       <= Moscow exists in `leftA`
//   rightCommon: [{cityID:2, cityName:'London', weather:"thunderstorm"}] <= London exists in `leftA`
// }
console.dir(diff);
```

## filterByKeys(aSearch, key_columns, key_values, findFirstOnly) ⇒ Array
Extract all the array elements which match the given key values (or are indicated by a comparer function)

**Kind**: global function
**Returns**: Array - array of matched elements

| Param | Type | Description |
| --- | --- | --- |
| aSearch | Array | array to be searched |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| key_values | Map | (optional) an object which should be matched with an element from `aSearch` array - it's optional because `key_columns` param can contain a function which doesn't need it |
| findFirstOnly | boolean | (optional) should only the first matched element be returned (defaults to `false`) |

**Example**
```js
let streets = [{cityID:22, streetID:1}, {cityID:44, streetID:2}, {cityID:22, streetID:3}];

let myCityStreets = filterByKeys(streets, ['cityID'], {cityID:22});

console.dir(myCityStreets); // will output [{cityID:22, streetID:1}, {cityID:22, streetID:3}]
```

## findFirstById(aSearch, key_columns, key_values) ⇒ Object
Returns the first matched element of the given type

**Kind**: global function
**Returns**: Object - matched array element

| Param | Type | Description |
| --- | --- | --- |
| aSearch | Array | array to be searched |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| key_values | Map | (optional) an object which should be matched with an element from `aSearch` array - it's optional because `key_columns` param can contain a function which doesn't need it |

**Example**
```js
let streets = [{cityID:22, streetID:1}, {cityID:44, streetID:2}, {cityID:22, streetID:3}];

let myStreet = findFirstById(streets, ['cityID','streetID'], {cityID:44, streetID:2});

console.dir(myStreet); // will output {cityID:44, streetID:2}
```

## indexOf(aSearch, key_columns, key_values) ⇒ number
Returns index of first matching element in the given array

**Kind**: global function
**Returns**: number - element index

| Param | Type | Description |
| --- | --- | --- |
| aSearch | Array | array to be searched |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| key_values | Map | (optional) an object which should be matched with an element from `aSearch` array - it's optional because `key_columns` param can contain a function which doesn't need it |

**Example**
```js
let streets = [{cityID:22, streetID:1}, {cityID:44, streetID:2}, {cityID:22, streetID:3}];

let streetIndex = findFirstById(streets, ['cityID','streetID'], {cityID:44, streetID:2});

console.log(streetIndex); // will print 1
```

## linkA(parentA, childA, key_columns, linkName, config) ⇒ ArrayLinkResult
Extends each child array element with a reference to it's parent element (in `parentA` array). Optionally it can extend parane element with a map of it's children.

**Kind**: global function
**Returns**: ArrayLinkResult - linking results object(see [ArrayLinkResult](#arraylinkresult))

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| parentA | Array |  | array containting parent elements |
| childA | Array |  | array containing child elements |
| key_columns | CompareBy |  | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| linkName | string | "parent" | (optional) name of the property which should be assigned a reference to parent element (defaults to 'parent') |
| config | ArrayDiffConfig |  | (optional) additional config parameters (see [ArrayDiffConfig](#arraydiffconfig)) |

**Example**
```js
let cities = [ {cityID:22, cityName:'New York'}, {cityID:44, cityName:'London'} ];
let streets = [{cityID:22, streetID:1}, {cityID:44, streetID:2}, {cityID:22, streetID:3}];

let result = linkA(cities, streets, ['cityID'], 'city')

console.dir(result); // will output [ {cityID:22,streetID:1,city:<reference to New York>},
                     //               {cityID:44,streetID:2,city:<reference to London>},
                     //               {cityID:22,streetID:3,city:<reference to New York>}]
```

## mergeA(currData, newData, key_columns, config) ⇒ ArrayDiffResult
Merges new/changed elements into an existing array

**Kind**: global function
**Returns**: ArrayDiffResult - comparisson results object (see [ArrayDiffResult](#arraydiffresult))

| Param | Type | Description |
| --- | --- | --- |
| currData | Array | an array of "current" data elements |
| newData | Array | an array of changes and new data elements |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| config | ArrayDiffConfig | (optional) additional config parameters (see [ArrayDiffConfig](#arraydiffconfig)) |

**Example**
```js
let currData = [
  {cityID:1, cityName:'New York'},
  {cityID:2, cityName:'Londonnnnn'}
];

let newData = [
  {cityID:2, cityName:'London'}, // London is fixed
  {cityID:3, cityName:'Rome' }   // Rome is added
];

// function which applies changes to an existing element
let mergeFn = (element, changes) => { element.cityName = changes.cityName; };

let result = mergeA(currData, newData, ['cityID'], { callbackFn: mergeFn });

console.dir(currData); // will print [ {cityID:1, cityName:'New York'},
                       //              {cityID:2, cityName:'London'},
                       //              {cityID:3, cityName:'Rome' } ];
```

## purgeA(aTarget, aHitList, key_columns, config) ⇒ Array
Removes elements indicated by a hit list from the provided array

**Kind**: global function
**Returns**: Array - an array of removed elements

| Param | Type | Description |
| --- | --- | --- |
| aTarget | Array | array to be purged |
| aHitList | Array | hit list - indicates which element from `aTarget` should be removed |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| config | ArrayPurgeConfig | (optional) additional config parameters (see [ArrayPurgeConfig](#arraypurgeconfig)) |

**Example**
```js
let targetA = [
  {cityID:1, cityName:'New York'},
  {cityID:2, cityName:'London'},
  {cityID:3, cityName:'Rome' }
];

let hitList = [ { cityID: 1 }, { cityID: 3 } ];

let elFreq = [];

let result = purgeA(targetA, hitList, ['cityID'] { elFreq: elFreq });

console.dir(targetA); // will print [ {cityID:1, cityName:'New York'} ];
console.dir(elFreq); // will print [1, 2] - it means that the first array
                     // element was found once, while the second twice
```

## uniqueA(source, key_columns, config) ⇒ Array
Copies unique elements from `source` to a new array, which is then returned

**Kind**: global function
**Returns**: Array - array of unique elements

| Param | Type | Description |
| --- | --- | --- |
| source | Array | source array - which may contain duplicates |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| config | ArrayUniqueConfig | (optional) additional config parameters (see [ArrayUniqueConfig](#arrayuniqueconfig)) |

**Example**
```js
let source = [ {cityID:1, cityName:'New York'}, {cityID:2, cityName:'London'}, {cityID:2, cityName:'London'} ];

let result = uniqueA(source, ["cityID"]);

console.dir(result); // will print [ {cityID:1, cityName:'New York'}, {cityID:2, cityName:'London'} ]
```

## compileC(key_columns) ⇒ function
Compiles and returns a function which compares two data elements and detects which comes before which in an orderd list.
The compiled function expects the compared values to be numeric

**Kind**: global function
**Returns**: function - compiled function

| Param | Type | Description |
| --- | --- | --- |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |

**Example**
```js
// function for an ASCENDING order
let ascFn = compileC('cityID','streetID');

// will return 0
ascFn({cityID:1, streetID:1}, {cityID:1, streetID:1});

// will return 1
ascFn({cityID:1, streetID:1}, {cityID:1, streetID:2});

// will return -1
ascFn({cityID:2, streetID:1}, {cityID:1, streetID:2});

// function for an DESCENDING order
let descFn = compileC('cityID:desc','streetID:desc');

// will return 0
descFn({cityID:1, streetID:1}, {cityID:1, streetID:1});

// will return -1
descFn({cityID:1, streetID:1}, {cityID:1, streetID:2});

// will return 1
descFn({cityID:2, streetID:1}, {cityID:1, streetID:2});
```

## eachPair(leftA, rightA, key_columns, callbackFn, config) ⇒ ArrayDiffResult
Calls a callback method for each matched elements of provided arrays

**Kind**: global function
**Returns**: ArrayDiffResult - [comparisson results object](#arraydiffresult)

| Param | Type | Description |
| --- | --- | --- |
| leftA | Array | first array of elements |
| rightA | Array | second array of elements |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |
| callbackFn | function | function to be called for each of mathced element pairs |
| config | ArrayDiffConfig | (optional) additional config parameters (see [ArrayDiffConfig](#arraydiffconfig)) |

**Example**
```js
let cities = [ {cityID:22, name:'New York'}, {cityID:44, name:'London'} ];

let streets = [
  {cityID:22, streetID:1, name:'Elm Street'},
  {cityID:22, streetID:3, name:'Wall St'},
  {cityID:44, streetID:2, name:'Downing St'}
];

let callbackFn = (city, street) => {
  console.log(street.name + ' ' + city.name)
}

eachPair(cities, streets, ["cityID"], callbackFn);

// The following will be printed to console:
// Elm Street in New York
// Wall St in New York
// Downing St in London
```

## sortOn(source, key_columns) ⇒ Array
Sorts the given array based on the given key name array (or comparer function)

**Kind**: global function
**Returns**: Array - array passed via `source` param

| Param | Type | Description |
| --- | --- | --- |
| source | Array | array to be sorted |
| key_columns | CompareBy | definition on how elements of two arrays should be compared (see [CompareBy](#compareby)) |

**Example**
```js
let source = [{cityID:2},{cityID:3},{cityID:1}];

// sorting in ASCENDING order
sortOn(source, ["cityID"]);

console.log(source); // will print [{cityID:1},{cityID:2},{cityID:3}];

// sorting in DESCENDING order
sortOn(source, ["cityID:desc"]);

let streets = [
   {cityID:22, streetID:1, name:'Elm Street'},
   {cityID:44, streetID:2, name:'Downing St'},
   {cityID:22, streetID:3, name:'Wall St'}
];

// using multiple keys
sortOn(source, ["cityID", "streetID:desc"]);
```

## clear(target) ⇒ Array
Removes all the elements of the given array

**Kind**: global function
**Returns**: Array - array passed via `target` param

| Param | Type | Description |
| --- | --- | --- |
| target | Array | array to be cleared |

**Example**
```js
let source = [{cityID:2},{cityID:3},{cityID:1}];

clear(source);

console.dir(source); // will print []
```

## overwrite(target, source) ⇒ Array
removes all the elements of `target` and replaces them with elements from `source`

**Kind**: global function
**Returns**: Array - array passed via `target` param

| Param | Type | Description |
| --- | --- | --- |
| target | Array | array to be overwritten |
| source | Array | array who's elements are to be places in `target` |

**Example**
```js
let target = [{cityID:100},{cityID:200}];
let source = [{cityID:2},{cityID:3},{cityID:1}];

overwrite(target, source);

console.dir(target); // will print [{cityID:2},{cityID:3},{cityID:1}]
```

## concat(target, source) ⇒ Array
Does an in-place concatination of elements of the `source` array at the end of `target` array

**Kind**: global function
**Returns**: Array - array passed via `target` param

| Param | Type | Description |
| --- | --- | --- |
| target | Array | array which should receive new elements |
| source | Array | array of elements which should be added at the end of the `target` array |

**Example**
```js
let target = [{cityID:100},{cityID:200}];
let source = [{cityID:2},{cityID:3},{cityID:1}];

concat(target, source);

console.dir(target); // will print [{cityID:100},{cityID:200},{cityID:2},{cityID:3},{cityID:1}]
```

## stringifyIDs(data) ⇒ string
Creates CSV containing values of all the keys ending with "ID". It's usefull for debugging

**Kind**: global function
**Returns**: string - CSV of key values

| Param | Type | Description |
| --- | --- | --- |
| data | Object | object or array to be converted to CSV |

**Example**
```js
let obj = { cityID: 11, streetID: 22, streetName: 'Elm Street' };

let result = stringifyIDs(obj);

console.log(result); // will print "cityID:11,streetID:22"
```

# Param types

## CompareBy

Functions which compare array elements need to be instructed how two elements can be compared. This can be done in two ways:

* by passing an array of ID property names, which should be compared to determin the relation of the two objects
* by passing a comparer function, which receives tow elements and returns a numeric value indicating the relation of the objects

If an array of property names is passed, a comparer function will be compiled automatically (via `compileC`) function.

The following snippet shows how comparisson can be defined via a comparer function:

```javascript
let leftA = [
  {cityID:1, cityName:'New York', weather:"windy"},
  {cityID:2, cityName:'London',   weather:"raining"}
];

let rightA = [
  {cityID:2, cityName:'London', weather:"thunderstorm"},
  {cityID:3, cityName:'Moscow', weather:"snowing"}
];

const comparerFn = (leftEl, rightEl) => {
    if(leftEl.cityID===rightEl.cityID) {
        return(0);
    }
    if(leftEl.cityID<rightEl.cityID) {
        return(1);
    }
    return(0);
}

let diff = compareA(leftA, rightA, comparerFn);
```

The previous example can be re-written to define comparrison via property name array instead of comparer function:

```javascript
let leftA = [
  {cityID:1, cityName:'New York', weather:"windy"},
  {cityID:2, cityName:'London',   weather:"raining"}
];

let rightA = [
  {cityID:2, cityName:'London', weather:"thunderstorm"},
  {cityID:3, cityName:'Moscow', weather:"snowing"}
];

let diff = compareA(leftA, rightA, ["cityID"]);
```

### Descending order

If a ID name array is passed as `key_columns` params, the compiled function will compare elements in ascending order.
We can change this behaviour by appending `:desc` to a ID name ... like so: ['cityID:desc','streetID:desc']

See an example given for the [`sortOn` function](#sortonsource-key_columns).

## ArrayDiffConfig

We can modify the way the functions work, by providing an **config object**. All the options in the `config` object are optional.

Here's a list of available options:

* [`sortLeftBy`](#sortleftby-and-sortrightby) - how should the `leftA` array be sorted
* [`sortRightBy`](#sortleftby-and-sortrightby) - how should the `rightA` be sorted
* `skipSort` - set it to `true` if arrays are not to be sorted
* `unique` - set it to `true` if are all the array elements unique - it speeds up the algorithm
* `linkName` - property assigned to the `rightA` elements, which should be pointing to the matching element in the `leftA`
* `mapName` - property assigned to the `leftA` elements, containig array of all the matched elemens from the `rightA`
* `callbackFn` - a callback function, which should be called for each of the matched element pairs

### `sortLeftBy` and `sortRightBy`

**Description:** defines how the arrays passed to the function should be sorted

**Defaults to**: value passed as `key_columns` param

**Expected value**: we can pass a function or an array of ID param names (see [CompareBy](#compareby))

In order to be more efficient, functions which rely on comparing array elements will sort both of the given arrays.

By default the functions use `key_columns` parameter to sort the arrays.

This can be overriden by specifying a dedicated sorting order for each of the two arrays:
* `config.sortLeftBy` = defines how the left array should be sorted (passed as the first param)
* `config.sortRightBy` = defines how the right array should be sorted (passed as the second param)

Sorting of an array can be disabled by assigning `null` to corresponding sort config param:
```javascript
{
    sortLeftBy: null // don't sort the left array
}
```

## ArrayPurgeConfig

This config si very similar to `ArrayDiffConfig` param type. The following params are the same as in [`ArrayDiffConfig`](#arraydiffconfig):
* `sortLeftBy`
* `sortRightBy`
* `skipSort`

The following params are unique to this param type:

* `sortBy` = how should both arrays be sorted
* `mapRemoved` - flag indicating should removed elements be mapped and returned
* `matchMulti` - can an element from the hit list array be matched with multiple elements from the target array (defaults to `false`)

## ArrayUniqueConfig

* `skipSort` - set it to `true` if arrays are not to be sorted
* `elFreq` - output param - an array in which element frequency is to be recorded (see the example given in the [`uniqueA` method description](#uniqueA))

# Return Types

## `ArrayDiffResult`

``ArrayDiffResult`` contains results of comparing two arrays. It has the following structure:
```javascript
{
    // an array of elements from left array (`leftA` param), which have not
    // been matched with any of the elements of the right array (`rightA` param)
    leftDiff:Array,
    // an array of elements from left array (`leftA` param),
    // which have been matched with at leas one element of the right array (`rightA` param)
    leftCommon:Array,
    // an array of elements from right array (`rightA` param), which have not
    // been matched with any of the elements of the left array (`leftA` param)
    rightCommon:Array,
    // an array of elements from right array (`rightA` param),
    // which have been matched with at leas one element of the left array (`leftA` param)
    rightDiff:Array
}
```

## `ArrayLinkResult`
``ArrayLinkResult`` contains results of linking two arrays. It has the following structure:
```javascript
{
    // parent elements with no matched child elements
    childless:Array,
    // parent elements with matching children
    parents:Array,
    // child elements with matching parent
    children:Array,
    // child elements without a matching parent
    orphans:Array
}
```

# License
MIT License, [http://www.opensource.org/licenses/MIT](http://www.opensource.org/licenses/MIT)

repository: knee-cola/array-merge-by-id

repo_name: knee-cola/array-merge-by-id


text:
# Syrchalis' Prosthetic Icons
Adds icons to every vanilla prosthetic and implant. Also adds a special texture for stacks of implants in case you have a mod that allows you to stack them.

**2.0:** Patch Operations have been replaced by C# code that looks for key words and assigns textures and colors accordingly. This means that instead of relying on compatibility on the side of this mod it now relies on mods that add prosthetics to use the right words in their defnames.

The result is that basically any mod that adds any prosthetic is compatible now.

## Guide for modders:
### Make sure your body parts have `<isTechHediff>true</isTechHediff>`
This is accomplished either by adding the above to the thingDef or by using the **vanilla parents**. Mostly there is no reason to not use the vanilla parents, so I recommend that. It also makes your mod automatically compatible with my Prosthetic Table mod.

### Textures get assigned based on key words (strings)
So make sure your defnames are logical. For example any body part that replaces an arm should also have 'arm' in it's defname. [For a full list of keywords look directly into the code](https://github.com/Syrchalis/ProstheticIcons/blob/master/Source/ProstheticIcons/ModSettings.cs#L67).
You can see that it looks for things like "arm" or "kidney". Note the words are not case sensitive so no need to capitalize anything.

### Colors get assigned based on key words as well
Same method as above, colors get assigned by key words. Here it looks for words like "simple" or "archotech" to assign the appropriate color. Defnames just need to contain one of these words if not specified differently.
There are 7 colors:
* White - default color, key words: `natural`
* Brown - for simple prosthetics, key words: `simple prosthetic basic artificial cochlear`
* Yellow - for bionics, key words: `bionic`
* Green - for archotech, key words: `archotech advanced`
* Purple - for advanced archotech, key words: `archotech AND advanced`
* Dark Blue - for simple animal prosthetics, key words: `animal`
* Light Blue - for bionic animal prosthetics, key words: `animal AND bionic`

### You can support me and help me speed up mod development for a small price:
[![ko-fi](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/A0A0IJ2R)

repository: Syrchalis/ProstheticIcons

repo_name: Syrchalis/ProstheticIcons


text:
# beanie.SalesInvoicesApi

All URIs are relative to *https://bean.ie*

Method | HTTP request | Description
------------- | ------------- | -------------
[**add_sales_invoice**](SalesInvoicesApi.md#add_sales_invoice) | **POST** /sales_invoices |
[**find_sales_invoice_by_id**](SalesInvoicesApi.md#find_sales_invoice_by_id) | **GET** /sales_invoices/{id} | Find Sales invoice by ID

# **add_sales_invoice**
> SalesInvoice add_sales_invoice(sales_invoices)

Creates a new sales invoice in the system

### Example
```python
from __future__ import print_function
import time
import beanie
from beanie.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = beanie.Configuration()
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# create an instance of the API class
api_instance = beanie.SalesInvoicesApi(beanie.ApiClient(configuration))
sales_invoices = beanie.SalesInvoiceInput() # SalesInvoiceInput | Sales invoice to add to the system

try:
    api_response = api_instance.add_sales_invoice(sales_invoices)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SalesInvoicesApi->add_sales_invoice: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sales_invoices** | [**SalesInvoiceInput**](SalesInvoiceInput.md)| Sales invoice to add to the system |

### Return type

[**SalesInvoice**](SalesInvoice.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **find_sales_invoice_by_id**
> SalesInvoice find_sales_invoice_by_id(id)

Find Sales invoice by ID

Returns a single sales invoice if the user has access

### Example
```python
from __future__ import print_function
import time
import beanie
from beanie.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = beanie.Configuration()
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# create an instance of the API class
api_instance = beanie.SalesInvoicesApi(beanie.ApiClient(configuration))
id = 789 # int | ID of sales invoice to fetch

try:
    # Find Sales invoice by ID
    api_response = api_instance.find_sales_invoice_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SalesInvoicesApi->find_sales_invoice_by_id: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **int**| ID of sales invoice to fetch |

### Return type

[**SalesInvoice**](SalesInvoice.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

repository: altoyield/python-beanieclient

repo_name: altoyield/python-beanieclient


text:
# Coryneum elevatum (Riess) B. Sutton, 1975 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycol. Pap. 138: 31 (1975)

#### Original name
Stegonsporium elevatum Riess, 1853

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Solidity Smart Contract Demo
## Deployment
ERC20FixedSupply
https://kovan.etherscan.io/address/0x1a9dce212cd804a7d95b28f6a9ae32861dc12221#code

SalesCtrt
https://kovan.etherscan.io/address/0x8bbc9a890c8d82312e88d1de0989a7a493110add#code

## Installation
Install NodeJs v15.14.0 or above
$ yarn install

## Automatic Simulation test
$ yarn run start

# Manual tests / Workflow
Notice: For all amounts below, 18 zeros are omitted. The token amount below are in Ethers denomination. Please add 18 zeros additionally.

Prepare 3 Ethereum addresses for owner, user1 and user2

# ERC20 Contract
## Deployment

# Sales Contract
## Deployment

## Testing Scenarios

## Security Analysis and Hacker Tes
### Those functions are open for public, will only affect their own accounts

### Those functions are read only, will not cause security risks

### Those functions are hidden from the public

### Those functions are only for testing, will not cause security risks

-----------== BSC Mainnet

-----------== BSC Testnet

## Configuration


text:
---
layout: post
title: "Ultraman"
description: "Set several years after the first Ultraman series, Shin Hayata, now a defense minister, has no memories of how he became Ultraman and saved the world from the Kaijus. Matsushiro Ide, his former personnel in the Science Patrol, tries to help him recover his memories in order to assist the Science Patrol eliminate new threats from the aliens. When the alien Bemular finds out that Hayata's son, Shinjirou, starts showing superhuman strength, the Science Patrol risks everything to give Shinjirou the t.."
img: 8699270.jpg
kind: tv series
genres: [Animation,Action,Sci-Fi]
tags: Animation Action Sci-Fi
year: 2019
imdb_rating: 6.9
votes: 1444
imdb_id: 8699270
netflix_id: 80231373
color: 114b5f
---
Director: `N/A`

Cast: `D.C. Douglas` `Josh Hutcherson` `Cristina Valenzuela` `Tara Sands` `Michael Yurchak`

Set several years after the first Ultraman series, Shin Hayata, now a defense minister, has no memories of how he became Ultraman and saved the world from the Kaijus. Matsushiro Ide, his former personnel in the Science Patrol, tries to help him recover his memories in order to assist the Science Patrol eliminate new threats from the aliens. When the alien Bemular finds out that Hayata's son, Shinjirou, starts showing superhuman strength, the Science Patrol risks everything to give Shinjirou the top-secret Ultrasuit to fight Bemular and save the world once again.::heyitsnuel

repository: meparth/BongNetflix

repo_name: meparth/BongNetflix


text:
# Botkit - Building Blocks for Building Bots

[![npm](https://img.shields.io/npm/v/botkit.svg)](https://www.npmjs.com/package/botkit)
[![David](https://img.shields.io/david/howdyai/botkit.svg)](https://david-dm.org/howdyai/botkit)
[![npm](https://img.shields.io/npm/l/botkit.svg)](https://spdx.org/licenses/MIT)
[![Build Status](https://travis-ci.com/howdyai/botkit.svg?branch=master)](https://travis-ci.com/howdyai/botkit)

**Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.**

## The information in this document is for the brand new 4.0 branch of Botkit! If you're looking for documentation for previous versions, [look here](https://botkit.ai/docs/v0/).

## Install Botkit

The best way to get started locally with Botkit is by installing our Yeoman template, and using it to create a new Botkit project.
This will install and configure a starter kit for you!

```bash
npm install -g yo generator-botkit
yo botkit
```

### Remix on Glitch

Want to dive right in? [Remix one of our starter kits on Glitch](https://glitch.com/botkit). You'll start with a fully functioning app that you can edit and run from the browser!

 [![Remix on Glitch](https://botkit.ai/docs/glitch.png)](https://glitch.com/botkit)

## Build Your Bot

The goal of Botkit is to make it easier and more fun to build software that talks and works like a robot!
Building a bot should feel cool, and not too technically complicated.

Botkit handles all the nitty gritty details like
API calls, session management and authentication,
allowing you to focus on building COOL FEATURES for your
bot using middleware and event handlers.

The toolkit is designed to provide meaningful building blocks for creating conversational user interfaces - with functions like `hears()`, `ask()`, and `reply()` that do what they say they do.

The [full documentation for Botkit's capabilities begins here »](../docs/index.md)

## Platform Support

Botkit can connect to multiple messaging channels through the [Microsoft Bot Framework Service](https://dev.botframework.com).
No plugins are necessary to use the Bot Framework service, and bots can be developed locally using the [Bot Framework Emulator](https://aka.ms/botframework-emulator).

The Botkit project includes several official adapters. Using these plugins, your bot can communicate directly with the messaging platforms.

* [Self-hosted web chat](../botbuilder-adapter-web)
* [Slack](../botbuilder-adapter-slack)
* [Webex Teams](../botbuilder-adapter-webex)
* [Facebook Messenger](../botbuilder-adapter-facebook)
* [Twilio SMS](../botbuilder-adapter-twilio-sms)
* [Google Hangouts](../botbuilder-adapter-hangouts)

Additional adapters can be found by [searching npm for Bot Framework-compatible adapters](https://www.npmjs.com/search?q=botbuilder-adapter). The open source community has created a variety of plugins and extensions to Bot Framework.  Check out the [Bot Builder Community Repo](https://github.com/BotBuilderCommunity/botbuilder-community-js) for additional adapters, storage connectors and middlewares.

[Platform specific documentation can be found on the main docs site  »](../docs/platforms/index.md)

### Hearing Keywords

Most bots do their thing by listening for keywords, phrases or patterns in messages from users. Botkit has a special event handler called `hears()` that makes it easy to configure your bot to listen for this type of trigger.

```javascript
controller.hears(['string','pattern .*',new RegExp('.*','i')],'message,other_event', async (bot, message) => {

  // do something!
  await bot.reply(message, 'I heard a message.')

});
```

[Read more about hearing things ›](../docs/core.md#matching-patterns-and-keywords-with-hears)

### Responding to Events

Bots can respond to non-verbal events as well, like when a new user joins a channel, a file gets uploaded, or a button gets clicked. These events are handled using an event handling pattern that should look familiar. Most events in Botkit can be replied to like normal messages.

```javascript
controller.on('channel_join', async (bot, message) => {

  await bot.reply(message,'Welcome to the channel!');

});
```

[See a full list of events and more information about handling them ›](../docs/core.md#receiving-messages-and-events)

### Middleware

In addition to taking direct action in response to a certain message or type of event, Botkit can also take passive action on messages as they move through the application using middlewares. Middleware functions work by changing messages, adding new fields, firing alternate events, and modifying or overriding the behavior of Botkit's core features.

Middleware can be used to adjust how Botkit receives, processes, and sends messages.

```javascript
// Log every message received
controller.middleware.receive.use(function(bot, message, next) {

  // log it
  console.log('RECEIVED: ', message);

  // modify the message
  message.logged = true;

  // continue processing the message
  next();

});

// Log every message sent
controller.middleware.send.use(function(bot, message, next) {

  // log it
  console.log('SENT: ', message);

  // modify the message
  message.logged = true;

  // continue processing the message
  next();

});
```
## Documentation

[Full documentation of Botkit, including a class reference, can be found on the docs site](https://botkit.ai/docs/v4), as well as [on Github](../docs/index.md).

## [Change Log](https://github.com/howdyai/botkit/blob/master/changelog.md)

## Community & Support

Join our thriving community of Botkit developers and bot enthusiasts at large.
Over 10,000 members strong, [our open Slack group](https://community.botkit.ai) is
_the place_ for people interested in the art and science of making bots.
Come to ask questions, share your progress, and commune with your peers!

You can also find help from members of the Botkit team [in our dedicated Cisco Spark room](https://eurl.io/#SyNZuomKx)!

## About Botkit

Botkit is a part of the [Microsoft Bot Framework](https://dev.botframework.com).

Want to contribute? [Read the contributor guide](https://github.com/howdyai/botkit/blob/master/CONTRIBUTING.md)

Botkit is released under the [MIT Open Source license](https://github.com/howdyai/botkit/blob/master/LICENSE.md)


text:
# Zombie Strike code

FPS zombie survival game.

Player has the ability to choose how many waves they want to play and after that it's simple, just try to SURVIVE.

To download simply clone repository.

After download open Unity Hub and click on Add, go to just downloaded folder and click ok.

When project opens go to Assets/Scenes, drag and drop all 3 scenes to Hierarchy window.

Delete untitled scene, select "GameScene" click on three dots on the right and unload scene, do the same for the "GameOverScene".

If you don't know how to clone repository here is a quick tutorial.

# Needed tools:
- Unity (Download Unity [here](https://unity3d.com/get-unity/download))
- Visual Studio (Download Visual Studio [here](https://visualstudio.microsoft.com/downloads/))

# Tutorial
- Download and install git [here](https://git-scm.com/downloads)
- Right mouse click on desktop and click ***Git Bash Here***
- Copy and paste (Middle mouse click) this code: ***git clone https://github.com/Siki1999/ZombieStrike_Code.git***
- Open cloned folder in Unity hub
- ***DONE***

# License
Read the [license](https://github.com/Siki1999/ZombieStrike_Code/blob/main/LICENSE).


text:
# Women-Communities

List of women communities in STEM.

- [community.anitab.org](https://community.anitab.org/)
- [African women in mathematics association](http://africanwomeninmath.org/)
- [She codes for change](http://shecodesforchange.org/)
- [She codes Africa](https://medium.com/shecodeafrica)
- [Pehia Foundation](https://pehia.org/)
- [WAAW Foundation](http://waawfoundation.org/)
- [Connecting African Women in STEM](https://connectingafricanwomeninstem.org/)
- [Girls Coding](http://www.girlscoding.com.ng/)
- [Women in Tech Africa](http://www.womenintechafrica.com/)
- [Women Techmakers](https://www.womentechmakers.com/)

repository: prondubuisi/Women-Communities

repo_name: prondubuisi/Women-Communities


text:
Written by: Sergey Gustun

Hello everyone

Today we will start a lesson in which we will try to understand Node.js and the Alpaca API. I don't like boring lessons, I suggest you go straight into battle.

Let's set ourselves the following tasks

- [Install NodeJS and NPM](#install-nodejs-and-npm)

- [Create your first script](#create-your-first-script)

- [How to get a string from the terminal](#how-to-get-a-string-from-the-terminal)

- [How to work with dates](#how-to-work-with-dates)

- [Install Alpaca API](#install-alpaca-api)

- [Get data from the Alpaca API based on the line we entered in the terminal, namely, find data on Stock](#get-data-from-the-alpaca-api-based-on-the-line-we-entered-in-the-terminal-namely-find-data-on-stock)

Simply put, we will make a very easy Stock Market Checker which one could use to find a correlation between the current price and previous prices.

Attached here is the GitHub repository with all the code discussed today https://github.com/Gaserd/alpacahq-nodejs-examples

## Install NodeJS and NPM

First of all, let's install NodeJS, all the information that we need to install is here:
 https://nodejs.org/en/

Nothing complicated, click the big green button, download the installer and that's it. Was it difficult? Great, you are already halfway there with the installation of NodeJS and NPM.

If you have any questions about the installation or something went wrong, just tweet me https://twitter.com/gaserdgg or email me<EMAIL_ADDRESS>
To understand that everything works, let's open the terminal and run the command:

```
node -v
```

In my case, it is shown that this version is  `v12.18.1`

Oh, you don't know what a terminal is? This is how you will communicate with the computer, but without the help of a special UI that you see every day.

If you have never used the terminal, Google what it is, and take into account your operating system.

Let's check again whether we have NPM , have you already guessed how?
```
npm -v
```

Again, if something doesn't work, don't be afraid to write to me.

## Create your first script

Now let's move on to creating your first script, here we will also stop a little, because you will need to choose a code editor, I recommend  VS Code.

https://code.visualstudio.com/

Let's create a workspace where we can create. Go to VS Code and create a folder, call it `StockScreener`

Now let's open the terminal, for this purpose in VS Code there is a separate line in the menu, which is called Terminal -> New Terminal , it will open the terminal with the path to your folder. Conveniently.

Let's initialize our NPM, if you haven't read what NPM is yet, I'll tell you, especially for those who have played MMORPG World of Warcraft, NPM is Addons for your code that other developers write, so you don't have to write anything with your own hands, by the way, you can help them write these Addons.

Let's enter the command
```
npm init
```

At this stage, you can not fill in anything yet, NPM will fill in everything itself, it is not important for us now, the main thing is not to forget to enter YES.

Great! Now let's create our first script. Create a file with the name `main.js`

Maybe it's time to write something and see how it works? Let's write something standard, but with a little tuning.

```
console.log(`Hello, I'm StockScreneer`)
```

Now open the terminal and run the command
```
node main.js
```

Now we would like the terminal to send something to us in the same way as NPM, we answered something to it, and our program remembered it.

## How to get a string from the terminal

For this purpose, there is a `readline` in NodeJS, which means something to you right now, but let me show you how it works.

Let's write this code. You can delete the old one.

```
const readline = require('readline')

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

rl.question('Input STOCK: ', (stock) => {
    console.log(`You choose stock: ${stock}`)
    rl.close()
});
```

At this stage, you can experiment a little, for example, try entering other questions and output a different answer. Try it, programming is a constant experiment.

## How to work with dates

Next we will work with dates and with the Alpaca API and try to find out if the exchange is working now.

Let's start with something new and add an NPM package that will allow us to work with dates in a more convenient way.

Open the terminal and write:
```
npm install date-fns
```

What is the date-fns? Yes read directly on the package page - https://date-fns.org/

Now let's connect it at the beginning of our file and then look at the following code.

```
const dateFns = require('date-fns')
```

Great, let's now try to output today's date.

```
console.log(new Date())
```

Now we should only have this code with you:
```
const readline = require('readline')
const dateFns = require('date-fns')

console.log(new Date())
```

And run it, if you forgot how, just enter the command in the terminal:
```
node main.js
```

If you have any questions or something went wrong, just tweet me https://twitter.com/gaserdgg or email me<EMAIL_ADDRESS>
I see something like this in my terminal:
```
2020-08-04T08:33:28.769Z
```

It's not the most convenient form to read the date, is it? Let's come up with a format for the date.
Let it be `yyyy-MM-dd HH:mm:ss`

So we will write:
```
const format = `yyyy-MM-dd HH:mm:ss`
const today = new Date()
```
And we'll also make a variable for today's date. Now let's do a little trick, print our date in the format we need.
```
console.log(dateFns.format(today, format))
```

Now run your script, how about it? Cool!

## Install Alpaca API
Ready for something more complex? I believe in you. It's time for us to get busy and check whether the exchange is working. In my examples, I will use Alpaca API - a special API for working with the stock market and trading algorithms.

To start, go to https://alpaca.markets/ and sign up, we only need to generate a key for your work right now.

Go to the Paper Trading API and you will see a button where you can generate a key for yourself. Now add these keys to our code, we will need them.

```
const apiKeyId = 'PUT API KEY HERE'
const secretKey = 'PUT SECRET KEY HERE'
```

Just don't forget to insert your keys here.

Now let's install the package for the Alpaca API
```
npm install @alpacahq/alpaca-trade-api
```

And as always, we'll add it to our code.
```
const Alpaca = require('@alpacahq/alpaca-trade-api')

const alpaca = new Alpaca({
    keyId: apiKeyId,
    secretKey: secretKey,
    paper: true,
    usePolygon: false
})
```

If you are at this moment, something is unclear or you have something that does not work, just tweet me https://twitter.com/gaserdgg or email me<EMAIL_ADDRESS>
Let's now try to get the state of the exchange, find out whether it works now or not.

```
alpaca
.getClock()
.then((clock) => {
    console.log(`The market is ${clock.is_open ? 'open.' : 'closed.'}`)
})
```

And try to execute the command, well? In my time zone, the exchange is not working yet, so I get this response:
```
2020-08-04 11:55:39
The market is closed.
```

But we would also like to know when the exchange is working, so that we know at what point it is time to start trading.
```
const date = dateFns.format(today, format)
alpaca.getCalendar({
    start: date,
    end: date
}).then((calendars) => {
    console.log(calendars)
})
```

Let's run our script and get something like this answer:
```
[
  {
    date: '2020-08-04',
    open: '09:30',
    close: '16:00',
    session_open: '0700',
    session_close: '1900'
  }
]
The market is closed.
```

## Get data from the Alpaca API based on the line we entered in the terminal, namely, find data on Stock

To start, install another package:

```
npm install date-fns-timezone
```

And let's add the function we need right away:
```
const { formatToTimeZone } = require('date-fns-timezone')
```

Now we need to understand, the time in New York,which is in the time zone America/Toronto, so we will write:

```
const timeZone = 'America/Toronto'

const edtFormat = 'YYYY-MM-DD HH:mm:ss.SSS [GMT]Z (z)'
const edtDate = formatToTimeZone(new Date(), edtFormat, { timeZone })

console.log(edtDate)
```

Well, as always, run your script, preferably before you comment on the old lines that we do not need yet.

```
2020-08-05 05:28:02.261 GMT-04:00 (EDT)
```

Let's now output the time at which we open the exchange and the time that is relative to our current time in NY.

Well, did it work out? If suddenly something didn't work out or you don't understand something tweet me https://twitter.com/gaserd or email me<EMAIL_ADDRESS>
But before that, we will write a code that will get data on Apple shares.

```
    const to = dateFns.format(today, format)
    today.setMonth(today.getMonth() - 3)
    const from = dateFns.format(today, format)
    const stock = 'AAPL'

    alpaca
        .getAggregates(
            stock,
            'day',
            from,
            to
        )
        .then(data => {
            console.table(data.results)
        }).catch((e) => {
            console.log(e)
        })
```

I hope you made a mistake, right? This is an error due to the format we use for formatting the date, replace it with `yyyy-MM-dd`

Now run your program again. You may have noticed that instead of `console. log` we used `console.table` this is due to a more convenient perception of the large amount of data that we receive.

Interesting point, do you understand why we do `setMonth` ? All in order to get data for 3 months, each month has about 21 trading days, so we set our date to 3 months ago.

Well, can you now link the input code with the data received and check whether the exchange is working?

I'll write the ready-made code right away, but I really want you to try it yourself.

```
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
const date = dateFns.format(new Date(), format)
const timeZone = 'America/Toronto'

const etcFormat = 'YYYY-MM-DD HH:mm:ss.SSS [GMT]Z (z)'
const etcDate = formatToTimeZone(new Date(), etcFormat, { timeZone })

function inputStock() {
    rl.question('Input STOCK: ', (stock) => {
        let today = new Date()
        const to = dateFns.format(today, format)
        today.setMonth(today.getMonth() - 3)
        const from = dateFns.format(today, format)

        alpaca
            .getAggregates(
                stock,
                'day',
                from,
                to
            )
            .then(data => {
                const results = data.results.map(res => res.startEpochTime = dateFns.format(res.startEpochTime, format))
                console.table(data.results)
                rl.close()
                exit()
            }).catch((e) => {
                console.log(e)
                exit()
            })
    });
}

function main() {
    alpaca.getClock().then((clock) => {
        console.log(`###############################`)
        console.log(`The market is ${clock.is_open ? 'open.' : 'closed.'}`)
        alpaca.getCalendar({
            start: date,
            end: date
        }).then((calendars) => {
            console.log(`The market opened at ${calendars[0].open} and closed at ${calendars[0].close} on ${date}.`)
            console.log(`NEW YORK TIME - ${etcDate}`)
            console.log(`###############################`)
        }).then(() => {
            if (clock.is_open) {
                inputStock()
            } else {
                exit()
            }
        })
    })
}

main()
```

Oops, it seems like too much code at a time. But let's try to understand.

I wrapped our previous code in functions to make it more convenient, now we have the main function `main` and the `inputStock` function that calls a request to enter the name of the Stock and then outputs data. this function should still be divided into several, but let's not do it yet.

the `main` function is the entry point to the execution of our script, it checks whether the exchange is working now and if it is working, it shows historical data, if it is not working, it tells us about it.

You may have noticed another thing, it's `exit()` this is a function that exits the script and stops executing it.

```
const { exit } = require('process')
```

Actually, this is all, this is a very light version of Stock Screneer, then you can dive more and more into the financial world and start processing the received data, as well as do not hesitate to get data from the Alpaca API in real time.

Again, attached here is the GitHub repository with all the code discussed today https://github.com/Gaserd/alpacahq-nodejs-examples

repository: Gaserd/alpacahq-nodejs-examples

gha_language: JavaScript

repo_name: Gaserd/alpacahq-nodejs-examples


text:
[![Build Status](https://travis-ci.org/Acosix/alfresco-utility.svg?branch=master)](https://travis-ci.org/Acosix/alfresco-utility)

# About
This project defines sets of utility constructs for Repository- or Share-tier modules as well as cross-cutting utilities. The resulting technical modules are primarily used to avoid redundancy in Acosix GmbH modules, as well as abstracting and consolidating similar functionality without tying it to specific functional constructs.

## Compatbility

This module is built to be compatible with Alfresco 5.0d and above. It may be used on either Community or Enterprise Edition.

## Features

### Common
- Collection of Spring bean factory / bean definition registry post processors for customising out-of-the-box Alfresco Spring beans without overriding / copy&pasting Spring XML
- Thread-safe SSL socket factory (default Alfresco SSL socket factory uses static, shared state)
- Enhanced default declarative web script which respects the web script format during lookup of JS customisations (e.g. site.put.json.js will look for site.put.json.js and site.put.js customisation files instead of only site.put.js)

### Repository-tier
- Enhanced subsystem factory/manager classes that allow reverse-lookup of the subsystem instance ID from its application context as well as access to the resolved locations of *.properties files
- Custom subsystem factory/manager variant that use a custom class loader for subsystems so that they can load custom library JARs or different versions from JARs already included in Alfresco
- Subsystem properties factory bean allowing subsystem properties to be exposed to other components as regular java.util.Properties objects
- Enhanced web script container capable of handling [web script extensibility](https://www.alfresco.com/blogs/developer/2012/05/23/webscript-extensibility-on-the-alfresco-repository/) - raised via [ALF-21794](https://issues.alfresco.com/jira/browse/ALF-21794)
- Simple override to site.get/site.put/sites.post JSON FTL to allow web script extension templates to augment the site data, e.g. as basis for simpler "Edit Site" dialog customisations either in YUI or Aikau
- Common utility functions for Quartz job processing, i.e. running a job with a lock and an optional transaction
- Basic batch process work provider handling cm:people nodes, using transactional metadata queries (TMQ) combined with metadata-based pagination for efficient loading, specifically for larger user bases

### Share-tier
- Support for share-global.properties files to hold simple configuration key-value pairs which can be provided by modules (similarly to Repository-tier) and overriden by administrators via a share-global.properties file in the Tomcat configuration root folder (./shared/classes/) - properties provided that way are automatically exposed in Spring XML files for placeholder resolution
- Support for log4j.properties files to be provided by modules (similarly to Repository-tier) and overriden by administrators via a *-log4j.properties in the Tomcat configuration root folder (./shared/classes/alfresco/web-extension/) - raised by an Enterprise customer in 2013 via [MNT-14972](https://issues.alfresco.com/jira/browse/MNT-14972)
- Minor enhancements to Surf CSS theme handlers (clean state separation between different theme CSS tokens)
- Minor enhancements to Surf Dojo widget dependency collection (JSON instead of RegEx-parsing instead of JSON model; improved RegEx-pattern for dependencies detection in JS source files)
- Minor enhancements to Surf CSS dependency collection (JSON instead of RegEx-parsing of JSON model; improved RegEx-pattern for dependencies detection in JS source files) - effectively adding the ability to load additional CSS files via JSON model
- Enhanced local web script container addressing an [issue](https://issues.alfresco.com/jira/browse/ALF-21949) with the Surf extensibility handling interfering with AbstractWebScript implementations that directly stream a response to the client

# Maven usage

This addon is being built using the [Acosix Alfresco Maven framework](https://github.com/Acosix/alfresco-maven) and produces both AMP and installable JAR artifacts. Depending on the setup of a project that wants to include the addon, different approaches can be used to include it in the build.

## Build

This project can be built simply by executing the standard Maven build lifecycles for package, install or deploy depending on the intent for further processing. A Java Development Kit (JDK) version 8 or higher is required for the build of the master branch, while the Alfresco 4.2 branch requires Java 7.

By inheritance from the Acosix Alfresco Maven framework, this project uses the [Maven Toolchains plugin](http://maven.apache.org/plugins/maven-toolchains-plugin/) to allow potential cross-compilation against different Java versions. This is used for instance in a [separate branch to provide an Alfresco 4.2 compatible version](https://github.com/Acosix/alfresco-utility/tree/alfresco-42) of this addon. In order to build the project it is necessary to provide a basic toolchain configuration via the user specific Maven configuration home (usually ~/.m2/). That file (toolchains.xml) only needs to list the path to a compatible JDK for the Java version required by this project. The following is a sample file defining a Java 7 and 8 development kit.

```xml
<?xml version='1.0' encoding='UTF-8'?>
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
  <toolchain>
    <type>jdk</type>
    <provides>
      <version>1.8</version>
      <vendor>oracle</vendor>
    </provides>
    <configuration>
      <jdkHome>C:\Program Files\Java\jdk1.8.0_112</jdkHome>
    </configuration>
  </toolchain>
  <toolchain>
    <type>jdk</type>
    <provides>
      <version>1.7</version>
      <vendor>oracle</vendor>
    </provides>
    <configuration>
      <jdkHome>C:\Program Files\Java\jdk1.7.0_80</jdkHome>
    </configuration>
  </toolchain>
</toolchains>
```

## Dependency in Alfresco SDK

The simplest option to include the addon in an All-in-One project is by declaring a dependency to the installable JAR artifact. Alternatively, the AMP package may be included which typically requires additional configuration in addition to the dependency.

### Using SNAPSHOT builds

In order to use a pre-built SNAPSHOT artifact published to the Open Source Sonatype Repository Hosting site, the artifact repository may need to be added to the POM, global settings.xml or an artifact repository proxy server. The following is the XML snippet for inclusion in a POM file.

```xml
<repositories>
    <repository>
        <id>ossrh</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
```

### Repository

```xml
<!-- JAR packaging -->
<dependency>
    <groupId>de.acosix.alfresco.utility</groupId>
    <artifactId>de.acosix.alfresco.utility.common</artifactId>
    <version><IP_ADDRESS></version>
    <type>jar</type>
</dependency>

<dependency>
    <groupId>de.acosix.alfresco.utility</groupId>
    <artifactId>de.acosix.alfresco.utility.repo</artifactId>
    <version><IP_ADDRESS></version>
    <type>jar</type>
    <classifier>installable</classifier>
</dependency>

<!-- OR -->

<!-- AMP packaging -->
<dependency>
    <groupId>de.acosix.alfresco.utility</groupId>
    <artifactId>de.acosix.alfresco.utility.repo</artifactId>
    <version><IP_ADDRESS></version>
    <type>amp</type>
</dependency>

<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <overlays>
            <overlay />
            <overlay>
                <groupId>${alfresco.groupId}</groupId>
                <artifactId>${alfresco.repo.artifactId}</artifactId>
                <type>war</type>
                <excludes />
            </overlay>
            <!-- other AMPs -->
            <overlay>
                <groupId>de.acosix.alfresco.utility</groupId>
                <artifactId>de.acosix.alfresco.utility.repo</artifactId>
                <type>amp</type>
            </overlay>
        </overlays>
    </configuration>
</plugin>
```

For Alfresco SDK 3 beta users:

```xml
<platformModules>
    <moduleDependency>
        <groupId>de.acosix.alfresco.utility</groupId>
        <artifactId>de.acosix.alfresco.utility.repo</artifactId>
        <version><IP_ADDRESS></version>
        <type>amp</type>
    </moduleDependency>
</platformModules>
```

### Share

```xml
<!-- JAR packaging -->
<dependency>
    <groupId>de.acosix.alfresco.utility</groupId>
    <artifactId>de.acosix.alfresco.utility.common</artifactId>
    <version><IP_ADDRESS></version>
    <type>jar</type>
</dependency>

<dependency>
    <groupId>de.acosix.alfresco.utility</groupId>
    <artifactId>de.acosix.alfresco.utility.share</artifactId>
    <version><IP_ADDRESS></version>
    <type>jar</type>
    <classifier>installable</classifier>
</dependency>

<!-- OR -->

<!-- AMP packaging -->
<dependency>
    <groupId>de.acosix.alfresco.utility</groupId>
    <artifactId>de.acosix.alfresco.utility.share</artifactId>
    <version><IP_ADDRESS></version>
    <type>amp</type>
</dependency>

<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <overlays>
            <overlay />
            <overlay>
                <groupId>${alfresco.groupId}</groupId>
                <artifactId>${alfresco.share.artifactId}</artifactId>
                <type>war</type>
                <excludes />
            </overlay>
            <!-- other AMPs -->
            <overlay>
                <groupId>de.acosix.alfresco.utility</groupId>
                <artifactId>de.acosix.alfresco.utility.share</artifactId>
                <type>amp</type>
            </overlay>
        </overlays>
    </configuration>
</plugin>
```

For Alfresco SDK 3 beta users:

```xml
<shareModules>
    <moduleDependency>
        <groupId>de.acosix.alfresco.utility</groupId>
        <artifactId>de.acosix.alfresco.utility.share</artifactId>
        <version><IP_ADDRESS></version>
        <type>amp</type>
    </moduleDependency>
</shareModules>
```

# Other installation methods

Using Maven to build the Alfresco WAR is the **recommended** approach to install this module. As an alternative it can be installed manually.

## alfresco-mmt.jar / apply_amps

The default Alfresco installer creates folders *amps* and *amps_share* where you can place AMP files for modules which Alfresco will install when you use the apply\_amps script. Place the AMP for the *de.acosix.alfresco.utility.repo* module in the *amps* directory, *de.acosix.alfresco.utility.share* in the *amps_share* directory, and execute the script to install them. You must restart Alfresco for the installation to take effect.

Alternatively you can use the alfresco-mmt.jar to install the modules as [described in the documentation](http://docs.alfresco.com/5.2/concepts/dev-extensions-modules-management-tool.html).

## Manual "installation" using JAR files

Some addons and some other sources on the net suggest that you can install **any** addon by putting their JARs in a path like <tomcat>/lib, <tomcat>/shared or <tomcat>/shared/lib. This is **not** correct. Only the most trivial addons / extensions can be installed that way - "trivial" in this case means that these addons have no Java class-level dependencies on any component that Alfresco ships, e.g. addons that only consist of static resources, configuration files or web scripts using pure JavaScript / Freemarker.

The only way to manually install an addon using JARs that is **guaranteed** not to cause Java classpath issues is by dropping the JAR files directly into the <tomcat>/webapps/alfresco/WEB-INF/lib (Repository-tier) or <tomcat>/webapps/share/WEB-INF/lib (Share-tier) folders.

For this addon the following JARs need to be dropped into <tomcat>/webapps/alfresco/WEB-INF/lib:

 - de.acosix.alfresco.utility.common-<version>.jar
 - de.acosix.alfresco.utility.repo-<version>-installable.jar

For this addon the following JARs need to be dropped into <tomcat>/webapps/share/WEB-INF/lib:

 - de.acosix.alfresco.utility.common-<version>.jar
 - de.acosix.alfresco.utility.share-<version>-installable.jar

If Alfresco has been setup by using the official installer, another, **explicitly recommended** way to install the module manually would be by dropping the JAR(s) into the <alfresco>/modules/platform (Repository-tier) or <alfresco>/modules/share (Share-tier) folders.

repository: jellsarawoot/alfresco-utility

repo_name: jellsarawoot/alfresco-utility


text:
---
title: "Segment Anything Is Not Always Perfect: An Investigation of SAM on Different Real-world Applications"

# if the author is from our lab, then you need to match it with the folder name you can find here
# https://github.com/Vision-and-Learning-Lab-UAlberta/home/tree/master/content/authors
# otherwise just write down their full name
authors:
- weiji
- jingjingli
- Qi Bi
- Tingwei Liu
- Wenbo Li
- licheng

date: "2023-07-01T00:00:00Z"
doi:

# Schedule page publish date (NOT publication's date).
publishDate: "2021-07-01T00:00:00Z"

# Publication type.
# Legend: 0 = Uncategorized; 1 = Conference paper; 2 = Journal article;
# 3 = Preprint / Working Paper; 4 = Report; 5 = Book; 6 = Book section;
# 7 = Thesis; 8 = Patent
# you can have this as multiple types, just use a list like ["1", "3"]
publication_types: ["1"]

# Publication name and optional abbreviated publication name.
publication: Proceedings of IEEE Conference on Computer Vision and Pattern Recognition Workshop
publication_short: CVPR Workshop

abstract: "Recently, Meta AI Research approaches a general, promptable Segment Anything Model (SAM) pre-trained on an unprecedentedly large segmentation dataset (SA-1B). Without a doubt, the emergence of SAM will yield significant benefits for a wide array of practical image segmentation applications. In this study, we conduct a series of intriguing investigations into the performance of SAM across various applications, particularly in the fields of natural images, agriculture, manufacturing, remote sensing, and healthcare. We analyze and discuss the benefits and limitations of SAM, while also presenting an outlook on its future development in segmentation tasks.  This work is expected to provide insights that facilitate future research activities toward generic segmentation. Source code is publicly available."

# Summary. An optional shortened abstract.
summary:

tags:
- CVPR

featured: false

links:
# url_pdf: https://arxiv.org/pdf/2006.03630.pdf
# url_code: https://github.com/BII-wushuang/Lie-Group-Motion-Prediction
# url_dataset:
# url_poster:
# url_project: https://coderstellaj.github.io/Hierarchical-Motion-Recurrent-Network-Website/
# url_slides:
# url_source:
# url_video: https://www.youtube.com/watch?v=6Yw6O_14xHQ&feature=youtu.be

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# If you have one, please zip together
image:
  caption: ''
  focal_point: ""
  preview_only: false

---

repository: Vision-and-Learning-Lab-UAlberta/home

repo_name: Vision-and-Learning-Lab-UAlberta/home


text:
---
title: SQL Performance
keywords: mysql, portworx, cos, class of service, production, performance, overhead
description: View Portworx erformance as measured by running a mysql workload against the baremetal server and then against a Portworx volume on that same server.
weight: 300
aliases:
    - /install-with-other/operate-and-maintain/performance-and-tuning/sql/
---
## SQL performance overhead
In this example, we measure the performance as measured by running a `mysql` workload against the baremetal server and then against a Portworx volume on that same server.
![Perf mysql](/img/perf-mysql.png)