text:
There are two method to send and receive data over SCPT, both methods have
an example implementations.

===sendmsg and recvmsg

According to RFC Section 3.1 the follwoing socket call
sequence can be used for sending and receiving messages:

 A typical server in this style uses the following socket calls in
   sequence to prepare an endpoint for servicing requests:

   o  socket()

   o  bind()

   o  listen()

   o  recvmsg()

   o  sendmsg()

   o  close()

   A typical client uses the following calls in sequence to set up an
   association with a server to request services:

   o  socket()

   o  sendmsg()

   o  recvmsg()

   o  close()

Sendmsg and recmsg ae standard POSIX method calls.

=== sctp_sendv and sctp_recv

The other method, described in RFC6458 section 9.12 and 9.13 are:

   ssize_t sctp_sendv(
      int sd,
      const struct iovec *iov,
      int iovcnt,
      struct sockaddr *addrs,
      int addrcnt,
      void *info,
      socklen_t infolen,
      unsigned int infotype,
      int flags);

    ssize_t sctp_recvv(
      int sd,
      const struct iovec *iov,
       int iovlen,
      struct sockaddr *from,
      socklen_t *fromlen,
      void *info,
      socklen_t *infolen,
      unsigned int *infotype,
      int *flags);

repository: cyberroadie/sctp-examples

repo_name: cyberroadie/sctp-examples


text:
---
title: Sharing Your Module
---

## Versioning

To ensure compatibility, Premake allows project script authors to specify a minimum version or range of versions for the modules they require.

```lua
require("foo", ">=1.1")
```

To support this feature, your module should include a `_VERSION` field specifying the current version.

```lua
m._VERSION = "1.0.0"         -- for the 1.0 release
m._VERSION = "1.0.0-dev"     -- for the development (i.e. what's in your code repository) version
m._VERSION = "1.0.0-alpha3"  -- for a pre-release version
```

