text:
# ✨ giget

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions][github-actions-src]][github-actions-href]
[![Codecov][codecov-src]][codecov-href]

> Download templates and git repositories with pleasure!

## Features

✔ Support popular git providers (GitHub, GitLab, Bitbucket, Sourcehut) out of the box.

✔ Built-in and custom [template registry](#template-registry).

✔ Fast cloning using tarball gzip without depending on local `git` and `tar`.

✔ Works online and offline with disk cache support.

✔ Custom template provider support with programmatic usage.

✔ Support extracting with a subdir.

✔ Authorization support to download private templates

## Usage (CLI)

```bash
npx giget@latest <template> [<dir>] [...options]
```

### Arguments

- **template**: Template name or a a URI describing provider, repository, subdir, and branch/ref. (See [Examples](#examples))
- **dir**: A relative or absolute path where to extract the template.

### Options

- `--force`: Clone to exsiting directory even if exists.
- `--offline`: Do not attempt to download and use cached version.
- `--prefer-offline`: Use cache if exists otherwise try to download.
- `--force-clean`: ⚠ Remove any existing directory or file recusively before cloning.
- `--shell`: ⚠ Open a new shell with current working directory in cloned dir. (Experimental).
- `--registry`: URL to a custom registry. (Can be overriden with `GIGET_REGISTRY` environment variable).
- `--no-registry`: Disable registry lookup and functionality.
- `--verbose`: Show verbose debugging info.
- `--cwd`: Set current working directory to resolve dirs relative to it.
- `--auth`: Custom Authorization token to use for downloading template. (Can be overriden with `GIGET_AUTH` environment variable).

### Examples

```sh
# Clone nuxt starter from giget template registry
npx giget@latest nuxt

# Clone the main branch of github.com/unjs/template to unjs-template directory
npx giget@latest gh:unjs/template

# Clone to myProject directory
npx giget@latest gh:unjs/template myProject

# Clone dev branch
npx giget@latest gh:unjs/template#dev

# Clone /test directory from main branch
npx giget@latest gh:unjs/template/test

# Clone from gitlab
npx giget@latest gitlab:unjs/template

# Clone from bitbucket
npx giget@latest bitbucket:unjs/template

# Clone from sourcehut
npx giget@latest sourcehut:pi0/unjs-template
```

## Template Registry

Giget has a built-in HTTP registry system for resolving templates. This way you can support template name shortcuts and meta-data. Default registry is served from [unjs/giget/templates](./templates/).

If you want to add your template to the built-in registry, just drop a PR to add it to the [./templates](./templates) directory. Slugs are added on first-come first-served basis but this might change in the future.

### Custom Registry

A custom registry should provide an endpoint with dynamic path `/:template.json` that returns a JSON response with keys same as [custom providers](#custom-providers).

- `name`: (required) Name of the template.
- `tar` (required) Link to the tar download link.
- `defaultDir`: (optional) Default cloning directory.
- `url`: (optional) Webpage of the template.
- `subdir`: (optional) Directory inside the tar file.
- `headers`: (optional) Custom headers to send while downloading template.

Because of the simplicity, you can even use a github repository as template registry but also you can build something more powerful by bringing your own API.

## Usage (Programmatic)

Install package:

```sh
# npm
npm install giget

# yarn
yarn install giget

# pnpm
pnpm install giget
```

Import:

```js
// ESM
import { downloadTemplate } from 'giget'

// CommonJS
const { downloadTemplate } = require('giget')
```

### `downloadTemplate(source, options?)`

**Example:**

```js
const { source, dir } = await downloadTemplate('github:unjs/template')
```

**Options:**

- `source`: (string) Input source in format of `[provider]:repo[/subpath][#ref]`.
- `dir`: (string) Destination directory to clone to. If not provided, `user-name` will be used relative to the current directory.
- `options`: (object) Options are usually inferred from the input string. You can customize them.
  - `provider`: (string) Either `github`, `gitlab`, `bitbucket` or `sourcehut`. The default is `github`.
  - `repo`: (string) Name of repository in format of `{username}/{reponame}`.
  - `ref`: (string) Git ref (branch or commit or tag). The default value is `main`.
  - `subdir`: (string) Directory of the repo to clone from. The default value is none.
  - `force`: (boolean) Extract to the exisiting dir even if already exsists.
  - `forceClean`: (boolean) ⚠ Clean ups any existing directory or file before cloning.
  - `offline`: (boolean) Do not attempt to download and use cached version.
  - `preferOffline`: (boolean) Use cache if exists otherwise try to download.
  - `providers`: (object) A map from provider name to custom providers. Can be used to override built-ins too.
  - `registry`: (string or false) Set to `false` to disable registry. Set to a URL string (without trailing slash) for custom registry. (Can be overriden with `GIGET_REGISTRY` environment variable).
  - `cwd`: (string) Current working directory to resolve dirs relative to it.
  - `auth`: (string) Custom Authorization token to use for downloading template. (Can be overriden with `GIGET_AUTH` environment variable).

**Return value:**

The return value is a promise that resolves to the resolved template.

- `dir`: (string) Path to extracted dir.
- `source`: (string) Normalized version of the input source without provider.
- [other provider template keys]
  - `url`: (string) URL of repostiroy that can be opened in browser. Useful for logging.

## Custom Providers

Using programmatic method, you can make your own custom template providers.

```ts
import type { TemplateProvider } from 'giget'

const rainbow: TemplateProvider = async (input, { auth }) => {
  return {
    name: 'rainbow',
    version: input,
    headers: { Authorization: auth },
    url: `https://rainbow.template/?variant=${input}`,
    tar: `https://rainbow.template/dl/rainbow.${input}.tar.gz`
  }
}

const { source, dir } = await downloadRepo('rainbow:one', { providers: { rainbow } })
```

### Custom Registry Providers

You can define additional [custom registry](#custom-registry) providers using `registryProvider` utility and register to `providers`.

```ts
import { registryProvider } from 'giget'

const themes = registryProvider('https://raw.githubusercontent.com/unjs/giget/main/templates')

const { source, dir } = await downloadRepo('themes:test', { providers: { themes } })
```

## Related projects

Giget wouldn't be possible without inspering from former projects. In comparation giget does not depend on any local command which increases stability and performance, supports custom template providers, auth and many more features out of the box.

- https://github.com/samsonjs/gitter
- https://github.com/tiged/tiged
- https://github.com/Rich-Harris/degit

## 💻 Development

- Clone this repository
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js < 16.10)
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`

## License

Made with 💛

Published under [MIT License](./LICENSE).

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/giget?style=flat-square
[npm-version-href]: https://npmjs.com/package/giget
[npm-downloads-src]: https://img.shields.io/npm/dm/giget?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/giget
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/giget/ci/main?style=flat-square
[github-actions-href]: https://github.com/unjs/giget/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/giget/main?style=flat-square
[codecov-href]: https://codecov.io/gh/unjs/giget

repository: ampm-jbnu/ampm-site

repo_name: ampm-jbnu/ampm-site


text:
# `joinByOneReverse`

A `joinByOneReverse` field allows us to access the other side of a [joinByOne](/reference/field-types/joinbyone.md) relationship. Since this is the "other end" of the relationship, there is no editing interface. It is just a convenience allowing us to "see" the related object from the other point of view.

::: tip
For backwards compatibility, you can set the `idField` option instead to match that in the other join, but this is confusing and hard to maintain. Just use `reverseOf`.
:::

## Example

```javascript
// Part of our schema for fabrics (see the joinByOne example)
{
  // No editing interface is currently offered, edit it from the other end
  //
  // Name is plural because more than one product might be joining to
  // each fabric; that's why `_products` will be an array
  name: '_products',
  type: 'joinByOneReverse',
  // Optional since our join name matches the other type's name
  withType: 'product',
  // Optional since there is only one join to fabrics in the other type
  reverseOf: '_fabric',
}
```

We can now see `_product` as a property of each `fabric` object that is related to a product.

## Settings

|  Property | Type   | Default | Description |
|---|---|---|---|
|name | `string` | | Sets the name of the field in the database |
|type | `string` | | Specifies the field type |
|withType | `string` | | The name of the related type, if it differs from the name of the join. If you do not set `withType`, then the name of the join must match the name of the related type, with a leading `_` added.  || reverseOf | `string` | | Set to the name of the join you are reversing (optional) |
|ifOnlyOne | `boolean` | false | If true, it will only carry out the join if the query that returned the original document returned only one document. This is useful if the joined information is only to be displayed on the `show.html` page of a piece, for instance, and you don't want the performance impact of loading it on the `index.html` page. |

::: tip
In documents with many joins in play, the `ifOnlyOne` option will avoid running through all the possible joins, and can be used to avoid a heavy performance impact in complex documents.
:::

license: MIT

repository: apostrophecms/apostrophe-documentation

branch_name: refs/heads/main

extension: md

gha_language: Shell

gha_license_id: MIT

license_type: permissive

repo_name: apostrophecms/apostrophe-documentation


text:
# AirTable Based Link Shortener

This is an archived repository. For an actively maintained copy of this repository, please visit [@hackclub/hack.af](https://github.com/hackclub/hack.af). It uses a similar codebase, but it has been rewritten by @zanedb to run serverlessly on Vercel.

## Setup

* Please make a copy of the template AirTable Base: [https://go.mingjie.info/template](https://go.mingjie.info/template)
* Please also grab the AirTable API Key & Base Key from the API documentations. Head [here](https://airtable.com/api) and click on the base you just created to get started.
* Set `AIRTABLE_BASE` to your Base Key, and `AIRTABLE_KEY` to your API Key.
* Set `APP_USER` to your desired username.
* Set `APP_SECRET` to a passphrase or key that only you know.
* Set `LOGGING` to `on` if you want to enable logging, `off` if otherwise.
* Set `ROOT_REDIRECT` to the URL you want people to be redirected to when they visit the landing page.

## Using

All links will be routed through a 302 (Temporary Redirect) because you're using AirTable. Simply visit `example.com/slug` to get redirected.

Navigate to `/admin` for a GUI to add new links.

## Using the API

You can make changes the database easily with the API.

### `/api/trace`
Find where a slug points to without getting redirected.

#### Parameters
* `slug` (required) - the slug you're looking up.

#### Result
* `dest` - the destination URL.
* `error` - the error message, if exists.
* `status` - status code of the request

### `/api/push`
Make changes to a specific record.

#### Parameters
* `auth` (required) - the `APP_SECRET` environment variable, used for authentication.
* `dest` (optional) - the destination URL you're pointing to. Must exist if `slug` does not exist.
* `slug` (optional) - the slug you're making changes to. If it does not exist, a random slug will be generated. Must exist if `dest` does not exist.

#### Result
* `error` - the error message, if exists.
* `slug` - the slug of the short link, if generated
* `status` - status code of the request

## License

ABLS is released under [the MIT license](LICENSE).

repository: itsmingjie/abls

branch_name: refs/heads/master

gha_language: JavaScript

repo_name: itsmingjie/abls


text:
# cryptserver: SHA512, base64-encoded encryption server

Server listening for POST requests containing a `password` parameter, returns SHA512 hash of password in base64 to `/` path. Server gracefully handles shutdown requests both from SIGINT signals and POST requests to `/shutdown` with authorized passwords.

## Installation

- Install [Go v1.8](https://golang.org/doc/install)
- `go get -u github.com/asgaines/cryptserver/...`

## Usage

### Starting Server

- `cryptserver`
- `cryptserver 2> /path/to/logfile`

#### Optional Parameters

- `-port`, or `--port` defines on which port server should listen (default: `8080`)
- `-delay`, or `--delay` defines how much time to wait before responding to requests (default: `5s`)
 - Note: must include unit (e.g. `3s`, `500ms`)

### Issuing Requests

#### Retrieving hashes of passwords
- `curl --data "password=<your-password>" http://localhost:<your-port>`

##### Example
Start server:

`cryptserver`

Issue POST request:

`curl --data "password=superSecretPassword1234" http://localhost:8080`

After default response time wait, receive:

`+PNX5nhK38mR3VJEWOMBweFrgocThl86dbM423y0DOtIsa3xBrUObVwsBnArhv5gFy69uvImsWK74QQogGHeUQ==`

#### Graceful shutdown of server

##### POST Request
- `curl --data "password=<valid-password>" http://localhost:<your-port>/shutdown`
- Passwords are validated by including a SHA512 hash of them in base 64 in [shadow file](etc/shadow)
 - For quick testing, `angryMonkey` is configured to work, out of the box. For security purposes, remove this line from the [shadow file](etc/shadow) and replace with new hashes when done testing
 - Create new valid password: `curl --data "password=<new-valid-password>" http://localhost:<your-port>/ >> ./etc/shadow`
- Invalid passwords return error

##### SIGINT (^C)
- `cryptserver` catches and handles <Ctrl-C> (nterrupt signal), gracefully shutting down server

## Testing

`go test ./...`

repository: asgaines/cryptserver

repo_name: asgaines/cryptserver


text:
# Command Pattern

Allows decouple a sender from a receiver. The sender will talk to the receive through a command. Commands can be undone and persisted.

![Command](../../../UML/Behavioral/Command.PNG)


text:
# MSC3077: Support for multi-stream VoIP

This MSC proposes a method for differentiating WebRTC streams from each other.

[MSC2746](https://github.com/matrix-org/matrix-doc/pull/2746) has improved VoIP
immeasurably. Yet, there is still no clear way to handle things such as
screen-sharing.

Simple VoIP calls only ever feature one stream, though often clients will want
to send multiple - usermedia, screensharing and possibly more. In a situation
with more streams, it can be very helpful to provide the other side with
metadata about the content of the streams.

## Proposal

This MSC proposes adding an `sdp_stream_metadata` field to the events containing
a session description i.e.:

+ [`m.call.invite`](https://spec.matrix.org/v1.7/client-server-api/#mcallinvite)
+ [`m.call.answer`](https://spec.matrix.org/v1.7/client-server-api/#mcallanswer)
+ [`m.call.negotiate`](https://spec.matrix.org/v1.7/client-server-api/#mcallnegotiate)

The `sdp_stream_metadata` field is an object in which each key is one stream
`id` in the session description. The values are objects with the
following fields:

+ `purpose` - a string indicating the purpose of the stream. For compatibility
  between client the following values are defined:
  + `m.usermedia` - stream that contains the webcam and/or microphone tracks
  + `m.screenshare` - stream with the screen-sharing tracks

### Example

```JSON
{
    "type": "m.call.invite",
    "room_id": "!roomId",
    "content": {
        "call_id": "1414213562373095",
        "invitee": "@bob:matrix.org",
        "party_id": "1732050807568877",
        "lifetime": "60000",
        "capabilities": {
            "m.call.transferee": true,
        },
        "offer": {
            "sdp": "...",
            "type": "offer",
        },
        "sdp_stream_metadata": {
            "271828182845": {
                "purpose": "m.screenshare",
            },
            "314159265358": {
                "purpose": "m.usermedia",
            },
        },
        "version": "1",
    },
}
```

### Edge cases

+ If an incoming stream is not described in `sdp_stream_metadata` and
  `sdp_stream_metadata` is present, the stream should be ignored.
+ If a stream has a `purpose` of an unknown type (i.e. not `m.usermedia` or
  `m.screenshare`), it should be ignored.

### Backwards compatibility

During the initial invite and answer exchange clients find out if the field
`sdp_stream_metadata` is missing. If it is not present in the event sent by the
opponent, the client should ignore any new incoming streams (i.e. it should use
the first one) and it shouldn't send more than one stream (i.e. clients cannot send a video feed and a screenshare at the same time, as is the case in current clients).

## Alternatives

Setting the stream `id`s to custom values had been considered. Though this is
possible on some platforms, it is not in browsers. That is because the `id`
property of `MediaStream` is _read-only_ as the [MDN Documentation
states](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/id).
Similar is true for SDP attributes.

This proposal is also more practical for cases where more complex metadata is
needed. For conferencing, a `user_id` field could be added to
the objects in `sdp_stream_metadata`; for differentiating between the front and rear camera of a
phone, a `camera_type` field could be added.

Previously, it has been thought that the `purpose` field has to be unique (or
another unique field has to be added), though this could only ever be important
if we wanted to replace a stream with another one in-place. It was deemed as a
rather uncommon thing for which there doesn't seem to be any use-case, so
uniqueness is not required.

## Unstable prefix

During development, the following fields should be used:

|Release                     |Development                                    |
|----------------------------|-----------------------------------------------|
|`sdp_stream_metadata`       |`org.matrix.msc3077.sdp_stream_metadata`       |
|`m.call.sdp_stream_metadata`|`org.matrix.msc3077.call.sdp_stream_metadata`  |

## Potential issues

None that I can think of.

## Security considerations

None that I can think of.

repository: matrix-org/matrix-spec-proposals

repo_name: matrix-org/matrix-spec-proposals


text:
# Skipping Pauses

Often in application code you may pause for a fixed amount of time, maybe for UX reasons as part of a user flow, or maybe to take a moment between checks on the status of a long running operation.

These kinds of pauses make for dead air in your tests: wasted time when nothing meaningful is being accomplished, only serving to increase the overall runtime of your test suite.

## Skipping by Hand

Skipping a pause by hand is fairly straightforward:
 - wrap the pause in a milestone
 - activate that milestone for any tests that would hit the pause
 - advance to the pause at the point in your test where you'd hit it
 - call `return()` rather than `continue()` so that the pause is skipped

While this is conceptually straightforward to do, in practice it gets tedious very quickly, and it has the potential to be brittle as you refactor code or add other pauses in your code.

## Skipping Automatically

Fortunately, the milestones API offers the tools you need to abstract away the tedious parts of activating and skipping pause milestones.

First, create a symbol that all your pause milestones will share as a tag:

```ts
const Pause = Symbol('pause');
```

Then, write a function called `pause` (or whatever you like) that returns a milestone with that tag that will resolve after the given amount of time has passed:

```ts
export function pause(ms, milestoneId = Symbol()) {
  return milestone(
    milestoneId,
    () => new Promise(resolve => setTimeout(resolve, ms)),
    { tags: [Pause] }
  );
}
```

Finally, add a function you can call in your test suite that will cause all milestones with that tag to immediately return:

```ts
export function skipAllPauses() {
  let coordinator;

  beforeEach(() => {
    coordinator = activateMilestones([Pause], {
      onMilestoneReached: milestone => milestone.return()
    });
  });

  afterEach(() => {
    coordinator.deactivateAll();
  });
}
```

Now you can use `await pause(duration)` in your application code anywhere you need to idle for some amount of time, and call `skipAllPauses()` as part of your setup for tests where you don't want to wait.

Note also that `pause` allows you to provide an optional ID for the milestone so that you can skip all timeouts during a test by default, but still be able to reference that particular milestone and advance to it when necessary.

repository: salsify/milestones

gha_language: TypeScript

repo_name: salsify/milestones


text:
# ChangeLog #

## Build <IP_ADDRESS> (04-25-2020) ##

- Added additional subscribed content that will be disabled when the ContentDeliveryManager system application is removed.
- Added the disabling of the Get More out of Windows notification that displays during OOBE and during reboots for builds 18362+.
- Updated registry values applied to the image registry hives.
- Updated the Get-OfflineHives function.
- Updated the Windows Store bundle packages.

## Build <IP_ADDRESS> (04-15-2020) ##

- Added the Developer Mode package for Windows 10 build 19041.
- Originally multiple package summary logs would be created and overwritten. This has been fixed.
- Removed a registry setting that applied a telemetry registry value to the WOW6432Node offline hive causing some UAC functionality issues.
- Corrected a typo in the external help files.

## Build <IP_ADDRESS> (04-14-2020) ##

- Added support for Windows 10 build 19041 (20H1).
- Multiple Resource Functions and optimization processes have been updated to support build 19041.
- Added a new -Additional hashtable parameter named 'LayoutModification' and its corresponding folder to the 'Content\Additional' directory. Enabling the 'LayoutModification' hashtable value will apply a user-specific custom Start layout XML added to the 'Content\Additional\LayoutModification' folder to the image. Additionally, the optimization process that creates and applies a custom Start layout XML will be bypassed.
- The custom Start layout XML that Optimize-Offline creates and applies to the image has been updated to support build 19041. Also, the regular Control Panel pinned application has been replaced by the Master Control Panel (God Mode) application.
- The creation of the Package Summary Log now first checks for specific dynamic parameters before compiling the log file. This prevents an empty log file from being created and saved if no package integrations were processed.
- Created a Microsoft DaRT 10 integration WIM file for Windows 10 build 19041.
- Updated the Windows Store bundle packages.
- This list is not exhaustive of all changes made to Optimize-Offline or its Resource Functions, but outlines the major ones.
**NOTE: Because the Data Deduplication and Developer Mode packages are not yet available for Windows 10 19041, they cannot be integrated into build 19041. When these packages are available, they will be added to Optimize-Offline. Likewise, Windows 10 build 19041 is still an Insider Preview, so more optimizations will be added in future Optimize-Offline builds.**

## Build <IP_ADDRESS> (03-17-2020) ##

- Updated multiple Resource Functions.
- Updated the firewall registry settings that get applied when the Deduplication packages are integrated into the image.
- Removed unsupported language packages from the 'Packages' directory. These will be re-added if/when additional languages are supported by Optimize-Offline.
- Optimized and trimmed down multiple module processes.
- This list is not exhaustive of all changes made to Optimize-Offline or its Resource Functions, but outlines the major ones.

## Build <IP_ADDRESS> (02-17-2020) ##

- Combined and ordered the Optimize-Offline module's initializing and finalizing processes more optimally.
- The clean-up of Xbox integrated content has been modified to eliminate potential errors when trying to run paid apps or games downloaded from the Windows Store.
- Errors are now handled simultaneously when a log entry is written that contains an error record.
- The boot and recovery images will no longer be automatically mounted by default; rather, Optimize-Offline will now only mount them if any parameters for optimization requires their mounting (i.e. applying Microsoft DaRT 10 or integrating drivers to Windows Setup or Windows Recovery environments).
- Simplified multiple processes and Resource Functions to further improve the overall speed of image optimization.
- Updated localized data and external help.
- Updated the Windows Store bundle packages.

repository: WuhDaFak/Optimize-Offline

repo_name: WuhDaFak/Optimize-Offline


text:
---
layout: post
title: "Xcode 4 Code Completion for External Build Projects"
date: 2013-07-07 21:53
comments: true
categories: [ programming, c++ ]
---

In [Xcode and the Simple C++ Project Structure](https://hiltmon.com/blog/2013/07/05/xcode-and-the-simple-c-plus-plus-project-structure/), I showed how to set up Xcode as your IDE for the [Simple C++ Project Structure](https://hiltmon.com/blog/2013/07/03/a-simple-c-plus-plus-project-structure/).

But one thing does not work, Code Sense. Xcode does not provide code completion or jump to definition for these projects.

Wouldn't it be nice if we could enable this too.

The solution is simple, you need to use the Xcode build system to create the indices that the IDE uses. But since we are working on cross-platform Makefile systems, we do not want to switch compilers.

The answer is to create a new target that uses the Xcode build tools, and add all your source `*.cpp` files to it. Xcode will now index these files. And you can simply ignore the new target and continue to build against the old Makefile-based target.

{% img /images/document-target.jpg 700 256 %}

To add this *documentation* target, click on the project at the top, then click the **Add Target** button. In this case, I chose a command-line tool. I like to name the new target the same name as the external target with a `-doc` extension. Then save it.

{% img right /images/target-membership.jpg 185 68 %}

The next step is to make sure each `.cpp` file gets added to the `-doc` target. One way to do this is to select the file and check that `-doc` target in the file inspector.

Unfortunately, Xcode has polluted our simple C++ project and created a new `main.cpp`, a `<name>.1` file and folder for this new target. We neither want or need these.

In the new `-doc` target, remove the **Copy Files** step from the **Build Phases** tab by clicking the `X` at the top right of this step. This frees us up to remove these files from the new target (uncheck them in the File Inspector) and delete them (choose Move to Trash when asked).

Any time you add a new file to the main project, make sure you add it's source to the `-doc` target. But never use the `-doc` target to compile the project, it will not work. However, if you ever need to reindex the project for some reason, performing a Clean and a Build on the `-doc` target will recreate the index.

Now we have a cross-platform external build C++ project that also takes advantage of Xcode's autocomplete and jump to definition features.

*Follow the author as [@hiltmon](https://twitter.com/hiltmon) on Twitter and [@hiltmon](http://alpha.app.net/hiltmon) on App.Net. Mute `#xpost` on one.*

extension: markdown


text:
# Biodiversity Soup II paper

See Wiki page for required folder structure.

This folder contains all the files created after the BioSoupII pipeline has finished creating OTU tables and assigning taxonomies. If you want to run the pipeline from scratch, remove the following folders:

cd BiodiversitySoupII_repo/
rm -rf analysis/Filter_min1PCRs_min1copies/
rm -rf analysis/Filter_min2PCRs_min4copies/
rm -rf analysis/Filter_min3PCRs_min3copies/
rm -rf analysis/singlepools/
rm data/seqs/BegumFilters
rm data/seqs/mergedtrimmed_read_counts.txt
rm data/seqs/samplelist.txt
rm -rf data/seqs/fastp_outputs/
rm -rf data/seqs/folder{A,B,C,D,E,F,G,H}/Filter_min1PCRs_min1copies_{A,B,C,D,E,F,G,H}
rm -rf data/seqs/folder{A,B,C,D,E,F,G,H}/Filter_min2PCRs_min4copies_{A,B,C,D,E,F,G,H}
rm -rf data/seqs/folder{A,B,C,D,E,F,G,H}/Filter_min3PCRs_min3copies_{A,B,C,D,E,F,G,H}
rm -rf data/seqs/folder{A,B,C,D,E,F,G,H}/PCR_{A,B,C,D,E,F,G,H}_pool{1,2,3}.summaryCounts
rm -rf data/seqs/folder{A,B,C,D,E,F,G,H}/PCR_{A,B,C,D,E,F,G,H}_pool{1,2,3}.tagInfo
rm -rf data/seqs/folder{A,B,C,D,E,F,G,H}/pool{1,2,3}/*_350K_mergedtrimmed.fq.gz

**These are the scripts used in our Biodiversity Soup II manuscript.**

**1_SoupII_software_install_on_macos_20191010.sh**

This pipeline is tested for macOS and processes Illumina HiSeq/MiSeq files for metabarcoding. Software installation information is in this script.

**2_SoupII_fastp_to_Begum_Metabarcoding_pipeline.sh**

1. Create merged reads using fastp (Chen et al. 2018)

2. Demultiplex, Filter, and Cluster the merged reads using the Begum pipeline, which is a rewrite of the DAMe pipeline (Zepeda-Mendoza et al. 2016, BMC Research Notes) (http://github.com/shyamsg/Begum)
a)  sort.py to remove tags from merged reads and sum by tag pair to visualise tag jumping and PCR/sequencing success
b)  filter.py to keep only reads that exceed Minimum_PCR and Minimum_copy_number_per_PCR thresholds, defined by the user
c)  vsearch -uchime_denovo chimera removal
d)  vsearch clustering and OTU table creation
e)  vsearch --sintax taxonomic assignment on the MIDORI COI database
f)  Filter OTU tables and OTU representative sequences fasta by taxonomy (keeping Arthropoda ≥ 0.80 probability)

**3_SoupII_ecological_analysis.Rmd**

1. Community analysis
a) filter out artefactually small OTUs via phyloseq method (https://github.com/joey711/phyloseq)
b) NMDS ordination to view results
c) estimate proportion of OTUs that are missing (drop-outs) and are erroneous (false-positives, drop-ins) as a function of Begum filtering, PCR condition, and taxonomy
d) analyse whether OTU size contains abundance information

**4_SoupII_singlepools_OTU_table.Rmd**

1. Tag-bias analysis
a) Exploit the replicate PCRs using same and different tags and compare for differences in community composition

Note that the Begum method works by independently PCRing each sample 3 times.  Begum filters out erroneous reads by keeping only those that appear in ≥M PCRs (e.g. ≥2 of 3 total PCRs) with more than ≥N copies per PCR (e.g. ≥4 copies per PCR). Begum also works best if both the forward and reverse reads have been tagged using the same tag (what we call 'twin tags').


text:
# **React-Wikipedia**

A simple react app that make a search to wikipedia api once user starts typing.

You can view the deployed project here https://mayukhkchanda.github.io/wikipedia-react/

I primarily used React hooks for this webapp.

- ### Components:

  - App.js: Renders the component in the root element.
  - SearchBar.js: Handles the user input and makes an api request to the Wikipedia api( https://en.wikipedia.org/w/api.php) whenever input changes . Used `setTimeout()` of to throttle the number of request made.

- ### Notable Points:
  1. Wikipedia API returns a block of embedded html in it's snippet. Used DOMPurify(https://github.com/cure53/DOMPurify) to `sanitize()` the response. Used `dangerouslySetInnerHTML()` to set the inner html of the paragraph.
  2. As React gives a warning message when variables used inside the `useEffect()` are not listed in the dependency array, used two different states to handle debouncing(or throttling) of the request. There is a commented out code of in `SearchBar.js` that shows the same.
  3. `useEffect()` can only return a function which gets invoked before every render after the initial render. Used this to `clearTimeout()` if the input changes within 500ms. This is essentially what throttles the request. If there is a pause of 500ms after the last input change, only then a request gets invoked.

repository: mayukhkchanda/wikipedia-react

repo_name: mayukhkchanda/wikipedia-react


text:
# Test

Project description text text text text

## Badges

Code quality and validation

[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/jorguzman100/09_README_Generator.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/jorguzman100/09_README_Generator/context:javascript)
![shields.io](https://img.shields.io/github/languages/top/jorguzman100/09_README_Generator)
![shields.io](https://img.shields.io/w3c-validation/html?targetUrl=https%3A%2F%jorguzman100.github.io%2F09_README_Generator%2F)

Repository Status

![shields.io](https://img.shields.io/badge/Repo%20Status-In%20Progress-yellow)
![shields.io](https://img.shields.io/bitbucket/issues/jorguzman100/09_README_Generator)

License

![GitHub](https://img.shields.io/github/license/jorguzman100/09_README_Generator)

## Table of contents

- [Test](#test)
  - [Badges](#badges)
  - [Table of contents](#table-of-contents)
  - [The challenge](#the-challenge)
  - [The development process](#the-development-process)
  - [The Output](#the-output)
  - [Installation and Usage](#installation-and-usage)
  - [Credits, tools and other references](#credits-tools-and-other-references)
  - [Contributing](#contributing)
  - [Questions](#questions)

## The challenge

Challenge description ...

elements:

- [x] Element
- [x] Element
- [x] Element

## The development process

In order to accomplish the challenge, the following steps were taken:

1. Define the purpose, and concept of the application.
2. Define MVPs (Minimum Viable Products) and due dates.
3. Research assets.
4. Define and build the base layout and grid, considering two stages:
   - Mobile-first approach.
   - Responsive design for larger screen sizes.
5. Create functionality.
6. Apply semantic HTML.
7. Asses valid HTML with W3C validator.
8. Benchmark the site with WebsiteGrader.
9. Final review and proper documentation.

## The Output

With the described process we were able to create a useful, efficient and responsive application that ...

**User stories**

1. As a <role> I can <capability>, so that <receive benefit>
2. As a <role> I can <capability>, so that <receive benefit>

**The application**

[Video](https://drive.google.com/file/d/1D7U7N_xBCtMhR-bkJN58lKtO2QH4kNYL/view)
![screenshot1](./images/screenshot1.png)
![screenshot1](./images/screenshot2.png)
![screenshot1](./images/screenshot3.png)
![screenshot1](./images/screenshot4.png)

## Installation and Usage

The project was uploaded to [GitHub](https://github.com/) at the following repository:
[https://github.com/jorguzman100/09_README_Generator](https://github.com/jorguzman100/09_README_Generator)

You can access the deployed application with the GitHup Pages link:
[https://jorguzman100.github.io/09_README_Generator/](https://jorguzman100.github.io/09_README_Generator/)

To install the project follow these steps:

1. Step
2. Step

## Credits, tools and other references

**Third Party Assets**

Other asset

[npm](http://www.npm.com)

## Contributing

- Pull requests are welcome.
- For major changes, please open an issue first to discuss what you would like to change.
- Please make sure to update tests as appropriate.

## Questions

If you have questions or you want to share comments, we will be glad to hear from you. Please contact us at<EMAIL_ADDRESS>
![GitHubProfilePicture](https://avatars3.githubusercontent.com/u/61070430?s=400&u=2b857b54876d926e32fa510d9363e301820b0c03&v=4)


text:
Application that counts time spent on different projects.

Useful for remote work if you have to log time for specific projects and want to see how long you are working.

# Screenshots

![](Screenshots/2020_04_13-projects-list.png)

![](Screenshots/2020_04_13-time-log.png)

repository: cybekRT/MultiProjectDevelopment

repo_name: cybekRT/MultiProjectDevelopment


text:
## Quick readme for sim generation

Use ms_gen.py to create sims; adjust sim number using 'sims' variable.

The script currently generates 4 demographic scenarios (no change, increasing, decreasing, cyclic)
There are two possible shapes for cyclic--we may need to consider generating more sims for that class, but 32/4 was very convenient...Sims for that scenarios are currently randomly assigned to the up/down cyclic shape

The script directly calls ms, and outputs to cnn_batched

gha_language: Jupyter Notebook


text:
---
id: Toggle group
section: components
---

## Elements
Toggle items can consist of icons, text, or both. Styling of toggles is dependent on the background color.

## Usage
Toggle groups can be used when the user must select a single choice from a mutually exclusive set of options and can be used with or without icons.
Use cases also vary depending on variation.

## Variations

1. [Single select toggle group](#single-select-toggle-group): Use to toggle between multiple items
2. [Multi select toggle group](#multi-select-toggle-group): Use to select multiple attributes
3. [Toggle items](#toggle-items): Use to select a single action

### Single select toggle group
Use single select toggle groups when you want to toggle between multiple items. There are many use cases where this can apply, such as:
  - Selecting a single action within a group of actions (this can be useful for topology or similar canvas views)
  - Toggling between multiple views
  - Filtering by a specific value within a filter group

#### Examples
Single select toggle groups are commonly used to switch between views including:
  - a form view and a YAML view
  - a card view and a table view

1. **Zoom in**: By selecting this action, the view would zoom in by one increment.
2. **Fit to screen**: This action will fit the topology view to screen. After selection, the item will return to its default state, with a white background.

### Multi select toggle group
Use single multi select toggle groups when you want to select multiple attributes from a group. This is most commonly used for filtering a content view when there is a lot of space available.

#### Examples
Selecting an attribute will apply that filter to the table. In this case, only nodes that are “ready” are shown.

### Toggle items

Use toggle items when you want to select a single action from a group. We recommend using toggle items when you want to switch the user into a specific “mode”. They look and act similarly to [buttons](/components/button).

#### Examples
Toggle items are most commonly used in canvas views, such as topology. Selecting a toggle item will switch the user into that “mode” or allow them to take that action.

1. **Zoom in**: This item changes the cursor into a zoom icon and allows the user to zoom, as long as that toggle is selected.
2. **Zoom cursor**: The cursor changes into a zoom icon and the user may exit that mode by selecting the “move” hand toggle item.

repository: patternfly/patternfly-org

repo_name: patternfly/patternfly-org


text:
# SSH-AM
SSH ACCOUNT MANAGEMENT

ssh-am is a macOS Command Line Tools for managing server account information, built-in ssh and scp commands. And support for a variety of login methods of automated authorization (including the authorization method of google secondary authentication).

[English](README.md) | [中文](README-zh.md)

## Installation
```bash
brew install gengxiankun/tap/ssh-am
```
> Tab Completion: echo "source ssh-am completion" >> ~/.bash_profile

## Commands

       add        add an account

       modify     modify an account

       delete     delete an account

       list       view account list

       find       view account details

       ansible    export account data in ansible format

       completion automatically replenish account name

       --scp      the default operation is ssh, and --scp is specified for scp operation.

       -h|--help  view help

## Options

       -n  account alias

       -i  IP

       -u  username

       -p  login password / google secondary authentication key

       -P  the port number

       -t  the type of login authorization, the default is password. If you choose Google secondary authentication, you can specify it as 'ga'

       -k  specify the key mode authorization by -t 'key'. This parameter passes the key address.

## How to use

### Log in to the server named server_aaa using ssh
`ssh-am server_aaaa`

### Use the scp command to pull the demo file or directory on the servar_aaa server to the local
`ssh-am --scp server_aaaa:~/demo ./`

### Add a server named server_bbb
`ssh-am add -n server_bbb -uroot -i <IP_ADDRESS> -p123123 `

### Modify the password for server_bbb
`ssh-am modify server_bbb -pbbb123123`

### Delete the server account named server_bbb
`ssh-am delete server_bbb`

### View to add a list of servers
`ssh-am list`

### View the server details named server_aaa (note that it will display the password)
`ssh-am find server_aaa`

### Export account data in ansible format
`ssh-am ansible`

### Implement autofill server name
`echo "source ssh-am completion" >> ~/.bash_profile`

### Ssh-am help information
`ssh-am -h` or `ssh-am --help`

repository: gengxiankun/ssh-am

repo_name: gengxiankun/ssh-am


text:
# SpamAssassin with Japanese tokenizer patch

## Overview

A [SpamAssassin](https://spamassassin.apache.org/) docker image which has following futures.

* SpamAssassin patched by [Japanese tokenizer](https://github.com/heartbeatsjp/spamassassin_ja)
* [spamass-milter](http://savannah.nongnu.org/projects/spamass-milt/)
* [MeCab](https://taku910.github.io/mecab/) (Part-of-Speech and Morphological Analyzer)
* Auto configured sa-update
* Provides systemd unit file

## Setup

This image can be run as a standalone application, but it is more convenient to run it under systemd.

In this instruction, we will run spamassassin under systemd control, and link it with postfix.

### Setup as a systemd service

**1. Create the `spamd` group and user.**

```
# groupadd spamd
# useradd -g spamd -s /sbin/nologin -M spamd
```

**2. Create a directory for the spamass-milter's socket.**

```
# mkdir /var/run/spamd
```

**3. Install systemd related files.**

```
# cp systemd/spamassassin-ja.service /etc/systemd/system/
# cp systemd/spamassassin /etc/sysconfig/
```

**4. Start the `spamassassin-ja` service.**

```
# systemctl daemon-reload
# systemctl start spamassassin-ja.service
# systemctl enable spamassassin-ja.service
```

### Postfix setup

The spamassassin-ja provides the spamass-milter.

Spamass-milter opens a unix domain scoket as `/var/run/spamd/spamass-milter.sock`.

Postfix will access spamass-milter through this socket.

To allow postfix to use this socket, let postfix user belong to the `spamd` group.

```
# usermod -aG spamd postfix
```

Add following configuration to `/etc/postfix/main.cf`

```
#
# Milter settings
#
milter_default_action = accept
milter_mail_macros = {auth_authen} {auth_author} {auth_type}
smtpd_milters = unix:/var/run/spamd/spamass-milter.sock

non_smtpd_milters = $smtpd_milters

milter_protocol = 2
```

Restart postfix.

```
# systemctl restart postfix
```

## How to run as a standalone

Assume that the `spamd` user's uid and gid are 910

```
# id spamd
uid=910(spamd) gid=910(spamd) groups=910(spamd)
```

```
docker run --rm \
  -e HOST_SPAMD_UID=910 \
  -e HOST_SPAMD_GID=910 \
  -v /var/run/spamd:/var/run/spamd \
  -v spamassassin:/mnt/spamassassin:Z \
  --name spamassassin littlef/spamassassin-ja
```

Both `HOST_SPAMD_UID` and `HOST_SPAMD_UID` are used as a spamass-milter socket's owner.

## Supplemental information on operations

### Log

* When run as a systemd service, all logs are stored in `/var/log/maillog` throw syslog udp socket.
  * Logs will not be output to journald
  * rsyslog must be configured to receive logs via udp/514.

* When run as a standalone container, all logs will be output to `stdout`.

### Directory structure

All files that should be persisent are stored in Docker volume named `spamassassin`.

Typically, this volume will be located in `/var/lib/docker/volumes/spamassassin`.

## Control script

This image has a control scrpt which placed as `/ctl`.

Additional operations can be performed by using control scripts.

### SPAM check

You can manually check if a mail is spam or not.

```
docker exec -i spamassassin /ctl check-spamm < MAIL_FILE
```

When `--header` option is given, only header will be outputted.

```
docker exec -i spamassassin /ctl check-spamm --header < spamtest01.txt
```

### Learn SPAM or HAM

If you want to learn mails as SPAM, copy them to the `/spam` directory
in the container and then run the learn-spam subcommand.

In the following example, the emails in the `spam-learn` directory of the alice user will be learned as SPAM.

```
docker cp /home/alice/Maildir/.spam-learn/cur spamassassin:/spam/
docker exec -it spamassassin /ctl learn-spam
```

After learning, `/spam` directory contents will be deleted.

In the same way, you can also learn the mails as a HAM by copying it to the `/ham` directory in the container.

```
docker cp /home/alice/Maildir/.ham-learn/cur spamassassin:/ham/
docker exec -it spamassassin /ctl learn-ham
```

### Update rule automatically

Spamassassin rule is automatically updated every Sunday at 1:00 am.

### Execute shell

```
docker exec -it /ctl shell
```

repository: little-forest/spamassassin-ja

repo_name: little-forest/spamassassin-ja


text:
# Laravel Git Helper for Packages Development

A package for Laravel to perform basic git commands on locally integrated development packages.  If working within multiple local development packages or repositories at once this package is meant to ease the burden of navigating to each individual repository to perform basic git commands.

[![Latest Unstable Version](http://poser.pugx.org/dalyio/laravel-gitpack/v/unstable)](https://packagist.org/packages/dalyio/laravel-gitpack)
[![PHP Version Require](http://poser.pugx.org/dalyio/laravel-gitpack/require/php)](https://packagist.org/packages/dalyio/laravel-gitpack)
[![License](https://poser.pugx.org/dalyio/laravel-gitpack/license)](https://packagist.org/packages/dalyio/laravel-gitpack)

## Installation

``` bash
composer require dalyio/laravel-gitpack
```

``` bash
php artisan vendor:publish --provider="Dalyio\Gitpack\Providers\GitpackServiceProvider"
```

## Configuration

Edit the new `git.php` configuration file in the config directory to match your git credentials and repositories.

```php
return [
    'username' => '{DEFAULT GIT USERNAME}',
    'email' => '{DEFAULT GIT EMAIL}',
    'message' => '{DEFAULT COMMIT MESSAGE}',

    'packages' => [
        '{VENDOR/REPOSITORY}' => '{PATH TO LOCAL DEVELOPMENT PACKAGE}',
        'dalyio/laravel-gitpack' => 'packages/dalyio/gitpack/',
    ],
]
```

## Usage

### Initialize

Initialize the git repository using the default information provided in the `git.php` configuration file.

``` bash
php artisan git:init -p {VENDOR/REPOSITORY}
```

Or provide new credentials.

``` bash
php artisan git:init -p {VENDOR/REPOSITORY} -u {GIT USERNAME} -e {GIT EMAIL}
```

### Status

Check the status of all your configured local development packages.

``` bash
php artisan git:status
```

And the output will display for each package.

``` bash
packages/dalyio/gitpack/
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")
```

### Pull

Pull all your configured local development packages.

``` bash
php artisan git:pull
```

Or specify a single package to pull from.

``` bash
php artisan git:pull -p {VENDOR/REPOSITORY}
```

### Push

Commit and push changes to all your configured local development packages.

``` bash
php artisan git:push -m "{COMMIT MESSAGE}"
```

Or specify a single package to commit and push to.

``` bash
php artisan git:push -p {VENDOR/REPOSITORY} -m "{COMMIT MESSAGE}"
```

## Branches

When performing any of the above commands, Laravel Gitpack will detect the local development package's current branch and perform the operation using that current branch.  To change branches or to perform more complex git branch operations, it is recommended that you navigate to the source of your local development package and use native git commands to resolve any issues.

## Errors

If a git error occurs during any of the above processes it is recommended that you navigate to the source of your local development package and use native git commands to resolve any issues.

## License

Laravel Gitpack is open-sourced software licensed under the [MIT license](LICENSE).

repository: dalyio/laravel-gitpack

repo_name: dalyio/laravel-gitpack


text:
# two-pass-assembler

## Working?
To run the program.
* Clone the Repository
* Run main.py
```
python main.py
```
* Input file Address when asked for

## File type
The program can work with the text file.

## Errors Taken Care of?

Since we were to handle the variables, following errors are handled by the program
* Symbol defined but not used
* Symbol defined more than one time
* Excessive arguments
* Lesser Number of Arguements for said Opcodes
* STOP Command Not Found Error
* Address Defined more than 256 Bits

## Files and There Use Case

* Output.txt
On successful completion of assembly the Output.txt will have the Machine code for the said Assembly code.
* Symboltable.txt
On Successful completion of pass one the Symbol Table will be filled with label name and address
* test.txt
It is the file that contains the assembly code to be tested
* Errorfile.txt
In case of Errors during Pass-One or Pass-Two the Error file will be flooded with the error message and where ever defined the address of the file.
* passes.py
Every method that has to be used for pass-one or pass-two has been coded in that given file

repository: singlautsav/two-pass-assembler

repo_name: singlautsav/two-pass-assembler


text:
# Woof.Windows 2.0

**.NET Framework / .NET Core** extension created by **[CodeDog Ltd.](https://codedog.pl)**

Distributed under [MIT License](https://en.wikipedia.org/wiki/MIT_License).
(c)2019 by CodeDog Ltd., All rights reserved.

---

## About

MVVM Helpers:
- `ViewModelBase`,
- `ObservableCollectionEx`
- `FullyObservableCollection`,
- `EventToCommand`,
- `DependencyObject`, `FrameworkElement` and `Visual` extensions.

## Usage

Either nuget, or copy the cs files if single exe is necessary.

---

## Disclaimer

Please report any issues to the [toolkit developer](mailto:it@codedog.pl).

Woof Toolkit is a work in progress in constant development,
however it's carefully maintained with production code quality.


text:
---
templateKey: blog-post
title: 'Amazon Web Services (AWS): Textract: Points to remember'
date: 2020-06-02T05:32:20.989Z
description: 'Let''s learn about Amazon Textract:'
tags:
  - '#AWS #LetsLearnTogether #AWSUGBLR #Textract'
---
1. Textract is a document analysis service that detects and extracts text, structured data and tables from images and scans of documents.

2. Textract's ML models have been trained on millions of documents so that virtually any document type users upload is automatically recognized & processed for text extraction.

3. Textract can detect Latin-script characters from the standard English alphabet and ASCII symbols.

4. Textract currently supports PNG, JPEG, and PDF formats.

5. Textract supports logging of the following actions as CloudTrail events - DetectDocumentText, AnalyzeDocument, StartDocumentTextDetection, StartDocumentAnalysis, GetDocumentTextDetection & GetDocumentAnalysis.

6. Textract charges users based on the number of pages and images processed.

7. Data from Textract is encrypted and stored at rest in the AWS region where users are using Textract.

8. Textract is compliant with SOC-1, SOC-2, SOC-3, ISO 9001, ISO 27001, ISO 27017 and ISO 27018.

9. Textract uses Optical Character Recognition (OCR) technology to automatically detect printed text and numbers in a scan or rendering of a document, such as a legal document or a scan of a book.

10. Textract enables users to detect key-value pairs in document images automatically so that they can retain the inherent context of the document without any manual intervention.

![Image Retrieved From: https://aws.amazon.com/textract/features/](/img/screenshot-1377-.png)

11. Textract preserves the composition of data stored in tables during extraction.

12. Textract is directly integrated with Amazon A2I so users can easily implement human review of text extracted from documents.

13. Users can easily process millions of documents using Textract's text extraction APIs.

14. With synchronous processing, Textract can analyze single-page documents for applications where latency is critical.

15. Textract provides asynchronous operations to extend support to multipage documents.

16. With AWS Batch, Textract is able to process multiple document images in a single operation.

17. To detect text asynchronously, use StartDocumentTextDetection to start processing an input document file.

18. To detect text synchronously, use the DetectDocumentText API operation and pass a document file as input.

19. Textract analyzes documents and forms for relationships between detected text.

20. Textract analysis operations return three categories of text extraction: text, forms and tables

![Image Retrieved From: https://aws.amazon.com/textract/features/](/img/screenshot-1378-.png)

21. For Textract synchronous operations, users can use input documents that are stored in S3 bucket, or they can pass base64-encoded image bytes.

22. Textract can detect selection elements such as option buttons and check boxes on a document page.

23. Textract conforms to the AWS shared responsibility model, which includes regulations and guidelines for data protection.

24. Textract communicates exclusively via HTTPS endpoints, which are supported in all Regions supported by Textract.

25. Textract is protected by the AWS global network security procedures.

A Points to remember series by [Piyush Jalan](https://www.linkedin.com/in/piyush-jalan/).

repository: awsugblr/awsugblr

repo_name: awsugblr/awsugblr


text:
# A simple console chat on Python and gRPC

A simple console chat on Python and gRPC

## Requirements

- Python 3.7+

## Installing dependencies
```shell script
pip install -r requirements.txt
```

## Generation python modules on proto files
```shell script
compile_proto.bat
```

## Run

##### Running  server
```shell script
python -m server
```

##### Running  client
```shell script
python -m client
```

### About generated files

Two files are generated
- Ending on '_pb2.py': module describing types and services
- Ending on '_pb2_grpc.py': a module that implements gRPC.


text:
---
title: My keys
layout: keys
tags:
  - gpg
---

These keys are attached to this page and are available on SKS server. You should
verify the fingerprints of these keys using some other channel than just this
page (e.g. my Gitlab & Github account).

This page is generated using the data at:
    https://gitlab.com/roddhjav/roddhjav.gitlab.io/raw/master/data/keys.yml.
It has been signed with my master key and may be verified using the
[public key]. If you have trust in that key, you can verify that this page has
not been tampered by downloading the file:
    https://pujol.io/keys/keys.yml.asc
and running the command: `gpg --verify keys.yml.asc`

[public key]: /keys/0xe0cc7d788da0ebf2.asc


text:
# Trigger an HTTP request to Text Message from IFTTT

Everything [IFTTT](https://ifttt.com) can do is accomplished through applets. These are tiny programs that you can create which use triggers (the “If’s”) to execute actions (the “Then That’s”).

This example shows how to create IFTTT Webhook Applet that work with any device or app that can make a web request and triggered IFTTT Webhook Applet to sends a text message.

## Create an IFTTT Applet

You can set the IFTTT webhooks service to use web requests to trigger an action. The incoming action is an HTTP request to the web server and the outgoing action is a text message.

1. Create an IFTTT account, or log into your existing account.
2. Create an Applet. Click on **My Applets** at the top of the screen, then click the **New Applet**  button in the upper right.
3. You’ll then be taken to a screen that features the words “if +this then that.” You’ll need to click on the blue **+this** section of the text.

![IFTTT_this](images/this.png?raw=true "Optional Title")

4. Select the Webhooks service. Enter *Webhooks* in the search field. Select the Webhooks card.
5. Complete the trigger fields. After you select Webhooks as the trigger, click the Receive a web request card to continue. Enter an event name. This example uses *HN-BIS* as the event name. Click **Create trigger**.

![IFTTT_this](images/event_trigger.png?raw=true "Optional Title")

6. It’s time to select the action you want to have activated by your trigger. To do that, click on **+that** which will now be blue. The trigger word this is now the Webhooks icon. Enter SMS in the search bar, and select the SMS box.

![IFTTT_this](images/choose_sms.png?raw=true "Optional Title")

7. Select Send me an SMS, and then enter the text message information. You can pass data about the event that triggered your message using ingredients. For example, including {OccurredAt} adds the  Date & Time value to your text message. Click **Create action** to finish the new Applet.

![IFTTT_this](images/sms_action_fields.png?raw=true "Optional Title")

Then, click **Finish** and you’ll be all set.

![IFTTT_this](images/sms_webhook.png?raw=true "Optional Title")

To retrieve your Webhooks trigger information, Select **My Applets > Services**, and search for Webhooks. Select Webhooks, and then click the Documentation button. You see your key and the format for sending a request. Enter the event name. The event name for this example is HN-BIS.

    https://maker.ifttt.com/trigger/{event}/with/key/XXXXXXXXXXXXXXXXXXXXXX

    https://maker.ifttt.com/trigger/HN-BIS/with/key/XXXXXXXXXXXXXXXXXXXXXX

You can test the service using the test button or by pasting the URL into your browser. The IFTTT event trigger is not always instantaneous

## Turning Applet on and off

Once you’ve activated one or more applets, you can turn them on and off as needed. Simply click on the **My Applets** text at the top of the screen, click onto the applet you’re interested in controlling, and click the “On” button to turn it to “off.”

On these screens, you can also make changes to any applets you’ve created. To do so, click the gear icon in the upper-right corner of the applet box and you’ll see the options you have for applet customization.

At any time, click the IFTTT logo in the upper-left corner of the screen to be taken back to the main page.

repository: bismuthfoundation/Hypernode-Alerts

gha_language: C

repo_name: bismuthfoundation/Hypernode-Alerts


text:
# A npm package boiler project for avoiding repeating jobs

## It should include items as following

- [x] README.md
- [x] .gitignore
- [x] .eslintrc.json
- [x] package.json
- [x] LICENSE.txt(MIT by default)
- [x] /src
- [x] /test
- [x] .travis.yml
- [x] .eslintignore

repository: kenshinji/node-boilerplate

repo_name: kenshinji/node-boilerplate


text:
# Installation

Install Fable bindings for Material-UI

## Nuget
Fable Material-UI is available as [Nuget package](https://www.nuget.org/packages/Fable.MaterialUI/)
```sh
dotnet add package Fable.MaterialUI
```
or
```sh
paket add Fable.MaterialUI
```

## NPM
You also need to install [Material-UI](https://material-ui.com/getting-started/installation/) npm package
```sh
npm install @material-ui/core
```
or
```sh
yarn add @material-ui/core
```

repository: mvsmal/fable-material-ui

gha_language: F#

repo_name: mvsmal/fable-material-ui


text:
# Managing Package Access

The key to managing package access in an Organization is Teams.
**Teams are sets of Organization Members that have defined privileges
for a set of packages that are controlled by the Organization**.
This page will teach you how to create and manage the
membership of your Organization's team from the web interface.

If you would like to manage the package access of your Team from
the npm command line interface (CLI), you can use:

```
npm access
```

Learn more about `npm access` [here][2].

If you are looking for how to manage a Team's Membership, check
out [this doc][1].

You will need to have the **Owner** or **Admin** Role to perform this
work. For more information on **Roles**, check out the
[Roles and Privileges doc].

<hr/>

To manage the package access of a Team, navigate to your Team's landing page.
You can find a list of your teams at `https://www.npmjs.com/org/<org_name>/teams`.

From this list, you can click the value in the "packages" column.

- If the Team has members, this value will be the current Package Count. Clicking
  this value will bring you to the Packages tab for this team.
- If the Team does not have any package access, this value will read "add packages".
  Clicking this value will bring you to the Manage Package Access page.

You can also navigate to your Team page directly by point your browser at
`https://www.npmjs.com/org/<org_name>/teams/<team_name>`.

From there, click the "Teams" tab. You'll use this interface to manage the
package access of your Team.

## Adding Package Access to a Team

#### Using the CLI

You can also use the CLI `access` command to add package acess to a team via
the command line as follows:

```
npm access grant <read-only|read-write> <org:team> [<package>]
```

## Removing Package Access from a Team

#### Using the CLI

You can also use the CLI `access` command to add package acess to a team via
the command line as follows:

```
npm access revoke <org:team> [<package>]
```

[1]: managing-teams.md
[2]: https://docs.npmjs.com/cli/access
[Roles and Privileges doc]: roles-and-privileges.md


text:
# React Decision Tree

A decision tree implemented in React.

Based on the code by https://jvloenen.home.xs4all.nl/orgchart.

## Usage

```
import * as React from 'react';
import DecisionTree from 'react-decisiontree/dist';
```

The `IDecisionTree` interface is a recursive one that contains arrays with a `data` array of text
that will be joined together in the box, and an optional `subNodes` array of recursive `data/subNode` elements
that forms the body of the decision tree.

```
<DecisionTree
    chartStyles={
        {
            lineColor: "#1D78BC",
            boxFillColor: "#1D78BC",
            textColor: "#FFFFFF"
        }
    }
    rootNode={{
        data: ["petalWidth=9.8", "entropy=1.0", "class=Iris-vertosa"],
        subNodes: [
            {
                data: ["petalWidth=6.8", "entropy=0.7", "class=Iris-vertosa"],
            }, {
                data: ["petalWidth=5.8", "entropy=1.3", "class=Iris-versicolor"],
                subNodes: [
                    {
                        data: ["petalWidth=6.8", "entropy=0.7", "class=Iris-vertosa"],
                    },
                    {
                        data: ["petalWidth=3.8", "entropy=0.4", "class=Iris-versicolor"],
                    }
                ]
            }
        ]
    }}
 />
```

![react-decisiontree](https://imgur.com/w4H23R2.jpg)


text:
---
title: "Tracing"
date: 2019-06-15T19:57:51-04:00
description: ""
categories: []
keywords: []
slug: ""
aliases: []
toc: false
draft: false
reviewed: true
---

When moving monolithic architecture to microservices, the majority of operational challenges that arise are narrowed in two areas: networking and observability.

This is where Distributed Tracing can really help. Distributed Tracing helps with two fundamental challenges faced by microservices:

* Latency tracking

One user request or transaction can travel through many different services in different runtime environments. Understanding the latency of each of these services for a particular request is critical to the understanding of the overall performance characteristics of the system as a whole, and provides valuable insight for possible improvements.

* Root cause analysis

Root cause analysis is even more challenging for applications that build on top of large ecosystems of microservices. Anything can go wrong with any of the services at any time. Distributed tracing is of crucial importance when debugging issues in such a system.

Tracing is only one piece of the puzzles of the Three Pillars of Observability - Logging, Metrics and Tracing.

In light-4j, we have built-in Traceability and Correlation handlers. Now, we have added OpenTracing support to give users more options.

- [Jaeger](/tutorial/tracing/jaeger/)
- [Skywalking](/tutorial/tracing/skywalking/)

repository: networknt/light-doc

gha_language: CSS

repo_name: networknt/light-doc


text:
---
title: "December Book Club Read: \"Nocturna\""
date: "2019-12-25"
authorName: "The Nerd Girls"
authorClass: "all"
description: "This month, we read \"Nocturna\" by Maya Motayne, a Latinx, magic-driven heist story that, despite a promising premise, did not live up to the Nerd Girls’ hopes. Read our individual thoughts on the book below."
---

![A photo of the cover of Nocturna](nocturna-122019.png)

This month, we read [*Nocturna* (*A Forgery of Magic* #1)](https://www.goodreads.com/book/show/35561260-nocturna) by Maya Motayne, a Latinx, magic-driven heist story that, despite a promising premise, did not live up to the Nerd Girls’ hopes. Read our individual thoughts on the book below.

**Warning, Here Be Spoilers.**

Jane

### 👓👓 2.5 / 5

I wanted to enjoy *Nocturna*, but I struggled to finish it. One aspect that really bothered me was that all of the characters sounded the same in both their speech and their internal monologue. I had to flip back a couple times to see who was talking because it literally could have been any of the characters.

I think there was a strong basic outline for the plot, but the actual execution of it left me wanting more. There were some fairly large jumps in logic and actions the characters took just for the sake of the story/ ease of the plot moving forward that bothered me while I was reading. With that being said, I actually really loved the ending of the book and thought it finally did justice to who the author **said** the characters were (even though their actions rarely matched up with how they were described). I didn’t hate it; I don’t regret reading it; but I wouldn’t recommend it to anyone else.

Beth

### 👓👓👓 3 / 5

It’s hard to put my finger on exactly what about *Nocturna* didn’t work for me. Things start off promising, but along the way that promise kind of falls apart. I like the complicated setting of a post-colonial world, I like the use of Spanish, I like Prince Alfie's backstory. He starts off with great motivation and I am here for it. I am also here for a protagonist who makes some great big mistakes and has to go about trying to fix them. Co-lead Finn has her sweet shapeshifting ability and, of course, her requisite dark backstory. But her ability goes underutilized and her backstory is definitely one I’ve seen before—people must love their badass teenage assassins. The broad strokes of *Nocturna*'s plot are good but somewhere in there we keep losing the more interesting threads.

A final note for all YA writers/editors/publishers: there are many kinds of love. I enjoy a good romance, but not every story calls for one. So often it can dilute characters’ motivations. Let’s all remember friendship is its own amazing and powerful bond.

Mary

### 👓👓👓 3 / 5

I was really excited about *Nocturna* and had been looking forward to its release for a while. The description of the novel as a Latinx-inspired, magic driven heist drew me in immediately! The beginning of the novel is promising, and the potential for the story world and magic system is definitely there, but ultimately the novel fell quite short of these early high expectations. In regard to plotting, solutions to problems seemed too neat and easy, and the magic is often overly convenient. Really though, it was the lack of consistent character development that I got stuck on. Character motivations were often murky, disjointed, or down right frustrating, and the unique and exciting world the novel is set in couldn’t make up for the lack of depth in a love story that really didn’t need to be there.

Catherine

### 👓👓👓 3 / 5

*Nocturna* starts as a complex fantasy with an intricate magic system and somewhere around halfway does a belly-flow into lukewarm romance. I found myself bored and disappointed, which is so sad, because there is real potential in this lush world of language-powered magic. A writing teacher once said, “If you’re not telling the most interesting story in your world, you’re telling the wrong story.” There were at least three potentially more interesting tales nestled inside *Nocturna* than the one chosen to be told.

The card game near the beginning is one of the most creative things I’ve read this year. Unfortunately, that was the high point of the novel. I probably won’t  be picking up the sequel anytime soon.

Trope Warning: Daddy Problems Abound, aka [You Killed My Father](https://tvtropes.org/pmwiki/pmwiki.php/Main/YouKilledMyFather)

Lydia

### 👓👓👓 3 / 5

I *really* wanted to love this book. The summary hooked me in, the characters seemed interesting, and it had *Spanish*! But in the end it just left me feeling…meh.  It kept me engaged enough to finish the book, but left me with no interest in reading any sequels. A lot of things seemed sort of convenient for the plot. Solutions to problems just fell into place without a lot of work from the characters, and the magical abilities of Alfie and Finn just *happened* to fit perfectly their needs for any situation they found themselves facing. There was a lot of potential in both the world and the story, but both needed more fleshing out and complexity to fulfill that potential.

---

*What were your thoughts about "Nocturna"? Join the discussion on [Facebook](https://www.facebook.com/nerdgirlsbookclub) or Instagram [@nerdgirlsbookclub](https://www.instagram.com/nerdgirlsbookclub/).*

repository: catheraaine/nerd-girls-blog

repo_name: catheraaine/nerd-girls-blog


text:
# Star Wars: The Final Frontier - Storyline

## Gameplay
You start off by flying a spaceship of your choice across the galaxy to any of these planets (very much like Misty Planets did), and land on them.
You can then play as an iconic character to complete missions on these planets with iconic droids at your side (such as BB-8, C3PO, and R2-D2).
And the end of each of these missions you will have to dual a Sith Lord, or someone that poses an equal challenge.

In the start of the game you have a choice to start as the Light Side or the Dark Side.
If you are on the Light Side, you are one of the main Light Side Characters during your missinos.
If you are on the Dark Side, you are one of the main enemies (Sith, Empire, First Order), and you are trying to accomplish a specific goal.
You are then given an option to choose one of three paths - the Prequels, the Original Trilogy, or the Sequels.
Once you have completed an earlier path, you can move on to a later path.

Your game can be saved at any time by clicking the "Save Game" button in-game, thereby printing a code which you can save
for later to pick up where you left off. To load your game, just start up the game and click "Load Game".
You'll be prompted for the code, whereby you will type in your save game code. The game will then reload the same seed,
character, progress, and update your stats based off of the unique code ID.

This game is completely free play. This still means you have to do certain missions to move on, but you get to decide when
you want to do that, and you get to explore and do other side missions too. You can earn extra coins by doing this, help tokens,
and earn favor for certain factions within the galaxy far far away. This may unlock certain missions later on because of your
reputation with that faction. You can switch between the characters and do tasks assigned by the locals in your area.
Coins can be used to buy better equipment, upgrade your ship to help you in battle or reach other destinations required.
Help tokens can be used to summon help in battle if the character you helped is an "ATTACKER", or can heal your character
if the character you helped is a "HEALER". If the character is a "DISTRACTER", they can give you 10 seconds where all
enemy fire is concentrated at a random point on the screen (in a Ship VS Ship battle).

In space, you can get stuck in battles with TIE fighters, the Death Star, StarKiller Base, and other evil ships.
In these battles, you can fire lasers from your ship, use your hyperdrive engine to fly to a random point on the screen,
or attempt to capture the enemy vessel. If the ship is big enough, you can choose to board it and fight the crew as you would
on a mission.

## Notes
1. All this is loaded in images that are cached, there are loading screens between levels to reduce lag.
2. I expect this to be 20K - 60K lines of code.
3. In the future, there will be a way to choose to go to the Dark Side, but until then there will only be the light side.
4. The save code may use a series of hexadecimal numbers later depending on the impending situation that we'll need it in.

# Explore Mode
Exploring is often better known as free-play mode. This means that there are no time requirements, no missions to undertake, and you can do whatever you like. Sub-Exploring mode is when your screen looks identical to Exploring mode, except you are merely traveling through the Exploration Territory to accomplish a mission.

## How
When you explore, you can collect prizes from locals by completing their missions. This can include capturing bad guys, finding stolen treasures, or something equally hard. On some missions, there are minor penalties for not completing, but not many.
In explore mode, there are no rules. You could wander into the center of the Empire's base, or you could chance upon the Jedi Temple itself. However, you won't be part of either side - instead of being a normal Jedi, you will be an "Explorer", and you won't be allowed inside any of the important places. This also means that if you accidentally anger someone from your own team, they can still attack you until you turn off explore mode.

# Ship VS. Ship Mode
Ship VS Ship mode is how you get from one planet to another. Oftentimes, there is nothing more than the black void of space keeping you from a location, but dangers can often occur such as asteroid fields and enemies.

## Ships You Can Fly
1. Millenium Falcon
2. X-Wing
3. Y-Wing
4. A-Wing
5. B-Wing
6. Republic Attack Cruiser
7. Jedi Starships
8. N-1 Starfighter
9. Tantive IV
10. Custom

## Enemy Ships
1. Death Star
2. Death Star 2
3. Starkiller Base
4. TIE Fighter
5. TIE Interceptor
6. Star Destroyer
7. Super Star Destroyer
8. *Executor*
9. Advanced Tie Fighter
10. TIE Bomber
11. Slave 1
12. *Finalizer*
13. Custom

## How
Start off by choosing your ship. Then, attempt to navigate between the asteroids to get to your location using the map. If you run into an enemy ship, you have multiple options.

1. #### Surrender
If you do this, you lose that ship, but you won't take any damage.

2. #### Attack
You can attack by pressing the spacebar and aiming your ship so that the lasers are focused on the enemy ship.

3. #### Defend
You can turn on your shield for up to 30 seconds, where you will be protected. Note - you can't move during this time. Activate by pressing the "S" key.

4. #### Escape
You can try to out-manuver their ship and escape to your planet. Steer using the arrow keys.

5. #### Hyperdrive
The hyperdrive is really dangerous. It transports you to a random point on the board. Sounds cool, right? Well, if you travel inside a planet, you die, and you have a chance of spawning within enemy territory.

6. #### Board
If you board the enemy's ship, you can attempt to loot all of their resources. However, this is dangerous, as you will face multiple battles in a row and won't get healed after each one. If you manage to get to the center of the ship, you can collect bounty for every member of the enemy crew.

# Character VS. Character Mode
Character VS Character Mode is how you can battle other characters. It is often known as the "Arena". When you anger a bad guy, you will automatically be transported to the Arena for battle. If you win, you will be teleported right back to where you were. If you lose, you lose everything you previously had and start the game again outside of the Arena.

## Characters You Can Be
* Anakin Skywalker (Good) - High Intelligence, but has varied Attack Damage.
* Luke Skywalker - Has Medium Intelligence, and has a high Attack Damage.
* Rey - Has High Intelligence and Medium Attack Damage.

## Your Droids
* C-3PO - 5% chance to convince enemy not to attack.
* R2-D2 - Can shock enemy.
* BB-8 - Can distract enemy for 2 turns.

## Your Backup Characters
#### Star Wars Prequels
* Padme - Gives all fellow teamates +100 health.
* Obi-Wan Kenobi - Deals incredible amounts of damage.
* Qui-Gon Jinn - Deals high amounts of damage. Raises all fellow teamates damage by +10.

#### Star Wars Original Trilogy
* Old Ben (Obi-Wan) - 50% chance to distract enemies using the Jedi Mind Trick.
* Yoda - Has an incredible intelligence, damage, and health. If he dies, all teamates are granted +100 health and +10 damage.
* Princess Leia - Has incredible accuracy, but a long reload time.
* Han Solo - Medium Damage amounts, raises all teamates damage by +20 for 3 turns after he attacks.

#### Star Wars Sequels
* Finn - High health.
* Poe Dameron - Distracts all enemies for 3 turns after he attacks.
* Old Leia - Brings in a Resistance Trooper for 2 turns.
* Old Han Solo - Can deal medium amounts of damage.
* Maz Kanata - Has incredible intelligence can provide x2 damage.

## Main Enemies
* Emperor Palpatine - Instant Kill, but Jedi have a 10% chance of only losing half of their total health. However, he has low health.
* Darth Vader - Incredible health, incredible damage.
* Emperor Snoke - You cannot harm him, but he will go away if all of his allies die.

## Enemy Backups
#### Star Wars Prequels
* Count Dooku - He can attack two players each turn.
* Darth Maul - 50% of blocking your attack, 25% chance of only recieving half damage.
* Jabba The Hutt - Every turn he gains +500 health.
* Jango Fett - Can clone himself for one turn, but cannot attack during that time - clone has x2 attack power.
* Nute Gunray - Every turn summons 1 half-health battle droid.
* General Grevious - Immense health, incredible attack, 50% to distract

#### Star Wars Original Trilogy
* Boba Fett - Has amazingly high health, 50% chance to dodge a hit, and can deal an incredible amount of damage. However, he attacks * really slowly.
* Jabba The Hutt - Every turn he gains +500 health.
* Grand Moff Tarkin - Can summon 2 clone troopers. However, they have low health

#### Star Wars Sequels
* Kylo Ren - If you block his attack, he will deal x2 damage using his crossguard
* Captain Phasma - Low damage, but incredible reload rate. Also has a 100% chance of counterattack.
* General Hux - Has 10% chance to summon a First Order Stormtrooper at his side. Does high damage, but moves slower than usual.

## Planets
* Tatooine - All characters have 75% health due to fatigue.
* Jakku - All characters have x1.5 damage.
* Naboo - Good guys have a 10% chance of summoning a Gungan, enemies have a 5% chance of summoning 2 battle droids.
* Hoth - Light side characters have 10% chance per attack to summon a Rebel Stormtrooper, and can start with or without a Tauntaun. Dark side characters can start with 3-6 AT-ATs, 2-7 AT-STs, and a 10% chance to summon a Snowtrooper per attack.

## Types of Characters
1. #### Attackers
    Attackers are characters that have high attack damages and have a lot of health. These characters are easy to get, but hard to help -
    If you want to help them to get help tokens, they often request near-impossible tasks.

2. #### Healers
    Healers are characters that have high heal ammounts and average health. These characters are hard to get, yet easy to help -
    If you want to help them to get help tokens, they often request protection from an ATTACKER or for you to find an
    ingredient for them to use to make a health potion.

3. #### Distracters
Distracters are characters that have incredible health amounts but often little to no health or attack effects. They do, however, have
a distract function where all enemy fire is concentrated on them. They are great for soaking up damage while facing a dangerous
opponent.

4. #### Bosses
Bosses are characters that have multiple talents. One such example would be General Grevious - he has amazing health, and incredible attack. He also has a 50% chance to focus all enemy fire on him. This means that they are incredibly difficult to defeat.

5. #### Supporters
Supporters are characters that can protect a character and maximize their attack. Supporters have really low health, but are a great addition to your team.

6. #### Blockers
Blockers are temporary characters that can walk across the screen. They have infinite health, and can protect a character from either side from getting hurt.

## How
You start off in a top-down, 2.5D scenic area. Once a character's turn bar is filled up, that character can do its stuff.
If a character on your team has a full attack bar, his different abilities will automatically appear in your "Action" bar.
If an enemy has a full attack bar, they will automatically attack your character by randomly selecting an action.
If your characters all have 0% health, you lose $10,000.
If the enemy characters all have 0% health, you can claim a special prize!

### Action Bar
The action bar is a small, gray bar at the bottom of the screen with all of your current actions on it. If you click on one of these actions, it will automatically execute it.
If you have a special advantage, you can choose not to activate it (extra character, etc).

 From picking locks to finding important information swept up in a sandstorm, there might appear to be no solution - but there always is.


text:
# [Fare(well)](http://alexa.amazon.com/#skills/amzn1.ask.skill.55f9bf03-6870-4280-b561-9985def8530e)
![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png) 0

To use the Fare(well) skill, try saying...

* *Alexa, ask farewell meter for a price estimate*

* *Alexa, open farewell meter*

* *Alexa, launch farewell meter and get a price estimate*

Use Fare(well) to get a fare estimate for any Uber ride in your city! Ask for a fare estimate between two addresses, a landmark and an address, or two landmarks, and the skill will return a price range for an Uber X ride between those two locations. Be smart about getting where you're going! Get started by saying, "Alexa, open farewell meter"

*Note: Right now, this skill is optimized for use in New York City.

***

### Skill Details

* **Invocation Name:** farewell meter
* **Category:** null
* **ID:** amzn1.ask.skill.55f9bf03-6870-4280-b561-9985def8530e
* **ASIN:** B01M35IOJW
* **Author:** Beni Shafer-Sull
* **Release Date:** November 11, 2016 @ 00:44:12
* **In-App Purchasing:** No


text:
# shakahl/laravel-eloquent-mysqli
MySQLi driver (connector) for Laravel **8.x** Eloquent database

## Installation

- Install via composer

```sh
composer require shakahl/laravel-eloquent-mysqli
```

- After installing, add provider on config/app.php on your project.

```php
// app.php

    'providers' => [
        ...

        'LaravelEloquentMySQLi\MySQLiServiceProvider',
    ],
```

## Usage

You should configure your database connection to use the ```mysqli``` driver.

**Example**
```php
//...
  'connections' => [
        'mysql' => [
            'driver'    => 'mysqli', // Sets mysqli driver
            'host'      => env('DB_HOST', 'localhost'),
            'port'      => env('DB_PORT', 3306),
            'database'  => env('DB_DATABASE', 'forge'),
            'username'  => env('DB_USERNAME', 'forge'),
            'password'  => env('DB_PASSWORD', ''),
            'charset'   => env('DB_CHARSET', 'utf8'),
            'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
            'prefix'    => env('DB_PREFIX', ''),
            'timezone'  => env('DB_TIMEZONE', '+00:00'),
            'strict'    => env('DB_STRICT_MODE', false),
        ],
    ]
//...
```

## Notes

### Accessing underlying mysqli instance
There are some inconsistent methods since Laravel only supports PDO officially.
You can access the raw, underlying MySQLi instance using the following methods on a connection instance:

```php
$mysqli = DB::connection()->getMySqli();
// or
$mysqli = DB::connection()->getReadMySqli();
// or
$mysqli = DB::connection()->getPdo();
// or
$mysqli = DB::connection()->getReadPdo();
```

### Escaping

Unfortunately PHP's mysqli driver does not support named parameter binding so this connector uses custom implementation for it.

repository: shakahl/laravel-eloquent-mysqli

gha_language: PHP

repo_name: shakahl/laravel-eloquent-mysqli


text:
---
order: 3
title: Real project with dva
---

[dva](https://github.com/dvajs/dva) is a React and redux based, lightweight and elm-style framework, which supports side effects, hot module replacement, dynamic on demand, react-native, and SSR. It has been widely used in production environments.

This article will guide you to create a simple application from zero using dva and antd.

Include the following:

---

## Install dva-cli

Install dva-cli with npm, and make sure the version is later than `0.8.1`.

```bash
$ npm install dva-cli -g
$ dva -v
0.8.1
```

## Create New App

After you have installed dva-cli, you can have access to the `dva` command in terminal ([can't access?](http://stackoverflow.com/questions/15054388/global-node-modules-not-installing-correctly-command-not-found)). Now, create a new application with `dva new`.

```bash
$ dva new dva-quickstart
```

This creates a `dva-quickstart` directory, that contains the project directories and files, and provides a development server, build script, mock service, proxy server and so on.

Then `cd` to the `dva-quickstart` directory, and start the development server.

```bash
$ cd dva-quickstart
$ npm start
```

After a few seconds, you will see the following output:

```bash
Compiled successfully!

The app is running at:

  http://localhost:8000/

Note that the development build is not optimized.
To create a production build, use npm run build.
```

Open http://localhost:8000 in your browser, you will see the dva welcome page.

## Integrate antd

Install `antd` and `babel-plugin-import` with npm. `babel-plugin-import` is used to automatically import scripts and stylesheets from antd on demand. See [repo](https://github.com/ant-design/babel-plugin-import) 。

```bash
$ npm install antd babel-plugin-import --save
```

Edit `.roadhogrc` to integrate `babel-plugin-import`.

```diff
  "extraBabelPlugins": [
-    "transform-runtime"
+    "transform-runtime",
+    ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
  ],
```

> Notice: dva-cli's build and server is based on roadhog, view [roadhog#Configuration](https://github.com/sorrycc/roadhog/blob/master/README_en-us.md#configuration) for more `.roadhogrc` Configuration.

## Define Router

We need to write an application displaying the list of products. The first step is to create a route.

Create a route component `routes/Products.js`:

```javascript
import React from 'react';

const Products = (props) => (
  <h2>List of Products</h2>
);

export default Products;
```

Add routing information to router, edit `router.js`:

```diff
+ import Products from './routes/Products';
...
+ <Route path="/products" exact component={Products} />
```

Then open http://localhost:8000/#/products in your browser, you should be able to see the `<h2>` tag defined before.

## Write UI Components

As your application grows and you notice you are sharing UI elements between multiple pages (or using them multiple times on the same page), in dva it's called reusable components.

Let's create a `ProductList` component that we can use in multiple places to show a list of products.

Create `components/ProductList.js` by typing:

```javascript
import React from 'react';
import PropTypes from 'prop-types';
import { Table, Popconfirm, Button } from 'antd';

const ProductList = ({ onDelete, products }) => {
  const columns = [{
    title: 'Name',
    dataIndex: 'name',
  }, {
    title: 'Actions',
    render: (text, record) => {
      return (
        <Popconfirm title="Delete?" onConfirm={() => onDelete(record.id)}>
          <Button>Delete</Button>
        </Popconfirm>
      );
    },
  }];
  return (
    <Table
      dataSource={products}
      columns={columns}
    />
  );
};

ProductList.proptypes = {
  onDelete: PropTypes.func.isRequired,
  products: PropTypes.array.isRequired,
};

export default ProductList;
```

## Define Model

After completing the UI, we will begin processing the data and logic.

dva manages the domain model with `model`, with reducers for synchronous state updates, effects for async logic, and subscriptions for data source subscribe.

Let's create a model `models/products.js` by typing:

```javascript
import dva from 'dva';

export default {
  namespace: 'products',
  state: [],
  reducers: {
    'delete'(state, { payload: id }) {
      return state.filter(item => item.id !== id);
    },
  },
};
```

In this model:

- `namespace` represents the key on global state
- `state` is the initial value, here it is an empty array
- `reducers` is equivalent to a reducer in redux, accepting an action, and update state simultaneously

Then don't forget to require it in `index.js`:

```diff
// 3. Model
+ app.model(require('./models/products'));
```

## Connect

So far, we have completed a separate model and component. How do we connect them together?

dva provides a `connect` method. If you are familiar with redux, this `connect` is from react-router.

Edit `routes/Products.js` and replace it with the following:

```javascript
import React from 'react';
import { connect } from 'dva';
import ProductList from '../components/ProductList';

const Products = ({ dispatch, products }) => {
  function handleDelete(id) {
    dispatch({
      type: 'products/delete',
      payload: id,
    });
  }
  return (
    <div>
      <h2>List of Products</h2>
      <ProductList onDelete={handleDelete} products={products} />
    </div>
  );
};

// export default Products;
export default connect(({ products }) => ({
  products,
}))(Products);
```

Finally, we need some initial data to make the application run together. Edit `index.js`:

```diff
- const app = dva();
+ const app = dva({
+   initialState: {
+     products: [
+       { name: 'dva', id: 1 },
+       { name: 'antd', id: 2 },
+     ],
+   },
+ });
```

Refresh your browser, you should see the following result:

## Build

Now that we've written our application and verified that it works in development, it's time to get it ready for deployment to our users. To do so, run the following command:

```bash
$ npm run build
```

After a few seconds, the output should be as follows:

```bash
> @ build /private/tmp/myapp
> roadhog build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  82.98 KB  dist/index.js
  270 B     dist/index.css
```

The `build` command packages up all of the assets that make up your application —— JavaScript, templates, CSS, web fonts, images, and more. Then you can find these files in the `dist /` directory.

## What's Next

We have completed a simple application, but you may still have lots of questions, such as:

- How to deal with async logic
- How to load initial data elegantly
- How to handle onError globally and locally
- How to load Routes and Models on demand
- How to implement HMR
- How to mock data
- and so on...

You can:

- Visit [dva official website](https://github.com/dvajs/dva).
- Be familiar with the [8 Concepts](https://github.com/dvajs/dva/blob/master/docs/Concepts.md), and understand how they are connected together
- Know all [dva APIs](https://github.com/dvajs/dva/blob/master/docs/API.md)
- Checkout [dva knowledgemap](https://github.com/dvajs/dva-knowledgemap), including all the basic knowledge with ES6, React, dva
- Checkout [more FAQ](https://github.com/dvajs/dva/issues?q=is%3Aissue+is%3Aclosed+label%3Afaq)
- If your project is created with [dva-cli](https://github.com/dvajs/dva-cli) , checkout how to [Configure it](https://github.com/sorrycc/roadhog#配置)


text:
# RecSys Challenge 2015

In this year’s edition of the RecSys Challenge, YOOCHOOSE is providing a collection of sequences of click events; click sessions. For some of the sessions, there are also buying events. The goal is hence to predict whether the user (a session) is going to buy something or not, and if he is buying, what would be the items he is going to buy. Such an information is of high value to an e-business as it can indicate not only what items to suggest to the user but also how it can encourage the user to become a buyer. For instance to provide the user some dedicated promotions, discounts, etc. The data represents six months of activities of a big e-commerce businesses in Europe selling all kinds of stuff such as garden tools, toys, clothes, electronics and much more.

A detailed description of the challenge can be found on the website of the [RecSys Challenge 2015](http://2015.recsyschallenge.com/).

## Dataset
Please download the dataset [HERE](https://recsys.acm.org/recsys15/challenge/).

![image](https://github.com/foamliu/GNN-Tutorial-Recsys2015/raw/master/images/yoochoose-large.png)

## Dependencies

- Python 3.6.8
- PyTorch 1.3.0

## Usage
### Data Pre-processing
Extract training images:
```bash
$ python extract.py
$ python pre_process.py
```

### Train
```bash
$ python train.py
```

### Performance

|epoch|Loss|Train Auc|Val Auc|Test Auc|
|---|---|---|---|---|
|0|0.20631|0.77606|0.73532|0.73023|
|1|0.18863|0.80737|0.73994|0.73288|


text:
---
description: See how others implemented Superfluid in their application
---

# 🛠 Examples

## Apps

### Official

These examples are maintained by the Superfluid team. We will try to continue to update them as we make improvments. Some of them can be easily forked to get started quickly

* **Dividend Rights Token -** Distribute IDA shares using an ERC20 token
* **Holy Grail -** Whoever holds this NFT receives a CFA stream
* **Continuous Auction** - The winner is whoever has the largest CFA stream
* **Developer Playground** - A full-stack playground built with RedwoodJS
* and more...

Click here to see the official examples:

{% embed url="https://github.com/superfluid-finance/protocol-monorepo/tree/dev/examples" caption="Superlfuid App Examples" %}

### Community

Our community makes some awesome things we want to showcase:

> ⚠ We do not maintain these examples. If you run into problems, check the versions for `@superfluid-finance/js-sdk` and `@superfluid-finance/ethereum-contracts`

* **Stream Rent** -  _Create NFTs using offchain resources, and gain income by renting them out_
  * Hackathon submission: [https://devfolio.co/submissions/stream-rent-d208](https://devfolio.co/submissions/stream-rent-d208)
  * Source: [https://github.com/Jayashrri/StreamRent](https://github.com/Jayashrri/StreamRent)
* more soon!

## Ideas

Want ideas? Check out _hack.superfluid.finance_ to connect with other community members and brainstorm ideas:

{% embed url="http://hack.superfluid.finance/" caption="Superfluid App Ideas" %}

## Code Snippets

### Constant Flow Agreement

```javascript
import SuperfluidSDK from '@superfluid-finance/js-sdk';
import { Web3Provider } from '@ethersproject/providers';

const testFlow = async () => {
    const walletAddress = await window.ethereum.request({
      method: 'eth_requestAccounts',
      params: [
        {
          eth_accounts: {}
        }
      ]
    });
    const sf = new SuperfluidSDK.Framework({
      ethers: new Web3Provider(window.ethereum),
      tokens: ['fDAI']
    });
    await sf.initialize();
    const carol = sf.user({
      address: walletAddress[0],
      token: '0x8ae68021f6170e5a766be613cea0d75236ecca9a'
    });

    await carol.flow({
      recipient: '0xA8f3447922d786045CB582B0C825723B744a54df',
      flowRate:<PHONE_NUMBER>35802
    });

    const details = await carol.details();
    console.log(details);
};

testFlow();
```

### Instant Distribution Agreement

```javascript
import SuperfluidSDK from '@superfluid-finance/js-sdk';
import { Web3Provider } from '@ethersproject/providers';
import { BigNumber } from '@ethersproject/bignumber';

const testPool = async () => {
    const walletAddress = await window.ethereum.request({
      method: 'eth_requestAccounts',
      params: [
        {
          eth_accounts: {}
        }
      ]
    });
    const sf = new SuperfluidSDK.Framework({
      ethers: new Web3Provider(window.ethereum),
      tokens: ['fDAI']
    });
    await sf.initialize();
    const carol = sf.user({
      address: walletAddress[0],
      token: '0x8ae68021f6170e5a766be613cea0d75236ecca9a'
    });
    await carol.createPool({ poolId: 1 });
    await carol.giveShares({
      poolId: 1,
      shares: 100,
      recipient: '0xA8f3447922d786045CB582B0C825723B744a54df'
    });
    await carol.distributeToPool({
      poolId: 1,
      amount: BigNumber.from(100).toString()
    });
  };

testPool();
```

## Videos

Adding a simple "Donate" button to an app:

{% embed url="https://www.youtube.com/watch?v=RmOogQK5VHY" %}

repository: iamsahu/superfluid-protocol-docs

repo_name: iamsahu/superfluid-protocol-docs