text:
---
date: 2017-11-07T01:21:25-05:00
title: "Hello World & Setup"
seo_title: "Hello World & Setup | C++ | GOUP"
subheader:
     greeting: C++ - Programming Language
     description: This course covers the basics of programming in C++. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!
description: This tutorial covers hello world & setup in C++.
author: GOUP
image: hello-world-&-setup.png
video: q4zIPCmPlqI
url: /programming-languages/c++/hello-world-setup/
weight: 4
---

## Code

{{< code lang="cpp" >}}
cout << "Hello" << endl;
cout << "World";
cout << "!" << endl;
{{< /code >}}


text:
[![Gem Version](https://badge.fury.io/rb/payout.svg)](https://badge.fury.io/rb/payout) [![Build Status](https://travis-ci.org/payout/payout-ruby.svg?branch=master)](https://travis-ci.org/payout/payout-ruby) [![Code Climate](https://codeclimate.com/github/payout/payout-ruby/badges/gpa.svg)](https://codeclimate.com/github/payout/payout-ruby) [![Test Coverage](https://codeclimate.com/github/payout/payout-ruby/badges/coverage.svg)](https://codeclimate.com/github/payout/payout-ruby/coverage)

# Payout Ruby SDK

The Payout Ruby SDK allows you to more quickly integrate with the [Payout](http://www.payout.com) API.

## Installation

The SDK is available as gem, which you can install like so:

```
gem install payout
```

Alternatively, you can add it to you `Gemfile`.

```ruby
gem 'payout', '~> 0.1.0'
```

And then run `bundle install`.

## Ruby Versions
The SDK has been tested on Linux with the following ruby versions:
 * 1.9.3
 * 2.0.0-p247
 * 2.1.6
 * 2.2.2
 * 2.3.1

## Configuration

```ruby
Payout.api_url =      ENV['PAYOUT_API_URL']           # Defaults to https://live.payout.com
Payout.api_token =    ENV['PAYOUT_API_TOKEN']         # You can find your credentials at
Payout.api_secret =   ENV['PAYOUT_API_SECRET']        # https://dashboard.payout.com/api
Payout.open_timeout = ENV['PAYOUT_OPEN_TIMEOUT'].to_i # Defaults to 30
Payout.read_timeout = ENV['PAYOUT_READ_TIMEOUT'].to_i # Defaults to 80
```

## Documentation

See full documentation [here](https://www.payout.com/page/ruby-library).

license: MIT

repository: payout/payout-ruby

branch_name: refs/heads/master

extension: md

gha_language: Ruby

license_type: permissive

repo_name: payout/payout-ruby


text:
# webpack-c3

## Preview
![Screenshot](./resources/screenshot.png)

## Quick start
```bash
npm install
# development
npm start
# or "production"
npm run build
```

## Based on
http://c3js.org/gettingstarted.html


text:
[![](https://img.shields.io/badge/OS-Unix-blue.svg?longCache=True)]()
[![](https://img.shields.io/pypi/v/shell-timeout.svg?maxAge=3600)](https://pypi.org/project/shell-timeout/)
[![](https://img.shields.io/npm/v/shell-timeout.svg?maxAge=3600)](https://www.npmjs.com/package/shell-timeout)[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
[![](https://github.com/andrewp-as-is/shell-timeout/workflows/tests42/badge.svg)](https://github.com/andrewp-as-is/shell-timeout/actions)

### Installation
```bash
$ [sudo] pip install shell-timeout
```

```bash
$ [sudo] npm i -g shell-timeout
```

#### How it works
If the command times out, then exit with status 124. Otherwise, exit with the status of COMMAND

#### Examples
```bash
$ timeout 1 sleep 2
```

    readme42.com

license: Unlicense

repository: andrewp-as-is/shell-timeout

repo_name: andrewp-as-is/shell-timeout


text:
---
title: Understanding How Data Gets into Your Analysis Workspace Project
description: This video shows you how to see the flow of data from your page to the tables and visualizations in Analysis Workspace, using the Adobe Experience Platform Debugger extension in Chrome.
feature: Workspace Basics
role: User
level: Beginner
kt: 4109
thumbnail: 31072.jpg
exl-id: eb6eada2-74b1-423c-a80d-2bcc2148e167
---
# Understanding How Data Gets into Your Analysis Workspace Project

This video shows you how to see the flow of data from your page to the tables and visualizations in Analysis Workspace, using the Adobe Experience Platform Debugger extension in Chrome.

>[!VIDEO](https://video.tv.adobe.com/v/31072/?quality=12&learn=on)

For more information about the Adobe Experience Platform Debugger, please visit the [documentation](https://experienceleague.adobe.com/docs/debugger/using-v2/experience-cloud-debugger.html).

branch_name: refs/heads/main

gha_license_id: MIT


text:
# awesome-oci
A curated list of all the awesome resources for [Oracle Cloud Infrastructure](https://cloud.oracle.com/en_US/cloud-infrastructure)- FAQ's, blogs, docs and moar!

Find a cool tutorial, blog, documentation or video about OCI that you liked, and is not here? ADD IT! PR me or create an issue with a link, and I'll be happy to add it.

# OKE Product Related
* [Official OKE Docs](https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm)
* [OKE- Product Page](https://cloud.oracle.com/containers/kubernetes-engine)
* [OKE Quickstart](https://www.oracle.com/webfolder/technetwork/tutorials/obe/oci/oke-full/index.html)

# CloudNative and Kubernetes Related
* [CloudNative Labs](https://cloudnative.oracle.com/learn.html)
* [Kubernetes HOL](https://go.oracle.com/container-native-development)
* [Helm Tutorials](https://cloudnative.oracle.com/template.html#application-development/package-management/helm/readme.md)
* [Istio on OKE](http://www.ateam-oracle.com/istio-on-oke/)
* [Logging in K8s- EFK Stack](https://cloudnative.oracle.com/template.html#observability-and-analysis/logging/efk-stack)
* [Kubeflow on OKE](https://blogs.oracle.com/cloud-infrastructure/deploy-kubeflow-with-oracle-cloud-infrastructure-container-engine-for-kubernetes)
* [Monitoring in K8s- Prometheus](https://cloudnative.oracle.com/template.html#observability-and-analysis/telemetry/prometheus/readme.md)
* [MySQL Operator Slides](https://www.slideshare.net/PatrickGalbraith/containerized-mysql-openworld-talk)
* [MySQL Operator](https://github.com/oracle/mysql-operator)
* [OKE Single AD Cluster](https://cloudnative.oracle.com/template.html#distributed-systems-management/container-orchestration/oke/Readme.md)
* [Oracle Developer Tutorials](https://developer.oracle.com/containers)
* [Weblogic Kubernetes Operator](https://blogs.oracle.com/weblogicserver/announcing-general-availability-version-of-the-weblogic-server-kubernetes-operator)
* [Weblogic Kubernetes Operator](https://blogs.oracle.com/developers/announcing-oracle-weblogic-server-kuberentes-operator)

# OCI Core
* [CLI Docs](https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliinstall.htm)
* [Service Limits](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm)

# Providers
* [Official Terraform Docs](https://www.terraform.io/docs/providers/oci/index.html)
* [Terraform- Github](https://github.com/terraform-providers/terraform-provider-oci)
* [Ansible Modules](https://github.com/oracle/oci-ansible-modules)

# CI/CD
* [Wercker](https://cloudnative.oracle.com/template.html#application-development/ci-cd/wercker/readme.md)
* [Wercker+OKE](https://www.youtube.com/playlist?list=PLKCk3OyNwIztJTnH_l_8kCYjYaaBniVcq)
* [JenkinsX on OKE](https://cloudnative.oracle.com/template.html#application-development/ci-cd/jenkinsx/readme.md)
* [Create an OKE Cluster with JenkinsX](https://jenkins-x.io/getting-started/create-cluster/#using-oracle-oce)
* [Microservices with Helidon](https://cloudnative.oracle.com/template.html#application-development/microservices/helidon/readme.md)

# Serverless
* [FN Project](http://fnproject.io/)
* [FN Getting Started](https://cloudnative.oracle.com/template.html#application-development/serverless/getting-started-with-fn/Readme.md)


text:
---
layout: post
title: "Sunday 06.02.19 -  Olympic Lifting"
teaser: "A.  Snatch + Overhead Squat + Hang Snatch + Overhead Squat 7 x 1
 B. Alternating Sets: Power Clean, Hang Squat Clean
 C. Alternating Sets: Parallette Push-Up, Barbell Z Press
 D.  15-12-9-6-3 Toes to Bars and GHD Sit-Ups"
date: 2019-06-02 00:00:00
categories: wodup
tags: wods sunday
header: no
---

A.  Snatch + Overhead Squat + Hang Snatch + Overhead Squat 7 x 1

Every 3:30, for 24:30 (7 sets):
Snatch + Overhead Squat + Hang Snatch + Overhead Squat

B. Alternating Sets: Power Clean, Hang Squat Clean

10 sets, starting a set every 90 seconds,  of:
B1. 1 Power CleanB2. 1 Hang Squat Clean

C. Alternating Sets: Parallette Push-Up, Barbell Z Press

3 sets of:
C1. 6-10 Parallette Push-UpsNo restC2. 12-20 Barbell Z PressesRest as needed

D.  15-12-9-6-3 Toes to Bars and GHD Sit-Ups

15-12-9-6-3 Reps for Time:
– Toes to Bar
– GHD Sit-Up

This is an optional little piece for those who believe in the fundamental principals of "core to extremity"
View on WodUp

#### Compare to other Sundays
{: .t60 }

{% include list-posts tag='sunday' entries='5' %}

branch_name: refs/heads/gh-pages

gha_language: JavaScript


text:
# OeD: Open-ended Dependency Analyser

OeD looks at open-ended dependencies (OeD): dependencies that multiple
package versions can satisify. For instance, 'green>=3.1' is
open-ended since any version above or equals to 3.1 should work.

We explore here whether these OeD actually work, or these are just a
pipe dream. We look in particular to Python packages, but in principle
the idea applies to other programming languages such as
Java,Javascript, Ruby, and the likes that uses some form of OeD.


text:
# Users

[Back to API documentation](./api.md)

## User JSON Object

This object is returned from many of the API calls below.

```javascript
{
	userId: [uuid],
	userName: [string],
	displayName: [string],
	email: [string],
	createdAt: [date/time],
	updatedAt: [date/time],
	location: [string],
	dateOfBirth: [date/time],
	certificationAgencies: [string],
	diverType: [string],
	numberOfDives: [string],
	role: [string],
	imageUrl: [url],
	hasPassword: [boolean]
}
```
Not all of the properties are guaranteed to be present; only the ones that have values set will be
returned for any given user.

* __userId:__ A UUID that uniquely identifies the user account. This the primary means by which users
can be identified - even if user names change!
* __userName:__ The user's unique user name.
* __displayName:__ Usually the user's full name. This is the name by which the user will be referred to in the UI.
* __email:__ The user's e-mail address.
* __createdAt:__ ISO date. Represents the date and time at which the user's profile was first created.
* __updatedAt:__ ISO date. Represents the date and time at which the user's profile was last modified. This value will be undefined until the first time changes are made to the user's profile.
* __location:__ String. Indicates where the user resides (city, region, etc.)
* __dateOfBirth:__ ISO date. Indicates the user's date of birth.
* __certificationAgencies:__ String. Lists the certification agencies with whom the user has received training.
* __diverType:__ String. The diver's level of skill/experience. One of `novice`, `vacation`, `typical`, `advanced`, `tech`, `commercial`, `divemaster`, or `instructor`.
* __numberOfDives:__ String. The approximate number of dives the user has logged in their lifetime. One of `unknown`, `no logs`, `0`, `<20`, `<50`, `<100`, `<500`, `<1000`, `<5000`, `<9000`, or `9000+`.
* __role:__ String. Indicates the user's role on the site. One of `user`, or `admin`.
* __imageUrl:__ String. A URL to an image of the user to be displayed with their profile.
* __hasPassword:__ Boolean. Indicates whether or not the user has a password set on their profile. Users who do not have passwords set cannot log in using the traditional username/password method. (They must use OAuth providers.)

## Create New User (Local)

Creates a new user account in the sytem.

### Route
```
POST /api/users/
```

### Data Params
```javascript
{
	usernName: [string],
	email: [string],
	password: [string],
	displayName: [string]
}
```

* __userName:__ Required. A unique user name to identify the new user. Must be alphanumeric though hyphens, underscores, and periods are allowed in the middle. Minimum lenght is 3 characters and maximum is 30.
* __email:__ Required. The e-mail address at which the new user can be contacted. This must also be unique to the user. Only valid e-mail addresses are accepted.
* __password:__ Required. A strong-ish password containing letters, numbers, and special characters. Minimum length is 7 characters and the maximum is 30.
* __displayName:__ Optional. An optional display name (usually the user's full name) to display on the site in place of the user name.

### Success Response
* __Status Code:__ 200

The details of the newly-created user account are returned as a User JSON Object.

### Error Response
* __Status Code 400:__ Bad request
  * __Error ID 1000:__ Validation error. One of the required parameters was omitted or a parameter contained an invalid value. Check the error details for what the problem was.
  * __Error ID 1010:__ User name is taken. The selected user name already belongs to a user in the database. Select a new user name and try again.
  * __Error ID 1020:__ Email is taken. The selected e-mail address already belongs to a user in the database. Perhaps an account recovery is in order?
* __Status Code 500:__ Internal server error.

## Get User Profile

Returns the user profile for the requested user.

### Route
```
GET /api/users/:userName
```
* __:userName__ The user name that identifies the user for which the profile should be returned.

### Success Response
* __Status Code:__ 200

A User JSON Object detailing the requested user profile is returned.

### Error Response
* __Status Code 401:__ User is currently unauthenticated or does not have permission to view the requested user profile.
* __Status Code 404:__ This is returned when a site administrator attempts to view the profile of a user that does not exist in the system. (Non-admin users will receive a 401 response for security reasons.)
* __Status Code 500:__ Internal server error.

## Get Current User Profile

Returns the user profile of the currently logged-in user.

### Route
```
GET /api/user/
```

This route is effectively an alias for `GET /api/users/{current_user}`. See documentation above for Get User Profile route.

## Update User Profile

Updates an existing user's profile.

### Route
```
PUT|PATCH /api/users/:userName
```
* __:userName__ The user name that identifies the user for which the profile should be updated.

### Data Params
```javascript
{
	displayName: [string],
	email: [string],
	location: [string],
	dateOfBirth: [string],
	certificationAgencies: [string],
	diverType: [string],
	numberOfDives: [string]
}
```

Any of these fields can be omitted if no update is necessary on that field (hence the `PATCH` route.)
Setting any of these fields to `null` will delete their values from the user's profile. These fields are the same as those found in the User JSON Object documented above. See that documentation for valid values.

__NOTE:__ `email` cannot be set to `null` because users _must_ have an e-mail address set on their account. Attempting this will result in a 403 (Forbidden Action) HTTP response and no updates will take place on the user's profile.

### Success Response
* __Status Code:__ 200

A User JSON Object is returned containing the user's profile information with the newly-imposed updates.

### Error Response
* __Status Code 400:__ Bad request. One or more of the fields contained invalid data. See the User JSON Object documentation above for details on what is valid for each of the fields. This error can also result when a field not documented here is included in the request.
* __Status Code 401:__ Not authorized. User is unauthenticated or not authorized to update the requested profile.
* __Status Code 403:__ Forbidden action. The update was refused for one of the following two reasons:
  * An attempt was made to delete the user's e-mail address (by setting `email` to `null`) or...
  * An attempt was made to set the user's e-mail address to one that is already registered to another user in the system.
* __Status Code 404:__ Not found. This is returned to administrative users who attempt to update profiles for users that do not exist. (Non-admins receive a 401 response for security reasons.)
* __Status Code 500:__ Internal server error.

repository: ChrisCarleton/DiveLog

repo_name: ChrisCarleton/DiveLog


text:
cas-addon-external-config-services-registry-support
===================================================

> This project was developed as part of Unicon's [Open Source Support program](https://unicon.net/opensource).
Professional Support / Integration Assistance for this module is available. For more information [visit](https://unicon.net/opensource/cas).

Foundational classes supporting external configuration facilities for services registries implementations. Such APIs and framework facilities
include generic external config unmarshalling and generic Spring's application event listener implementation to react to external config changes at runtime
and ensure that the registered services are then unmarshalled and reloaded into memory for use by other CAS components.

### Current version
`1.0.0-GA`

### Supported CAS version
The minimum supported CAS server version is `4.0.0`


text:
# Android Sign

[![Step changelog](https://shields.io/github/v/release/bitrise-steplib/steps-sign-apk?include_prereleases&label=changelog&color=blueviolet)](https://github.com/bitrise-steplib/steps-sign-apk/releases)

Signs your APK or Android App Bundle before uploading it to Google Play Store.

Description

Once you have uploaded your keystore file and provided your keystore credentials on the **Code Signing** tab of the Workflow Editor, the **Android Sign** Step signs your APK digitally.
Bitrise assigns Environment Variables to the uploaded file and credentials, and uses those in the respective fields of the **Android Sign** Step.
Once the Step runs, it produces a signed APK or App Bundle which will be used as the input value of the **App file path** field in the **Google Play Deploy** Step.

### Configuring the Step

1. Add the **Android Sign** Step after a build Step in your deploy workflow.
2. Upload the keystore file to the **Upload file** field on the **Code Signing** tab.
3. Provide your keystore password, keystore alias and private key password to the relevant fields on the **Code Signing** tab.
4. Run your build.

### Troubleshooting
Make sure you have the **Android Sign** Step right after a build Steps but before **Deploy to Google Play** Step in your deploy workflow.
If you wish to get your Android project signed automatically, use the **Android Sign** Step and do not set any gradle task for the signing, otherwise, the Step will fail.

### Useful links
- [Android code signing using Android Sign Step](https://devcenter.bitrise.io/code-signing/android-code-signing/android-code-signing-using-bitrise-sign-apk-step/)
- [Android deployment](https://devcenter.bitrise.io/deploy/android-deploy/android-deployment-index/)

### Related Steps
- [Android Build](https://www.bitrise.io/integrations/steps/android-build)
- [Gradle Runner](https://www.bitrise.io/integrations/steps/gradle-runner)
- [Deploy to Bitrise.io](https://www.bitrise.io/integrations/steps/deploy-to-bitrise-io)

## 🧩 Get started

Add this step directly to your workflow in the [Bitrise Workflow Editor](https://devcenter.bitrise.io/steps-and-workflows/steps-and-workflows-index/).

You can also run this step directly with [Bitrise CLI](https://github.com/bitrise-io/bitrise).

### Examples

1. Build an Android App Bundle:

```yaml
workflows:
  release:
    envs:
    - PROJECT_LOCATION: .
    - MODULE: app
    - VARIANT: release
    # If the Android keystore is configured in the workflow editor, BITRISEIO_ANDROID_KEYSTORE* envs will be set automatically
    - BITRISEIO_ANDROID_KEYSTORE_URL: $BITRISEIO_ANDROID_KEYSTORE_URL
    - BITRISEIO_ANDROID_KEYSTORE_PASSWORD: $BITRISEIO_ANDROID_KEYSTORE_PASSWORD
    - BITRISEIO_ANDROID_KEYSTORE_ALIAS: $BITRISEIO_ANDROID_KEYSTORE_ALIAS
    - BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD: $BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD

    steps:
    - activate-ssh-key:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone: {}
    - install-missing-android-tools:
        inputs:
        - gradlew_path: $PROJECT_LOCATION/gradlew
    - android-build:
        inputs:
        - project_location: $PROJECT_LOCATION
        - module: $MODULE
        - variant: $VARIANT
        - build_type: aab
```
2. Sign the App Bundle:

```yaml
    - sign-apk:
        inputs:
        - use_apk_signer: false
```

3. Deploy the signed App Bundle to Bitrise:

```yaml
    - deploy-to-bitrise-io: {}
```

## ⚙ Configuration

Inputs

| Key | Description | Flags | Default |
| --- | --- | --- | --- |
| `android_app` | Path(s) to the build artifact file to sign (`.aab` or `.apk`).  You can provide multiple build artifact file paths separated by `\|` character.  Format examples:  - `/path/to/my/app.apk` - `/path/to/my/app1.apk\|/path/to/my/app2.apk\|/path/to/my/app3.apk`  - `/path/to/my/app.aab` - `/path/to/my/app1.aab\|/path/to/my/app2.apk\|/path/to/my/app3.aab` | required | `$BITRISE_APK_PATH\n$BITRISE_AAB_PATH` |
| `keystore_url` | For remote keystores you can provide any download location (e.g. `https://URL/TO/keystore.jks`). For local keystores provide file path url. (e.g. `file://PATH/TO/keystore.jks`). | required, sensitive | `$BITRISEIO_ANDROID_KEYSTORE_URL` |
| `keystore_password` |  | required, sensitive | `$BITRISEIO_ANDROID_KEYSTORE_PASSWORD` |
| `keystore_alias` |  | required, sensitive | `$BITRISEIO_ANDROID_KEYSTORE_ALIAS` |
| `private_key_password` | If key password equals to keystore password (not recommended), you can leave it empty. Otherwise specify the private key password.  | sensitive | `$BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD` |
| `page_align` | If enabled, it tells zipalign to use memory page alignment for stored shared object files.  - `automatic`: Enable page alignment for .so files, unless atribute `extractNativeLibs="true"` is set in the AndroidManifest.xml - `true`: Enable memory page alignment for .so files - `false`: Disable memory page alignment for .so files  | required | `automatic` |
| `use_apk_signer` | Indicates if the signature should be done using `apksigner` instead of `jarsigner`. | required | `false` |
| `signer_scheme` | If set, enforces which Signature Scheme should be used by the project.  - `automatic`: The tool uses the values of `--min-sdk-version` and `--max-sdk-version` to decide when to apply this Signature Scheme. - `v2`: Sets `--v2-signing-enabled` true, and determines whether apksigner signs the given APK package using the APK Signature Scheme v2. - `v3`: Sets `--v3-signing-enabled` true, and determines whether apksigner signs the given APK package using the APK Signature Scheme v3. - `v4`: Sets `--v4-signing-enabled` true, and determines whether apksigner signs the given APK package using the APK Signature Scheme v4. This scheme produces a signature in an separate file (apk-name.apk.idsig). If true and the APK is not signed, then a v2 or v3 signature is generated based on the values of `--min-sdk-version` and `--max-sdk-version`.  | required | `automatic` |
| `debuggable_permitted` | Whether to permit signing `android:debuggable="true"` APKs. Android disables some of its security protections for such apps.  | required | `true` |
| `output_name` | If is empty then the output name is `app-release-bitrise-signed`. Else it's the specified name. Do not add the file extension here.  |  |  |
| `verbose_log` | Enable verbose logging? | required | `false` |
| `apk_path` | __This input is deprecated and will be removed on 20 August 2019, use `App file path` input instead!__  Path(s) to the build artifact file to sign (`.aab` or `.apk`).  You can provide multiple build artifact file paths separated by `\|` character.  Deprecated, use `android_app` instead.  Format examples:  - `/path/to/my/app.apk` - `/path/to/my/app1.apk\|/path/to/my/app2.apk\|/path/to/my/app3.apk`  - `/path/to/my/app.aab` - `/path/to/my/app1.aab\|/path/to/my/app2.apk\|/path/to/my/app3.aab` | required |  |

Outputs

| Environment Variable | Description |
| --- | --- |
| `BITRISE_SIGNED_APK_PATH` | This output will include the path of the signed APK. If the build generates more than one APK this output will contain the last one's path. |
| `BITRISE_SIGNED_APK_PATH_LIST` | This output will include the paths of the generated APKs If multiple APKs are provided for signing the output paths are separated with `\|` character, for example, `app-armeabi-v7a-debug.apk\|app-mips-debug.apk\|app-x86-debug.apk` |
| `BITRISE_SIGNED_AAB_PATH` | This output will include the path of the signed AAB. If the build generates more than one AAB this output will contain the last one's path. |
| `BITRISE_SIGNED_AAB_PATH_LIST` | This output will include the paths of the generated AABs. If multiple AABs are provided for signing the output paths are separated with `\|` character, for example, `app-armeabi-v7a-debug.aab\|app-mips-debug.aab\|app-x86-debug.aab` |
| `BITRISE_APK_PATH` | This output will include the path(s) of the signed APK(s). If multiple APKs are provided for signing the output paths are separated with `\|` character, for example, `app-armeabi-v7a-debug.apk\|app-mips-debug.apk\|app-x86-debug.apk` |
| `BITRISE_AAB_PATH` | This output will include the path(s) of the signed AAB(s). If multiple AABs are provided for signing the output paths are separated with `\|` character, for example, `app-armeabi-v7a-debug.aab\|app-mips-debug.aab\|app-x86-debug.aab` |

## 🙋 Contributing

We welcome [pull requests](https://github.com/bitrise-steplib/steps-sign-apk/pulls) and [issues](https://github.com/bitrise-steplib/steps-sign-apk/issues) against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://devcenter.bitrise.io/bitrise-cli/run-your-first-build/).

Learn more about developing steps:

- [Create your own step](https://devcenter.bitrise.io/contributors/create-your-own-step/)
- [Testing your Step](https://devcenter.bitrise.io/contributors/testing-and-versioning-your-steps/)

repository: bitrise-steplib/steps-sign-apk

gha_language: Go

repo_name: bitrise-steplib/steps-sign-apk


text:
\page UtilsTypesLibrary Utils::Types Library
# Utils/Types

This directory contains a library of helper types.

## Circular Buffer

This type uses a circular buffer to implement a bounded FIFO stream,
i.e., a logical store that can grow to a maximum
size and can shrink.
The logical store is byte addressable with addresses
0 through _n - 1_, where _n_ is the current store size.
It grows by increasing the top address from _n - 1_
to _n + m - 1_ and copying _m_ bytes of data into the
logical memory so allocated.
It shrinks by deleting the lowest _m_ addresses
and renumbering the logical addresses of the
remaining bytes starting at zero.

The implementation uses a fixed-size physical store.
The logical store is represented as a base or head index into
the physical store and an allocated size.
Initially both are zero.
When data is added to the circular buffer, the allocated size grows.
When data is removed from the circular buffer, the allocated
size shrinks, and the head pointer advances.

The allocated store size never exceeds the physical store size.
However, when the head index is greater than zero, the sum of
the head index and the allocated size may exceed
the physical store size.
In this case, the logical store wraps around to the beginning
of the physical store.
Further, deleting data while in this state may cause
the head index to wrap around.

`CircularBuffer` does not provide concurrency control.
If multiple threads use the buffer, the uses must
be guarded by other concurrency control, e.g.,
a queue or lock.

The `CircularBuffer` type provides the following operations.

### Constructor

```c++
CircularBuffer(U8* const buffer, const NATIVE_UINT_TYPE size)
```

Construct a circular buffer with the given physical store,
specified as a starting pointer and a size in bytes.

### Adding Data

```c++
Fw::SerializeStatus serialize(const U8* const buffer, const NATIVE_UINT_TYPE size);
```

If the current logical store size plus `size` exceeds
the maximum logical store size, then return an error.
Otherwise increase the logical store size by
`size` bytes and copy `size` bytes starting at `buffer`
into the new logical memory.

The operation is called `serialize` following F Prime practice.
No data is actually serialized (the data is copied byte for byte).

### Reading Data

```c++
Fw::SerializeStatus peek(char& value, NATIVE_UINT_TYPE offset = 0) const;
```

If `offset` is not a valid address of the logical store,
then return an error.
Otherwise read a `char` value at address `offset` of the logical store
and store the result into `value`.

```c++
Fw::SerializeStatus peek(U8& value, NATIVE_UINT_TYPE offset = 0) const;
```

Same as previous, but read a `U8` value.

```c++
Fw::SerializeStatus peek(U32& value, NATIVE_UINT_TYPE offset = 0) const;
```

If `offset` through `offset` + 3 are not valid addresses
in the logical store, then return an error.
Otherwise read four bytes of the logical store starting at `offset`,
interpret them as an unsigned 32-bit integer in big endian order,
and store the result into `value`.

```c++
Fw::SerializeStatus peek(U8* buffer, NATIVE_UINT_TYPE size, NATIVE_UINT_TYPE offset = 0) const;
```

If `offset` through `offset + size - 1` are not all valid
addresses in the logical store, then return an error.
Otherwise copy `size` bytes starting at `offset` into
the memory starting at `buffer`.

### Deleting Data

```c++
Fw::SerializeStatus rotate(NATIVE_UINT_TYPE amount);
```

If the logical store size _s_ is less than `amount`, then
return an error.
Otherwise delete `amount` bytes from the bottom of the
logical store: reassign the bytes at addresses `amount`
through _s_ - 1 to addresses zero through _s_ - `amount` - 1,
and set the logical store size to _s_ - `amount`.

### Querying Buffer State

```c++
NATIVE_UINT_TYPE get_allocated_size() const;
```

Return the number of allocated bytes, i.e., the
current logical store size.
This is the maximum number of bytes that may be read from
the logical store without adding data.

```c++
NATIVE_UINT_TYPE get_free_size() const;
```

Return the number of free bytes, i.e., the
maximum logical store size minus the current logical store size.
This is the number of bytes that may be added to the logical
store without deleting data.

```c++
NATIVE_UINT_TYPE get_capacity() const;
```

Return the maximum logical store size (equal to the physical store size).
This is the total number of bytes that may be added to an empty
circular buffer.

repository: nasa/fprime

branch_name: refs/heads/devel

repo_name: nasa/fprime


text:
## border-top-color

### Summary

The `border-top-color` CSS property sets the color of the top border of an element. Note that in many cases the shorthand CSS properties [`border-color`][0] or [`border-top`][1] are more convenient and preferable.

* _[Initial value][2]_ `currentColor`
* _Applies to_ all elements
* _[Inherited][3]_ no
* _Media_ [`visual`][4]
* _[Computed value][5]_ If the value is translucent, the computed value will be the `rgba()` corresponding one. If it isn't, it will be the `rgb()` corresponding one. The `transparent` keyword maps to `rgba(0,0,0,0)`.
* _Animatable_ yes, as a [color][6]
* _Canonical order_ the unique non-ambiguous order defined by the formal grammar

### Syntax

    [Formal syntax][7]: [<color>][8]

    border-top-color: red
    border-top-color: rgb(255, 128, 0)
    border-top-color: hsla(100%, 50%, 25%, 0.75)
    border-top-color: #ffbb00
    border-top-color: currentColor
    border-top-color: transparent

    border-top-color: inherit

### Values

**<`color>`**

> Is a [`<color>`][9] CSS value describing the color of the top border.

**inherit**

> Is a keyword denoting the color of the top border of the parent's element (which may be different from the `border-top-color` default value)

### Examples

### A simple div with a border

#### HTML Content

This is a box with a border around it.
           Note which side of the box is
           red.

#### CSS Content

    .mybox {
        border: solid 0.3em gold;
        border-top-color: red;
        width: auto;
    }
    .redtext {
        color: red;
    }

#### Result

[0]: https://developer.mozilla.org/en/docs/Web/CSS/border-color
[1]: https://developer.mozilla.org/en/docs/Web/CSS/border-top
[2]: https://developer.mozilla.org/en/docs/CSS/initial_value
[3]: https://developer.mozilla.org/en/docs/CSS/inheritance
[4]: https://developer.mozilla.org/en/docs/CSS/@media#Media_groups
[5]: https://developer.mozilla.org/en/docs/CSS/computed_value
[6]: https://developer.mozilla.org/en/docs/CSS/color_value#Interpolation "Values of the <color> CSS data type are interpolated on each of their red, green, blue components, each handled as a real, floating-point number. Note that interpolation of colors happens in the alpha-premultiplied sRGBA color space to prevent unexpected grey colors to appear."
[7]: https://developer.mozilla.org/en/docs/CSS/Value_definition_syntax "https://developer.mozilla.org/en/docs/CSS/Value_definition_syntax"
[8]: https://developer.mozilla.org/en/docs/CSS/color
[9]: https://developer.mozilla.org/en/docs/Web/CSS/color_value


text:
# DAY 1 CHALLENGE

# Question 1
## Tech
Here are the tools used to work on the assignment

- [Python3]
- [sqlite3]

## Installation
Download python3 and run the scripts

## Boot Camp Python Problems

```sh
Write a Python program to create an SQLite database and connect with the database and print the version of the SQLite database.
```

## Development

Want to contribute? Great!
Open your favorite Terminal and run these commands.

```sh
    python3 db.py
```

## License

MIT

**Free Software, **

path: /assignments/group/Day 1/README.md


text:
---
hrs_structure:
  division: '2'
  volume: '11'
  title: '26'
  chapter: 481X
  section: 481X-8
type: hrs_section
tags:
  - Business
menu:
  hrs:
    identifier: HRS_0481X-0008
    parent: HRS0481X
    name: 481X-8 Contractual liability insurance policies
weight: 38040
title: Contractual liability insurance policies
full_title: 481X-8 Contractual liability insurance policies
---
**[§481X-8] Contractual liability insurance policies.** (a) Contractual liability insurance policies in this State shall provide that if covered service is not provided by the service contract provider or administrator within sixty days of proof of loss by the contract holder, the contract holder is entitled to apply directly to the contractual liability insurance company for services under the service contract that are covered under the policy.

(b) A contractual liability insurance policy insurer shall not terminate the policy until it has issued a notice of termination required by the commissioner under the insurance laws of this State. The termination of a contractual liability insurance policy shall not reduce the insurer's responsibility for service contracts issued by providers prior to the date of termination.

(c) A provider covered by a contractual liability insurance policy shall be considered the agent of the contractual liability insurance policy insurer, for purposes of determining duties owed by the insurer to contract holders in accordance with the service contract and this chapter.

(d) Insurers issuing reimbursement insurance to providers are deemed to have received the premiums for the insurance upon the payment of provider fees by consumers for service contracts issued by the insured provider. [L 2000, c 221, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Lab: Using a Mediator

## Overview

In this lab, show a script running two ACA-Py-based agents interacting while one of them is using a mediator. We’ll be running a version of the Alice-Faber demo that is used for performance testing.

## How to Run

This lab can be run locally with Docker or on Play with Docker in your browser. For general instructions for each, see the following:

- [Running LFS173x Labs](RunningLabs.md)

## Instructions

For this lab, you will need just a single terminal session. As with many of the other labs, clone the ACA-Py repo in the terminal session on Play with Docker or locally:

```bash
git clone https://github.com/hyperledger/aries-cloudagent-python
cd aries-cloudagent-python/demo

```

The performance demonstration runs an instance of Alice and Faber, and has Faber issue a number of credentials to Alice, one after another. Then, each agent publishes timing information about the calls executed and the time taken for those calls. Optionally, you can run the test with a mediator, which is what we’ll do first. To run the test execute this command:

```bash
LEDGER_URL=http://greenlight.bcovrin.vonx.io ./run_demo performance --mediation --timing --count 100

```

After the run, review the timing output to see both the counts of the controller actions executed and the cumulative time taken for each action. As you scan the numbers, think about how controllers work and the number of actions that were executed. Do those counts make sense, given the number of credentials issued/received? Do the timings make sense? Note the actions that are especially slow. Think about why they would be slow. Likely it's because of the underlying cryptographic actions that are being executed. Notice as well that the total time taken to run the test is less the cumulative time for all the actions. Why? It’s because Faber is issuing multiple credentials in parallel—not waiting for Alice to respond to one before starting the next.

If you are interested, you can run the tests with a different number of credential issuances (by changing the `--count` number) and without the mediator (by removing the `--mediation` parameter). The latter change will show you the impact of the mediator (spoiler alert -- not much!)

By the way, in the progress bar, how come the "Receiving credentials" bar moves ahead of the "Issuing credentials" bar?

### Navigating the Code

As we did with the Faber and Alice code, let’s take a quick look at the code for this demo, focusing on the impact of the router in the configuration. The code for the demo is in [performance.py](https://github.com/hyperledger/aries-cloudagent-python/blob/master/demo/runners/performance.py). You’ll see it is much like the Alice and Faber code, but with all three controllers run from the same script.

The main thing to note is the minimal impact of the mediator (router) on the code. Scanning the script we can find where the use of the router impacts the code—the places we see `if mediation` constructs:

- Instantiating the router (mediator) controller - [line](https://github.com/hyperledger/aries-cloudagent-python/blob/ab8097d199ae07a31459509eec007451483526e3/demo/runners/performance.py#L237)
- Starting the router ACA-Py process - line 245
- Having Alice’s agent connect with the router agent - line 256
- Having Alice’s agent add the router key data when connecting to Faber - line 263

After that, the Faber and Alice controllers don’t do anything differently—the rest of the controller code is the same with or without the mediator. Thus, Faber controller is unchanged, while the Alice controller has just two changes to account for the use of a mediator. Faber’s ACA-Py instance does behave differently (wrapping the message for Alice twice, and sending to the mediator), but that is invisible to the Faber controller. Likewise, Alice’s ACA-Py instance receives messages from the mediator, but again, that’s invisible to Alice’s controller.

The underlying message? Adding in mediators has a small impact on the controller that is going to use the mediator, but has no impact on anything else. Routing with mediators is handled at the messaging envelope protocol layer (DIDComm) without affecting the higher level Aries protocols.

## Takeaways

The key takeaway from this lab is how mediators can be integrated into agent-to-agent scenarios with minimal impact to the agents code. There is no impact on the controllers of agents connecting to an agent with a mediator. For an agent using a mediator, there is a little bit of effort in connecting to the mediator, but after that is done, the rest of the controller operations “just work” with the mediator in place.

Some of you will be disappointed that this lab does not include a mobile agent (or at least a simulated one) and a mediator for that mobile agent. We are too! To this point in the evolution of Aries, the mobile agent mediators that have been built have not been open source, so we have no good examples to share. That’s changing rapidly, and if we find a good mobile agent and mediator example, we’ll update this lab. Interested in contributing a mediator demo to one of the Aries repos?  Let us know!

Oh, and about the progress bar question. If you look at the "Issue Credential" protocol ([RFC 0453 Issue Credential V2](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2)), the holder receiving the credential sends an "Ack" message back to the Issuer after receiving the credential, so it completes the protocol before the Issuer, who has to wait until the "Ack" messages is received and processed.

That's it for this lab! Please return to the course.

repository: swcurran/ToIPLabs

repo_name: swcurran/ToIPLabs


text:
# Live Form Validation

This is example of live form validation for nette/forms.

## Installation

```bash
composer install
```

## See

- `app/Presenters/HomepagePresenter` - form
-<EMAIL_ADDRESS>- linked live validation script

repository: MartinKokesCz/playground

repo_name: MartinKokesCz/playground


text:
# Enhancing Dynamic Mode Decomposition using Autoencoder Networks

## Abstract
Prediction, estimation, and control of dynamical systems remains challenging due to nonlinearity. The Koopman operator is an infinite-dimensional linear operator that evolves the observables of a dynamical system which we approximate by the dynamic mode decomposition (DMD) algorithm. Using DMD to predict the evolution of a nonlinear dynamical system over extended time horizons requires choosing the right observable function defined on the state space. A number of DMD modifications have been developed to choose the right observable function, such as Extended DMD.  Here, we propose a simple machine learning based approach to find these coordinate transformations.
This is done via a deep autoencoder network. This simple DMD autoencoder is tested and verified on nonlinear dynamical system time series datasets, including the pendulum and fluid flow past a cylinder.

*Keywords* - Dynamic mode decomposition, Deep learning, Dynamical systems, Koopman analysis, Observable functions.

## Dependencies
1. [Python >= 3.7](https://www.python.org/downloads/)
1. [numpy >= 1.19.1](https://numpy.org/install/)
2. [tensorflow >= 2.0](https://www.tensorflow.org/install)
3. [matplotlib >= 3.3.1](https://matplotlib.org/users/installing.html)
4. [pydmd >=0.3](https://pypi.org/project/pydmd/)

## References
[1] [Bethany Lusch, J. Nathan Kutz, and Steven L. Brunton. Deep learning for universal linear embeddings of nonlinear dynamics. Nature Communications, 9(1):4950, 2018.](https://arxiv.org/pdf/1712.09707.pdf)

[2] [J. H. Tu, C. W. Rowley, D. M. Luchtenburg, S. L. Brunton, and J. Nathan Kutz. On dynamic mode decomposition: theory and applications. J. Comp. Dyn., 1(2):391-421, 2014.](https://arxiv.org/abs/1312.0041)

[3] [B. R. Noack, K. Afanasiev, M. Morzynski, G. Tadmor,
and F. Thiele. A hierarchy of low-dimensional models for the transient and post-transient cylinder wake.
Journal of Fluid Mechanics, 497:335–363, 2003.](http://www.berndnoack.com/publications/2003_JFM_Noack.pdf)

## License
[MIT](https://choosealicense.com/licenses/mit/)

## Important Python subroutines
This is a collection of Python subroutines and examples that illustrate how to train a Dynamic Mode Decomposition autoencoder.

The most important Python subroutines are:

  - dmd_machine:

        dmd_machine/autoencoder_network.py
        dmd_machine/dmd_ae_machine.py
        dmd_machine/loss_function.py

  - data:

        data/Data.py

  - driver/runfile:

        train_discrete_dataset_machine.py
        train_pendulum_machine.py
        train_fluid_flow_machine.py

## About the Authors
Mathematics Department, San Diego State University

Research project under the supervision of Professor Christopher Curtis (ccurtis@sdsu.edu).

- Opal Issan- Applied Mathematics undergraduate student<EMAIL_ADDRESS>


text:
---
title: AOP in .NET
categories: .Net, IT Related, Software Design
tags: AOP, Dependency Injection, Useful Links
date: 2008-08-11 21:26:42 +10:00
---

A few months ago I did some research into dependency injection frameworks. One of the interesting features provided by many of the DI frameworks was the support for [AOP][0]. This is really interesting stuff and great for injecting logging and caching implementations without having to modify existing code.

There are several AOP implementations around ([Oren Eini][1] identified seven in [this post][2]) and I have always wondered how some of them worked. Unfortunately I never got the time to research it.

[Using aspects in .NET - Part 1][3] is a post by [Istvan][4] that just popped up in my feed reader. He describes how to create an AOP implementation using [ContextBoundObject][5] and [ProxyAttribute][6] classes. I didn't previously know that combining these types in the .Net framework allows you to override the new statement. This is extremely powerful. I had assumed that this was the method that [TypeMock][7] used for creating unit testing mocks, but Oren's post identifies it as using a profiling API.

<!--more-->

I think the centerpiece of Istvan's implementation is the [RealProxy][8] class. This is another one of those .Net classes that is incredibly powerful. I have used RealProxy before to create a wrapper for WCF channel management. Thankfully this helped me to understand Istvan's post quickly. I am looking forward to his Part 2 post.

The only thing I don't like about this style of AOP is that it requires the aspected class to derive from ContextBoundObject and have a ProxyAttribute derived attribute decorated on the class. This has the disadvantage that the aspected class must be not only designed for AOP, but coded for this specific type of AOP. I'm a fan of [POCO][9] code design, so at this stage I think the profiling API version of AOP used by TypeMock is so much more powerful and has less impact on the code.

BTW, Castle Windsor was my pick of the dependency injection frameworks as it was the most suitable for my requirements. I also did some research into mocking frameworks about the same time. While TypeMock was certainly the most powerful, its particular implementation isn't very flexible. Oren's [RhinoMocks][10] was my pick on that one.

[0]: http://en.wikipedia.org/wiki/Aspect-oriented_programming
[1]: http://www.ayende.com/Blog/
[2]: http://www.ayende.com/Blog/archive/2007/07/02/7-Approaches-for-AOP-in-.Net.aspx
[3]: http://dotneteers.net/blogs/divedeeper/archive/2008/08/11/UsingAspects1.aspx
[4]: http://dotneteers.net/members/inovak/default.aspx
[5]: http://msdn.microsoft.com/en-us/library/system.contextboundobject.aspx
[6]: http://msdn.microsoft.com/en-us/library/system.runtime.remoting.proxies.proxyattribute.aspx
[7]: http://www.typemock.com/
[8]: http://msdn.microsoft.com/en-us/library/system.runtime.remoting.proxies.realproxy.aspx
[9]: http://en.wikipedia.org/wiki/POCO
[10]: http://www.ayende.com/projects/rhino-mocks.aspx

license: MIT,Unlicense

detected_licenses: MIT Unlicense

gha_language: SCSS


text:
---
layout: default
title: Setup and Tools
chapter: 0
description: >
  Get your local machine setup for text analysis.
---

## Setting Up Python

Plan steps for world domination then cats take over the world eat from dog's food, swat at dog, and meow, chase red laser dot but chase imaginary bugs. Inspect anything brought into the house love to play with owner's hair tie but chew on cable meow for food, then when human fills food dish, take a few bites of food and continue meowing paw at your fat belly burrow under covers, or unwrap toilet paper. Chew iPad power cord. Scratch leg; meow for can opener to feed me human is washing you why halp oh the horror flee scratch hiss bite find something else more interesting.

Always hungry throwup on your pillow.

### Anaconda and Miniconda

Curl into a furry donut tuxedo cats always looking dapper, or missing until dinner time brown cats with pink ears, so peer out window, chatter at birds, lure them to mouth swat at dog.

```bash
bash ./Miniconda-latest-MacOSX-x86_64.sh
```

Ignore the squirrels, you'll never catch them anyway.   Give attitude favor packaging over toy, or hide head under blanket so no one can see yet get video posted to internet for chasing red dot. Loves cheeseburgers. Hiss at vacuum cleaner chew foot.

### Installing Packages

```bash
pip install textkit
```

Here is an example of using an `iframe` in Jekyll:

<iframe src="http://bl.ocks.org/mbostock/raw/978f6c03c9aab8af8594/a0a7f9c5604cf7dc670d092cc5cf4082a216332f/" marginwidth="0" marginheight="0" scrolling="no"></iframe>

Right now the width and height of the iframe are controlled by css in `_chapter.scss`. If this proves not robust enough, we can switch to specifying width and height explicitly in the `iframe` definition.

The source of this particular iframe is a [block](http://bl.ocks.org/mbostock/raw/978f6c03c9aab8af8594/a0a7f9c5604cf7dc670d092cc5cf4082a216332f/).


text:
---
title: Hi! I'm Talor Anderson.
layout: post
---

I build exciting things with code.

I'm ~~an incoming~~ \*officially\* a New Grad Software Engineer at [Intuit](https://intuit.com){:target="_blank"}.

In the past, I was a developer at [Scratch.app](//scratch.app){:target="_blank"} building an educational platform for students, teachers, and universities. I hold a B.S. in Computer Science from [Cal Poly Pomona](https://www.cpp.edu/sci/computer-science/){:target="_blank"}, focused in software engineering and machine learning.

My work is through the screen of a computer, but my heart belongs to the outdoors. I love climbing and walking my [dog 🐕](https://instagram.com/thatsabiglab){:target="_blank"}.

**Find me here:**

* [github](https://github.com/talor-a){:target="_blank"}
* [linkedin]({{site.linkedin_url}}){:target="_blank"}
* [twitter]({{site.twitter_url}}){:target="_blank"}
* [instagram](site.instagram_url){:target="_blank"}

**I'm listening to**
<iframe src="https://open.spotify.com/embed/playlist/7FDHVJo4ncDwM8r0NS3tcP" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
**I'm inspired by:**

* making the web [smaller](https://runyourown.social/#how-to-run-a-small-social-network-site-for-your-friends){:target="_blank"}, [slower](https://jackcheng.com/the-slow-web/){:target="_blank"}, more [friendly](https://www.robinsloan.com/notes/home-cooked-app/){:target="_blank"}, and more [human](https://medium.com/@the_i_i/were-a-niche-we-just-didn-t-know-9561f662e127){:target="_blank"}.
* how the internet shapes our [relationships](https://youshoulddateppt.com){:target="_blank"} and [identity](https://www.snap.com/en-US/news/post/the-liquid-self){:target="_blank"}
* improving technology through education
* sustainability and environmental awareness

**If you're also interested in these things...**

Get in [touch](https://twitter.com/talor_a){:target="_blank"} and let's talk about it! :)

repository: Talor-A/talordotdev

gha_language: HTML

repo_name: Talor-A/talordotdev


text:
# Erlang Pipeline Parse Transform

## What is it?

Sometimes erlang programmer wants to apply function composition.

Other way to do that is creating multiple bindings:

    R1 = fun1(Arg1, Arg2),
    R2 = mod2:fun2(R1),
    Result = fun3(R2).

This parse transform allows the user to write like this:

    Result = [fun1, mod2:fun2, fun3] (Arg1, Arg2).

More complicated options are available -- see `src/pipeline_demo.erl` for examples.

## Including in your applications

### rebar3

Add the following in your dependencies

```erlang
{deps, [
    ...
    {pipeline, {pkg, erl_pipeline}}   %% <--- That's line to add
]}.
```

You want to make sure you specify it that way, with the application being called `pipeline` and the package being called `erl_pipeline`.

### rebar2

If you're still on rebar2 (trust me, I get it, no judgment here, I totally get it), add this to your deps:

```erlang
{deps, [
    {pipeline, {git, "https://github.com/choptastic/pipeline", {branch, master}}}
]}.
```

## Try it out

To use pipeline, simply compile your modules with `-compile({parse_transform, pipeline}).` module attribute.

## License and Team

Creator: [Danil Zogoskin](https://github.com/stolen)
Maintainer: [Jesse Gumm](http://jessegumm.com)
Licenced: [MIT License](https://github.com/choptastic/pipeline/blob/master/LICENSE)

# CHANGES

## 0.2.0

* Updated to work with rebar3 and hex
* Fix compilation issue on Erlang 24

repository: choptastic/pipeline

gha_language: Erlang

repo_name: choptastic/pipeline


text:
# Generative Adversarial Networks (GAN)

This demo implements GAN training described in the original [GAN paper](https://arxiv.org/abs/1406.2661) and deep convolutional generative adversarial networks [DCGAN paper](https://arxiv.org/abs/1511.06434).

The high-level structure of GAN is shown in Figure. 1 below. It is composed of two major parts: a generator and a discriminator, both of which are based on neural networks. The generator takes in some kind of noise with a known distribution and transforms it into an image. The discriminator takes in an image and determines whether it is artificially generated by the generator or a real image. So the generator and the discriminator are in a competitive game in which generator is trying to generate image to look as real as possible to fool the discriminator, while the discriminator is trying to distinguish between real and fake images.

![](./gan.png)

    Figure 1. GAN-Model-Structure
    figure credit

The generator and discriminator take turn to be trained using SGD. The objective function of the generator is for its generated images being classified as real by the discriminator, and the objective function of the discriminator is to correctly classify real and fake images. When the GAN model is trained to converge to the equilibrium state, the generator will transform the given noise distribution to the distribution of real images, and the discriminator will not be able to distinguish between real and fake images at all.

## Implementation of GAN Model Structure
Since GAN model involves multiple neural networks, it requires to use paddle python API. So the code walk-through below can also partially serve as an introduction to the usage of Paddle Python API.

There are three networks defined in gan_conf.py, namely **generator_training**, **discriminator_training** and **generator**. The relationship to the model structure we defined above is that **discriminator_training** is the discriminator, **generator** is the generator, and the **generator_training** combined the generator and discriminator since training generator would require the discriminator to provide loss function. This relationship is described in the following code:
```python
if is_generator_training:
    noise = data_layer(name="noise", size=noise_dim)
    sample = generator(noise)

if is_discriminator_training:
    sample = data_layer(name="sample", size=sample_dim)

if is_generator_training or is_discriminator_training:
    label = data_layer(name="label", size=1)
    prob = discriminator(sample)
    cost = cross_entropy(input=prob, label=label)
    classification_error_evaluator(
        input=prob, label=label, name=mode + '_error')
    outputs(cost)

if is_generator:
    noise = data_layer(name="noise", size=noise_dim)
    outputs(generator(noise))
```

In order to train the networks defined in gan_conf.py, one first needs to initialize a Paddle environment, parse the config, create GradientMachine from the config and create trainer from GradientMachine as done in the code chunk below:
```python
import py_paddle.swig_paddle as api
# init paddle environment
api.initPaddle('--use_gpu=' + use_gpu, '--dot_period=10',
               '--log_period=100', '--gpu_id=' + args.gpu_id,
               '--save_dir=' + "./%s_params/" % data_source)

# Parse config
gen_conf = parse_config(conf, "mode=generator_training,data=" + data_source)
dis_conf = parse_config(conf, "mode=discriminator_training,data=" + data_source)
generator_conf = parse_config(conf, "mode=generator,data=" + data_source)

# Create GradientMachine
dis_training_machine = api.GradientMachine.createFromConfigProto(
dis_conf.model_config)
gen_training_machine = api.GradientMachine.createFromConfigProto(
gen_conf.model_config)
generator_machine = api.GradientMachine.createFromConfigProto(
generator_conf.model_config)

# Create trainer
dis_trainer = api.Trainer.create(dis_conf, dis_training_machine)
gen_trainer = api.Trainer.create(gen_conf, gen_training_machine)
```

In order to balance the strength between generator and discriminator, we schedule to train whichever one is performing worse by comparing their loss function value. The loss function value can be calculated by a forward pass through the GradientMachine.
```python
def get_training_loss(training_machine, inputs):
    outputs = api.Arguments.createArguments(0)
    training_machine.forward(inputs, outputs, api.PASS_TEST)
    loss = outputs.getSlotValue(0).copyToNumpyMat()
    return numpy.mean(loss)
```

After training one network, one needs to sync the new parameters to the other networks. The code below demonstrates one example of such use case:
```python
# Train the gen_training
gen_trainer.trainOneDataBatch(batch_size, data_batch_gen)

# Copy the parameters from gen_training to dis_training and generator
copy_shared_parameters(gen_training_machine,
dis_training_machine)
copy_shared_parameters(gen_training_machine, generator_machine)
```

## A Toy Example
With the infrastructure explained above, we can now walk you through a toy example of generating two dimensional uniform distribution using 10 dimensional Gaussian noise.

The Gaussian noises are generated using the code below:
```python
def get_noise(batch_size, noise_dim):
    return numpy.random.normal(size=(batch_size, noise_dim)).astype('float32')
```

The real samples (2-D uniform) are generated using the code below:
```python
# synthesize 2-D uniform data in gan_trainer.py:114
def load_uniform_data():
    data = numpy.random.rand(1000000, 2).astype('float32')
    return data
```

The generator and discriminator network are built using fully-connected layer and batch_norm layer, and are defined in gan_conf.py.

To train the GAN model, one can use the command below. The flag -d specifies the training data (cifar, mnist or uniform) and flag --useGpu specifies whether to use gpu for training (0 is cpu, 1 is gpu).
```bash
$python gan_trainer.py -d uniform --useGpu 1
```
The generated samples can be found in ./uniform_samples/ and one example is shown below as Figure 2. One can see that it roughly recovers the 2D uniform distribution.

![](./uniform_sample.png)

    Figure 2. Uniform Sample

## MNIST Example
### Data preparation
To download the MNIST data, one can use the following commands:
```bash
$cd data/
$./get_mnist_data.sh
```

### Model description
Following the DC-Gan paper (https://arxiv.org/abs/1511.06434), we use convolution/convolution-transpose layer in the discriminator/generator network to better deal with images. The details of the network structures are defined in gan_conf_image.py.

### Training the model
To train the GAN model on mnist data, one can use the following command:
```bash
$python gan_trainer.py -d mnist --useGpu 1
```
The generated sample images can be found at ./mnist_samples/ and one example is shown below as Figure 3.
![](./mnist_sample.png)

    Figure 3. MNIST Sample

repository: emailweixu/Paddle

repo_name: emailweixu/Paddle


text:
mail-builder 0.3.1
================================
- Added `MimePart::transfer_encoding` method to disable automatic Content-Transfer-Encoding detection and treat it as a raw MIME part.

mail-builder 0.3.0
================================
- Replaced all `Multipart::new*` methods with a single `Multipart::new` method.

mail-builder 0.2.4
================================
- Added "Ludicrous mode" unsafe option for fast encoding.

mail-builder 0.2.3
================================
- Removed chrono dependency.

mail-builder 0.2.2
================================
- Fix: Generate valid Message-IDs

mail-builder 0.2.1
================================
- Fixed URL serializing bug.
- Headers are stored in a `Vec` instead of `BTreeMap`.

mail-builder 0.2.0
================================
- Improved API
- Added `write_to_vec` and `write_to_string`.

mail-builder 0.1.3
================================
- Bug fixes.
- Headers are written sorted alphabetically.
- Improved ID boundary generation.
- Encoding type detection for `[u8]` text parts.
- Optimised quoted-printable encoding.

mail-builder 0.1.2
================================
- All functions now take `impl Cow<str>`.

mail-builder 0.1.1
================================
- API improvements.

mail-builder 0.1.0
================================
- Initial release.

repository: stalwartlabs/mail-builder

gha_language: Rust

repo_name: stalwartlabs/mail-builder


text:
Svelte 3 Up and Running

Want to learn Svelte 3 and how to build a Single-Page App (SPA) with it (and with this router)? Check out my book Svelte 3 Up and Running on Amazon.

# svelte-spa-router

[![Build Status](https://github.com/ItalyPaleAle/svelte-spa-router/workflows/Continuous%20Integration%20tests/badge.svg)](https://github.com/ItalyPaleAle/svelte-spa-router/actions)
[![npm](https://img.shields.io/npm/v/svelte-spa-router.svg)](https://www.npmjs.com/package/svelte-spa-router)
[![GitHub](https://img.shields.io/github/license/ItalyPaleAle/svelte-spa-router.svg)](https://github.com/ItalyPaleAle/svelte-spa-router/blob/master/LICENSE.md)

This module is a router for [Svelte 3](https://github.com/sveltejs/svelte) applications, specifically optimized for Single Page Applications (SPA).

Main features:

- Leverages **hash-based routing**, which is optimal for SPAs and doesn't require any server-side processing
- Insanely simple to use, and has a minimal footprint
- Uses the tiny [regexparam](https://github.com/lukeed/regexparam) for parsing routes, with support for parameters (e.g. `/book/:id?`) and more

This module is released under MIT license.

## Video

["So you want to pick a router?"]((https://www.youtube.com/watch?v=EL1qM0cv0eA)) talk by @ItalyPaleAle at Svelte Summit 2020. Includes an explanation of the two kinds of routers and a demo of svelte-spa-router.
_(Click on the cover image to play the video on YouTube)_

[![Click to play video: 'So you want to pick a router?'](https://img.youtube.com/vi/EL1qM0cv0eA/0.jpg)](https://www.youtube.com/watch?v=EL1qM0cv0eA)

## Hash-based routing

With hash-based routing, navigation is possible thanks to storing the current view in the part of the URL after `#`, called "hash" or "fragment".

For example, if your SPA is in a static file called `index.html`, your URLs for navigating within the app look something like `index.html#/profile`, `index.html#/book/42`, etc. (The `index.html` part can usually be omitted for the index file, so you can just create URLs that look like `http://example.com/#/profile`).

When I created this component, other routers for Svelte 3 implemented navigation using the HTML5 history API. While those URLs look nicer (e.g. you can actually navigate to `http://example.com/profile`), they are not ideal for static Single Page Applications. In order for users to be able to share links or even just refresh the page, you are required to have a server on the backend processing the request, and building fully-static apps is much harder as a consequence.

Hash-based routing is simpler, works well even without a server, and it's generally better suited for static SPAs, especially when SEO isn't a concern, as is the case when the app requires authentication. Many popular apps use hash-based routing, including GMail!

## Sample code

Check out the code in the [examples](/examples) folder for some usage examples.

To run the samples, clone the repository, install the dependencies, then build each sample using Rollup:

````sh
git clone https://github.com/ItalyPaleAle/svelte-spa-router
cd svelte-spa-router
npm install

# Navigate to a sample
cd examples/…
# For example
cd examples/basic-routing

# Build and run (in the folder of a sample)
npx rollup -c
npx serve -n -l 5000 dist
````

The sample will be running at http://localhost:5000

## Starter template

You can find a starter template with Svelte 3 and svelte-spa-router at [italypaleale/svelte-spa-router-template](https://github.com/italypaleale/svelte-spa-router-template).

To use the template:

```sh
npx degit italypaleale/svelte-spa-router-template svelte-app
cd svelte-app
```

More information can be found on the [template's repo](https://github.com/italypaleale/svelte-spa-router-template).

## Using svelte-spa-router

You can include the router in any project using Svelte 3.

### Install from NPM

To add svelte-spa-router to your project:

````sh
npm install svelte-spa-router
````

### Supported browsers

svelte-spa-router aims to support modern browsers, including recent versions of:

- Chrome
- Edge ("traditional" and Chromium-based)
- Firefox
- Safari

Support for Internet Explorer is not a goal for this project. Some users have reportedly been able to use svelte-spa-router with IE11 after transpilation (e.g. with Babel), but this is not guaranteed.

### Define your routes

Each route is a normal Svelte component, with the markup, scripts, bindings, etc. Any Svelte component can be a route.

The route definition is just a JavaScript dictionary (object) where the key is a string with the path (including parameters, etc), and the value is the route object.

For example:

````js
import Home from './routes/Home.svelte'
import Author from './routes/Author.svelte'
import Book from './routes/Book.svelte'
import NotFound from './routes/NotFound.svelte'

const routes = {
    // Exact path
    '/': Home,

    // Using named parameters, with last being optional
    '/author/:first/:last?': Author,

    // Wildcard parameter
    '/book/*': Book,

    // Catch-all
    // This is optional, but if present it must be the last
    '*': NotFound,
}
````

Routes must begin with `/` (or `*` for the catch-all route).

Alternatively, you can also define your routes using custom regular expressions, as explained below.

Note that the order matters! When your users navigate inside the app, the first matching path will determine which route to load. It's important that you leave any "catch-all" route (e.g. a "Page not found" one) at the end.

### Include the router view

To display the router, in a Svelte component (usually `App.svelte`), first import the router component:

````js
import Router from 'svelte-spa-router'
````

Then, display the router anywhere you'd like by placing the component in the markup. For example:

````svelte
<body>
    <Router {routes}/>
</body>
````

The `routes` prop is the dictionary defined above.

That's it! You already have all that you need for a fully-functional routing experience.

### Dynamically-imported components and code-splitting

Starting with version 3.0, svelte-spa-router supports dynamically-imported components (via the `import()` construct). The advantage of using dynamic imports is that, if your bundler supports that, you can enable code-splitting and reduce the size of the bundle you send to your users. This has been tested with bundlers including Rollup and Webpack.

To use dynamically-imported components, you need to leverage the `wrap` method (which can be used for a variety of actions, as per the docs on [route wrapping](/Advanced%20Usage.md#route-wrapping)). First, import the `wrap` method:

```js
import {wrap} from 'svelte-spa-router/wrap'
```

Then, in your route definition, wrap your routes using the `wrap` method, passing a function that returns the dynamically-imported component to the `asyncComponent` property:

```js
wrap({
    asyncComponent: () => import('./Foo.svelte')
})
```

> Note: the value of `asyncComponent` must be the **definition of a function** returning a dynamically-imported component, such as `asyncComponent: () => import('./Foo.svelte')`.
> Do **not** use `asyncComponent: import('./Foo.svelte')`, which is a function invocation instead.

For example, to make the Author and Book routes from the first example dynamically-imported, we'd update the code to:

````js
// Import the wrap method
import {wrap} from 'svelte-spa-router/wrap'

// Note that Author and Book are not imported here anymore, so they can be imported at runtime
import Home from './routes/Home.svelte'
import NotFound from './routes/NotFound.svelte'

const routes = {
    '/': Home,

    // Wrapping the Author component
    '/author/:first/:last?': wrap({
        asyncComponent: () => import('./routes/Author.svelte')
    }),

    // Wrapping the Book component
    '/book/*': wrap({
        asyncComponent: () => import('./routes/Book.svelte')
    }),

    // Catch-all route last
    '*': NotFound,
}
````

The `wrap` method accepts an object with multiple properties and enables other features, including: setting a "loading" component that is shown while a dynamically-imported component is being requested, adding pre-conditions (route guards), passing static props, and adding custom user data.

You can learn more about all the features of `wrap` in the documentation for [route wrapping](/Advanced%20Usage.md#route-wrapping).

### Navigating between pages

You can navigate between pages with normal anchor (`<a>`) tags. For example:

````svelte
<a href="#/book/123">Thus Spoke Zarathustra</a>
````

#### The `use:link` action

Rather than having to type `#` before each link, you can also use the `use:link` action:

````svelte
<script>
import {link} from 'svelte-spa-router'
</script>
<a href="/book/321" use:link>The Little Prince</a>
````

The `use:link` action accepts an optional parameter `opts`, which can be one of:

- A dictionary `{href: '/foo', disabled: false}` where both keys are optional:
  - If you set a value for `href`, your link will be updated to point to that address, reactively (this will always take precedence over `href` attributes, if present)
  - Setting `disabled: true` disables the link, so clicking on that would have no effect
- A string with a destination (e.g. `/foo`), which is a shorthand to setting `{href: '/foo'}`.

For example:

````svelte
<script>
import {link} from 'svelte-spa-router'
let myLink = "/book/456"
</script>
<!-- Note the {{...}} notation because we're passing an object as parameter for a Svelte action -->
<a use:link={{href: myLink, disabled: false}}>The Biggest Princess</a>
````

The above is equivalent to:

````svelte
<script>
import {link} from 'svelte-spa-router'
let myLink = "/book/456"
</script>
<a use:link={myLink}>The Biggest Princess</a>
````

Changing the value of `myLink` will reactively update the link's `href` attribute.

#### Navigating programmatically

You can navigate between pages programmatically too:

````js
import {push, pop, replace} from 'svelte-spa-router'

// The push(url) method navigates to another page, just like clicking on a link
push('/book/42')

// The pop() method is equivalent to hitting the back button in the browser
pop()

// The replace(url) method navigates to a new page, but without adding a new entry in the browser's history stack
// So, clicking on the back button in the browser would not lead to the page users were visiting before the call to replace()
replace('/book/3')
````

These methods can be used inside Svelte markup too, for example:

````svelte
<button on:click={() => push('/page')}>Go somewhere</button>
````

The `push`, `pop` and `replace` methods perform navigation actions only in the next iteration ("tick") of the JavaScript event loop. This makes it safe to use them also inside `onMount` callbacks within Svelte components.

These functions return a Promise that resolves with no value once the navigation has been triggered (in the next tick of the event loop); however, please note that this will likely be before the new page has rendered.

### Parameters from routes

svelte-spa-router uses [regexparam](https://github.com/lukeed/regexparam) to parse routes, so you can add optional parameters to the route. Basic syntax is:

- `/path` matches `/path` exactly (and only that)
- `/path/:id` matches `/path/` followed by any string, which is a named argument `id`
- `/path/:id/:version?` allows for an optional second named argument `version`
- `/path/*` matches `/path/` followed by anything, using a non-named argument

_Please refer to the documentation of regexparam for more details._

If your route contains any parameter, they will be made available to your component inside the `params` dictionary.

For example, for a route `/name/:first/:last?`, you can create this Svelte component:

````svelte
<p>Your name is: <b>{params.first}</b> <b>{#if params.last}{params.last}{/if}</b></p>
<script>
// You need to define the component prop "params"
export let params = {}
</script>
````

Non-named arguments are returned as `params.wild`.

### Getting the current page

You can get the current page from the `$location` readable store. This is a Svelte store, so it can be used reactively too.

````svelte
<script>
import {location} from 'svelte-spa-router'
</script>
<p>The current page is: {$location}</p>
````

### Querystring parameters

You can also extract "querystring" parameters from the hash of the page. This isn't the _real_ querystring, as it's located after the `#` character in the URL, but it can be used in a similar way. For example: `#/books?show=authors,titles&order=1`.

When svelte-spa-router finds a "querystring" in the hash, it separates that from the location and returns it as a string in the Svelte store `$querystring`. For example:

````svelte
<script>
import {location, querystring} from 'svelte-spa-router'
</script>
<p>The current page is: {$location}</p>
<p>The querystring is: {$querystring}</p>
````

With the example above, this would print:

````text
The current page is: /books
The querystring is: show=authors,titles&order=1
````

It's important to note that, to keep this component lightweight, svelte-spa-router **does not parse** the "querystring". If you want to parse the value of `$querystring`, you can use [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) available in all modern browsers, or third-party modules such as [qs](https://www.npmjs.com/package/qs).

### Highlight active links

svelte-spa-router has built-in support for automatically marking links as "active", with the `use:active` action.

For example, you can use the code below to add the CSS class `active` to links that are active:

````svelte
<script>
import {link} from 'svelte-spa-router'
import active from 'svelte-spa-router/active'
</script>

<style>
/* Style for "active" links; need to mark this :global because the router adds the class directly */
:global(a.active) {
    color: red;
}
</style>

<a href="/hello/user" use:link use:active={{path: '/hello/*', className: 'active', inactiveClassName: 'inactive'}}>Say hi!</a>
<a href="/hello/user" use:link use:active={'/hello/*'}>Say hi with a default className!</a>
<a href="/hello/user" use:link use:active>Say hi with all default options!</a>
````

The `active` action accepts a dictionary `options` as argument:

- `options.path`: the path that, when matched, makes the link active. In the first example above, we want the link to be active when the route is `/hello/*` (the asterisk matches anything after that). As you can see, this doesn't have to be the same as the path the link points to. When `options.path` is omitted or false-y, it defaults to the path specified in the link's `href` attribute. This parameter can also be a regular expression that will mark the link as active when it matches: for example, setting to the regular expression `/^\/*\/hi$/` will make the link active when it starts with `/` and ends with `/hi`, regardless of what's in between.
- `options.className`: the name of the CSS class to add. This is optional, and it defaults to `active` if not present.
- `options.inactiveClassName`: the name of the CSS class to add when the link is _not_ active. This is optional, and it defaults to nothing if not present.

As a shorthand, instead of passing a dictionary as `options`, you can pass a single string or regular expression that will be interpreted as `options.path`.

### Define routes with custom regular expressions

Since version 1.2 of svelte-spa-router, it's possible to define routes using custom regular expressions too, allowing for greater flexibility. However, this requires defining routes using a JavaScript Map rather than an object:

````js
import Home from './routes/Home.svelte'
import Name from './routes/Name.svelte'
import NotFound from './routes/NotFound.svelte'

const routes = new Map()

// You can still use strings to define routes
routes.set('/', Home)
routes.set('/hello/:first/:last?', Name)

// The keys for the next routes are regular expressions
// You will very likely always want to start the regular expression with ^
routes.set(/^\/hola\/(.*)/i, Name)
routes.set(/^\/buongiorno(\/([a-z]+))/i, Name)

// Catch-all, must be last
routes.set('*', NotFound)
````

When you define routes as regular expressions, the `params` prop is populated with an array with the result of the matches from the regular expression.

For example, with this `Name.svelte` route:

````svelte
<p>Params is: <code>{JSON.stringify(params)}</code></p>
<script>
// You need to define the component prop "params"
export let params = {}
</script>
````

When visiting `#/hola/amigos`, the params prop will be `["/hola/amigos","amigos"]`.

This is consistent with the results of [`RegExp.prototype.exec()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec).

> When defining a route using a regular expression, you can optionally use [named capturing groups](https://2ality.com/2017/05/regexp-named-capture-groups.html). When using those, in addition to finding your matches in the `params` prop, you can find the matches for named capturing groups in `params.group`.
> For example, consider the route:
>
> ```js
> routes.set(/^\/book\/(?<title>[a-z]+)$/, Book)
> ```
>
> When visiting `/#/book/mytitle`, the `params` prop will be an array with `["/book/mytitle", "mytitle"]`, and `params.groups` will be a dictionary with `{"title": "mytitle"}`.

## Advanced usage

Check out the [Advanced Usage](/Advanced%20Usage.md) documentation for using:

- [Route wrapping](/Advanced%20Usage.md#route-wrapping), including:
  - [Dynamically-imported routes and placeholders](/Advanced%20Usage.md#async-routes-and-loading-placeholders)
  - [Route pre-conditions](/Advanced%20Usage.md#route-pre-conditions) ("route guards")
  - [Adding user data to routes](/Advanced%20Usage.md#user-data)
  - [Static props](/Advanced%20Usage.md#static-props)
- [`routeEvent` event](/Advanced%20Usage.md#routeevent-event)
- [`routeLoading` and `routeLoaded` events](/Advanced%20Usage.md#routeloading-and-routeloaded-events)
- [Querystring parsing](/Advanced%20Usage.md#querystring-parsing)
- [Static props](/Advanced%20Usage.md#static-props)
- [Route transitions](/Advanced%20Usage.md#route-transitions)
- [Nested routers](/Advanced%20Usage.md#nested-routers)
- [Route groups](/Advanced%20Usage.md#route-groups)
- [Restore scroll position](/Advanced%20Usage.md#restore-scroll-position)

repository: ItalyPaleAle/svelte-spa-router

repo_name: ItalyPaleAle/svelte-spa-router


text:
# rfuzz: coverage-directed fuzzing for RTL research platform

This repository contains the `rfuzz` research platform which was
created at UC Berkeley's [ADEPT Lab](https://adept.eecs.berkeley.edu/)
to investigate the use of coverage-directed fuzzing for RTL
pre-silicon testing.

The source code is release under a BSD-3-Clause license in order to
allow for reproduction of experimental results as well as a basis for
further research.

## Instructions

### Clone the Repository

```.sh
git clone https://github.com/ekiwi/rfuzz.git
cd rfuzz
# switch submodules to use HTTPS instead of SSH
sed -i 's/git@github.com:/https:\/\/github.com\//'  .gitmodules
# initialize and update submodules
git submodule update --init
```

### Install Dependencies

**Note:** instead of setting up your system manually you can try the
`Vagrantfile` provided with this repository. For more information see
[vagrantup.com](vagrantup.com).

On a fresh installation of `Ubuntu 18.04` (Bionic Beaver) the following
installation steps were necessary:

1. Install dependencies from the default repositories (requires root privileges):

```.sh
apt update && apt upgrade
apt install build-essential meson pkg-config openjdk-8-jdk verilator cargo
apt install python3-toml python3-numpy python3-matplotlib graphviz
```

2. Install `sbt` by following the [official docs](https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html#Ubuntu+and+other+Debian-based+distributions):

```.sh
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt
```

3. On a _headless_ server: add the following to your `~/.config/matplotlib/matplotlibrc`:

```
backend: agg
```
([more info](https://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined))

**Note:** _`rfuzz` is developed on  [Fedora Linux Workstation](https://getfedora.org/)
which thus also offers good support_

### Software Simulation Fuzz Server

In order to fuzz test a particular RTL design, we need to take the FIRRTL source
code, instrument it and compile it into a fast RTL simulation using the
[verilator](https://www.veripool.org/wiki/verilator) tool.

The exact build steps are encoded in the toplevel `Makefile` provided with
this repository.
In order to build the final binary you can use the pseudo target `bin`.
If you also want to start the binary you can use the pseudo target `run`
(_WARNING: this will create the `/tmp/fpga` directory and will delete any
existing directory of the same name_).

Thus to start the RTL simulation (also called the **fuzz server**)
for the default `Sodor3Stage` benchmark you just need to execute `make run`.
This should provide you with the following output:
```
rm -rf /tmp/fpga
mkdir /tmp/fpga
/home/ubuntu/rfuzz/build/ICache_server
Fuzz Server for ICache
Allocated Bytes per Input:    40
Allocated Bytes per Coverage: 30
created tx fifo
created rx fifo
```

This signals that the fuzz server is ready to receive test input from the
fuzzer as well as provide coverage feedback.

### Fuzzer

The fuzzer is implemented in software and connects to the software simulation
fuzz server or the FPGA driver through shared memory.
As opposed to the fuzz server, the fuzzer itself is design agnostic and
thus only needs to be compiled once. The design specific information
is propagated through a TOML file generated alongside the fuzz server
when executing `make bin` (or `make run`).

To build the fuzzer change to the `fuzzer` directory and execute:
```.sh
cargo build --release
```

**Note:** _the performance of `release` builds can be around 10x faster.
Do NOT run benchmarks with `debug` builds (the default configuration)._

To see a list of options that the fuzzer supports run:
```.sh
cargo run --release -- -h
```
This should provide you with an output similar to this:
```
kfuzz 0.1.0
Kevin Laeufer<EMAIL_ADDRESS>AFL-style fuzzer specialized for fuzzing RTL circuits.

USAGE:
    kfuzz [FLAGS] [OPTIONS] <TOML> --output-directory <DIR>

FLAGS:
    -h, --help                      Prints help information
    -q, --print-queue               Prints queue content at the end of a fuzzing run.
    -c, --print-total-cov           Prints the union coverage at the end of a fuzzing run.
    -r, --random                    Generate independent random inputs instead of using the fuzzing algorithm.
    -d, --skip-deterministic        Skip all deterministic mutation strategies.
    -n, --skip-non-deterministic    Skip all non-deterministic mutation strategies.
    -t, --test-mode                 Test the fuzz server with known input/coverage pairs.
    -v, --version                   Prints version information

OPTIONS:
    -s, --server-id <fuzz_server_id>    The id of the fuzz server isntance to connect to. [default: 0]
    -i, --input-directory <DIR>         The output directory of a previous run from which to resume.
    -j, --jqf-level <jqf_level>         Select which level of JQF to apply. [default: 2]  [possible values: 0, 1, 2]
    -o, --output-directory <DIR>        Used to log this session. Must be empty!
        --seed-cycles <seed_cycles>     The starting seed consits of all zeros for N cycles. [default: 5]

ARGS:
    <TOML>    TOML file describing the circuit being fuzzed
```

To quickly fuzz the default configuration, make sure that the fuzz server is
running (see previous section) and then launch the fuzzer like this:
```.sh
cargo run --release -- -c -o out ../build/Sodor3Stage.toml
```

To terminate fuzzing use `Ctrl+C` and wait for the fuzzer to shut down
(this can take some time depending on how fast the design under test executes).

### FPGA Accelerated Fuzz Server

The FPGA acceleration is not working on the current main branch anymore.
Please have a look at the `iccad18` branch instead.
Also, please feel free to contact the authors since the FPGA fuzzing
is not very well documented.

### Analysis

The scripts that were used to analyze the fuzzing results and generate
graphs for our `ICCAD'18` paper can be found in the `analysis/` directory.
Our raw results from running the fuzz server and fuzzer on the AWS cloud
can be found in the [rfuzz-results](https://github.com/ekiwi/rfuzz-results)
repository in the
[jack](https://github.com/ekiwi/rfuzz-results/tree/390e4eedbca8254b8b4aac859b906827c6052f1c/jack)
folder.
In order to ignore any functional changes that were made to `rfuzz`
after the `ICCAD'18` submission, please make sure that you use the
`iccad18` branch in the `rfuzz` repository.

In order to regenerate the graphs, make sure that your installation has a
graphical desktop environment (or add the appropriate code to dump graphs to disk
to the end of [analysis.py](analysis/analysis.py)).
Then make sure that the appropriate binaries are available:

```.sh
make FIR=FFTSmall.fir DUT=FFTSmall bin
make FIR=Sodor1Stage.fir DUT=Sodor1Stage bin
make FIR=Sodor3Stage.fir DUT=Sodor3Stage bin
make FIR=Sodor5Stage.fir DUT=Sodor5Stage bin
make FIR=TLI2C.fir DUT=TLI2C bin
make FIR=TLSPI.fir DUT=TLSPI bin
```

Now you can run the analysis script like this:
```.sh
./analysis.py ../../rfuzz-results/jack/Sodor3Stage.jqf1.seed5.random.out ../../rfuzz-results/jack/Sodor3Stage.jqf2.seed5.out
```

This will display the resulting graph which should be an exact copy of the one
printed in our paper (assuming you used the `iccad18` branch).
It will also generate a mutation history graph for each fuzzing run,
e.g. `0.Sodor3Stage.out_mutations.png`.

**Note:** _the `analysis.py` script uses a version of the design with minimal
instrumentation and restarts the RTL simulator for each test input in order
to increase our confidence in the analysis results.
Invalid inputs as indicated by failing assumptions in the design
are automatically discarded and excluded from the coverage results.
Have a look at the scripts in the `analysis/` directory to learn the details._

### Benchmarks

A collection of benchmarks in the form of
RTL circuits in the [FIRRTL format](https://bar.eecs.berkeley.edu/projects/firrtl.html)
can be found in the `benchmarks/` directory.
Please consult the [local Readme](benchmarks/Readme.md) to learn more about
how each individual benchmark was created.

Our `Makefile` takes the name of a FIRRTL (`*.fir`) file and the name
of the corresponding RTL toplevel module as parameters, e.g.:
```.sh
make FIR=TLI2C.fir DUT=TLI2C run
```

The following benchmarks are available, benchmarks used in our `ICCAD'18` paper
are listed in **bold**:

| Name                    | `FIR`                   | `DUT`               | Description                                   | Source                                                         |
|-------------------------|-------------------------|---------------------|-----------------------------------------------|----------------------------------------------------------------|
| **FFT Small**           | `FFTSmall.fir`          | `FFTSmall`          | FFT DSP circuit                               | [fft](https://github.com/ucb-art/fft)                          |
| ICache                  | `ICache.fir`            | `ICache`            | instruction cache from Rocket Chip            | [rocket-chip](https://github.com/freechipsproject/rocket-chip) |
| ICache w/ Coverage      | `ICacheCover.fir`       | `ICache`            | ICache w/ user defined coverage annotations   | [rocket-chip](https://github.com/freechipsproject/rocket-chip) |
| Non-Blocking Data Cache | `NonBlockingDCache.fir` | `NonBlockingDCache` | data cache from Rocket Chip                   | [rocket-chip](https://github.com/freechipsproject/rocket-chip) |
| **Rocket Chip Tile**    | `RocketTile.fir`        | `RocketTile`        | 64-bit RISCV CPU Tile                         | [rocket-chip](https://github.com/freechipsproject/rocket-chip) |
| **Sodor 1-Stage**       | `Sodor1Stage.fir`       | `Sodor1Stage`       | educational RISCV core with 1 pipeline stage  | [riscv-sodor](https://github.com/ucb-bar/riscv-sodor)          |
| **Sodor 3-Stage**       | `Sodor3Stage.fir`       | `Sodor3Stage`       | educational RISCV core with 3 pipeline stages | [riscv-sodor](https://github.com/ucb-bar/riscv-sodor)          |
| **Sodor 5-Stage**       | `Sodor5Stage.fir`       | `Sodor5Stage`       | educational RISCV core with 5 pipeline stages | [riscv-sodor](https://github.com/ucb-bar/riscv-sodor)          |
| **I2C Peripheral**      | `TLI2C.fir`             | `TLI2C`             | I2C controller connected to TileLink bus      | [sifive-blocks](https://github.com/sifive/sifive-blocks)       |
| PWM Peripheral          | `TLPWM.fir`             | `TLPWM`             | PWM timer connected to TileLink bus           | [sifive-blocks](https://github.com/sifive/sifive-blocks)       |
| **SPI Peripheral**      | `TLSPI.fir`             | `TLSPI`             | SPI controller connected to TileLink bus      | [sifive-blocks](https://github.com/sifive/sifive-blocks)       |
| UART Peripheral         | `TLUART.fir`            | `TLUART`            | UART controller connected to TileLink bus     | [sifive-blocks](https://github.com/sifive/sifive-blocks)       |

**Note:** _the benchmarks that were not used in our paper have not been thoroughly
evaluated and thus may not work reliably or may produce spurious results._

## ICCAD'18 Paper

You can learn more about `rfuzz` in our `ICCAD'18` paper which explains
how we adapted the coverage-directed fuzzing ideas from software testing
to RTL verification while building the basic research platform.

In order to reproduce our results, please make sure to use the `iccad18`
branch of this repository.

Kevin Laeufer and Jack Koenig and Donggyu Kim and Jonathan Bachrach and Koushik Sen.
**RFUZZ: Coverage-Directed Fuzz Testing of RTL on FPGAs**.
_In International Conference On Computer Aided Design, 2018 (ICCAD'18)_, San Diego, CA, November 2018.

[Preprint PDF](https://people.eecs.berkeley.edu/~laeufer/papers/rfuzz_kevin_laeufer_iccad2018.pdf)


text:
# team-track

## what

team-track is a tool designed to bulk-scrape team award history from the FIRST website.

## warning

use this tool **sparingly**. if you're downloading a huge amount of data, it's
going to put a large-ish load on FIRST's servers.

if you're going to try to download the complete award history for all teams out
there, i'd recommend doing so in batches, of, say, 500 or so.

## installation

team-track requires [node.js](http://nodejs.org/) to run and
[git](http://git-scm.org/) to download the source files. once you've installed
both, you should be able to download and install team-track via:

    git clone https://github.com/frc604/team-track.git
    cd ./team-track
    npm install

## how

### scrape team 604's award history

    node index 604 604

### scrape team 1 to team 500's award history, ignoring nonexistant teams

    node index 1 500

### save that data to awards.csv

    node index 1 500 > awards.csv

### clean up the output, removing extra newlines

    node cleanup awards.csv > awards-formatted.csv

## building

to build team-track from its coffeescript source files, run:

    cake build

## tests

none are currently written. i'd rather not burden FIRST's servers with them.

## license

[MIT License](https://en.wikipedia.org/wiki/MIT_License)


text:
# Chaos Hub - Collaborative Chaos Engineering

The Chaos Hub enables your teams' effort on Chaos Engineering so they can
work collaboratively on experiments executed via the
[Chaos Toolkit][chaostoolkit].

[chaostoolkit]: https://chaostoolkit.org/

<iframe width="700" height="394" src="https://www.youtube.com/embed/eE3L48-0FqE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>


text:
---
category: Layout
title: 吸顶
desc: 使某块区域固定顶部
---

Make your React components sticky!

<DEMO>

## API

`<Sticky />` elements require a function that returns a React component or DOM node as the only child. When invoked, this child function will be supplied an object with the following properties:

- `isSticky` _(boolean)_ - is the element sticky as a result of the current event?
- `wasSticky` _(boolean)_ - was the element sticky prior to the current event?
- `distanceFromTop` _(number)_ - number of pixels from the top of the `Sticky` to the nearest `StickyContainer`'s top
- `distanceFromBottom` _(number)_ - number of pixels from the bottom of the `Sticky` to the nearest `StickyContainer`'s bottom
- `calculatedHeight` _(number)_ - height of the element returned by this function
- `style` _(object)_ - modifiable style attributes to optionally be passed to the element returned by this function

The `Sticky`'s child function will be called when events occur in the parent `StickyContainer`,
and will serve as the callback to apply your own logic and customizations, with sane `style` attributes
to get you up and running quickly.

app.js

```js
import React from 'react';
import { StickyContainer, Sticky } from 'react-sticky';
...

class App extends React.Component ({
  render() {
    return (
      ...
      <StickyContainer>
        ...
        <Sticky>
          {
            ({
              style,

              // the following are also available but unused in this example
              isSticky,
              wasSticky,
              distanceFromTop,
              distanceFromBottom,
              calculatedHeight
            }) => {
              return (
                <header style={style}>
                  ...
                </header>
              )
            }
          }
        </Sticky>
        ...
      </StickyContainer>
      ...
    );
  },
});
```

When the "stickiness" becomes activated, the arguments to the sticky function
are modified. Similarly, when deactivated, the arguments will update accordingly.

### `<StickyContainer />` Props

`<StickyContainer />` supports all valid `<div />` props.

### `<Sticky />` Props

#### relative _(default: false)_

Set `relative` to `true` if the `<Sticky />` element will be rendered within
an overflowing `<StickyContainer />` (e.g. `style={{ overflowY: 'auto' }}`) and you want
the `<Sticky />` behavior to react to events only within that container.

When in `relative` mode, `window` events will not trigger sticky state changes. Only scrolling
within the nearest `StickyContainer` can trigger sticky state changes.

#### topOffset _(default: 0)_

Sticky state will be triggered when the top of the element is `topOffset` pixels from the top of the closest `<StickyContainer />`. Positive numbers give the impression of a lazy sticky state, whereas negative numbers are more eager in their attachment.

app.js

```js
<StickyContainer>
  ...
  <Sticky topOffset={80}>
    { props => (...) }
  </Sticky>
  ...
</StickyContainer>
```

The above would result in an element that becomes sticky once its top is greater than or equal to 80px away from the top of the `<StickyContainer />`.

#### bottomOffset _(default: 0)_

Sticky state will be triggered when the bottom of the element is `bottomOffset` pixels from the bottom of the closest `<StickyContainer />`.

app.js

```js
<StickyContainer>
  ...
  <Sticky bottomOffset={80}>
    { props => (...) }
  </Sticky>
  ...
</StickyContainer>
```

The above would result in an element that ceases to be sticky once its bottom is 80px away from the bottom of the `<StickyContainer />`.

#### disableCompensation _(default: false)_

Set `disableCompensation` to `true` if you do not want your `<Sticky />` to apply padding to
a hidden placeholder `<div />` to correct "jumpiness" as attachment changes from `position:fixed`
and back.

app.js

```js
<StickyContainer>
  ...
  <Sticky disableCompensation>
    { props => (...) }
  </Sticky>
  ...
</StickyContainer>
```

#### disableHardwareAcceleration _(default: false)_

When `disableHardwareAcceleration` is set to `true`, the `<Sticky />` element will not use hardware acceleration (e.g. `transform: translateZ(0)`). This setting is not recommended as it negatively impacts
the mobile experience, and can usually be avoided by improving the structure of your DOM.

app.js

```js
<StickyContainer>
  ...
  <Sticky disableHardwareAcceleration>
    { props => (...) }
  </Sticky>
  ...
</StickyContainer>
```

repository: zhhyang/yep-react

branch_name: refs/heads/next

gha_language: TypeScript

repo_name: zhhyang/yep-react