When updating your version number between releases, try to follow the conventions set by the [semantic versioning](http://semver.org) standard.

## Publishing

If you intend your module to be available to the public, consider creating a new repository on [GitHub](http://github.com/) (where Premake is hosted) for it, and taking a look at some of the [existing third-party modules](/community/modules) for examples. Some tips:

* Name your repository something like `premake-modulename`

* Include a `README.md` file which explains what your module does, how to use it, and any requirements it has on other modules or libraries.

* Set up a wiki and briefly document any new features and functions it adds. See [Premake's own documentation](https://github.com/premake/premake-core/wiki) for lots of examples.

Finally, regardless of where you host it, be sure to add a link on the [Available Modules](/community/modules) page to help people find it.

repository: premake/premake-core

branch_name: refs/heads/master

extension: md

gha_language: C

license_type: permissive

repo_name: premake/premake-core


text:
# Known Bugs and Solution

## numpy ImportError

**20200613**

```text
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 968, in _find_and_load
SystemError: <class '_frozen_importlib._ModuleLockManager'> returned a result with an error set
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2020-06-13 08:57:38.485784: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr
```

Solution: upgrade your numpy version (1.18.5)

license: MIT


text:
## AWS CDK Change Analyzer

The CDK Change Analyzer is a tool that aims to improve manual review of changes to AWS CDK Projects and allow automating approval of changes in continuous deployment. Enables detecting dangerous changes when using external construct libraries or when performing large refactorings.

This tool generates a comprehensive list of modifications between two CloudFormation templates (as produced by CDK), classifies them and presents them through a web application to allow manual review.

## How to run

```bash
yarn install --frozen-lockfile
yarn build
# You will first need to deploy the app/integ.nested-stacks.js file
yarn workspace cdk-change-analyzer run start nested-stacks
```

## Repository Structure

This repository contains multiple packages managed with [lerna](https://github.com/lerna/lerna). The packages are located in the `packages` folder and contain:
- [**change-analysis**](packages/change-analysis/README.md) - Contains all logic related to change analysis and creating a report of those changes.
- **change-analysis-models** - Contains the class definitions for creating a report of detected changes, as well as serialization logic for all relevant objects.
- **web-app** - Contains a web application for visualizing and interacting with a produced change report.

![c2a - architecture](https://user-images.githubusercontent.com/26902818/124084162-9e19f800-da46-11eb-9c22-42b8f1cf1882.png)

## Concepts

This tool introduces some new concepts, described below:

### InfraModel

InfraModel is used to represent a state of the infrastructure, corresponding to a CloudFormation template.

![infra-model](https://user-images.githubusercontent.com/26902818/124086326-d91d2b00-da48-11eb-8e23-078d2b747e98.png)

Its main entities are:
- **Components** - Represent any relevant entity of the infrastructure definition, such as CloudFormation resources, parameters and outputs, or CDK Constructs. Their main fields are:
    - **type** - The type of component. Some examples are "Resource", "Parameter", "CDK-Construct".
    - **subtype** - The subtype of the component. In the case of resources, this is the type of resource (e.g. "AWS::CloudFront::Distribution", "AWS::Lambda::Function").
    - **name** - An identifier for the Component. For CloudFormation Components, it corresponds to the logical ID. It is not assumed to be unique.
- **Relationships** - Represent semantic relationships between Components. There are two types of relationships:
    - **Dependency Relationships** - Connects Components that depend on each other. In CloudFormation, these are generated from intrinsic function references and the `DependsOn` field.
    - **Structural Relationships** - Connects Components in a hierarchical structure. In CDK, these is generated from the construct tree.
- **Property Values** - Hold property values for Components. They can be primitive values, or collections of other Property Values. The _componentUpdateType_ field indicated the behavior of the component once this property has changed (e.g. "NONE", "REPLACEMENT", "POSSIBLE_REPLACEMENT").

### InfraModelDiff

In addition to InfraModel, InfraModelDiff has a few extra concepts:

- **Operation** - Describes a detected change/operation that occured between two versions of a Component or Property Value.
- **Transition** - Contains the two versions (before and after) of any entity, after two InfraModels have been matched.

This is then represented in a graph, according to the following class diagram:

![graph](https://user-images.githubusercontent.com/26902818/124144956-52863f00-da84-11eb-9fa1-57c2147f0e83.png)

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This project is licensed under the Apache-2.0 License.

branch_name: refs/heads/main


text:
# Internal bracing

Experiment with internal bracing for wings

This is an ellipse with a brace at about 45 degs and with Jeremy's
help from advice in this [thread](https://groups.google.com/g/cadquery/c/dzsvo9R3XdY/m/gUctOXWABAAJ) it's now working.

I experimented with three types of bracing. The first was a plate with lightening holes.
The second was just a collar around the inside of the tube. The third, the present
version, is a collar with a lip. This last version is much stronger than the other two
and I tuned the dimensions so it printed fairly well with a 0.4mm nozzle and PLA.

Wirtten in python using the [CadQuery](https://github.com/CadQuery/cadquery) framework.

repository: winksaville/cq-internal-bracing

gha_language: Python

gha_license_id: MIT

repo_name: winksaville/cq-internal-bracing


text:
Rust-syntax file for notepad++
==============================

Notepad++ syntax highlighting for Rust.

Use:
* Download userDefineLang_rust.xml
* In Notepad++ open Language -> define your own language
* use Import to add Rust syntax highlighting to files with .rs extension


text:
---
layout: post
title: 'unix: managing start-up services'
date: 2019-03-28
updated: 2020-05-24
---

# Managing start-up services

|                                        |                                                              |
| -------------------------------------- | ------------------------------------------------------------ |
| `systemctl`                            | shows all of the packages that are managed at boot time and whatnot |
| `systemctl -at service`                | shows only the services                                      |
| `systemctl -at service -state=active`  | shows only the active ones                                   |
| `systemctl list-unit-files`            | To see the files with their status as enabled or not, you can run grep on this |
| `sudo systemctl (en)disable <service>` | To (en)disable a service                                     |
| `sudo systemctl (un)mask <service.`    | To mask/unmask a service                                     |

gha_language: HTML


text:
---
title: Recursive cases
nav_order: 2
---

Say we want to implement `writeStars`, a method that takes an integer `n` and prints out `n` asterisks `*` followed by a new line. We can solve this by defining an iterative algorithm.

```java
// pre : n >= 0
// post: Prints a line containing the given number of stars
public static void writeStars(int n) {
    for (int i = 0; i < n; i++) {
        System.out.print("*");
    }
    System.out.println();
}
```

In order to solve the `writeStars` problem using recursion, we'll temporarily disallow ourselves from using iteration. (This is not a general rule. Many recursive algorithms use recursion together with iteration to solve problems.)

One way to solve this problem without using any loops is to write out every possible case using `if` statements. But this gets tedious very quickly. How do we even cover all possible values of `n`?

```java
public static void writeStars(int n) {
    if (n == 0) {
        System.out.println();
    } else if (n == 1) {
        System.out.print("*");
        System.out.println();
    } else if (n == 2) {
        System.out.print("*");
        System.out.print("*");
        System.out.println();
    } else if (n == 3) {
        System.out.print("*");
        System.out.print("*");
        System.out.print("*");
        System.out.println();
    } ...
}
```

This is where recursion can help. Notice the `n == 3` case contains the same code from `n == 2` but with an extra asterisk at the beginning. We can factor-out the repeated code and call the `n == 2` case with `writeStars(2)`.

```java
public static void writeStars(int n) {
    if (n == 0) {
        System.out.println();
    } else if (n == 1) {
        System.out.print("*");
        System.out.println();
    } else if (n == 2) {
        System.out.print("*");
        System.out.print("*");
        System.out.println();
    } else if (n == 3) {
        System.out.print("*");
        writeStars(2);
    } ...
}
```

Notice the `n == 2` case also contains the same code as the `n == 1` case! And the `n == 1` case also contains the same code as the `n == 0` case!

```java
public static void writeStars(int n) {
    if (n == 0) {
        System.out.println();
    } else if (n == 1) {
        System.out.print("*");
        writeStars(0);
    } else if (n == 2) {
        System.out.print("*");
        writeStars(1);
    } else if (n == 3) {
        System.out.print("*");
        writeStars(2);
    } ...
}
```

What are the steps for evaluating writeStars(3)?

1. Call `writeStars(3)`, use the `n == 3` case.
1. Print `*`.
1. Call `writeStars(2)`, use the `n == 2` case.
1. Print `*`.
1. Call `writeStars(1)`, use the `n == 1` case.
1. Print `*`.
1. Call `writeStars(0)`, use the `n == 0` case.
1. Print a new line.

More generally, every case except for `n == 0` can be rewritten with two statements.

```java
public static void writeStars(int n) {
    if (n == 0) {
        // Base case
        System.out.println();
    } else {
        // Recursive case
        System.out.print("*");
        writeStars(n - 1);
    }
}
```

What are the steps for evaluating writeStars(3)?

1. Call `writeStars(3)`, use the `n >= 1` case.
1. Print `*`.
1. Call `writeStars(2)`, use the `n >= 1` case.
1. Print `*`.
1. Call `writeStars(1)`, use the `n >= 1` case.
1. Print `*`.
1. Call `writeStars(0)`, use the `n == 0` case.
1. Print a new line.

This recursive program has two parts: a **base case** and a **recursive case**.

Base case
: A simple input that is computed directly.

Recursive case
: A complex input that is computed with recursive calls to smaller subproblems.


text:
# Triangle Counting
[![Build Status](https://api.travis-ci.com/zhaofeng-shu33/triangle_counting.svg?branch=master)](https://travis-ci.com/zhaofeng-shu33/triangle_counting/)
[![Windows](https://ci.appveyor.com/api/projects/status/github/zhaofeng-shu33/triangle_counting?branch=master&svg=true)](https://ci.appveyor.com/project/zhaofeng-shu33/triangle-counting)
[![codecov](https://codecov.io/gh/zhaofeng-shu33/triangle_counting/branch/master/graph/badge.svg)](https://codecov.io/gh/zhaofeng-shu33/triangle_counting)
[![Documentation Status](https://readthedocs.org/projects/triangle-counting/badge/?version=latest)](https://triangle-counting.readthedocs.io/en/latest/?badge=latest)

## How to build

Use package manager to install `liblemon` and then use `CMake` to generate the build recipe.

## How to install
```shell
make install # default to /usr/local
```
## How to use
```shell
lemon-tc -f input.bin
```
The bin file has the following format. It uses 8 bytes to store an edge: source node id(4 bytes), sink node id(4 bytes) ...

## Reference

1. [Lecture Notes on Triangle Counting Algorithms](https://cs.stanford.edu/~rishig/courses/ref/l1.pdf)

## Method used in detail
Internally, we use directed graph data structure to save space. The node id is from 0 to |V|-1. The arc id is from 0 to |E|-1. The arc direction is from i to j if i < j and (i, j) belongs to the edge set.
Once the directed graph is constructed, we provide two methods: edge iteration first and node iteration first method.

### Edge Iteration first

We enumerate every edge of the graph first. For each edge e of the graph, we count how many triangles there are including this edge. For this inner task, we are given the graph and edge (u,v). We enumerate every incident node w of u and figure out whether there is an edge (w,v) or not. Notice that the existence test of (w,v) has time complexity log d where d is the degree of node w.

### Node Iteration first

We enumerate every node of the graph first. For each node n of the graph, we count how many triangles there are including this node. For this inner task, we are given the graph and node n. We enumerate all its incident node pairs u and v which have larger degrees than n. If the degrees are same, we choose nodes with higher node id. Also, the existence test of (w,v) has time complexity log d where d is the degree of node w. This method is faster than the previous one for two reasons. One reason is that every triangle is counted only once. The other reason is that the sorting of degree makes each enumeration of (u,v) pairs not too much. That is, we save time of the total number of existence test.
There are also two drawbacks of this method. Firstly, it needs extra time to compute the degree of each node. This time is not included when comparing node-first with edge-first method. Secondly, it needs extra space to save the degree of each node and those nodes which have larger degree than node n.

## Baseline

See [another repository](https://github.com/zhaofeng-shu33/triangle_counting_benchmark) for detail.


text:
# analyzer
A python tool that will/should convert a sentence into structured data.

## Requirements
- Python 3
- TextBlob
  - NLTK

## Usage

- Install `TextBlob` and its corpus
  - `pip3 install -U TextBlob`
  - `python3 -m textblob.download_corpora`
- Run the app
  - `python3 analyzer.py '<sentence you want to analyze>'`

repository: menan/analyzer

repo_name: menan/analyzer


text:
---
Order: 50
Title: GitLab CI
Description: Details on the GitLab CI support in GitVersion
---

To use GitVersion with GitLab CI, either use the [MSBuild
Task](/docs/usage/msbuild) or put the GitVersion executable in your
runner's `PATH`.

repository: ermshiperete/GitVersion

gha_language: C#

repo_name: ermshiperete/GitVersion


text:
# DarwinsArrows

## Description
- Hosted: https://darwins-arrows.web.app/
- Target-seeking arrows learn to avoid obstacles or to stay in a predefined track using a genetic algorithm
- Try playing with the sliders for population size, lifespan (max. calculation cycles) and mutation rate to change the settings of the genetic algorithm
- Depending on your screen size and resolution (because of the scaling by the HTML5 canvas) you should change the max. force and max. velocity settings to restrict / open up the speed and manoeuverability of the arrows
- Firstly inspired by: https://www.youtube.com/watch?v=bGz7mv2vD6g
## Version 1 and 2
- Uses array of vectores as genes for the genetic algorithm
## Version 3
- Uses weights and biases of neural net as genes for the genetic algorithm

repository: nico-bohlinger/DarwinsArrows

repo_name: nico-bohlinger/DarwinsArrows


text:
# Useful scripts

### Data visualisation

When using `k6` as a performance testing tool, you may want to use `k6-metrics-setup.sh` script to setup apps for visualisation of the results from your tests.

#### Prerequisites

* OpenShift instance available (^3.11)
* [oc](https://github.com/openshift/origin/releases) command-line tool (^3.11)
* [jq](https://github.com/stedolan/jq) JSON processor
  * `brew install jq`
  * `jq` could be also run as a Docker container (in that case make sure [Docker](https://docs.docker.com/install/) is installed and running)

Create a new project in OpenShift
```
oc new-project k6
```
Run the script
```
./k6-metrics-setup.sh
```

When the script finishes, it will provide you an example on how to run performance tests with `k6` and to redirect an output (test results) to InfluxDB now running in OpenShift.
To access visualised data from your test, go to Grafana URL also provided by script in console output.

repository: jhellar/voyager-performance

repo_name: jhellar/voyager-performance


text:
# 2015-Contracts-Treasury

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/2015-contracts-treasury) |
| Metadata | [Link](https://data.oregon.gov/api/views/2496-4hde) |
| Data: JSON | [100 Rows](https://data.oregon.gov/api/views/2496-4hde/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.oregon.gov/api/views/2496-4hde/rows.csv?max_rows=100) |
| Host | data.oregon.gov |
| Id | 2496-4hde |
| Name | 2015-Contracts-Treasury |
| Category | Revenue & Expense |
| Tags | contracts, state treasurer, state treasurer contracts, state treasurer's office, treasury contracts, treasury 2015, 2015 |
| Created | 2015-12-21T06:00:14Z |
| Publication Date | 2015-12-24T06:29:30Z |

## Description

Contracts for the State Treasurer's office for Fiscal Year 2015. For more information go to:http://www.oregon.gov/transparency/Pages/contracts.aspx

## Columns

```ls
| Included | Schema Type    | Field Name                            | Name                                  | Data Type     | Render Type   |
| ======== | ============== | ===================================== | ===================================== | ============= | ============= |
| No       |                | fiscal_year                           | Fiscal Year                           | number        | number        |
| Yes      | series tag     | type_of_contract                      | Type of Contract                      | text          | text          |
| Yes      | series tag     | contractor                            | Contractor                            | text          | text          |
| Yes      | time           | original_start_date                   | Original Start Date                   | calendar_date | calendar_date |
| No       |                | end_date                              | End Date                              | calendar_date | calendar_date |
| Yes      | numeric metric | contract_value                        | Contract Value                        | money         | money         |
| Yes      | series tag     | description_amendment_no_renewal_data | Description Amendment No/Renewal Data | text          | text          |
```

## Time Field

```ls
Value = original_start_date
Format & Zone = yyyy-MM-dd'T'HH:mm:ss
```

## Series Fields

```ls
Excluded Fields = end_date,fiscal_year
```

## Data Commands

```ls
series e:2496-4hde d:2015-04-21T00:00:00.000Z t:type_of_contract=PSK t:description_amendment_no_renewal_data="Bond Tracker System" t:contractor="Online Business Systems" m:contract_value=460000

series e:2496-4hde d:2015-06-09T00:00:00.000Z t:type_of_contract=PSK t:description_amendment_no_renewal_data="Myers Briggs Training" t:contractor="Mass Ingenuity, LLC" m:contract_value=10000

series e:2496-4hde d:2015-05-18T00:00:00.000Z t:type_of_contract=PSK t:description_amendment_no_renewal_data="Communication Training" t:contractor="Glaser & Associates, Inc." m:contract_value=24000
```

## Meta Commands

```ls
metric m:contract_value p:double l:"Contract Value" t:dataTypeName=money

entity e:2496-4hde l:2015-Contracts-Treasury t:url=https://data.oregon.gov/api/views/2496-4hde

property e:2496-4hde t:meta.view v:id=2496-4hde v:category="Revenue & Expense" v:averageRating=0 v:name=2015-Contracts-Treasury

property e:2496-4hde t:meta.view.owner v:id=d6zz-js5q v:screenName="Paula N." v:lastNotificationSeenAt=1492617591 v:displayName="Paula N."

property e:2496-4hde t:meta.view.tableauthor v:id=d6zz-js5q v:screenName="Paula N." v:roleName=administrator v:lastNotificationSeenAt=1492617591 v:displayName="Paula N."
```

## Top Records

```ls
| fiscal_year | type_of_contract | contractor                        | original_start_date | end_date            | contract_value | description_amendment_no_renewal_data |
| =========== | ================ | ================================= | =================== | =================== | ============== | ===================================== |
| 2015        | PSK              | Mersereau Shannon, LLP            | 2015-05-04T00:00:00 | 2017-12-31T00:00:00 |                | OFA Special Bond Councel              |
| 2015        | PSK              | Online Business Systems           | 2015-04-21T00:00:00 | 2017-06-30T00:00:00 | 460000.00      | Bond Tracker System                   |
| 2015        | PSK              | Mass Ingenuity, LLC               | 2015-06-09T00:00:00 | 2016-12-31T00:00:00 | 10000.00       | Myers Briggs Training                 |
| 2015        | PSK              | Glaser & Associates, Inc.         | 2015-05-18T00:00:00 | 2016-01-31T00:00:00 | 24000.00       | Communication Training                |
| 2015        | PSK              | CBIZ Benefits & Insurance, Inc.   | 2015-06-25T00:00:00 | 2016-12-31T00:00:00 | 133942.20      | Recruitment Services                  |
| 2015        | PSK              | Challenger, Gray & Christmas, Inc | 2015-07-15T00:00:00 | 2017-12-31T00:00:00 | 10000.00       | Consulting Services                   |
| 2015        | PSK              | Advanced Reporting, LLC           | 2015-05-19T00:00:00 | 2020-06-20T00:00:00 | 10000.00       | Background Checks                     |
| 2015        | PSK              | CBIZ Benefits & Insurance, Inc.   | 2015-06-25T00:00:00 | 2016-12-31T00:00:00 | 139982.00      | Recruitment Services                  |
| 2015        | PSK              | Online Enterprises, Inc.          | 2015-05-11T00:00:00 | 2015-10-31T00:00:00 | 55000.00       | Database Adminstrative Services       |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
![MarkerKit](https://github.com/pchelnikov/MarkerKit/blob/master/Assets/marker-kit.jpg)

# MarkerKit
A lightweight and easy to use wrapper for Auto Layout Constraints (iOS 8+ support), inspired by [https://github.com/ustwo/autolayout-helper-swift](https://github.com/ustwo/autolayout-helper-swift)

[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/pchelnikov/MarkerKit/blob/master/LICENSE)
[![Platform](https://img.shields.io/cocoapods/p/MarkerKit.svg?style=flat)](https://github.com/pchelnikov/MarkerKit)
[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/MarkerKit.svg)](https://cocoapods.org/pods/MarkerKit)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

## Requirements

- iOS 8.0+
- Xcode 9.0+
- Swift 4.0+

## Installation

### CocoaPods

You can use [CocoaPods](http://cocoapods.org/?q=MarkerKit).

```bash
platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
  pod 'MarkerKit'
end
```

#### Carthage
You can use [Carthage](https://github.com/Carthage/Carthage).
Specify in Cartfile:

```bash
github "pchelnikov/MarkerKit"
```

Run `carthage` to build the framework and drag the built MarkerKit.framework into your Xcode project. Follow [build instructions](https://github.com/Carthage/Carthage#getting-started).

### Manually

- Add the `MarkerKit.swift` file to your Xcode project.

## Usage

### Quick Start

```swift
import MarkerKit

class MyViewController: UIViewController {

    lazy var myView = UIView()

    override func viewDidLoad() {
        super.viewDidLoad()

        view.addSubview(myView)

        myView.mrk.height(50)
        myView.mrk.width(50)
        myView.mrk.center(to: view)
    }
}
```

### More examples:

**Edges placing**

```swift
// Create view

let myView = UIView()
myView.backgroundColor = UIColor.red
view.addSubview(myView)

// Add constraints

myView.mrk.top(to: view, attribute: .top, relation: .equal, constant: 10.0)
myView.mrk.leading(to: view, attribute: .leading, relation: .equal, constant: 10.0)
myView.mrk.trailing(to: view, attribute: .trailing, relation: .equal, constant: -10.0)
myView.mrk.bottom(to: view, attribute: .bottom, relation: .equal, constant: -10.0)
```

or shorter you can omit the attributes:

```swift
myView.mrk.top(to: view, constant: 10.0)
myView.mrk.leading(to: view, constant: 10.0)
myView.mrk.trailing(to: view, constant: -10.0)
myView.mrk.bottom(to: view, constant: -10.0)
```

or even shorter using `fillSuperview`:

```swift
let edgeInsets = UIEdgeInsets(top: 10.0, left: 10.0, bottom: 10.0, right: 10.0)
myView.mrk.fillSuperview(edgeInsets)
```

**Centering**

```swift
myView.mrk.centerX(to: view)
myView.mrk.centerY(to: view)
```

or equivalent:

```swift
myView.mrk.center(to: view)
```

**Measurements**

Constraints for width and height:

```swift
myView.mrk.width(100)
myView.mrk.height(100)
```

**Modify constraints**

```swift
// Create a reference to the `NSLayoutConstraint` e.g. for height

let heightConstraint = myView.mrk.height(100)
```

...

```swift

// Update the height constant

heightConstraint.constant = 30.0

// Animate changes

UIView.animate(withDuration: 0.3) {
    self.view.layoutIfNeeded()
}
```

## What to do next

* Writing tests

## License

MarkerKit is available under the MIT license. See the LICENSE file for more info.

repository: pchelnikov/MarkerKit

repo_name: pchelnikov/MarkerKit


text:
# Alfred Display Menu workflow
workflow for fast-switcing between multiple res in Alfred via *Display Menu* app

## Usage

- **ddnat**: to put the display in native res, in my case 2560 x 1440
- **ddlarg**: to put the display in large text mode, which is 1600 x 900
- **ddmore**: to put the display in more space mode, which is 3200 x 1800
- **dd{*query*}**: you can select/set any res

you can edit the script file to list your own native/large/more res.

license: Unlicense


text:
---
layout: default
title: Reporting
parent: User Guide
nav_order: 3
---

# Reporting

## Overview

You can view all of your frames with the `report` command.

```
$ hours report
May 1, 2019 to May 21, 2019
+---------+---------+--------------------------+-------------+----------+----------+---------+
| Project | Tags    | Notes                    | Date        | Start    | End      | Elapsed |
+---------+---------+--------------------------+-------------+----------+----------+---------+
| blog    | writing | Updating the about page  | May 7, 2019 | 12:26 pm | 1:26 pm  | 1:00    |
| blog    |         | Adding missing redirects | May 9, 2019 | 12:26 pm | 12:41 pm | 0:15    |
+---------+---------+--------------------------+-------------+----------+----------+---------+
Total hours: 1:15
```

By default the report will show time tracked thus far this month in text format.

## Date Ranges

To change the date range for the report use the `--from` and `--to` options.

```
$ hours report --from '2019-05-06' --to '2019-05-10'
May 6, 2019 to May 8, 2019
+---------+---------+-------------------------+-------------+----------+---------+---------+
| Project | Tags    | Notes                   | Date        | Start    | End     | Elapsed |
+---------+---------+-------------------------+-------------+----------+---------+---------+
| blog    | writing | Updating the about page | May 7, 2019 | 12:26 pm | 1:26 pm | 1:00    |
+---------+---------+-------------------------+-------------+----------+---------+---------+
Total hours: 1:00
```

Sometimes it's more convenient to specify an interval instead of the `--to` date. You can do this using the `--interval` option.

```
$ php hours report --from '2019-05-06' --interval '2 days'
May 6, 2019 to May 8, 2019
+---------+---------+-------------------------+-------------+----------+---------+---------+
| Project | Tags    | Notes                   | Date        | Start    | End     | Elapsed |
+---------+---------+-------------------------+-------------+----------+---------+---------+
| blog    | writing | Updating the about page | May 7, 2019 | 12:26 pm | 1:26 pm | 1:00    |
+---------+---------+-------------------------+-------------+----------+---------+---------+
Total hours: 1:00
```

## Output Formats

You can view the report as CSV or JSON instead by using the `--format` option.  The report is always printed to STDOUT. Use a [pipe](https://en.wikipedia.org/wiki/Pipeline_%28Unix%29) to save it to a file.

```
$ hours report --format csv > ~/Desktop/timesheet.csv
```

## Filters

Reports can be filtered by project and tag.

```
$ hours report --tag writing --project blog
May 1, 2019 to May 21, 2019
+-------------------------+-------------+----------+---------+---------+
| Notes                   | Date        | Start    | End     | Elapsed |
+-------------------------+-------------+----------+---------+---------+
| Updating the about page | May 7, 2019 | 12:26 pm | 1:26 pm | 1:00    |
+-------------------------+-------------+----------+---------+---------+
Total hours: 1:00
```

repository: matt-allan/hours

gha_language: PHP

repo_name: matt-allan/hours


text:
---
title: Envoy
kind: tutorial
weight: 8
---

[Envoy](https://www.envoyproxy.io/docs/envoy/v1.14.4/intro/what_is_envoy) is a
L7 proxy and communication bus designed for large modern service oriented
architectures. Envoy (v1.7.0+) supports an [External Authorization
filter](https://www.envoyproxy.io/docs/envoy/v1.14.4/intro/arch_overview/security/ext_authz_filter)
which calls an authorization service to check if the incoming request is
authorized or not.

This feature makes it possible to delegate authorization decisions to an
external service and also makes the request context available to the service
which can then be used to make an informed decision about the fate of the
incoming request received by Envoy.

## Goals

The tutorial shows how Envoy’s External authorization filter can be used with
OPA as an authorization service to enforce security policies over API requests
received by Envoy. The tutorial also covers examples of authoring custom
policies over the HTTP request body.

## Prerequisites

This tutorial requires Kubernetes 1.14 or later. To run the tutorial locally, we
recommend using
[minikube](https://minikube.sigs.k8s.io/docs/start/) in
version `v1.0+` with Kubernetes 1.14+.

## Steps

### 1. Start Minikube

```bash
minikube start
```

### 2. Create ConfigMap containing configuration for Envoy

The Envoy configuration below defines an external authorization filter
`envoy.ext_authz` for a gRPC authorization server.

Save the configuration as **envoy.yaml**:

```yaml
static_resources:
  listeners:
    - address:
        socket_address:
          address: <IP_ADDRESS>
          port_value: 8000
      filter_chains:
        - filters:
            - name: envoy.http_connection_manager
              typed_config:
                "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
                codec_type: auto
                stat_prefix: ingress_http
                route_config:
                  name: local_route
                  virtual_hosts:
                    - name: backend
                      domains:
                        - "*"
                      routes:
                        - match:
                            prefix: "/"
                          route:
                            cluster: service
                http_filters:
                  - name: envoy.ext_authz
                    typed_config:
                      "@type": type.googleapis.com/envoy.config.filter.http.ext_authz.v2.ExtAuthz
                      with_request_body:
                        max_request_bytes: 8192
                        allow_partial_message: true
                      failure_mode_allow: false
                      grpc_service:
                        google_grpc:
                          target_uri: <IP_ADDRESS>:9191
                          stat_prefix: ext_authz
                        timeout: 0.5s
                  - name: envoy.router
                    typed_config: {}
  clusters:
    - name: service
      connect_timeout: 0.25s
      type: strict_dns
      lb_policy: round_robin
      load_assignment:
        cluster_name: service
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address:
                      address: <IP_ADDRESS>
                      port_value: 8080
admin:
  access_log_path: "/dev/null"
  address:
    socket_address:
      address: <IP_ADDRESS>
      port_value: 8001
```

Create the ConfigMap:

```bash
kubectl create configmap proxy-config --from-file envoy.yaml
```

### 3. Define a OPA policy

The following OPA policy restricts access to the `/people` endpoint exposed by
our sample app:

* Alice is granted a **guest** role and can perform a `GET` request to `/people`.
* Bob is granted an **admin** role and can perform a `GET` and `POST` request to `/people`.

The policy also restricts an `admin` user, in this case `bob` from creating an
employee with the same `firstname` as himself.

**policy.rego**

```live:example:module:openable
package envoy.authz

import input.attributes.request.http as http_request

default allow = false

token = {"valid": valid, "payload": payload} {
    [_, encoded] := split(http_request.headers.authorization, " ")
    [valid, _, payload] := io.jwt.decode_verify(encoded, {"secret": "secret"})
}

allow {
    is_token_valid
    action_allowed
}

is_token_valid {
  token.valid
  now := time.now_ns() /<PHONE_NUMBER>
  token.payload.nbf <= now
  now < token.payload.exp
}

action_allowed {
  http_request.method == "GET"
  token.payload.role == "guest"
  glob.match("/people*", [], http_request.path)
}

action_allowed {
  http_request.method == "GET"
  token.payload.role == "admin"
  glob.match("/people*", [], http_request.path)
}

action_allowed {
  http_request.method == "POST"
  token.payload.role == "admin"
  glob.match("/people", [], http_request.path)
  lower(input.parsed_body.firstname) != base64url.decode(token.payload.sub)
}
```

Store the policy in Kubernetes as a Secret.

```bash
kubectl create secret generic opa-policy --from-file policy.rego
```

In the next step, OPA is configured to query for the `data.envoy.authz.allow`
decision. If the response is `true` the operation is allowed, otherwise the
operation is denied. Sample input received by OPA is shown below:

```live:example:query:hidden
data.envoy.authz.allow
```

```live:example:input
{
  "attributes": {
      "request": {
          "http": {
              "method": "GET",
                "path": "/people",
                "headers": {
                  "authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiZ3Vlc3QiLCJzdWIiOiJZV3hwWTJVPSIsIm5iZiI6MTUxNDg1MTEzOSwiZXhwIjoxNjQxMDgxNTM5fQ.K5DnnbbIOspRbpCr2IKXE9cPVatGOCBrBQobQmBmaeU"
                }
            }
        }
    }
}
```

With the input value above, the answer is:

```live:example:output
```

An example of the complete input received by OPA can be seen [here](https://github.com/open-policy-agent/opa-envoy-plugin#example-input).

> In typical deployments the policy would either be built into the OPA container
> image or it would fetched dynamically via the [Bundle
> API](https://www.openpolicyagent.org/docs/latest/bundles/). ConfigMaps are
> used in this tutorial for test purposes.

### 4. Create App Deployment with OPA and Envoy sidecars

Our deployment contains a sample Go app which provides information about
employees in a company. It exposes a `/people` endpoint to `get` and `create`
employees. More information can on the app be found
[here](https://github.com/ashutosh-narkar/go-test-server).

OPA is started with a configuration that sets the listening address of Envoy
External Authorization gRPC server and specifies the name of the policy decision
to query. More information on the configuration options can be found
[here](https://github.com/open-policy-agent/opa-envoy-plugin#configuration).

Save the deployment as **deployment.yaml**:

```yaml
kind: Deployment
apiVersion: apps/v1
metadata:
  name: example-app
  labels:
    app: example-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: example-app
  template:
    metadata:
      labels:
        app: example-app
    spec:
      initContainers:
        - name: proxy-init
          image: openpolicyagent/proxy_init:v5
          # Configure the iptables bootstrap script to redirect traffic to the
          # Envoy proxy on port 8000, specify that Envoy will be running as user
          # 1111, and that we want to exclude port 8282 from the proxy for the
          # OPA health checks. These values must match up with the configuration
          # defined below for the "envoy" and "opa" containers.
          args: ["-p", "8000", "-u", "1111", "-w", "8282"]
          securityContext:
            capabilities:
              add:
              - NET_ADMIN
            runAsNonRoot: false
            runAsUser: 0
      containers:
        - name: app
          image: openpolicyagent/demo-test-server:v1
          ports:
            - containerPort: 8080
        - name: envoy
          image: envoyproxy/envoy:v1.14.4
          securityContext:
            runAsUser: 1111
          volumeMounts:
          - readOnly: true
            mountPath: /config
            name: proxy-config
          args:
          - "envoy"
          - "--config-path"
          - "/config/envoy.yaml"
        - name: opa
          # Note: openpolicyagent/opa:latest-envoy is created by retagging
          # the latest released image of OPA-Envoy.
          image: openpolicyagent/opa:{{< current_opa_envoy_docker_version >}}
          securityContext:
            runAsUser: 1111
          volumeMounts:
          - readOnly: true
            mountPath: /policy
            name: opa-policy
          args:
          - "run"
          - "--server"
          - "--addr=localhost:8181"
          - "--diagnostic-addr=<IP_ADDRESS>:8282"
          - "--set=plugins.envoy_ext_authz_grpc.addr=:9191"
          - "--set=plugins.envoy_ext_authz_grpc.query=data.envoy.authz.allow"
          - "--set=decision_logs.console=true"
          - "--ignore=.*"
          - "/policy/policy.rego"
          livenessProbe:
            httpGet:
              path: /health?plugins
              scheme: HTTP
              port: 8282
            initialDelaySeconds: 5
            periodSeconds: 5
          readinessProbe:
            httpGet:
              path: /health?plugins
              scheme: HTTP
              port: 8282
            initialDelaySeconds: 5
            periodSeconds: 5
      volumes:
        - name: proxy-config
          configMap:
            name: proxy-config
        - name: opa-policy
          secret:
            secretName: opa-policy
```

```bash
kubectl apply -f deployment.yaml
```

Check that the Pod shows `3/3` containers `READY` the `STATUS` as `Running`:

```bash
kubectl get pod

NAME                           READY   STATUS    RESTARTS   AGE
example-app-67c644b9cb-bbqgh   3/3     Running   0          8s
```

> The `proxy-init` container installs iptables rules to redirect all container
  traffic through the Envoy proxy sidecar. More information can be found
  [here](https://github.com/open-policy-agent/contrib/tree/master/envoy_iptables).

### 5. Create a Service to expose HTTP server

In a second terminal, start a [minikube tunnel](https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-tunnel) to allow for use of the `LoadBalancer` service type.

```bash
minikube tunnel
```

In the first terminal, create a `LoadBalancer` service for the deployment.

```bash
kubectl expose deployment example-app --type=LoadBalancer --name=example-app-service --port=8080
```

Check that the Service shows an `EXTERNAL-IP`:

```bash
kubectl get service example-app-service

NAME                  TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)          AGE
example-app-service   LoadBalancer   <IP_ADDRESS>   <IP_ADDRESS>   8080:32170/TCP   5s
```

Set the `SERVICE_URL` environment variable to the service's IP/port.

**minikube:**

```bash
export SERVICE_HOST=$(kubectl get service example-app-service -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export SERVICE_URL=$SERVICE_HOST:8080
echo $SERVICE_URL
```

**minikube (example):**

```bash
<IP_ADDRESS>:8080
```

### 6. Exercise the OPA policy

For convenience, we’ll want to store Alice's and Bob's tokens in environment variables.

```bash
export ALICE_TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiZ3Vlc3QiLCJzdWIiOiJZV3hwWTJVPSIsIm5iZiI6MTUxNDg1MTEzOSwiZXhwIjoxNjQxMDgxNTM5fQ.K5DnnbbIOspRbpCr2IKXE9cPVatGOCBrBQobQmBmaeU"
export BOB_TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYWRtaW4iLCJzdWIiOiJZbTlpIiwibmJmIjoxNTE0ODUxMTM5LCJleHAiOjE2NDEwODE1Mzl9.WCxNAveAVAdRCmkpIObOTaSd0AJRECY2Ch2Qdic3kU8"
```

Check that `Alice` can get employees **but cannot** create one.

```bash
curl -i -H "Authorization: Bearer $ALICE_TOKEN" http://$SERVICE_URL/people
curl -i -H "Authorization: Bearer $ALICE_TOKEN" -d '{"firstname":"Charlie", "lastname":"OPA"}' -H "Content-Type: application/json" -X POST http://$SERVICE_URL/people
```

Check that `Bob` can get employees and also create one.

```bash
curl -i -H "Authorization: Bearer $BOB_TOKEN" http://$SERVICE_URL/people
curl -i -H "Authorization: Bearer $BOB_TOKEN" -d '{"firstname":"Charlie", "lastname":"Opa"}' -H "Content-Type: application/json" -X POST http://$SERVICE_URL/people
```

Check that `Bob` **cannot** create an employee with the same firstname as himself.

```bash
curl -i  -H "Authorization: Bearer $BOB_TOKEN" -d '{"firstname":"Bob", "lastname":"Rego"}' -H "Content-Type: application/json" -X POST http://$SERVICE_URL/people
```

## Wrap Up

Congratulations for finishing the tutorial !

This tutorial showed how to use OPA as an External authorization service to
enforce custom policies by leveraging Envoy’s External authorization filter.

This tutorial also showed a sample OPA policy that returns a `boolean` decision
to indicate whether a request should be allowed or not.

Envoy's external authorization filter allows optional response headers and body
to be sent to the downstream client or upstream. An example of a rule that
returns an object that not only indicates if a request is allowed or not but
also provides optional response headers, body and HTTP status that can be sent
to the downstream client or upstream can be seen
[here](https://github.com/open-policy-agent/opa-envoy-plugin#example-policy-with-object-response).

repository: open-policy-agent/opa

gha_language: Go

repo_name: open-policy-agent/opa


text:
---
layout: post
title: "5 Ways to add prefix to a string"
date: 2015-08-17 09:10:29 +0300
comments: true
categories: ruby
---

Mostly all of us like their our names. That's why effective email often starts from username.
I had a task where I need to fetch any information about receiver and add it to very beginning of email.

So, challenge accepted and I writing fetch method, then refactor it to class and ta-da:
we have a chance to guess username. Our emails'll become much pretty. But wait!
Need to add it name to email at first. And I started think about: which way most common for it case,
how great rubist can implement that? Below I present five variants which I found.

<!--more-->

## 1. Array#join

[Array#join](http://ruby-doc.org/core-2.2.2/Array.html#method-i-join)

What? Array? Did you joke? Sure, not) Lets see:

```ruby
str = "world"
prefix = "Hello, "
result = [prefix, str].join # => "Hello, world"
```

But what about GC in this case? Here we use 3 strings and 1 array.
Not really careful about a RAM. Lets see another variants.

## 2. Insert

[String#insert](http://ruby-doc.org/core-2.2.2/String.html#method-i-insert)

```ruby
str = "world"
str.insert(0, "Hello, ") # => Hello, world
```

It created only 2 strings, cool! How you can see it also return changed line immediately.
Why I mention that? Please, see #3 and #4

## 3. [with Regexp]

[String#:[]](http://ruby-doc.org/core-2.2.2/String.html#method-i-5B-5D-3D)

```ruby
str = "world"
str[/\A/] = "Hello, " # => "Hello, "
str                   # => "Hello, world"
```

Isn't that awesome? Ruby `String#:[]` method can get `Regexp` like an argument!
Did you know about it before? I nope) So I glad to gain new experience.

## 4. [with funny smile]

```ruby
str = "world"
str[0,0] = "Hello, " # => "Hello, "
str                  # => "Hello, world"
```

As you can see from documentation, the squarebrackets method can get a second argument.
And when it is, first arg become an index, which you can specify for replacing
next `%second_arg%` values.

## 5. Prepend

[String#prepend](http://ruby-doc.org/core-2.2.2/String.html#method-i-prepend)

And the last one, but not in relevance.

```ruby
str = "world"
str.prepend("Hello, ") # => "Hello, world"
```

# Conclusion

So, which one you'll use? It's completely your choice. I think that most ruby way to use `prepend`.
But lets see benchmarks at first.

[Benchmark Gist](https://gist.github.com/goodniceweb/85665d4fcfc3f1c0a423)

```bash
Comparison:
       String#insert:  2557799.1 i/s
      String#prepend:  2521598.6 i/s - 1.01x slower
        String#[0,0]:  2422770.0 i/s - 1.06x slower
          Array#join:  1650504.4 i/s - 1.55x slower
       String#[/\A/]:  1065932.3 i/s - 2.40x slower
```

Wow, looks great! Ruby way not only good for eyes but faster as well for it case. Glad to know it.
Are you not?

repository: goodniceweb/octopress

extension: markdown

repo_name: goodniceweb/octopress


text:
---
layout: post
title: Long-run restriction, technology shock, RBC practice[course by_prof. Shim]
categories:
  - Study_econ&math
tags:
  - economics
  - Long-run restriction
  - VAR
  - technology shock
  - NK
  - RBC
last_modified_at: 2020-04-28
use_math: true
---
### homework1

* [link for homework1](https://drive.google.com/uc?export=view&id=1D08ZyOe7J15jrmlAUp4bohVfmgVLM9AI)

### Using the Long-run restriction that non-technology shock cannot affect the growth rate of employment in the long-run (following the specification of Gal´ı (1999)), show the impulse response function of hours worked (employment) to the identified technology shock.

As follows Gali(1999), I estimated the impulse response function of
housrs worked (employment) to the identified technology shock using
South Korea's yearly data covering period 1963-2011 from Federal Reserve
Economic Data. Gali(1999) obtained results by using the
first-differenced log of the employed civilian labor
force(\"employment\") as a labor-input measure and the baseline series
for labor productivity was constructed by subtracting the labor-input
measure from the log of GDP. Thus, to check whether the South Korea
employment data should be differenced or not, I conducted ADF(Augmented
Dickey-Fuller) unit root test by STATA.

![window](https://drive.google.com/uc?export=view&id=1opc7CKq_sIKrsQafLty0JB9Mgl-t8XYi)

The test reveals that the null hypothesis that the assigned variable
follows a unit root cannot be rejected, which means that the log of the
employment variable in South Korea needs to be first-differenced. Using
the Long-run restriction that non-technology shock cannot affect the
growth rate of employment in the long-run, Figure 2 displays the impluse
response of hours worked (employment) to the identified technology
shock. All data are yearily, and not seasonally adjusted.

![window](https://drive.google.com/uc?export=view&id=1WcsPgpW2oqw-yRhl2S0iT6C6GH7vGlGV)

### Compare your results with Gal´ı (1999).

As you can see in the Figure 3, the impulse response of hours worked
(employment) in South Korea annual data appears totally different from
the ones in Gali(1999). According to Gali(1999), in response to a
positive technology shock of size equal to one-standard deviation, hours
worked experiences an immediate decrease of about 0.4 percent,
eventually stabilizing at a level somewhat lower, which is interpreted
as the reason for the gap between the initial increase in labor
productivity and the (smaller) increase in output.

![window](https://drive.google.com/uc?export=view&id=1WcsPgpW2oqw-yRhl2S0iT6C6GH7vGlGV)
![window](https://drive.google.com/uc?export=view&id=1Oc4Ea7xm9nS7lgNYi7ArrHhIaVb5oxTJ)

However, contrary to the result of Gali(1999), the impulse response of
hours worked (employment) in South Korea shows an immediate increase,
but the initial rise appears to be vanished in a short period.

As following the plot technicians in Blanchard $\&$ Quah(1989), Figure 4
displays the cumulative summation of estimated impulse response of hours
worked and productivity to the identified technology shock in both of
South Korea and Japan(from Gali(1999)).

![window](https://drive.google.com/uc?export=view&id=1ttHi7DYSn3FzjGEHteBeKep3ScH12_y0)
![window](https://drive.google.com/uc?export=view&id=1QI274ucWdxf1Zss5aR9tBVZuQmtnzx2H)

The result of Figure 4 is quite interesting in that hours worked in most
countries suggested in Gali(1999) but Japan experience a decrease in
response to the positive technology shock. However, hourse worked in
South Korea from new VAR and Japan show an increase. There may exist
numerous reasons to elicit the eccentric response in South Korea. One
may assert that the sticky price model in NK suggested by Gali(1999)
would not be valid to explicate the relation between employment and
technology shock in South Korea, which can be interpreted that South
Korea employment is more paralled with RBC models. Others may argue
that, citing the conseqeunces in Figure 4, there would be specific
un-observed characterisitcs around the East Asis leading the peculiar
responses of employment. Unfortunately, in this assignment, it is
insufficient to deduce which arguments may be more vaild among numerous
assertions.

However, as we can see in Figure 5, Kim et.al(2008) suggested a impulse
response of hours worked to the technology shock defined as labor
productivity, which is consistent to the Gali(1999) and totally
different from mine. Kim et.al(2008) revealed that they used the data
covering period 1985-2002 for labor productivity, which is defined as
the ratio of gross domestic product (GDP) to total hours worked, is
compiled by the Bank of Korea. in addition, their measure of employment
is hours worked, which we derived as the product of total number of
employed workers and average hours worked per week ($h_{}i$) and all
variables are converted into constant 2000 prices. They also used
bivariate long-run restriction VAR model to estimate the impulse
response of hours worked to the identified technology shock.

![window](https://drive.google.com/uc?export=view&id=1ttHi7DYSn3FzjGEHteBeKep3ScH12_y0)
![window](https://drive.google.com/uc?export=view&id=17KbB7GpNikae2H3EADNsH75Dulrh3rqA)

Thus, if the VAR specification using in both are same exactly, one
inference is that the eccentric response of hours worked described in
Figure 2-(a) may be due to the wrong data using. Thus, it may be needed
to re-estimate the impulse response of hours worked using the data used
in KIm et.al(2008) before concluding that South Korea has peculiar
impuls response of hours worked to the identified technology shock.

9 Gali, J.(1999) *Technology, Employment, and the Business Cycle: Do
Technology Shocks Explain Aggregate Fluctuations?*. The American
Economic Review, 89(1), 249-271.

Blanchard, O., $\&$ Quah, D. (1989) *The Dynamic Effects of Aggregate
Demand and Supply Disturbances*. Economic Review, 79(4), 655-673.

Kim, S.(2008) *Productivity and employment in a developing country:
Evidence from Republic of Korea*. ERD Working Paper Series, 0(116),
1-30.

url: https://raw.githubusercontent.com/davidkim5707/davidkim5707.github.io/6b25bbc36ad0d67179c0d530acab717c01a4c5ea/_posts/2020-04-28-Long-run restriction, technology shock, RBC practice[course by_prof. Shim].md


text:
---
title: "SwissMiss: How A Sabbatical From Clients Led To Business Success"
date: 2012-05-19 18:10:08 00:00
permalink: /videos/429
source: "https://vimeo.com/41767280"
featured: false
provider: "Vimeo"
thumbnail: "http://b.vimeocdn.com/ts/289/529/289529706_1280.jpg"
user:
  id: 1
  username: "sawyer"
  name: "Sawyer Hollenshead"
tags: ["creativemornings","talk","psfk","swissmiss"]
html: "<iframe src=\"http://player.vimeo.com/video/41767280\" width=\"1280\" height=\"720\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"
id: 429
---

You can follow SwissMiss on Organized Wonder: http://www.organizedwonder.com/swissmiss

In this short talk from PSFK CONFERENCE NYC, Tina Roth Eisenberg describes how she decided to put the design work she was doing for clients on hold as she focused on creating a series of 'side projects'. For the designer known by her blog-readers as SwissMiss, a number of small bets worked out so well that her client sabbatical will now go on indefinitely.

Projects she describes in the video include the temporary tattoo brand Tattly, her lecture series Creative Mornings, her efficiency tool TeuxDeux and her co-working space Studiomates.

repository: sawyerh/organizedwonder

repo_name: sawyerh/organizedwonder


text:
# Figure 5: PacBio transcriptomes of 6-month adult male mouse cortex and hippocampus

Files/paths used to generate the panels of this figure:
```bash
PLOTPATH=../plotting_scripts/
APATH=../analysis_scripts/
# download the supplementary tables and change this path!
sup_tables=/share/crsp/lab/seyedam/share/TALON_paper_data/revisions_10-19/human_TALON/analysis/supplementary_tables/

gtf=${sup_tables}S34_mouse_brain_talon_observedOnly.gtf
```
Abundance and GTF files are available as supplementary tables of the TALON paper.

Software versions:
* R v3.5.1

## Panel A: Isoform diversity for one representative dataset of cortex
```bash
# TODO
```

 Pearson and Spearman correlations are recorded in ONT_GM12878_1-ONT_GM12878_2_gene_correlations.txt.

## Panel B: Isoform diversity for one representative dataset of hippocampus
```bash
# TODO
```

## Panel C: #TODO of genes with higher novelty read counts (NIC+NNC) than known, of which #TODO are only higher in cortex and #TODO higher in hippocampus
```bash
# TODO
```

## Panel D: GO semantic map for cortex genes
```bash
# TODO
```

## Panel E: GO semantic map for hippocampus genes
```bash
# TODO
```

## Panel F: Example of Mef2a isoform expression in cortex and hippocampus
```bash
# create config file for gtf creation
# replace url with the url to your public-facing directory
url=http://crick.bio.uci.edu/freese/TALON_gtf/S34_mouse_brain_talon_observedOnly_tracks
printf "${gtf},n+,0,none,$url" > mouse_brain_track_config
python ${APATH}gen_novelty_tracks_gtf.py \
    --c mouse_brain_track_config
mv ${sup_tables}S34_mouse_brain_talon_observedOnly_tracks/ .
```
Then copy your tracks directory to your public-facing directory and load the trackline in the genome browser, and screenshot.


text:
---

This work is licensed under the Creative Commons CC0 License

---

# Support package / package reference dispose and downgrade
### xtUML Project Implementation Note

1. Abstract
-----------
This note describes the work performed to handle dispose and downgrade of
package references.

2. Document References
----------------------
2.1 [BridgePoint DEI #8865](https://support.onefact.net/issues/8865) Headline issue.
2.2 [BridgePoint DEI #8873](https://support.onefact.net/issues/8873) Package Reference dispose and downgrade test.

3. Background
-------------
Package reference support is being added in incremental baby steps.  This step
makes sure dispose and downgrade are handled properly.

4. Requirements
---------------
4.1 BridgePoint shall clean up Package References instances and associations
  when a source or target package is removed from the model.
4.2 BridgePoint shall handle downgrade of an assigned package.

5. Work Required
----------------
5.1  Dispose
5.1.1  Package dispose() must unAssign if the package is assigned as a reference
5.1.2  Package dispose() must also work in reverse. If the package is the target
  of one or more package references, those references need to be forced to
  unAssign.

5.2  Downgrade
5.2.1  Package downgradeCheck() must handle the same cases where the package is
  the source or target of a downgrade.

6. Implementation Comments
--------------------------
6.1  Tear down error on R8008
6.1.1  During testing we noticed an error in the log:
```The following relationships were not torn down by the Component Visibility.dispose call: 8008```.
Investigation found that this is due to ```PackageableElement.dispose()``` line 15.
The code tears down the R8004 link before deleting the ```PE_CVS``` but it does
not unrelate across R8008 before deleting the ```PE_CVS```. We added code to
tear down R8008 before deleting.

7. Unit Test
------------
Captured as manual test [2.2](#2.2).

7.1 Downgrade test

    Create a new project "foo", import the test model
    Open the comp diagram
    R See that the package inside comp is assigned to tgt
    Expand the model in Model Explorer
    Move package tgt inside package privat to cause a loss of visibility
    R The downgrade notice dialog pops up and notes that tgt is associated with b and will cause a downgrade
    Select OK
    R The package inside comp is unassigned and the name changes to b

7.2 Delete target test

    Create a new project "bar", import the test model
    Open the comp diagram
    R See that the package inside comp is assigned to tgt
    Expand the model in Model Explorer
    Delete package tgt
    R The downgrade notice dialog pops up and notes that this will cause a downgrade on b
    Select OK
    R The package inside comp is unassigned and the name changes to b

7.3 Delete source test

    Create a new project "baz", import the test model.
    Open the comp diagram
    R See that the package inside comp is assigned to tgt
    Expand the model in Model Explorer
    Open the "Instance Population Monitor" view
    Expand baz/Ooaofooa Model Elements/baz.xtuml
    R See there is one PackageReference_c instance
    Delete assigned package "b" (assigned to tgt)
    In the Instance Population Monitor, click the double arrow "Update population display" button
    Expand baz/Ooaofooa Model Elements/baz.xtuml
    R See there are no PackageReference_c instances

8. User Documentation
---------------------
None.

9. Code Changes
---------------
Fork/Repository: keithbrown/bridgepoint
Branch: 8865_pkg_ref_dispose

doc-bridgepoint/notes/8865_pkg_ref_dispose_int.md

org.xtuml.bp.core/models/org.xtuml.bp.core/ooaofooa/Element Packaging/
    Package/Package.xtuml
org.xtuml.bp.core/models/org.xtuml.bp.core/ooaofooa/Packageable Element/
    Packageable Element/Packageable Element.xtuml

End
---


text:
# webrtc
web real time communication platform

![alt webrtc development ](http://s20.postimg.org/sywx5rjx5/webrtc_development_logo_1_1.png)

[![Gitter][GS image]][Gitter]
[![Build Status][BS img]][Build Status]
[![Dependency Status][DS img]][Dependency Status]
[![NPM Status][NS img]][NPM Status]

[Gitter]: https://gitter.im/altanai/webrtc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
[Build Status]: https://travis-ci.org/altanai/webrtc
[Dependency Status]: https://david-dm.org/altanai/webrtc
[NPM Status]: https://www.npmjs.com/package/webrtcdevelopment

[GS img]: https://badges.gitter.im/altanai/webrtc.svg
[BS img]: https://api.travis-ci.org/altanai/webrtc.png
[DS img]: https://david-dm.org/altanai/webrtc.svg
[NS img]: https://nodei.co/npm/webrtcdevelopment.png

This is a ready to deploy webrtc SDK and SaaS for a customized and flexible communication and collaboration solution .

SDK
----

##### Architecture
The Solution primarily contains nodejs frameworks for hosting the project and webbsockets over socket.io to perform offer - answer handshake and share SDP (Session description protocol ).
![alt webrtc development architecture ](https://s32.postimg.org/uamq0uq9h/webrtcdevelopment_SDK.png)

##### Technologies used

1. WebRTC
Web based real time communication framework.
read more on [webrtc](https://altanaitelecom.wordpress.com/2013/08/02/what-is-webrtc/ )

2. Node (v5.0.0)
Asynchronous event driven JavaScript runtime

3. socket.io ( v0.9)
Communication and signalling

Note  : while its possible to use any prtotocol like SIP , XMPP , AJAX , JSON etc for this purpose , modifying thsi libabry will require a lot of rework . It would be advisble to start from apprtc directly in that case .

4. Grunt
It is a task Runner and its used to automate running of command in gruntfile
```
grunt -verbose
```

Get Started
----

To run this project following steps need to be followed in that order :

##### 1. get the project from github
```
git clone https://github.com/altanai/webrtc.git webrtc
```

##### 2. install nvm ( node version manager )
```
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
. ~/.nvm/nvm.sh
nvm install v5.0.0
nvm use v5.0.0
```

##### 3. install npm and update the dependencies
It will read the package.json and update the dependencies in node_modules folder on project location

```
	sudo apt-get install npm
	npm install
```

###### 4. Change ENV variables and Test

To change the ports for running the https server and rest server, goto env.json
```
{       "hostname"      : "host",
	"enviornment"   : "local",
	"host"        	: "localhost",
	"jsdebug"       :  true,
	"httpsPort"	:  8086,
	"restPort"	:  8087,
        "extensionID"   : "elfbfompfpakbefoaicaeoabnnoihoac"
}
```

To run the tests
```
	npm test
```

##### 5. Start up the Server

To start the Server in dev mode  and stop the server as soon as Ctrl+ C is hit or the terminal widnow is closed .
```
	node webrtcserver.js
```
read more about [node](https://nodejs.org/en/about/ )

To start the Server using npm start ( using package.json) , behaves same as earlier run using node. We use supervisor to restart the server incase of exceptions or new code .

```
	npm start
```

##### 6. JS and CSS Libs

Make a webpage and give holders for video and button elements that SDK will use .

Inside the head tag of html
    minScripts/webrtcdevelopment_header.css
    minScripts/webrtcdevelopment_header.js

After the body tag of html
    minScripts/webrtcdevelopment.css
    minScripts/webrtcdevelopment.js

##### 7. Configure

Create the webrtc dom object
```
var local={
        localVideo: "localVideo",
        videoClass:"",
        userDisplay:false,
        userMetaDisplay:false
    };

    var remote={
        remotearr: ["video1"],
        remoteVideoCount: "unlimited",
        remoteVideoContainer : "rightVideo",
        videoClass:"",
        userDisplay:false,
        userMetaDisplay:false
    };

    var webrtcdomobj= new WebRTCdom(
        local,remote
    );
```

Get session id
```
sessionid = init(true);
```

Create a session json object with turn credentials nd the session created from above step

set preference for the incoming and outgoing media connectection. Bydefault all are set to true .
```
    var incoming={
        audio:  true,
        video:  true,
        data:   true,
        screen: true
    };

    var outgoing={
        audio:  true,
        video:  true,
        data:   true,
        screen: true
    };
```
Set widgets and their properties . Currently available widgets are
	* Chat
	* Fileshare
	* Screen Record
	* Screen Share
	* Video Record
	* Snapshot
	* Draw on Canvas and Sync
	* Text Editor and Sync
	* Mute (audio amd video)
	* Reconnect

```
	var widgets={
	}
```
Initiate the webrtcdev contructor
```
    var webrtcdevobj = new WebRTCdev (
        session,  incoming,  outgoing ,  widgets
    );
```

Start the session
```
    startcall();
```

##### 8. VOIP calls and conf
open tab on chrome or mozilla browser and add a link to the https server using nodejs script
https://<IP_ADDRESS>:8086/multiparty_fullfeatures.html

Used Libs
----

Following are the additioanl libraries packed with the project

###### Gulp
Minify and concat the js and css files  into minscripts
```
gulp
```

###### forever
Keeps running even when window is not active
```
cd WebCall
forever start webrtcserver.js
```

###### PM2
To start the Server using PM2 ( a process manager for nodejs)

License
----

MIT


text:
# Tests

This directory contains a skeleton Strapi project configuration using this Firestore connector, and the test setup scripts copied from the Strapi repo.

## Test procedure

1. Clean the Strapi project configuration
2. Copy the end-to-end tests out of the `strapi` package (Jest seemingly refuses to run them while inside `node_modules`)
3. Start the Firestore emulator
4. Start Strapi
5. Run the end-to-end tests from the `strapi` package

repository: jfbourne/strapi-connector-firestore

repo_name: jfbourne/strapi-connector-firestore


text:
# Contributions

MALA is an open-source software and is built upon the collaborative efforts of
many contributors. The MALA team warmly welcomes additional contributions and
kindly requests potential contributors to follow the suggested guidelines below
to ensure the code's overall quality and maintainability.

## MALA contributors

Many people have made valuable contributions to MALA, and we are immensely
grateful for their support.
If you decide to contribute to MALA, please add your name to the following
alphabetically ordered list of contributors and include a note of the
nature of your contribution:

- Bartosz Brzoza (Bugfixes, GNN implementation)
- Timothy Callow (Grid-size transferability)
- Attila Cangi (Scientific supervision)
- Austin Ellis (General code infrastructure)
- Omar Faruk (Training parallelization via horovod)
- Lenz Fiedler (General code development and maintenance)
- James Fox (GNN implementation)
- Nils Hoffmann (NASWOT method)
- Kyle Miller (Data shuffling)
- Daniel Kotik (Documentation and CI)
- Somashekhar Kulkarni (Uncertainty quantification)
- Normand Modine (Total energy module and parallelization)
- Parvez Mohammed (OAT method)
- Vladyslav Oles (Hyperparameter optimization)
- Gabriel Popoola (Parallelization)
- Franz Pöschel (OpenPMD interface)
- Siva Rajamanickam (Scientific supervision)
- Josh Romero (GPU usage improvement for model tuning)
- Steve Schmerler (Uncertainty quantification)
- Adam Stephens (Uncertainty quantification work)
- Hossein Tahmasbi (Minterpy descriptors)
- Aidan Thompson (Descriptor calculation)
- Sneha Verma (Tensorboard interface)
- Jon Vogel (Inference parallelization)

## Versioning and releases

MALA has a versioning system. The version number is only updated when merging
on `master`. This constitutes a release. Please note that not all changes
to code constitute such a release and generally, merges will be directed
to the `develop` branch
(see [branching strategy](#branching-strategy)). The version number has
the form `MAJOR.MINOR.FIX`:

* `MAJOR`: Big changes to the code, that fundamentally change the way it
  functions or wrap up a longer development.
* `MINOR`: new features have been added to the code.
* `FIX`: A bug in a feature has been fixed.

Every new version should be accompanied by a changelog. Please include the
version of the test data repository with which this version is supposed to be
used in this changelog.

### Creating a release

In order to correctly update the MALA version, we use
[bumpversion](https://github.com/peritus/bumpversion). The actual release
process is very straightforward:

1. Create a PR from `develop` to `master`.
2. Merge the PR.
3. Update the `date-released: ...` entry in `CITATION.cff` (on `master`).
4. Create a tagged (and signed) commit on `master` with `bumpversion minor --allow-dirty` (check changes with `git show` or `git diff HEAD^`). Use either `major`, `minor` or `fix`, depending on what this release updates.
5. Check out `develop` and do a `git merge master --ff`
6. Push `master` and `develop` including tags (`--tags`).
7. Create a new release out of the tag on GitHub (https://github.com/mala-project/mala/releases/new) and add release notes/change log.
8. Check if release got published to PyPI.

## Branching strategy

In general, contributors should develop on branches based off of `develop` and
merge requests should be to `develop`. Please choose a descriptive branch name.
Branches from `develop` to `master` will be done after prior consultation of
the core development team.

## Developing code

* Regularly check your code for PEP8 compliance
* Make sure all your classes, functions etc. are documented properly,
  follow the
  [NumPy style](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard)
  for docstrings
* Keep your code object-oriented, modular, and easily reusable
* If you're adding code that should be tested, add tests
* If you're adding or modifying examples, make sure to add them to `test_examples.py`

### Adding dependencies

If you add additional dependencies, make sure to add them to `requirements.txt`
if they are required or to `setup.py` under the appropriate `extras` tag if
they are not.
Further, in order for them to be available during the CI tests, make sure to
add _required_ dependencies to the appropriate environment files in folder `install/` and _extra_ requirements directly in the `Dockerfile` for the `conda` environment build.

## Pull Requests
We actively welcome pull requests.
1. Fork the repo and create your branch from `develop`
2. During development, make sure that you follow the guidelines for [developing code](#developing-code)
3. Rebase your branch onto `develop` before submitting a merge request
4. Ensure the test suite passes before submitting a pull request

## Issues

* Use issues to document potential enhancements, bugs and such
* Please tag your issues, and consider setting up a deadline
* Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue

## License
By contributing to MALA, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.

repository: mala-project/mala

branch_name: refs/heads/develop

repo_name: mala-project/mala


text:
@annotate: folktale.core.lambda.constant
category: Functional combinators
---
The constant combinator; always returns the first argument given.

## Example::

    const constant = require('folktale/core/lambda/constant');

    [1, 2, 3].map(constant(0));
    // ==> [0, 0, 0]

## Why?

Constant combinators can be passed to higher-order operations if you
want to provide a plain value, but the operation expects a function
providing a value::

    const constant = require('folktale/core/lambda/constant');

    [1, 2, 3].map(constant(0));
    // ==> [0, 0, 0]

For a primitive, there's usually not much of a difference between
using the `constant` combinator or an arrow function. In fact, for
most cases, using the arrow function is preferred::

    [1, 2, 3].map(() => 0);
    // ==> [0, 0, 0]

The problem with using arrows is that the value is computed lazily.
That is, it's computed only when the arrow is evaluated, and recomputed
many times if the arrow is evaluated many times. The `constant` combinator
lets you evaluate something eagerly instead.

You can see the importance of this when effects are involved::

    let counter = 0;
    const next = () => ++counter;

    ['a', 'b', 'c'].map(constant(next()));
    // ==> [1, 1, 1]

    counter = 0;
    ['a', 'b', 'c'].map(_ => next());
    // ==> [1, 2, 3]

Expensive pure computations are another place where `constant` is desirable
over plain arrows, given that one'd rather avoid re-evaluating the
computation unnecessarily.

repository: dChunikhin/folktale

repo_name: dChunikhin/folktale


text:
# book-of-becoming
A simple log to keep you on track with who you are Becoming, because life happens.

[Book of Becoming online](https://book-of-becoming.herokuapp.com/)

## Summary
This was my passion project in Phase 2 of DevBootcamp. It's a CRUD app with MVC architecture and RESTful routes and is deployed on Heroku. I'm proud of the simple clean interface.

Conceptually, it's in the crossroads of my past mindful productivity experience.

## Image
![images](/index.png "index image")

## Tech stack
* Ruby
* Sinatra
* Postgres DB
* Bcrypt & has_secure_password
* Bootstrap for top nav bar
* Unsplash (image) API

## MVP
* User can create a user account
* User can log in
* User can enter a spark
* User can create themes (tags) meaningful to their experience
* User can apply theme to spark
* User can view list of sparks per theme

### Future Feature Ideas
* alert (via text?) to remind to use
* 1 min video posts
* view by multiple tags
* send to print / list of some sort
* share with others
* graphical views, for ex chart along timeline
* Why this process works / who it's for
* personalize theme / font / color
* gratitude quotes / inspirations

# Run
shotgun

repository: ShawnTe/book-of-becoming

gha_language: Ruby

repo_name: ShawnTe/book-of-becoming


text:
---
layout: post
title: Reprojecting shapefiles
categories: Geospatial
tags: ogr gdal
---

I'm often using the [gdal](http://www.gdal.org/gdal_utilities.html) library for reprojecting and resampling raster data but have rarely needed to do so with vector formats. When dealing with points, I usually sort out the conversion manually. For other vectors - polygons and polylines - often stored as [shapefiles](https://en.wikipedia.org/wiki/Shapefile), the ogr library of tools can be quite useful. [This page](http://casoilresource.lawr.ucdavis.edu/software/gdal-and-ogr-geodata-conversion-and-re-projection-tools/) provides a handy overview with some example data available for download. [Here](http://www.gdal.org/osr_tutorial.html) is a more verbose description of dealing with projections of vectors.


text:
# pfctl
PaddleFlow CMD tool

## pfctl features

pfctl contains several features for first release:

1. PaddleFlow installation on different enviornments(local, cloud, on-premise)
2. PaddleFlow different cluster enviornments context switch
3. PaddleFlow underlying storage system abstraction installation

repository: drinktee/pfctl

repo_name: drinktee/pfctl


text:
# Deploy warm path

For the warm path, there are three versions of the Azure Function, depending on data store technology of choice and throughput requirements:

- WarmPathFunction supports up to 2500 requests/sec, based on our load testing.
- WarmPathFunction_OptimizedForCosmosDb supports more than 2500 requests/sec.
- WarmPathFunction_OptimizedForSqlDb supports more than 2500 requests/sec.

Use the following steps to provision the warm path.

1. Deploy the IoT Hub instance. See the `/src/CloudGateway/IoTHubDeployment` project.

2. In the Azure Portal, navigate to the IoT Hub resource and click the **Built-in endpoints** blade.

3. Under **Events** -> **Consumer groups** enter a name for a new consumer group for the warm path. Here you will also find the Event Hub values needed as parameters in the next step.

4. Add values for the following parameters:

    For CosmosDB, in the `/src/WarmPath/WarmPathDeployment` directory, open the `azuredeploy.parameters.json` file.

    - `appName`: A name for the Function app (of less than 11 characters of lowercase letter and numbers only).
    - `eventHubConnectionString`: The Event Hub-compatible endpoint connection string.
    - `eventHubName`: The Event Hub-compatible name.
    - `eventHubConsumerGroup`: The name of the Event Hub consumer group.
    - `cosmosDbDatabase`: A name for the Cosmos DB account name.
    - `cosmosDBCollection`: A name for the Cosmos DB collection name.
    - `appInsightsLocation`: Azure region for the Application Insights instance

    For Azure SQL Database, in the `/src/WarmPath/WarmPathDeployment_SqlDb` directory, open the `azuredeploy.parameters.json` file.

    - `appName`: A name for the Function app (of less than 11 characters of lowercase letter and numbers only).
    - `eventHubConnectionString`: The Event Hub-compatible endpoint connection string.
    - `eventHubName`: The Event Hub-compatible name.
    - `eventHubConsumerGroup`: The name of the Event Hub consumer group.
    - `sqlDbDatabase`: A name for the SQL DB instance.
    - `sqlDbServer`: A name for the SQL DB logical server.
    - `sqlAdministratorLogin`: A name for the SQL DB administrator.
    - `sqlAdministratorPassword`: A name for the SQL DB admin password.
    - `SQLDBConnectionString`: A connection string for your Azure SQL Database server.
    - `appInsightsLocation`: Azure region for the Application Insights instance

5. Deploy the Azure resources.

    ```bash
    cd src/WarmPath/WarmPathDeployment #for CosmosDB
    cd src/WarmPath/WarmPathDeployment_SqlDb #for Azure SQL Database

    # Deploy the resources
    az group deployment create --name <deployment-name> \
      -g <resource-group> --template-file azuredeploy.json \
      --parameters azuredeploy.parameters.json
    ```

6. Create the data stores.

    For Cosmos DB database and collection:

    > Note: This step is only required when deploying the WarmPathFunction_OptimizedForCosmosDb project. If you deploy the WarmPathFunction project, the Function app automatically creates the database and the collection.

    ```bash
    # Get the Cosmos DB account name
    az cosmosdb list -g <resource-group> --query [*].name

    # Create the Cosmos DB database
    # The value of <database-name> must match the cosmosDbDatabase template parameter.
    az cosmosdb database create -g <resource-group> --name <db-account> \
      --db-name <database-name>

    # Create the collection
    # The value of <collection-name> must match the cosmosDBCollection template parameter.
    az cosmosdb collection create -g <resource-group> --name <db-account> \
      --db-name <database-name> -c <collection-name> \
      --partition-key-path /deviceId --throughput 100000
    ```

    > Note: This step is only required when deploying the WarmPathFunction_OptimizedForSqlDb project.

    For Azure SQL Database:

    ```bash
    # Create database objects using SQLCMD command line tool.
    sqlcmd -S <servername>.database.windows.net -U <adminlogin> -P <password> -d <databasename> -i ./createobjects.sql

    ```

7. Use Visual Studio to deploy one of the following projects to the Azure Function app:

   - WarmPathFunction supports up to 2500 requests/sec.
   - WarmPathFunction_OptimizedForCosmosDb supports > 2500 requests/sec.
   - WarmPathFunction_OptimizedForSqlDb supports > 2500 requests/sec.

  Right click on the project and click *Publish...*. Select the function app created in the previous step.

Use Application Insights Analytics to understand the execution of the WarmPath Azure Function app.

```
# Degree of paralalization in the optimized path
traces | where message startswith "Starting Upserts with " | order by timestamp desc

# Errors
traces | where message startswith "Error processing message" | order by timestamp desc
```

repository: habolanos/iot-guidance

gha_license_id: NOASSERTION

repo_name: habolanos/iot-guidance


text:
# Contributions
(Ordered alphabetically)

- **Lei Xian** - [floraleilei](https://github.com/floraleilei)
   - Implemented CNN model.
   - Implemented Data cleaning and preprocessing.
   - Contributed to Readme and Wiki.
   - Contributed to final report.

- **Jiahao Xu** - [jiahaoxu](https://github.com/jiahaoxu)
    - Implemented bidirectional LSTM model.
    - Implemented base models.
    - Collected original data.
    - Contributed to Ethics and Wiki.
    - Contributed to final report.

- **Yang Shi** - [YangAzure](https://github.com/YangAzure)
   - Implemented LEAM model.
   - Implemented embedding.
   - Implemented Plotting for neural network models.
   - Model training.
   - Contributed to Wiki.
   - Contributed to final report.

repository: voghoei/DL-Fundation

repo_name: voghoei/DL-Fundation


text:
# Allocating Elastic IP and Associating it to EC2 Instance

## Tasks:

1. Log into AWS Management Console.

1. Create an Amazon Linux Instance from an Amazon Linux AMI

1. Find your instance in the AWS Management Console.

1. SSH into your instance and configure your server as a web server.

1. Create and publish a sample test.html file.

1. Test the page with the public IP address of EC2 Instance created.

1. Allocate an Elastic IP and associate it to the EC2 Instance.

1. Test the page with Elastic IP address of EC2 Instanc

path: /EC2/Allocating Elastic IP.md

filename: Allocating Elastic IP.md