text:
# Generate YML from Python
Generate YML file from Python code that includes special syntax.
The output file name will be the same as the Python code with the `.yml` extension instead of `.py`.
The generation currently supports integrations only.

The feature is supported from content Base pack version 1.20.0 and on.

**Arguments**
* **-i, --input**
   (Required) The path to the python code to generate from.
* **-v, --verbose**
   Flag for extended prints.
* **-f, --force**
   Override existing yml file. If not used and yml file already exists, the script will not generate a new yml file.

For syntax and usage information see docs [here](https://xsoar.pan.dev/docs/integrations/yml-from-python-code-gen)

repository: demisto/demisto-sdk

repo_name: demisto/demisto-sdk


text:
# Handwritten_equation_solverCNN

Equation solver can solve quadratic equation. It is based on CNN model.

1. [Description](#description)
2. [Requirements](#requirements)
3. [Library](#library)
4. [Steps](#steps)
5. [Conclusion](#conclusion)
6. [Reference](#Reference)

## Description
Equation solver use the contour feature of OpenCV for detection of digits and mathematical symbols like +,-,X and divide etc.

I used maths symbol data set from kaggle. https://www.kaggle.com/xainano/handwrittenmathsymbols

For making this project I refer this repository https://github.com/vipul79321/Handwritten-Equation-Solver

## Dataset Description
Dataset consists of jpg files(45x45)

DISCLAIMER: dataset does not contain Hebrew alphabet at all. It includes basic Greek alphabet symbols like: alpha, beta, gamma, mu, sigma, phi and theta.

English alphanumeric symbols are included.

All math operators, set operators.

Basic pre-defined math functions like: log, lim, cos, sin, tan.

Math symbols like: \int, \sum, \sqrt, \delta and more.

I am using only digits and +,-,times,/ and X(x in algebra) folders for input. These folder contains jpg files(45x45). But our model requires 28X28 images

## CNN Model diagram
![](images/model.png)

## Requirements
1.Python 3.6
2.Machine Learning library : OpenCV

## Library
![](images/opencv.png)

## OpenCV

OpenCV is an open source computer vision and machine learning software library. It is a BSD-licence product thus free for both business and academic purposes.The Library provides more than 2500 algorithms that include machine learning tools for classification and clustering, image processing and vision algorithm, basic algorithms and drawing functions, GUI and I/O functions for images and videos. Some applications of these algorithms include face detection, object recognition, extracting 3D models, image processing, camera calibration, motion analysis etc.

OpenCV is written natively in C/C++. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS, and Android. OpenCV was designed for computational efficiency and targeted for real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing.

## Steps
You can run all the three ipynb files either separately or sequentially.
1. For running Data_extraction.ipynb first download train images.rar zip file and extract it in the folder containing Data_extaction.ipynb file.
2. For running train.ipynb, you either need to download train_final.csv or you can run it after succesfully running Data_extraction.ipynb.
3. For running CNN test.ipynb, you either need to download model_final.h5 and model_final.json file or you can run it after succesfullyn running train.ipynb file. You also need to replace the path of the image in code from the local path of image to be tested on your computer.

## Conclusion
# output

![](images/capture.png)

## solved Equation
![](images/output.PNG)

## Reference

reference https://github.com/vipul79321/Handwritten-Equation-Solver

dataset :https://www.kaggle.com/xainano/handwrittenmathsymbols

### for Suggestion
email<EMAIL_ADDRESS>LinkedIN : https://www.linkedin.com/in/pratik-patil-3108081a5/

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Custom Authentication

If your authentication system is not listed in [npme's supported authentication methods](/up-and-running/auth/#authentication) you may be able to use an external open-source plugin (or write your own). Here are some of the available third-party plugins:
 * [npme-auth-atlassian-stash](https://github.com/bcoe/npme-auth-atlassian-stash)
 * [npme-auth-gitlab](https://github.com/nexdrew/npme-auth-gitlab)

You can also opt to write your own `custom auth-plugin` for npm Enterprise using one of the open-source plugins listed above as a starting point.

## 1. Atlassian Stash authentication and authorization strategy for npm Enterprise:

### Installation

Install `npme-auth-atlassian-stash` in npmE's data directory. By default this can be found in `/usr/local/lib/npme/data`.

```
npm install @bcoe/npme-auth-atlassian-stash
```

### Configuration

This module will use `stash.json` which you should create in npme's data directory (by default this can be found in `/usr/local/lib/npme/data`):
```
{
  "host": "https://stash.domain.com",
  "user": "npme",
  "pass": "npmepass",
  "logFile": "/etc/npme/data/npme-auth-atlassian-stash.log",
  "logLevel": "info"
}
```

* **host**: your Stash repository
* **name**: admin Stash user login used for basic authorization
* **pass**: admin Stash user password
* **logFile**: location of module log file
* **logLevel**: logging level

### Stash user

`npme-auth-atlassian-stash` will use the admin Stash account to get information about users, groups, projects and repositories. This account should be created only for the purpose of `npme-auth-atlassian-stash` and should have administrative privileges to be able to acquire needed information.

Go to your npm Enterprise admin console (on port 8800 of your server), go to Authentication section on Settings page, select Custom, and populate plugin value as:

|Config Field           |Config Value|
|-----------------------|------------|
|Authorization plugin  | /etc/npme/data/node_modules/@bcoe/npme-auth-atlassian-stash  |
|Authentication plugin | /etc/npme/data/node_modules/@bcoe/npme-auth-atlassian-stash  |
|Session plugin        | /etc/npme/data/node_modules/@bcoe/npme-auth-atlassian-stash  |

Click **Save** to save these settings and then **Restart now** when prompted to restart the appliance and apply these settings.

That's all the server-side configuration you need!

## 2. GitLab authentication and authorization strategy for npm Enterprise.

Login to npm Enterprise using GitLab credentials.

### Installation

To install on your npm Enterprise instance:

`cd /usr/local/lib/npme/data` (or the directory configured for Miscellaneous data files in the admin console)

```
sudo npm i npme-auth-gitlab
```

### Configuration

`sudo touch gitlab.json` and populate it with data like the following:

```
{
  "url": "https://gitlab.example.com",
  "strictSSL": false
}
```

Point the "url" to your GitLab instance. If it's using https with a self-signed cert, then make sure "strictSSL" is false.

Go to your npm Enterprise admin console (on port 8800 of your server), go to Settings, select Custom for Authentication, and populate each plugin value as `/etc/npme/data/node_modules/npme-auth-gitlab`

|Config Field           |Config Value|
|-----------------------|------------|
|Authorization plugin  | /etc/npme/data/node_modules/npme-auth-gitlab  |
|Authentication plugin | /etc/npme/data/node_modules/npme-auth-gitlab  |
|Session plugin        | /etc/npme/data/node_modules/npme-auth-gitlab  |

Click **Save** to save these settings and then **Restart now** (when prompted) to restart the appliance and apply these settings.

license: ISC

branch_name: refs/heads/master

gha_license_id: ISC


text:
# SFDX App

Demo code for the

## Dev, Build and Test

Clone the Salesforce DX project.
Push all the code into your scrash org.

## Resources

Post: https://billsalesforce.blogspot.com/2019/03/salesforce-dx-packages-simple-recipe-to.html

Video : https://www.youtube.com/watch?v=Se-QuuS3yLo

## Description of Files and Directories

force-dependent-app: Original code format.

force-indenpent-app: Code for the refactored Controller and Service Class

## Issues

license: MIT


text:
# Selene

## Overview

**Selene** is a C++17 image representation, processing and I/O library.

It currently contains, among other things

  * Statically and dynamically typed in-memory pixel and image data representations.
  	* [Pixel\<T, n\>](../selene/img/pixel/Pixel.hpp):
  	Statically typed multi-channel pixel value.
  	  * For example, `Pixel<std:uint8_t, 3>` (shortcut: `Pixel_8u3`) could represent an 8-bit RGB value, while
  	`Pixel<float, 1>` represents a single-channel floating point image.
  	* [Image\<T\>](../selene/img/typed/Image.hpp):
  	Statically typed class representing a 2-D image, owning its data.
  	  * Example: `Image<Pixel_8u1> img_gray({320_px, 240_px});  // 8-bit grayscale image of size (320 x 240)`
  	* [ImageView\<T\>](../selene/img/typed/ImageView.hpp):
  	Statically typed class representing a 2-D image view, i.e. pointing to non-owned memory.
  	Can be either mutable or constant.
  	  * Example: `MutableImageView<Pixel<double, 10>> img(ptr, {width, height});  // view onto 10-channel floating point image data`
  	* [DynImage](../selene/img/dynamic/DynImage.hpp):
  	Dynamically typed class representing a 2-D image.
  	  * Its main use case is as an intermediate representation for decoded image data (from disk or memory) before
  	  conversion to a strongly typed `Image<T>`.
  	* [DynImageView](../selene/img/dynamic/DynImageView.hpp):
  	Dynamically typed class representing a 2-D image view.
  	Can be either mutable or constant.
  	* [Interoperability](../selene/img/interop/OpenCV.hpp) with [OpenCV](https://opencv.org/) `cv::Mat` matrices:
  	both wrapping (as view) or copying is supported, in both directions.

  * Functions for reading and writing image data in JPEG, PNG, and TIFF formats (from/to files or memory).
    The implementation cleanly wraps the *libjpeg*, *libpng*, and *libtiff* APIs.
  	* [read_jpeg()](../selene/img_io/jpeg/Read.hpp),
  	[read_jpeg_header()](../selene/img_io/jpeg/Read.hpp),
  	[write_jpeg()](../selene/img_io/jpeg/Write.hpp)
  	* [read_png()](../selene/img_io/png/Read.hpp),
  	[read_png_header()](../selene/img_io/png/Read.hpp),
  	[write_png()](../selene/img_io/png/Write.hpp)
  	* [read_tiff()](../selene/img_io/tiff/Read.hpp),
  	[write_tiff()](../selene/img_io/tiff/Write.hpp)
  	* Convenience functions [read_image()](../selene/img_io/IO.hpp)
  	and [write_image()](../selene/img_io/IO.hpp), being able to handle all formats.
  	  * Example: `auto img_data = read_image(FileReader("image.png"));`
  	  * Example: `auto img_data = read_image(MemoryReader(data_ptr, size_bytes));`

  * Basic image processing functionality, such as:
    * Image [pixel access](../selene/img/typed/access/GetPixel.hpp) using
    various [interpolation algorithms](../selene/img/typed/access/Interpolators.hpp)
    (nearest neighbor, bilinear) and
    [boundary handling strategies](../selene/img/typed/access/BorderAccessors.hpp) (no
    check, replicate boundary, zero padding).
      * Example: `const auto u = get<ImageInterpolationMode::Bilinear>(img, 8.5, 10.2);`
      * Example: `const auto v = get<BorderAccessMode::Replicated>(img, -5_idx, 10_idx);`
      * Example: `const auto w = get<ImageInterpolationMode::Bilinear, BorderAccessMode::ZeroPadding>(img, x, y)`
    * [Algorithms](../selene/img_ops/Algorithms.hpp) to apply point-wise
    operations to images/views.
      * Example: `for_each_pixel(img, [](auto& px){ px += 1; });`
      * Example: `const auto img_2 = transform_pixels(img, [const auto& px]{ return px + 1; });`
    * [Pixel-level](../selene/img_ops/PixelConversions.hpp) and
    [image-level](../selene/img_ops/ImageConversions.hpp) conversion
    functions between different pixel formats (e.g. RGB -> Grayscale, etc.).
      * Example: `const auto img_gray = convert_image<PixelFormat::RGB, PixelFormat::Y>(rgb_img);`
      * Example: `const auto img_bgra = convert_image<PixelFormat::RGB, PixelFormat::BGRA>(rgb_img, 255);`
    * [Transformations](../selene/img_ops/Transformations.hpp)
    such as transposing, flipping and rotating image data.
      * Example: `const auto img_transposed = transpose(img);`
      * Example: `const auto img_flipped = flip<FlipDirection::Horizontal>(img);`
      * Example: `const auto img_rotated = rotate<RotationDirection::Clockwise90>(img);`
    * [Convolution operations](../selene/img_ops/Convolution.hpp) using [1-D kernels](../selene/base/Kernel.hpp)
    that can be applied in x- or y-direction on an image.
      * Example: `const auto img_convolved = convolution_x<BorderAccessMode::Unchecked>(img, kernel);`

  * Functions for binary IO from and to files or memory. The type of source/sink can be transparent to users of this
  functionality, via static polymorphism.
    * [FileReader](../selene/base/io/FileReader.hpp) /
    [FileWriter](../selene/base/io/FileWriter.hpp):
    Reading/writing from and to files
    * [MemoryReader](../selene/base/io/MemoryReader.hpp) /
    [MemoryWriter](../selene/base/io/MemoryWriter.hpp):
    Reading/writing from and to memory (raw pointer locations)
    * [VectorReader](../selene/base/io/VectorReader.hpp) /
    [VectorWriter](../selene/base/io/VectorWriter.hpp):
    Reading/writing from and to `std::vector<std::uint8_t>`, extending as needed when writing

repository: kmhofmann/selene

gha_license_id: MIT

repo_name: kmhofmann/selene


text:
# next-day
[![Build Status](https://travis-ci.org/tanhauhau/next-day.svg?branch=master)](https://travis-ci.org/tanhauhau/next-day)
[![npm version](https://badge.fury.io/js/next-day.svg)](https://badge.fury.io/js/next-day)
[![Dependency status](https://david-dm.org/tanhauhau/next-day.svg)](https://david-dm.org)
[![Downloads](https://img.shields.io/npm/dt/next-day.svg)](https://www.npmjs.com/package/next-day)
[![Donate](https://img.shields.io/gratipay/user/tanhauhau.svg)](https://gratipay.com/~tanhauhau/)
[![codecov](https://codecov.io/gh/tanhauhau/next-day/branch/master/graph/badge.svg)](https://codecov.io/gh/tanhauhau/next-day)

> Get the coming day of the week, eg: coming Thursday

## Installation

```bash
npm install --save next-day
```

## Usage

```javascript
var nextDay = require('next-day');
// get next Monday
nextDay(new Date(), 1); // returns { date: [Date] , dayLeft: 4 }
                                            ^ date object    ^ day left till next monday

// or equivalent to
nextDay(new Date(), nextDay.Monday);
```

The MIT License (MIT)

Copyright (c) 2016 Tan Li Hau

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: tanhauhau/next-day

gha_language: JavaScript

repo_name: tanhauhau/next-day


text:
---
title: Code Style
summary: Rules which enforce a specific coding style.
permalink: pmd_rules_xsl_codestyle.html
folder: pmd/rules/xsl
sidebaractiveurl: /pmd_rules_xsl.html
editmepath: ../pmd-xml/src/main/resources/category/xsl/codestyle.xml
keywords: Code Style, UseConcatOnce
language: XSL
---
<!-- DO NOT EDIT THIS FILE. This file is generated from file ../pmd-xml/src/main/resources/category/xsl/codestyle.xml. -->
## UseConcatOnce

**Since:** PMD 5.0

**Priority:** Medium (3)

The XPath concat() functions accepts as many arguments as required so you can have
"concat($a,'b',$c)" rather than "concat($a,concat('b',$c)".

**This rule is defined by the following XPath expression:**
``` xpath
//node()[contains(substring-after(@select,'concat'),'concat')]
```

**Example(s):**

``` xsl
{%raw%}<xsl:variable name="var" select="concat("Welcome",concat("to you ",$name))"/>
<xsl:variable name="var" select="concat("Welcome","to you ",$name))">{%endraw%}
```

**Use this rule by referencing it:**
``` xml
<rule ref="category/xsl/codestyle.xml/UseConcatOnce" />
```

gha_license_id: NOASSERTION


text:
---
name: pollex.club
id: pollex
frame: Macbook
categories:
    - Web
techStack:
    - Hugo
    - Sass
    - CSS3
    - HTML5
    - AWS
    - Netlify
shortDescription: A static site built with Hugo.
external: https://pollex.club
github: https://github.com/Juhannuspukki/pollex-web
---

Pollex.club was the first website I created after neuroeventlabs.com. It
received a substantial redesign in 2019 and it runs on the same victor-hugo
generator as all of my newer static site projects. During this project I also
learned to use AWS S3, for it was originally hosted there.

gha_language: TypeScript


text:
# rackspace_firewall

## Supported Platforms

- CentOS 6.5
- Ubuntu 12.04
- Ubuntu 14.04

## Requirements

### Cookbooks

- `firewall`

## Recipes

### default
- what it does
  - Install default firewall rules for Rackspace services

## Usage

### include recipe

```ruby
include_recipe 'rackspace_firewall'
```

### rackspace_firewall

- single node (app and db):
```json
{
    "run_list": [
      "recipe[rackspace_firewall::default]"
    ]
}
```

# Contributing

https://github.com/rackspace-cookbooks/contributing/blob/master/CONTRIBUTING.md

# Authors
Authors:: Matthew Thode<EMAIL_ADDRESS>


text:
# Using your mBot as a NodeBot

[![Join the chat at https://gitter.im/Makeblock-official/mbot_nodebots](https://img.shields.io/badge/Gitter-Join%20Chat-brightgreen.svg)](https://gitter.im/Makeblock-official/mbot_nodebots?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![](https://img.shields.io/badge/status-Stable-green.svg)

## Hardware [mbot](http://mblock.cc/) from [makeblock](http://www.makeblock.cc/)

> mBot is the easiest educational robot for kids to learn programming, Arduino and robotics.

![mbot](https://cloud.githubusercontent.com/assets/1183541/7513052/80e6dfc0-f4f4-11e4-94b8-76d3ee166cd2.jpg)

*Photo from [Andrew Fisher](https://twitter.com/ajfisher)*

## Getting started

### 1. Drivers

Install the USB Serial driver for your platform found in the `drivers` folder.
Windows users will need to reboot after installing the drivers.

If you're using linux you can skip this step. But instead you will need to add yourself to the `dialout` group using the command

```
sudo usermod -a dialout YOUR_USERNAME
```
You will need to restart or logout and in again afterwards.

### 2. Install Node.js

Install a recent version of  [NodeJS](https://nodejs.org) installed (v6 is preferred).

### 3. Build the bot

Build the bot according to the instructions in your kit

### 4. Install firmware using Interchange

We need to install the firmata firmware onto the board. We do this using a tool called `interchange`.

Connect the USB cable and switch the on/off switch to on. Open up the command line (command prompt, iTerm, etc) and install interchange globally with the following command.

```
npm install -g nodebots-interchange
```

You can install the firmware to work with either USB or Bluetooth with appropriate
firmata using the firmata switch on interchange.

To use USB:

```
interchange install git+https://github.com/Makeblock-official/mbot_nodebots -a uno --firmata=usb
```

To use Bluetooth:

```
interchange install git+https://github.com/Makeblock-official/mbot_nodebots -a uno --firmata=bluetooth
```

If you see `Error: no Arduino 'uno' found.`. Make sure the on/off switch is on. Also check you have the drivers installed properly. Did you forget to reboot? El Capitan users please make sure you installed the codebenderDriver version located in the driver directory.

If you see the `Error: Sending xxxx: receiveData timeout after 400ms`, try again after removing the bluetooth module. Replace it afterwards if you are following the bluetooth method.

If you see `There was an error downloading the manifest file.` try checking your internet connection. If all connectivity fails, ask someone to kindly install firmata for you.

If you see `Permission denied, cannot open /dev/ttyUSB0` double check you're in the dialout group and you restarted.

### 4. (Alternative) Install firmware using Arduino IDE

If you're having troubles with interchange, you can install the firmata firmware using the Arduino IDE however this method is now no longer the preferred option.

## Examples

Time to play with some code. There are plenty of examples in the examples directory that you can learn from. You can run from a command line using the command `node examples/file.js`.

Once you're done with an example, close the program by pressing `Ctrl + c` twice.

If you get the error `Error: Cannot find module 'johnny-five'` or another module, try running the command `npm install` from the `mbot_nodebots` directory.

### LEDs

Lets make the lights flash. There are 2 LEDs on the mbot which are RGB (Red Green Blue) NeoPixel LEDs. These are connected in a strip so you can use node-pixel to control them. An example is `examples/leds.js`

```
node examples/leds.js
```

### Buzzer

Use `examples/piezo.js` - this will make your mbot play some tunes - note that
the latency of Bluetooth means this won't work over the bluetooth controller.

### Motors

Use `examples/motors.js` this will drive the mbot around using the arrow keys on
your keyboard. You may need to change the details of the directions depending on
how you wired up the motors.

### Obstacle detection

Use `examples/sonar.js` to detect the distance to an object. You can use this to
stop your robot from running into things.

### Button

Your mbot has a little button that you can use to trigger something maybe. Use
`examples/button.js` to detect the button press and do something with it.

### Light Sensor

You can read the light level near the mbot - maybe you can make your mbot
run away from too much light or move towards more light? Use `examples/light.js`

### Reflectance sensor

Under your mbot is a sensor which you can use to detect lines. Look at
`examples/reflectance.js` to see how to get the data. You can detect lines by
getting both sensors to detect a light or dark line (eg black tape on a light
surface). Once both sensors are on the line when one drifts off (eg the right
sensor) then you can steer back towards the line (turn back to the left in this
case).

Once you get this working you can build an effective line following bot.

## Bluetooth module

To use the BT module do the following modifications:

* Remove the bluetooth module from the mBot
* Install the bluetooth firmata with instruction below

```
interchange install git+https://github.com/Makeblock-official/mbot_nodebots -a uno --firmata=bluetooth
```

* Turn the mbot off, install the bluetooth module, turn the board on again.
* Pair the module (use whatever tool you need to make that work for your OS -
usually BT settings in your control panel). It should be called `Makeblock`. Hopefully nobody else is pairing at the same time.

Test the connection by using a screen terminal such as:

```
screen /dev/tty.Makeblock-ELETSPP
```

If this connects you should see the blue LED on the BT module go solid. From there
hit the reset button on the board and then you should see something like the following
appear on your terminal.

```
��ymbotFirmata.ino��{�3��l�A�2�U�
```

If you don't get that, test your connection etc. If you do then proceed.

Now execute

```
node examples/leds.js /dev/tty.Makeblock-ELETSPP
```

And you should get blinking lights over BT. You can do the same thing with
most of the examples though speed may be an issue in high data rate cases.

## 2.4GHz wireless module

Install using:

```
npm install drivers/node-hid
```

Run example

```
node examples/wifi_motors.js
```


text:
# docker-nginx-reverse-proxy

## Environment Variables

| environment variable | notes                                                                  |
|----------------------|------------------------------------------------------------------------|
| REDIRECT_HOST        | Your domain which is sent as Host header (e.g., demo2.l3.example.com)  |
| PROXY_PASS_IP        | LB IP address or domain which resolves onto it                         |

## Usage

Set the environment variables listed above and build. You can use this image as
a base or only edit the `Dockerfile` and build it from scratch.

Based on: https://hub.docker.com/r/pindar/docker-nginx-redirect-301/ which does
only 301 redirection.

repository: keitaroinc/docker-nginx-reverse-proxy

gha_language: Dockerfile

repo_name: keitaroinc/docker-nginx-reverse-proxy


text:
# DMU2 validation report (2017-03-14)

- Unique ID present.
- Catalogue limited to HELP coverage.
- I removed the catalogue from the Github repository as we prefer not to store
  the data there.  The data is available on HeDaM in the dmu_products section.
- Isn't the content of `meta_main.yml` something that should be in
  a `meta_survey.yml` as this seems to describe the survey? If not, the
  description of the survey is missing.


text:
# [Manual] Analysis panel

Test verifies Analysis panel

**Prerequisites**:
- User that has full permissions to the storage with HCS images
- HCS image

| Steps | Actions | Expected results |
| :---: | --- | ---|
| 1 | Login as the user from the prerequisites |  |
| 2 | Open the **Library** page |  |
| 3 | Find HCS image from the Prerequisites |  |
| 4 | Click the **HCS** icon near the HCS image file name | ***Preview pop-up*** opens that contains <li> The first well is selected on the *Plate panel*  |
| 5 | Click **Analysis** icon on the *Preview panel* | **Analysis** panel opens that contains 2 tabs: *Analysis* (opens by default) and *Evaluations* |
| 6 | Check *Analysis* panel | *Analysis* panel contains <li> **Pipeline** and **+ Add module** buttons <li> **>** button to submit analysis that is disabled by default <li> Warning `To run evaluation please specify output at the Define Results section` <li> Section with info about analysis object that contains <ul> <li> Info about selected entries  `Selection: 1 well <num_fields> fields 1 time point` <li> Message `Analysis will be submitted as a batch job that can be found at Evaluations tab. For fine-tuning pipeline select a single well, field, and time point.` <li> Field to input *Analysis alias* </ul> <li> **Info** section (colapsed by default) |
| 7 | Expand **Info** section | *Info* section contains <li> *Name* and *Description* fields <li> Analysis creation timestamp and owner |
| 8 | Click **Pipeline** button | Pipeline menu opens that contains with *New*, *Open*, *Save*, *Save as new* options |
| 9 | Click **+ Add module** button | List with submenus *Main*, *File Processing*, *Object Processing*, *Advanced*, *Image Processing*, *Measurement* opens |
| 10 | Hover over the **Main** option | *FindNuclei*, *FindCells*, *FindCytoplasm*, *FindMembrane*, *FindNeurites*, *FindSpots*  |
| 11 | Open **Evaluations** tab | **Evaluations** tab contains <li> List of all jobs available to the user is shown <li> Filters *Owners* and *File name* <ul> by default list is filtered by current user as owner </ul> <li> Each row has status icon |

repository: epam/cloud-pipeline

branch_name: refs/heads/develop

gha_language: Java

repo_name: epam/cloud-pipeline


text:
1. In Wavefront, [create an alert target](/webhooks/add).
1. Give the alert target a meaningful name.
1. In the Triggers field, select the alert state changes that should trigger the notification. See [Creating an Alert Target](https://docs.wavefront.com/webhooks_alert_notification.html#creating-an-alert-target).
1. Make sure the Type is Webhook.
1. Paste the application's notification URL into the URL field.

repository: susanjlindner/docs

repo_name: susanjlindner/docs


text:
## Deploying MultiChain on Microsoft Azure

This Microsoft Azure template deploys MultiChain to create a new private blockchain.

[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fmultichain-on-ubuntu%2Fazuredeploy.json)

Once your deployment is complete, a private blockchain named ``chain1`` will be running and you can start connecting other MultiChain nodes to the blockchain to send transactions and issue assets.

## Template Parameters

When you launch the installation of the VM, you need to specify the following parameters:
* `vmDnsName`: This is the public DNS name for the VM.  You need to specify an unique name.
* `adminUsername`: This is the username you will use for logging into to the VM.
* `adminPassword`: Azure requires passwords to have at least three of the following: one upper case, one lower case, a special character, or a number.
* `vmSize`: The type of VM that you want to use for the node. The default size is D1 (1 core 3.5GB RAM) but you can change that if you expect to run workloads that require more RAM or CPU resources.
* `location`: The region where the VM should be deployed to

Once the deployment of the MultiChain node has completed, you will receive the ``nodeaddress`` that can be used to connect other nodes to the new blockchain.  The blockchain's name is ``chain1`` and the network port is set to ``8333`` and the JSON-RPC port set to ``8332``.  The deployed node has the role of Administrator.

## Connect to the blockchain from another computer

Install Multichain on a second computer and run the command `multichaind <nodeaddress>`.

The ``nodeaddress`` argument was obtained after deployment and should look something like `chain1@magicunicorns.westus.cloudapp.azure.com:8333`.

More information about how to connect to a blockchain and grant permissions can be found in the [Getting Started](http://www.multichain.com/getting-started/) tutorial.

## Tips

If you want to experiment with two separate chains, create a new Resource Group, and use it to launch the template again.

repository: okcashpro/azure-blockchain-projects

gha_language: Shell

repo_name: okcashpro/azure-blockchain-projects


text:
# JetStore

A clone of Google PlayStore app with animations in Android built using Jetpack compose.

### This sample app showcases the following:

* Working with bottom nav bar and tabs
* Implementation of Chips to filter
* Light and dark theme using custom color palette
* Horizontal and vertical scrollable list
* Using Animation APIs
* Test compose layouts

### Screens
Demo UI             |  Games | App Details
:-------------------------:|:-------------------------: | :-------------------------:
  |   |

App Reviews             |  Apps (Dark) | Movies (Dark)
:-------------------------:|:-------------------------: | :-------------------------:
  |   |

### Status: 🚧 In progress

JetStore is still under development and some screens are yet to be designed.

### Libraries used

* [Jetpack Compose]
* [Accompanist]
* [Coroutines]
* [Lottie Compose]
* [Compose Navigation]
* [Compose Test]

[Jetpack Compose]: https://developer.android.com/jetpack/compose
[Accompanist]: https://github.com/chrisbanes/accompanist
[Coroutines]: https://developer.android.com/kotlin/coroutines
[Lottie Compose]: https://github.com/airbnb/lottie
[Compose Navigation]: https://developer.android.com/jetpack/compose/navigation
[Compose Test]: https://developer.android.com/jetpack/compose/testing

### How to get started
Please get Android Studio Arctic Fox 2020.3.1 Beta 3 or above to build this project
from [from here](https://developer.android.com/studio/preview/).

### License
```
Copyright 2020 Pushpal Roy

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: Eqilibrium-Hub/jetstore

repo_name: Eqilibrium-Hub/jetstore


text:
---
title: Multiple route responses
meta:
  title: "Define multiple responses for each route: 200, 404, 500, etc."
  description: Multiple responses can be defined for each route with different body, headers and status. Learn how to create them and randomize them.
order: 900
---

# Multiple responses

---

For each route, multiple responses can be defined (status, body, and headers) and [triggered using a set of rules](docs:route-responses/dynamic-rules).

## Adding or duplicating a response

To **add** a new response to your route, click on the "plus" icon next to the responses list:

![Click on the icon to add a new response](/images/docs/v1.14.0-add-route-response.png)

You can also **duplicate** an existing route response by clicking on the "copy" icon on the right:

![Click on the copy icon to duplicate a response](/images/docs/v1.14.0-duplicate-route-response.png)

Everything will be copied to the new response: documentation, file/body, headers and rules.

## Default route response

There is always at least one response when you create a new route. You can modify it and add more responses. But you can never delete the last route response.

Without rules or when a request does not match the one you defined, the default response will always be the first one in the list. You can easily change the default response by reordering the responses menu with a drag and drop:

![Reorder route responses](/images/docs/v1.14.0-reorder-responses.png)

## Random route response

Mockoon can serve the route responses randomly (200, 500, 404) to simulate an unpredictable behavior.

To activate this option, click on the "shuffle" icon next to the response list:

![Random route responses](/images/docs/v1.14.0-random-route-responses.png)

> When this option is active, all the rules defined on this route will be ignored. Also, this option cannot be selected in addition to the sequential responses option below.

## Sequential route response

Mockoon can serve the route responses sequentially (200 → 500 → 404). Mockoon will serve all the responses one after the other and restart at the beginning. The sequence is reset when restarting the server.

To activate this option, click on the "repeat" icon next to the response list:

![Sequential route responses](/images/docs/v1.14.0-sequential-route-responses.png)

> When this option is active, all the rules defined on this route will be ignored. Also, this option cannot be selected in addition to the random responses option above.


text:
---
title: RuhrJS 2019
url: 'https://2019.ruhrjs.de'
cocUrl: 'https://ruhrjs.de/coc'
date: 2019-10-05
endDate: 2019-10-06
location: 'Bochum Germany'
byline: JavaScript Conference in the heart of the Ruhrarea
thumbnail: /images/uploads/ruhrjs-2019.png
---

The RuhrJS is an annual, community-driven JavaScript conference and the first of its kind in the metropolitan Ruhr Area in Germany. First held in 2016, the RuhrJS brings together an international line-up of renowned speakers with 200 JavaScript developers from all over the globe, creating a forum for developers to connect with companies and one another.

We aim to foster a vibrant developer community and thereby strengthen our region's role in the tech industry. Our vision is to contribute to the digital transition of the Ruhr Area. We want to do our bit in making the region more attractive for everyone who is enthusiastic about JavaScript programming.

We take particular pride in our diversity program. With the help of our sponsors, we can provide around 20% of our tickets to people from underrepresented groups every year.

We are happy to welcome you in October, 5th and 6th in Bochum!

repository: CSS-Tricks/conferences

gha_language: Nunjucks

repo_name: CSS-Tricks/conferences


text:
# graphql-schemas
A collection of common and useful GraphQL Object schemas.
Expressed in **GraphQL Schema Language**.

(Need a quick primer? Refer to the [cheat sheet](http://wehavefaces.net/graphql-shorthand-notation-cheatsheet-17cd715861b6))

## Schemas List
- [GeoJSON](./geojson)
- [GraphQL Introspection System Schema](./graphql_introspection_system/)
- [Hacker News API](./hacker_news_api)

Want to contribute more schemas?

## Raison d'être
To have a repository of common and reusable GraphQL Object schemas, preferably with defined specifications / documentation.

## How to contribute
Feel free to submit PRs for:
- New schemas
- Add JSON data sets and GraphQL queries to allow others to test and validate their implementation.

If you have implemented any of the above schemas, feel free to add a link to it in the README.

## License

MIT

repository: joedeveloper/graphql-schemas

repo_name: joedeveloper/graphql-schemas


text:
# Chaper 4

## Simple Example: XOR

We include a notebook for setting up the XOR problem using the two-dimensional toy data from Chapter 3. The notebook will show the Perceptron (which is technically a 1-layer MLP), a 2-layer MLP, and a 3-layer MLP. Various plots are also shown.

### Notebooks

- [4_mlp_2d_points/2Dimensional_Perceptron_MLP](4_mlp_2d_points/2Dimensional_Perceptron_MLP.ipynb)

### Corresponding examples in the book

No actual code examples are shown in the book for the XOR problem, but the plots in Figure 4-3, Figure 4-4, and Figure 4-5 were derived from this notebook.

## In Text Examples

### Notebooks

- [Chapter-4-In-Text-Examples](Chapter-4-In-Text-Examples.ipynb)

### Corresponding examples in the book

- Example 4-1. Multilayer perceptron using PyTorch
- Example 4-2. An example instantiation of an MLP
- Example 4-3. Testing the MLP with random inputs
- Example 4-4. Producing probabilistic outputs with a multilayer perceptron classifier (notice the apply_softmax = True option)
- Example 4-13. MLP with dropout
- Example 4-14. Artificial data and using a Conv1d class
- Example 4-15. The iterative application of convolutions to data
- Example 4-16. Two additional methods for reducing to feature vectors
- Example 4-22. Using a Conv1D layer with batch normalization

## Example: Surname Classification with an MLP

### Notebooks

- (for dataset preprocessing) [munging_surname_dataset](4_2_mlp_surnames/munging_surname_dataset.ipynb)
- [4_2_Classifying_Surnames_with_an_MLP](4_2_mlp_surnames/4_2_Classifying_Surnames_with_an_MLP.ipynb)

### Corresponding examples in the book

- Example 4-5. Implementing `SurnameDataset.__getitem__()`
- Example 4-6. Implementing SurnameVectorizer
- Example 4-7. The SurnameClassifier using an MLP
- Example 4-8. Hyperparameters and program options for the MLP-based Yelp review classifier
- Example 4-9. Instantiating the dataset, model, loss, and optimizer
- Example 4-10. A snippet of the training loop
- Example 4-11. Inference using an existing model (classifier): Predicting the nationality given a name
- Example 4-12. Predicting the top-k nationalities

## Example: Classifying Surnames by Using a CNN

### Notebooks

- (for dataset preprocessing) [munging_surname_dataset](4_4_cnn_surnames/munging_surname_dataset.ipynb)
- [4_4_Classifying_Surnames_with_a_CNN](4_4_cnn_surnames/4_4_Classifying_Surnames_with_a_CNN.ipynb)

### Corresponding examples in the book

- Example 4-17. SurnameDataset modified for passing the maximum surname length
- Example 4-18. Implementing the SurnameVectorizer for CNNs
- Example 4-19. The CNN-based SurnameClassifier
- Example 4-20. Input arguments to the CNN surname classifier
- Example 4-21. Using the trained model to make predictions

repository: delip/PyTorchNLPBook

gha_language: Jupyter Notebook

repo_name: delip/PyTorchNLPBook


text:
# Table of contents

## 🧰 INTRODUCTION

* [〰 The Toolkit](README.md)
* [〰 Distributed Design?](introduction/what-is-distributed-design.md)
* [🏭    Supply Chains](introduction/batchworks.md)

## 🎯 DIRECTION

* [〰 Orientation](direction/orientation.md)
* [〰 Vision Setting](direction/orientation-and-beginning-the-journey.md)
* [〰 Finding Purpose](direction/exercise-start-with-why.md)
* [📢 Manifesto + Identity](direction/your-graphic-identity.md)
* [〰 Sustainability](direction/people-planet-profit.md)

## ✏ DESIGN

* [🔬 Experiment + Record](design/experiment-+-record.md)
* [〰 Design Context](design/design-context.md)
* [〰 Divergent research](design/loose-associations.md)
* [〰 Ideation](design/ideation.md)
* [〰 Brief: One Sheet](design/one-sheet-2.md)
* [〰 Technology](design/technology.md)

## 📦 DISTRIBUTION

* [〰 Business models](distribution/exercise-business.md)
* [📷 Document + Share](distribution/documenting-your-work-1.md)
* [〰 Project: Plastic Kitchen](distribution/plastickitchen.md)

repository: OtherToday/webtest

repo_name: OtherToday/webtest


text:
# Roka Recipes App
Personal project developed with the Android SDK.

All recipe information is provided by [Spoonacular API.](https://spoonacular.com/food-api)

Design inspired by [Roka - Recipes and Food Plan App UI.](https://creativemarket.com/betush/3703359-Roka-Recipes-and-Food-Plan-App-UI)

## Features
- List of recipe categories
- Search recipes from the network
- Infinite scroll with pagination
- Save your favorite recipes in a local database
- Share recipes
- Navigation with deep linking
- Visit original recipe website within a webview
- Transitions with Material Motion and MotionLayout
- Dark theme support

## Libraries Used
- Android KTX
- Kotlin Coroutines
- View Binding
- LiveData
- ViewModel
- Navigation
- Room
- Retrofit
- Hilt
- Glide
- DataStore
- Paging 3

## Screenshots
| ![Categories](assets/screenshot_1.jpg) | ![Recipes](assets/screenshot_2.jpg) |
|----------|:-------------:|

| ![Favorites](assets/screenshot_3.jpg) | ![Instructions](assets/screenshot_4.jpg) |
|----------|:-------------:|

| ![Favorites](assets/screenshot_5.jpg) | ![Instructions](assets/screenshot_6.jpg) |
|----------|:-------------:|

repository: android-architectureer/roka-recipe-app

repo_name: android-architectureer/roka-recipe-app


text:
The `` `default_netype`` compiler directive can be used to specify the net type
of implicit nets, i.e. where a signal is referenced, or assigned to, without
being declared.
IEEE1800-2017 clause 22.8 stipulates "When no `` `default_nettype`` directive
is present or if the `` `resetall`` directive is specified, implicit nets are of
type `wire`."

SystemVerilog makes a distinction between variables (only 0 or 1 drivers)
and nets (0 or more drivers).
IEEE1364-2001 (Verilog) uses variables as abstractions for data storage
elements (`reg`, `integer`, `real`, `time`, `realtime`).
In contrast, IEEE1800-2017 (SystemVerilog) the distinction between nets and
variables is defined by how a simulator must calculate a value.
In a simulator, a variable stores a value, but a net's value is calculated by
evaluating the strength of all drivers.
To keep compatibility with Verilog, the default net type of an undeclared net
in SystemVerilog is `wire` (a net, not a variable), which requires evaluating a
list of values with strengths, rather than simply looking up a value.
The distinction between data storage elements and physical wires is therefore
made in using `always_comb`, `always_ff`, and (less commonly) `always_latch`
keywords.

Variables are preferred over nets for most digital logic for 2 reasons:
- Only 0 or 1 drivers allowed, so an accidental multi-driving is caught by
  a compile time error.
- Simulator performance (dependent on implemetation).
  Value can be found by lookup, rather than evaluation of drivers.

When `` `default_nettype none`` is used, all signals must be declared, thus
forcing the author to consider whether they mean a variable or a net.

See also:
- **inout_with_tri** - Useful companion rule.
- **input_with_var** - Useful companion rule.
- **output_with_var** - Useful companion rule.

The most relevant clauses of IEEE1800-2017 are:
- 6.5 Nets and variables
- 22.8 default nettype

Note: One prominent paper (Cliff Cummings, HDLCON 2002) recommends *against*
using `` `default_nettype none`` on the basis that concise, typeless code has
fewer opportunities for mistakes.
This attitude was popular at the time, e.g. Python's dynamic typing, but
modern attitudes are now favouring explicit types, e.g. Python's new type
checking syntax and tooling.
Additionally, the reasoning behind this guideline only applies principally to
IEEE1364, but not strongly to IEEE1800.

repository: dalance/svlint

gha_language: Rust

repo_name: dalance/svlint


text:
# SEDE

![sede ci](https://github.com/hirupert/sede/actions/workflows/ci.yml/badge.svg)

**SEDE** (Stack Exchange Data Explorer) is new dataset for Text-to-SQL tasks with more than 12,000 SQL queries and their natural language description.
It's based on a real usage of users from the Stack Exchange Data Explorer platform, which brings complexities and challenges never seen before in any other semantic parsing dataset like including complex nesting, dates manipulation, numeric and text manipulation, parameters, and most importantly: under-specification and hidden-assumptions.

Paper (NLP4Prog workshop at ACL2021): [Text-to-SQL in the Wild: A Naturally-Occurring Dataset Based on Stack Exchange Data](https://arxiv.org/abs/2106.05006).

---
![sede sql](./sede_sql.jpg)

### Setup Instructions

Create a new Python 3.7 virtual environment:

```
python3.7 -m venv .venv
```

Activate the virtual environment:

```
source .venv/bin/activate
```

Install dependencies:

```
pip install -r requirements.txt
```

Add the project directory to python PATH:
```
export PYTHONPATH=/your/projects-directories/sede:$PYTHONPATH
```

One can run all commands by just running ``make`` command, or running them step by step by the following commands:

Run pylint:

```
make lint
```

Run black:

```
make black_check
```

Run tests (required JSQL running for this - please see "Running JSQLParser" chapter):

```
make unit_test
```

Add the virtual environment to Jupyter Notebook:

```
python3.7 -m ipykernel install --user --name=.venv
```

Now you can enter into Jupyter with the command `jupyter notebook` and when creating a new notebook you will need to choose the `.venv` environment.

### Folders Navigation
* `src` - source code
* `configs` - contains configuration files for running experiments
* `data/sede` - train/val/test sets of SEDE. **Note** - files with the `_original` suffix are the ones that we kept original as coming from SEDE without our fixes. See our paper for more details.
* `notebooks` - some helper Jupyter notebooks.
* `stackexchange_schema` - holds file that respresents the SEDE schema.

### Running JSQLParser

Clone JSQLParser-as-a-Service project: `git clone https://github.com/hirupert/jsqlparser-as-a-service.git`

Enter the folder with `cd jsqlparser-as-a-service`

Build the JSQLParser-as-a-Service image using the following command: `docker build -t jsqlparser-as-a-service .`

Running the image inside a docker container in port 8079: `docker run -d -p 8079:8079 jsqlparser-as-a-service`

Test that the docker is running by running the following command:
```
curl --location --request POST 'http://localhost:8079/sqltojson' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sql":"select salary from employees where salary < (select max(salary) from employees)"
}'
```

### Training T5 model

Training SEDE:
```
python main_allennlp.py train configs/t5_text2sql_sede.jsonnet -s experiments/name_of_experiment --include-package src
```

Training Spider:

In order to run our model + Partial Components Match F1 metric on Spider dataset,
one must download Spider dataset from here: https://yale-lily.github.io/spider and save it under `data/spider` folder inside the root project directory.
After that, one can run the following command in order to train our model on Spider dataset:

```
python main_allennlp.py train configs/t5_text2sql_spider.jsonnet -s experiments/name_of_experiment --include-package src
```

### Evaluation (SEDE)

Run evaluation on SEDE validation set with:
```
python main_allennlp.py evaluate experiments/name_of_experiment data/sede/val.jsonl --output-file experiments/name_of_experiment/val_predictions.sql --cuda-device 0 --batch-size 10 --include-package src
```

Run evaluation on SEDE test set with:
```
python main_allennlp.py evaluate experiments/name_of_experiment data/sede/test.jsonl --output-file experiments/name_of_experiment/test_predictions.sql --cuda-device 0 --batch-size 10 --include-package src
```

Note - In order to evaluate a trained model on Spider, one needs to replace the experiment name and the data path to: `data/spider/dev.json`.

### Inference (SEDE)

Predict SQL queries on SEDE validation set with:
```
python main_allennlp.py predict experiments/name_of_experiment data/sede/val.jsonl --output-file experiments/name_of_experiment/val_predictions.sql --use-dataset-reader --predictor seq2seq2 --cuda-device 0 --batch-size 10 --include-package src
```

Predict SQL queries on SEDE test set with:
```
python main_allennlp.py predict experiments/name_of_experiment data/sede/test.jsonl --output-file experiments/name_of_experiment/val_predictions.sql --use-dataset-reader --predictor seq2seq2 --cuda-device 0 --batch-size 10 --include-package src
```

Note - In order to run inference with a trained model on Spider (validation set), one needs to replace the experiment name and the data path to: `data/spider/dev.json`.

## Acknowledgements

We thank Kevin Montrose and the rest of the Stack Exchange team for providing the raw query log.

repository: stjordanis/sede

repo_name: stjordanis/sede


text:
---
layout: default
---

# 1997-09-22 - On the trail of David Aarons

## Header Data

From: Peter F Cassidy<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 9d172346c0d739e813ba199543e30adbaa1a2803526991a2ae1d1a07ed84429f

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-09-22 07:12:22 UTC

Raw Date: Mon, 22 Sep 1997 15:12:22 +0800

## Raw message

```
{% raw  %}From: Peter F Cassidy<EMAIL_ADDRESS>Date: Mon, 22 Sep 1997 15:12:22 +0800
To<EMAIL_ADDRESS>Subject: On the trail of David Aarons
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Fellas,

Don't flame me for asking. It's just that in following this guy I cannot
get very close to those who have met with the crypto czar - except in
Japaan where sources have gotten me pretty close to the man's activities.
. .

I'm trying to finish up the research for a piece on Aaron who has been
meeeting with Western Allies to get them on-board the key escrow program
that the Clinton Administration has mindelessly pursued since the first
week of its reign.

Aaron has been all over, visiting UK, Japan and Germany and Australia -
meeting different kinds of receptions, most visibly successful in Japan.

All I am asking here is if anyone has contacts at important labs or
government ministries where Aaron might have been received. I've got to
have my ducks lined up before I interview him.

Regards,

Peter Cassidy for
WIRED Magazine

{% endraw %}
```

## Thread

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

+ Return to "[Peter F Cassidy <pcassidy@world.std.com>](/authors/peter_f_cassidy_pcassidy_at_world_std_com_)"

+ 1997-09-22 (Mon, 22 Sep 1997 15:12:22 +0800) - On the trail of David Aarons - _Peter F Cassidy<EMAIL_ADDRESS>


text:
INSTALL

RabbitMQ must be installed for the Mule ESB flow to run correctly. See Server/AMQP/INSTALL.md

Simply follow the instructions on http://www.mulesoft.org/download-mule-esb-community-edition

Download and unpack on a machine that is to be used as the Push Server. Run Mule either by hand or by installing it as a service.

CONFIGURE

Download and copy the push-trigger.zip in the push-trigger-flow/bin folder to your Push Server installation's app folder.

Alternatively use Mule Studio to assemble the push-trigger flow by downloading and opening the push trigger project from the push-trigger-flow/source folder.

You must setup a public writable share in order for the Push Server file interface to function correctly.
The default share name that must be created is 'pushfiles'. It must be created on the Push Server machine and be a public writable share.
If in doubt consult your operating system guide for how to setup a public share.

The file share and the port of the http interface can be customized by changing the push-trigger.properties file found in the push-trigger-flow/bin folder and then dropping the push-trigger.properties file in the conf folder of the mule installation.

The default values for the Push Server interfaces are:

- Http interface is <Push Server IP>:8081
- File interface is share at <root of Push Server>/pushfiles
- AMQP interface is using a queue named PushTriggerQueue

repository: nikolajo/ci-push

repo_name: nikolajo/ci-push


text:
# Linelos

_Linelos_ is an api made in Clojure that uses Google
[Gmail API](https://developers.google.com/gmail/api/) to search for the user
emails, then it extracts data using regexes and returns a json object.

It also takes advantage of Clojure's interop with Java to use the
[gmail java library](https://developers.google.com/gmail/api/quickstart/java).
So in the end you take the compatibility of Java with the functional programming
goodness of Clojure.

## What this program does

Supose you have a bunch of emails from your bank with this format:

```
<EMAIL_ADDRESS>===============================

Hello Roberto,

You have made a payment with your account # 123

Vendor: Some vendor
Date of transaction 05/02/2019 at 16:14
Amount $ 1.00.
```

You can send Linelos a request with a query param similar to what you would
search inside your gmail client

```bash
curl -XGET localhost:3478/transactions?query=from:(notifications@thebank.com)%20payment
```

The [message parser](src/linelos/gmail/service.clj#L22) will process each email
that matches the query and extract the fields according to the
[provided regexes](src/linelos/gmail/message/pacificard.clj). You will end with
a response that looks like this:

```json
{
  "transacciones": [
    {
      "vendor": "Some vendor",
      "date": "2019-02-05T16:14:00Z",
      "amount": 1
    },
    {
      "vendor": "Some other vendor",
      "date": "2019-03-01T11:11:00Z",
      "amount": 9001
    }
  ]
}
```

## What's Next

* Currently, only [one format](src/linelos/gmail/message/pacificard.clj) of
  message is supported. That is just the basic idea put into workable code, but
  ideally the parsing and regex stuff would be provided with the request.
* Documentation for the API.

## Setup

* [Create a new API](https://console.developers.google.com/flows/enableapi?apiid=gmail)
  from Google if you don't have one yet and download your client secret.
* Copy your `client_secret.json` into the root directory of the project.

### Configure your local environment

* Copy `.lein-env.example` to `.lein-env` and edit it.
* Run `lein ring server-headless` to start a local server.
* Go to http://localhost:3478/transactions.

### Creating a Docker container for production

* Copy `.lein-env.example` to `.lein-env.prod` and edit it.
* Run `docker build -t linelos .`

## Development Commands

| Command                            | Description                                         |
| ---------------------------------- | --------------------------------------------------- |
| `lein ring server-headless [port]` | Start server locally                                |
| `lein test:unit`                   | Run unit tests                                      |
| `lein test:functional`             | Run functional tests                                |
| `lein test`                        | Run all tests                                       |
| `lein test:coverage`               | Run tests with code coverage report                 |
| `lein kibit`                       | Analyze code for more idiomatic functions or macros |
| `lein cljfmt fix`                  | Run linter and fix files                            |
| `lein check`                       | Run all checks and tests                            |

## Useful docs

* Gmail - Using OAuth 2.0 for Web Server Applications:
  https://developers.google.com/identity/protocols/OAuth2WebServer
* Gmail API - Java Quickstart:
  https://developers.google.com/gmail/api/quickstart/java

repository: rdparedes/linelos

repo_name: rdparedes/linelos


text:
# SHAK Token

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)

The SHAK Token is the Stable Hyper Algorithmic Kryptocurrency. It is intended to be used as a stable alternative to store value as compared to fiat currencies, commodities, or even other stablecoins. Our cryptocurrency is backed by a basket of different currencies and other assets. With our algorithms continuously balancing the basket, we aim to provide a store of value that stays above the volatile fluctuations that impact commonly held assets.

## Table of Contents
---
- [Installation](#installation)
    - [Balancing Algorithm](#balancing-algorithm)
    - [Placeholder](#placeholder)
- [Balancing Methodology](#balancing-methodology)
    - [Country Indicator Balancing](#country-indicator-balancing)
    - [Continuous FX Balancing](#continuous-fx-balancing)
- [SHAK Oracle](#SHAK-oracle)
- [Smart Contracts](#smart-contracts)
- [User Guide](#user-guide)
- [Contributors](#contributors)

## Installation
---

Beyond cloning the repository, in order to run the included scripts, some installation steps are required. They are listed below by section, with the specific scripts specified as well. Most of these can be installed with the [Anaconda](https://www.anaconda.com) package (as indicated with an asterisk).

## Balancing Algorithm

Scripts covered: [countryweight.py](countryweight.py), [Stable_coin.py](Stable_coin.py)

### Key Python Libraries Required:
|Library|Command Line Install|
|-------|-----------------------------|
|[Pandas*](https://pandas.pydata.org/getting_started.html) | ```conda install pandas``` |
|[Numpy*](https://numpy.org/install/)  | ```conda install numpy```  |
|[ScikitLearn*](https://scikit-learn.org/stable/install.html#)|```pip install -U scikit-learn```|
|[Quandl](https://pypi.org/project/Quandl/)|```pip install quandl```|

## Smart Contract and Oracle Deployment

Scripts covered: [SHAK_price_oracle.py](SHAK_price_oracle.py), [SHAK_monitor.py](SHAK_monitor.py)

### Key Python Libraries Required:
|Library|Command Line Install|
|-------|-----------------------------|
|[Web3.py](https://web3py.readthedocs.io/en/stable/) | `pip install web3`|
|[Flask](https://pypi.org/project/Flask/) | `pip install Flask` |

### Env Variables Required:
These env variables require definition prior to running these scripts:
- `CMC_PRO_API_KEY =` requires creating a free account at [CoinMarketCap](https://pro.coinmarketcap.com/)
- `WEB3_INFURA_PROJECT_ID =` for local testing, create a free account at [Infura](https://infura.io/)
- `WEB3_PROVIDER_URI = https://kovan.infura.io/v3/aa3c1e7b65054c8595581a4241ff7b40`
- `SHAK_TOKEN_ADDRESS = 0xTBD`

## Balancing Methodology
---
![Balance](images/balance.png)

Stability is the cornerstone of our cryptocurrency. As such, we are evaluating the currency basket we hold daily. In addition to monitoring the interday fluctuations in exchange rates, we also take a long-term approach by looking at key indicators for the countries of our currencies to anticipate future currency movements. This country indicator balancing is done at a lesser frequency as these indicators are only released annually.

### Country Indicator Balancing

All country indicator information is pulled via the [World Bank API](https://datahelpdesk.worldbank.org/knowledgebase/topics/125589-developer-information). The indicators currently used are [Gross Domestic Product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP), GDP Growth (Year over Year), GDP per capita, Inflation based on [Consumer Price Index](https://en.wikipedia.org/wiki/Consumer_price_index) (CPI), and Unemployment rate. These indicators going back 20 years are pulled for all countries that are represented in the currency basket.

Matched against this set of historical indicators are the annualized volatility of each currency against the USD (as provided by [Federal Reserve Economic Data](https://fred.stlouisfed.org) (FRED)). These indicators and annualized volatility numbers then go to train a linear regression machine learning algorithm (a deep learning model and other forms of linear regression were also evaluated in the process). This trained model is used on the most recent set of indicators for the countries represented in the currency basket to provide projected annualized volatility for the next year. These projections are fed into the weighting recommendation model.

This model takes in the annualized volatility and removes the most volatile 25% of projections and sets the weighting to 0. Then based on the remaining volatility associated with each country/currency pair, it assigns weights for the portfolio (with higher weight assigned to lower projected volatility). These weighting recommendations then form the baseline for the continuous FX balancing algorithm that will be explained in the next section.

For example, given a portfolio of 20 non-pegged currencies, after training and testing the model, the recommended breakdown of the currencies are as follows:

![Country_Weighting](images/Country_Weighting.png)

### Continuous FX Balancing

A master SHAK currency basket is created through Quandl API calls including currency alternatives, Gold and BTC. Using the Country Indicator Balancing weights, daily returns, and two features a low volatility, mean reverting algorithm is produced. An additional annualized volatility filter removes hyperinflationary and secular trending currencies (Venezuela, Gold and BTC this year). Bollinger band and daily return volatility averages create signals when outside of a standard deviation measure which are then utilized by a Random Forest Model to produce a synthetic portfolio currency value.

In validating the efficacy of the algorithm, the following output was produced:
```
The percentage of days the portfolio has had low volatility:
Portfolio to FRED/DEXUSEU beta    0.965986
Portfolio to FRED/DEXCAUS beta    0.976474
Portfolio to ECB/EURCHF beta      0.994048
Combined Benchmark Beta           0.999433
The percentage of days the portfolio has had extremely low correlation (beta .5 SD)
Portfolio to FRED/DEXUSEU beta    0.207200
Portfolio to FRED/DEXCAUS beta    0.274943
Portfolio to ECB/EURCHF beta      0.363662
Combined Benchmark Beta           0.285431
```

Also included in the repository is a [Basket Analysis notebook](basket_analysis.ipynb) for the CIO and marketing team to analyze the efficacy of the algorithm in regards to daily returns, volatility, and beta relative to a benchmark of currencies. Post Ethereum charts are also included given the current nature of the SHAK coin's native point of exchange. There are also a variety of callable methods within the [Stable_coin.py](Stable_coin.py) file that are meant to be used to remove/add filters, change benchmark baskets, and quickly review Random Forest results.

The resulting graphs produced are as follows:

### **Volatility Comparisons**

![Volatility Comparison](images/Vol_comparisons.png)

### **Returns Comparisons**

![Returns Comparison](images/portfolio_return_comparisons.png)

## SHAK Oracle
---
![Oracle](images/oracle.jpg)

The Oracle's primary function ([SHAK_price_oracle.py](SHAK_price_oracle.py)) is to provide an API end point to serve requests for latest calculated basket price in wei from the basket balancing scripts. This API is hosted with Flask. The API endpoint is accessed by the SHAK token's Solidity contract to determine current exchange price (wei).

The basket price and balancing scripts are calculating price in USD. The SHAK token smart contracts transact using wei. To convert latest basket USD price to current wei price, the Oracle fetches per request the latest ETH-USD exchange aggregated rate from Coin Market Data pro API, and the latest wei-ETH ratio from Web3 Infura.io mainnet API.

To allow websites and fund balancing operations to real-time monitor the total SHAK tokens active, the separate [SHAK_monitor.py](SHAK_monitor.py) invokes TotalCount functions within the SHAK contract to read number of active Tokens.

## Smart Contracts
---
![Smart_Contracts](images/smartcontracts.png)

The smart contract is acting as the frontend for buying and redeeming our tokens. It will be the interface which clients will buy and redeem our tokens. Our token are built to ERC20 standard, as well as utilzed safemath for security.

Operations

The contract holds funds in ETH for day-to-day transactions. The contract will not allow token redemption which it could not cover with available fund, and will advice client to contact our office.

As a client initiated transaction with the contract, the contract will updates the rate with the latest rate posted on our server through Oraclize and use that rate to convert tokens to ETH, vice versa. Moreover, the contract will log each transaction (buying, redeeming, transferring, and oraclize pull) to the chain as our transaction ledger.

## User Guide
---
Clients will interact with our smart contract in 3 ways: Buy Tokens, Redeem Tokens, Transfer Tokens, and Check Token Balance.
- Buy Tokens
    - The contract will only use message sender as source of ETH for transaction and message value as amount of ETH in wei to buy tokens.
    - Client will specify the wallet which SHAK token would be place.
    - If we have already reached the maximum number of tokens, the contract will not sell any token to message sender, and return the remaining value and gas. If we have not reached maximum number of token, the contract will sell the remaining amount up to maximum number of token or total worth of message value, whichever is less.
    - Any remainder left from converting to SHAK token will be return to message sender.
- Redeem Tokens
    - The contract will assume that the message sender is the token owner who will specify the number of tokens to redeem.
    - If token owner doesn’t have enough tokens to redeem, the transaction is terminated. Otherwise, the contract will update the conversion rate, then send ETH back to the owner. If the contract doesn’t have enough ETH to cover this redemption, then, it will notify the contract owner to contact our office.
- Transfer Tokens
    - The contract will assume that the message sender is the token owner who will specify the number of tokens to redeem and to whom to transfer the tokens.
    - If token owner doesn’t have enough tokens to transfer, the transaction is terminated.
- Check Token Balance
    - The contract will assume that the message sender is the token owner. It will return the number of tokens registered to the owner.

Operator will be able to check conversion rate, check number of token sold, remaining token, maximum number of tokens, check contract’s ETH balance, set URL for oraclize and withdraw ETH from the contract.
- Withdraw funds
    - Only the "fund wallet" address specified at contract construction can withdraw ETH.
    - Operator will specify how much ETH to withdraw in wei, then the contract will transfer funds to the fund wallet. If the contract doesn't have enough to send, then the operation is terminated.

## Contributors
---
|Doc Fern|Albert Kong|Thee Sanpitakseree|Henry Schrader|Kiel Wheat|
|:------:|:---------:|:----------------:|:------------:|:--------:|
|![Doc](images/DFpropic.png)| ![Albert](images/AKpropic.png)| ![Tee](images/TSpropic.png)| ![Henry](images/HSpropic.jpg)| ![Kiel](images/KWpropic.png)|

repository: albertlk/UCBFinTech

repo_name: albertlk/UCBFinTech


text:
# *Big Map* for node js

----------------------

[![Build status][travis-image]][travis-url]

This package provides you with a big map.
It uses Buffer as its storage space rather than heap memory.
It implemented by node js pure javascript code (ES6), no other dependencies.
Its feature is still relatively simple, and performance worse than build-in Object or Map,
but sometimes in order to get more space, we have no other choice.

Use Buffer implementation does not exist v8 engine heap memory limit of 1.4GB,
you can store 4GB, 8GB or more data therein, as long as sufficient physical memory.

### When use

* heap memory will not meet your demand
* the keys and values have consistent data type
* you know the max length of your key and value

### When NOT use

* performance sensitive
* can not determine the data type
* can not determine the max length of key or value
* you need remove/delete entries

------------------------

### node compatibility

it needs node version >= 4.0 to support some es6 features. (arrow function, let ... )

------------------------

### Usage

##### install :
```
npm install big-map
```
##### quick start :
```javascript
var BigMap = require('big-map');

var bigmap = new BigMap(16, 16);

bigmap.set('hello', 'world');
// -> true

bigmap.get('hello')
// -> 'world'
```

##### Heap Memory Usage

```javascript
var BigMap = require('big-map');
var bigmap = new BigMap(32, 32);
var v8 = require('v8');

console.log('before: ', v8.getHeapStatistics().used_heap_size);

for (var i = 0; i < 1024 * 128; i ++ ) {
    bigmap.set('it\'s a long string key ' + i, 'it\'s a long string value' + i);
}

console.log('after: ', v8.getHeapStatistics().used_heap_size);
```

On my Mac, before is 10018984 and after is 10731160. the heap memory almost not change.

```javascript
var obj = {};
var v8 = require('v8');

console.log('before: ', v8.getHeapStatistics().used_heap_size);

for (var i = 0; i < 1024 * 128; i ++ ) {
    obj['it\'s a long string key ' + i] = 'it\'s a long string value' + i;
}

console.log('after: ', v8.getHeapStatistics().used_heap_size);
```

As contrast, after the codes above, heap memory increase from 9400024 to 33636280, it grows 23MB.
it has 128K key/value pairs, 23MB / 128K = 184 Byte per key/value pair costs.

------------------------------

### new BigMap(key_length, value_length\[, options\])

construct a new BigMap

* `key_length` : required. specify the max key string length. recommend a multiple of 4.
* `value_length` : required. specify the max value string length. recommend a multiple of 4.
* `options` : optional.
    * `keyType` : only support string now.
    * `valueType` : support string and number. default is string. note: if value type set to number, the value_length will be override by 8 (DoubleFloat).
    * `loadFactor` : default is 0.75
    * `migrate` : whether rehash data from old buffer to new bigger buffer. default is false. (set it true will increase average performance but it's need time to migrate data)
    * `async_migrate` : if migrate, use async mode or sync mode. default is false. (set it true will lead to performance drop)

### set(key, value)

set key value pair to big map.

you should make sure the key and value has valid data type and length,
or else it will throw a error.

* `key` : your string key
* `value` : your value, default it needs string type. you can pass a number if you set valueType options to number.

`return` boolean, true if it success.

### get(key)

get a value by the key.

* `key` : your string key

`return` string or number, depends on the options. if not find the key, return undefined.

### properties

* `.id` : {string} BigMap id
* `.size` : {number} the number of the elements have been set.
* `.migrating` : {number} 0 if not in migrating status, or else, it has N MapBlocks in migrating status.

### TODO

* add more test case, make sure basic functionality
* key support number type
* add remove function
* change data structure, add a meta byte

[travis-image]: https://img.shields.io/travis/Chunlin-Li/BigMap.svg?style=flat
[travis-url]: https://travis-ci.org/Chunlin-Li/BigMap

repository: freeart/BigMap

repo_name: freeart/BigMap


text:
# Quick Sort

Quicksort is a very effective sorting algorithm because of its speed, in case the name wasn't a giveaway. And, although Quicksort is a divide and conquer algorithm, same as merge sort, it is often preferred due to its many interations and low complexity.

Unlike other sorting algorithms, there are many different ways to implement quicksort, each with their own performance characteristics and stability concerns.

The basic idea is to find a “pivot” item in the array to compare all other items against. Items larger than the pivot go to the right; items less than the pivot go to the left. There are two basic operations in the algorithm, swapping items in place and partitioning a section of the array.

## Psuedocode

```
  ALGORITHM QuickSort(arr, left, right)
    if left < right
        // Partition the array by setting the position of the pivot value
        DEFINE position <-- Partition(arr, left, right)
        // Sort the left
        QuickSort(arr, left, position - 1)
        // Sort the right
        QuickSort(arr, position + 1, right)

  ALGORITHM Partition(arr, left, right)
      // set a pivot value as a point of reference
      DEFINE pivot <-- arr[right]
      // create a variable to track the largest index of numbers lower than the defined pivot
      DEFINE low <-- left - 1
      for i <- left to right do
          if arr[i] <= pivot
              low++
              Swap(arr, i, low)

      // place the value of the pivot location in the middle.
      // all numbers smaller than the pivot are on the left, larger on the right.
      Swap(arr, right, low + 1)
      // return the pivot index point
      return low + 1

  ALGORITHM Swap(arr, i, low)
      DEFINE temp;
      temp <-- arr[i]
      arr[i] <-- arr[low]
      arr[low] <-- temp

```

## Visual
![](./assets/quickSort.jpg)

## Trace
**The basic steps to partition an array are:**
- Find a “pivot” item in the array. This item is the basis for comparison for a single round.
- Start a pointer (the left pointer) at the left of the pivot.
- Start a pointer (the right pointer) at the right of the pivot.
- While the value at the left pointer in the array is less than the pivot value, move the left pointer to the right (add 1). Continue until the value at the left pointer is greater than or equal to the pivot value.
- While the value at the right pointer in the array is greater than the pivot value, move the right pointer to the left (subtract 1). Continue until the value at the right pointer is less than or equal to the pivot value.
- If the left pointer is less than or equal to the right pointer, then swap the values at these locations in the array.
- Move the left pointer to the right by one and the right pointer to the left by one.
- If the left pointer and right pointer don’t meet, go to step 1.

## Submission Links
[Code](./quickSort.js)

[Travis-CI](https://www.travis-ci.com/LindsayPeltier-401-advanced-javascript/data-structures-and-algorithms-401/builds/149855465)

[PR](https://github.com/LindsayPeltier-401-advanced-javascript/data-structures-and-algorithms-401/pull/30)


text:
# README Generator

## Description
This project was designed with node.js to creat a README file for your repository. When run in the terminal, the user will be provided with questions to answer for sections of a README. Once complete, a new README file will be created.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contribute](#contribute)
- [Tests](#tests)

## Installation
None

## Usage
Run the index.js file using node in the terminal. Answer the questions and then push the README. It will be updated in your repo.
Walkthrough Video: https://drive.google.com/file/d/1zYfnEnHFX-f1-qfsYfS-Ne3yolDLZtLw/view

## Licenses
MIT License

## Contribute
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)

## Tests
No tests were created or run

## Questions
Here's my GitHub profile: https://github.com/mkhatling
If you have questions about this project, please email me at<EMAIL_ADDRESS>
Thanks for checking out my project!

repository: mkhatling/readme-generator

repo_name: mkhatling/readme-generator


text:
# Nova Azure Functions
Web API framework for Azure Functions written in TypeScript.

## Install

```sh
$ npm install --save @nova/azure-functions
```

## Examples

index.js
```JavaScript
const nova = require('@nova/azure-functions');
const controller = new nova.HttpController();

controller.set('/', {
    get: {
        action: async function (inputs) {
            this.log.info('Some debug message');
            return {
                message: `Hello ${inputs.name}!`
            };
        }
    },
    post: {
        action: async function (inputs) {
            this.log.info('Some other debug message');
            const userId = inputs.userId;
            // make some updates here
        }
    }
});

module.exports = controller;
```

function.json
```JSON
{
  "disabled": false,
  "entryPoint": "handler",
  "bindings": [
    {
      "authLevel": "anonymous",
      "type": "httpTrigger",
      "direction": "in",
      "name": "request",
      "route": "{*route}"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "$return"
    }
  ]
}

```

## License
Copyright (c) 2019 Credo360, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
# scrapy-proxyland-middleware
[![scrapy-proxyland-middleware on pypi](https://img.shields.io/pypi/v/scrapy-proxyland-middleware?color=blue)](https://pypi.org/project/scrapy-proxyland-middleware/)
This middleware lets you use [Proxyland](https://proxyland.io) for every request you process with Scrapy.

## Settings
You need to specify your package credentials for Proxyland in your settings.py or settings object for this middleware to take effect.

```python
PROXYLAND = {
    'username': 'package_username',
    'password': 'package_password'
}
```

You need to also enable ScrapyProxylandMiddleware as well as Scrapy's HttpProxyMiddleware.

```python
DOWNLOADER_MIDDLEWARES = {
    'scrapy_proxyland_middleware.ScrapyProxylandMiddleware': 350,
    'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 400,
}
```

repository: patkle/scrapy-proxyland-middleware

repo_name: patkle/scrapy-proxyland-middleware


text:
# MQTT-SN Gateway: DTLS

This module is part of [mqttsngw](https://github.com/jue89/node-mqttsngw). It is responsible for handling incoming DTLS connections from the sensor network and parsing and generating MQTT-SN packets.

All packet conversions are handled by [mqttsn-packet](https://github.com/ithinuel/mqttsn-packet).

## Factory

```js
const DTLS = require('mqttsngw-dtls');
mqttsngw.attach(DTLS(opts));
```

Creates a new DTLS factory and attaches it to an existing instance of *mqttsngw*. ```opts``` has the following fields:
 * ```log```: Optional. An object containing logging callbacks for all log levels (```error```, ```warn```, ```info```, ```debug```). Every callback is called with a human-readable message as the first argument followed by an object containing more information regarding the event: ```{ error: (msg, info) => { ... }, ...}```.
 * ```guard```: Optional. Callback function that is called for every parsed ingress packet: ```(peer, certInfo, packet) => { ... }```. Returns ```true``` if the packet shall pass and ```false``` if it shall not pass. Arguments for decision-making:
   * ```peer```: Object containing ```address``` and ```port``` of the sensor.
   * ```certInfo```: Objection containing further details of the client certificate if presented.
   * ```packet```: Packet parsed by [mqttsn-packet](https://github.com/ithinuel/mqttsn-packet).
 * ```bind```: ```options``` of the [Node.js Dgram bind method](https://nodejs.org/api/dgram.html#dgram_socket_bind_options_callback)
 * *All other options accepted by the createServer method of [openssl-dtls](https://github.com/jue89/node-openssl-dtls)*

## Events

All in all just two events are consumed and emitted by the *DTLS* module on the event bus.

### Consumed

| Event                          | Description |
| ------------------------------ | ----------- |
| snUnicastOutgress,\*,\*          | A packet shall be sent to a sensor |

### Emitted

| Event                          | Description |
| ------------------------------ | ----------- |
| snUnicastIngress,\*,\*           | A packet has been received from a sensor |


text:
# CHANGELOG

All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

> ### 2020-6-1

#### Changed

- OpenCore to 0.5.9
- Upgraded various Acidanthera kexts.
- Recompiled various SSDT with new iasl libraries.
- Replaced `SSDT-EXT3` with `SSDT-LED`
- Change SSDT OEM ID to `tyler` to somewhat track distributions and usage across various projects

> ### 2020-5-27

#### Changed

- Keyboard backlight is now supported by [ThinkpadAssistant 1.7](https://github.com/MSzturc/ThinkpadAssistant), thank so much [@MSzturc](https://github.com/MSzturc)
- SSDT-keyboard to support ThinkpadAssistant 1.7.0
- Honestly, what's even left to improve on the keyboard? Open an issue.

> ### 2020-5-24

#### Added
- Setting instructions better sleep in 5_README-other.md

#### Changed

- Bluetooth Toggle is now supported by [ThinkpadAssistant 1.6](https://github.com/MSzturc/ThinkpadAssistant), thank so much [@MSzturc](https://github.com/MSzturc)
- SSDT-keyboard to support ThinkpadAssistant 1.6.0

#### Removed
- BetterTouchTool is no longer needed for Fn key functions and has been removed.
- `SMCLightSensor.kext` has been removed as the x1c6 has no ambient light sensor.

> ### 2020-5-22

- Further SSDT-Keyboard tweaks:
    - Windows (mismapped to Left Alt by default) is now properly mapped to Left GUI
    - Left Alt (mismapped to Left GUI by default) is now properly mapped to Left Alt
    - Right Alt (mismapped to Right GUI by default) is now properly mapped to Right Alt
- This means that Karabiner-Elements is no longer a necessary for this project. Once less program! unless you need it for other purposes (like a hyper key).
- *Similarly, once Bluetooth toggle is implemented in ThinkpadAssistant, BetterTouchTool can also go away.

> ### 2020-5-21

#### Changed

Keyboard Perfection is almost here!
- Modified SSDT-Keyboard patch to be compatible with [ThinkpadAssistant](https://github.com/MSzturc/ThinkpadAssistant).
    - Mute/unMute Microphone with F4, with LED!
    - Disable WiFi with F8
    - Mirror with F7
    - Bluetooth, F10 still has to be handled by BetterTouchTool, but hopefully supported will be added soon. See my [request](https://github.com/MSzturc/ThinkpadAssistant/issues/9)

> ### 2020-5-9

#### Changed

- Upgraded OpenCore to 0.5.8
- Upgraded various acidanthera kexts.
- Fixed various dortania broken guide links.
- Removed `TbtForcePower.efi` from LiveUSB OpenCore `config.plist`
- Added PM981 install suggestions per [Issue #43](https://github.com/tylernguyen/x1c6-hackintosh/issues/43)
- Changed ScanPolicy of `install_USB` to 0.

> ### 2020-4-6 (#2)

#### Added

- Added OpenCanopy to EFI for Picker GUI support.
- NVMeFix kext to EFI-installUSB for PM981 support.

#### Changed
- Upgraded OpenCore to 0.5.7
- Upgraded various kexts.

> ### 2020-4-6 (#1)

#### Added

- SSDT-EXT1-FixShutdown to fix the rare issue that sometimes a shutdown would result in a restart instead.
- SSDT-HPET to patch out legacy IRQ conflicts.

#### Changed
- Better notes and documentation with `config.plist`
- Modularized each needed OpenCore config patches.

> ### 2020-4-1

#### Added

- ALCPlugFix to automatically change output to headphones after being plugged in, and to change it back to speakers after being unplugged.
- ALCPlugFix to fix the rare condition that audio is messed up after waking from sleep.

#### Changed

- More documentation about recommended macOS settings.

> ### 2020-3-31

#### Added

- Further documentation regarding specific tweaks and recommmended macOS settings.
- ADB and PS2 code reference sheet.

#### Changed

- All Fn keys now have have an assigned key, remap as needed.
- Keyboard map is now in markdown.

> ### 2020-3-30

#### Added

- OpenCore configuration folder intended for install media usage.
- Configuration, patches and documentation for alternative network cards, specifically the DW1560 and DW1820A.

#### Changed

- Moved `assets` folder into `docs/`.

#### Deprecated

- All things Clover. OpenCore is now my only friend.

#### Removed

- Removed EC related patches from `config.plist` as they are unnecessary.

> ### 2020-3-29

#### Added

- SSDT-ALS0 hotpatch for faking ambient light sensor ALS0 per Catalina's brightness preservation.
- SSDT-GPRW hotpatching for fixing instant wake (0D/6D patch).

#### Changed

- SSDT-Keyboard with the exception of F7 and F12, now maps all hotkeys to a Fn value that can be remapped within macOS. In addition, PrtSc is now remapped to F13.
- SSDT-PLNF to a cleaner version.
- Similarly, battery patch has been simplified.

#### Removed

- Some unused patches within OpenCore config.plist has now been removed.

> ### 2020-3-26

#### Changed

- Switched to AppleALC layout 21.

> ### 2020-3-23

#### Changed

- Upgraded OpenCore to 0.5.6

> ### 2020-2-04

#### Changed

- Upgraded OpenCore to 0.5.5
- Upgraded kexts.

> ### 2020-1-18

#### Changed

- Upgraded OpenCore to 0.5.4
- Upgraded kexts.

> ### 2019-12-22

#### Added

- Project website: https://tylernguyen.github.io/x1c6-hackintosh/
- ACPI dump for `BIOS-v1.43`.
- CHANGELOG.md to keep track of the project's developments.
- OpenCore bootloader, version `0.5.3`.
- Better SSDT patching with hotpatches under `patches`. Making sure to read `patches/README`.

#### Changed

- Switched completely to hotpatching through OpenCore. Credits to [daliansky](https://github.com/daliansky) and [jsassu20](https://github.com/jsassu20).
- Updated main README, made it look more visually appealing and organized.

#### Deprecated

- Clover bootloader. Clover r5100 is the last version I used on this machine. Moving forward, OpenCore is my preferred bootloader. See `EFI-Clover/README.md`.
- Reorganized folder/project structure. Setup instructions and references now under `docs`.

#### Removed

- Old static patches.
- Old IORegistryExplorer dump.


text:
+++
title = "Workshop Prerequisites"
chapter = true
weight = 1
+++

# Prerequisites

Please note that in order to complete this workshop, you should have completed [Prerequisites for all GitOps Workshops](/20_weaveworks_prerequisites.html). Once you have completed the Introduction to GitOps Workshop, please return to perform this workshop.

{{% notice warning %}}
If you are using your own AWS account, you will need permissions to create EKS clusters plus admin rights within your EKS cluster to configure configuration rules and install agents. Ensure you have authority within your organization to do this in your tenant.
{{% /notice %}}

## Add the EKS security group to your Cloud9 Instance

As part of your Event Engine setup you have access to a pre-created EKS cluster, in order to access that cluster you will need to attach the security group in use by the EKS cluster to your Cloud9 Environment.

Go to your EC2 Instances and select the instance with a name starting with `aws-cloud9`, Click on `Actions`, `Security` and select `Change Security Groups`.

![Modify Security Groups](/images/module_8-modify-security-groups.png)

Now click on the `Select security groups` field, you will see a list of all available security groups, look for the one that starts with `eks-cluster-sg-basic-eks`, select it and click on `Add security group`, you should now see two security groups in the list below. Now, hit `Save`

![Add EKS Security Group](/images/module_8-add-security-groups.png)


text:
# withFile vs. openFile

## Question

This program produces the output I expect when given an input file of text delimited by \\n:

    import System.IO

    main :: IO ()
    main = do h <- openFile "test.txt" ReadMode
              xs <- getlines h
              sequence_ $ map putStrLn xs

    getlines :: Handle -> IO [String]
    getlines h = hGetContents h >>= return . lines

By substituting withFile for openFile and rearranging slightly

    import System.IO

    main :: IO ()
    main = do xs <- withFile "test.txt" ReadMode getlines
              sequence_ $ map putStrLn xs

    getlines :: Handle -> IO [String]
    getlines h = hGetContents h >>= return . lines

I manage to get no output at all. I'm stumped.

Edit: Not stumped anymore: thanks to one and all for the thoughtful and thought-provoking answers. I did a little more reading in the documentation and learned that **withFile** can be understood as a partial application of **bracket**.

This is what I ended up with:

    import System.IO

    main :: IO ()
    main = withFile "test.txt" ReadMode $ \h -> getlines h >>= mapM_ putStrLn

    getlines :: Handle -> IO [String]
    getlines h = lines `fmap` hGetContents h

## Answer

The file is being closed too early. From the [documentation](http://hackage.haskell.org/packages/archive/base/latest/doc/html/System-IO.html#v:withFile):

> The handle will be **closed on exit from withFile**

This means the file will be closed as soon as the `withFile` function returns.

Because `hGetContents` and friends are lazy, it won't try to read the file until it is forced with `putStrLn`, but by then, `withFile` would have closed the file already.

To solve the problem, pass the whole thing to `withFile`:

    main = withFile "test.txt" ReadMode $ \handle -> do
               xs <- getlines handle
               sequence_ $ map putStrLn xs

This works because by the time `withFile` gets around to closing the file, you would have already printed it.

repository: stackflow-io/stackflow

repo_name: stackflow-io/stackflow