text:
# Arduino Machine Learning Profiling

This repository seeks to compare the performance of different implementations of TVM on Arduino, as well as the performace of our competitor [Tensorflow Lite for Microcontrollers](https://github.com/tensorflow/tflite-micro)'s tuned models.

# Results summay
The AOT runtime consumes much less RAM than the graph executor, and runs a little faster. Tensorflow Lite for Microcontrollers, however, beats both in terms of speed, RAM usage, and flash usage. **AutoTVM and/or operator scheduling must be implemented to obtain competitive performance.**

## Keyword spotting on the [Nano 33 BLE](https://store.arduino.cc/usa/nano-33-ble)
| Implementation | Flash usage (bytes) | Unused RAM (bytes) | Initialization speed (ms) | Inference speed (ms) |
| -------------- | ------------------- | ----------------- | ------------------------- | -------------------- |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)  | 148,152 bytes | 137,332 bytes | 14.526 ms | 101.976 ms |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)    | 125,544 bytes | 188,388 bytes | 0 ms | 87.817 ms |
| [Tensorflow Lite Micro](https://github.com/tensorflow/tflite-micro)    | 151,480 bytes | 196,580 bytes | 1.206 ms | 53.654 ms |

## Person detection on the [Nano 33 BLE](https://store.arduino.cc/usa/nano-33-ble)
| Implementation | Flash usage (bytes) | RAM free (bytes) | Initialization speed (ms) | Inference speed (ms) |
| -------------- | ------------------- | ----------------- | ------------------------- | -------------------- |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)  | 570,352 bytes | | | |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)    | 530,624 bytes | | | |
| [Tensorflow Lite Micro](https://github.com/tensorflow/tflite-micro)    | 441,160 bytes | 69,604 bytes | 71.209 ms | 653.005 ms |

## Person detection on the [Sony SPRESENSE](https://developer.sony.com/develop/spresense/)
| Implementation | Flash usage (bytes) | Unused RAM (bytes) | Initialization speed (ms) | Inference speed (ms) |
| -------------- | ------------------- | ----------------- | ------------------------- | -------------------- |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)  | 641,912 bytes | 319,128 bytes | 66.272 ms | 1223.217 ms |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)    | 1,210,984 bytes | 296,344 bytes | 0 ms | 1423.898 ms |

# Models

We picked two models for profiling that have been very heavily tuned by the TLFM folks for performance on Arduino - the [micro speech](https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples/micro_speech) and [person detection](https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples/person_detection) models (these are the same ones on the [TVM Arduino demos repository](https://github.com/guberti/tvm-arduino-demos).

As currently implemented in TVM (with both executors), the [person detection](https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples/person_detection) model is too large to run on the Arduino Nano, so these cells are blank. Also, Tensorflow Lite for Microcontrollers is platform-specific and does not work on the Sony Spresense, so these cells are blank too.

# Flash usage

For measuring flash usage, note that a **lot** of flash is used by various overhead functions, and by [all the crap Arduino automatically adds to your program](https://arduino.github.io/arduino-cli/latest/sketch-build-process/). For example, the simplest valid Arduino program (seen below) takes 83.4 kB on the Nano 33 BLE and 163.5 kB on the Spresense. For this reason, **all measurements of flash memory usage include overhead**.

```arduino
// Shortest running script for Arduino
void setup() {}
void loop() {}
```

Additionally, for some of the implementation/model/board pairings, the Arduino IDE discovered there was not enough memory and refused to compile the sketch. I overrode this refusal to compile by modifying `linker_script.ld`. These entries are marked with a \*.

Since Tensorflow Lite Micro cannot run on the Sony SPRESENSE Arduino bindings, these cells are empty.

### Flash usage results

| Implementation | Keyword spotting [Nano](https://store.arduino.cc/usa/nano-33-ble) (↓) | Person detection [Nano](https://store.arduino.cc/usa/nano-33-ble) (↓) | Person detection [SPRESENSE](https://developer.sony.com/develop/spresense/) (↓) |
| - | - | - | - |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)     | 148,152 bytes | 570,352 bytes  | 641,912 bytes |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)       | 125,544 bytes | 530,624 bytes* | 1,210,984 bytes |
| [Tensorflow Lite Micro](https://github.com/tensorflow/tflite-micro) | 151,480 bytes | 441,160 bytes  | |

# RAM usage

Measuring RAM usage is more challenging. While there are a few ways it can be done, the most likely to be valid (in my opinion) is to determine how much memory can be allocated to other things while not crashing the model. Consider the below program, running on a Nano 33 BLE with 256 kB of RAM:

```c
#include "src/model.h"
static Model model;

void setup() {
  char* ptr = (char*) malloc(137332);

  static const char input_data[1920] = {0};
  int8_t output_data[4];
  model = Model();
  model.inference(input_data, output_data);
  digitalWrite(LED0, HIGH);
}

void loop() {}
```

If we call `malloc(137332);` the script succeeds - however, calling `malloc(137333);` instead causes the script to stall due to lack of memory. While there are other approaches to determining the amount of free memory (such as examining the stack pointer or seeing the largest block of memory that can be allocated after performing inference), these don't directly measure the thing we want - the amount of memory that can be allocated beforehand without causing inference to fail.

With this script, we then use binary search to determine the largest number that can be passed to `malloc` without breaking the model. However, since doing this by hand would be tedious, I've provided a script - `profile_ram.py` to do this automatically. Use the script as follows:

```
python3 profile_ram.py ./micro_speech/micro_speech_graph_executor/micro_speech_graph_executor.ino arduino:mbed_nano:nano33ble /dev/ttyACM0 --max 250000
```

The file that's being pointed to must have the form below, where bolded lines are strictly necessary:

#include "src/model.h"

static Model model;
static char* ptr;
void setup() {
  ptr = (char*) malloc($alloc_size);
  if (ptr == NULL) {
    for (;;) {}
  }
  int8_t input_data[1920] = {0};
  int8_t output_data[4];
  model = Model();
  model.inference(input_data, output_data);
  free(ptr);
  Serial.begin(115200);
}

void loop() {
  Serial.println(1);
}

For the Sony Spresense, it is possible to split the 1.5 Mb of total available memory between the main and subcores. By default, memory is split 50/50. However, in these tests all memory has been allocated to the main core, as the subcores are not used. Tensorflow Lite Micro for Arduino does not run on the Spresense, so this number is not included. Both the `graph` and `aot` executors for the person detection model take up too much RAM to run on the Nano, so these results could not be included either.

### Unused RAM results

| Implementation | Keyword spotting [Nano](https://store.arduino.cc/usa/nano-33-ble) (↑) | Person detection [Nano](https://store.arduino.cc/usa/nano-33-ble) (↑) | Person detection [SPRESENSE](https://developer.sony.com/develop/spresense/) (↑) |
| - | - | - | - |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)     | 137,332 bytes | | 319,128 bytes |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)       | 188,388 bytes | | 296,344 bytes |
| [Tensorflow Lite Micro](https://github.com/tensorflow/tflite-micro) | 196,580 bytes | 69,604 bytes  | |

# Runtime measurement

On all Arduino boards, there is a natural and consistent way of measuring elapsed time - the `micros()` function. It is implemented differently on different boards, and its accuracy varies between implementations, but it is always accurate to < 1 ms. Most are much better than this - for example, the Spresense is accurate to +- 30 μs. If a higher precision runtime measurement was ever desired, an oscilloscope could be used to count CPU cycles, but this is probably overkill for now.

While the initialization and inference times were very consistent, it seemed prudent to run them repeatedly and take an average. For initialization (because I had to reset the board manually), I ran it 32 times and took an average. For inference, we ran 256 times. The files used to measure inference time looked like the below sketch:

#include "src/model.h"

void setup() {
  int8_t input_data[1920] = {0};
  int8_t output_data[4];
  model = Model();
  Serial.begin(115200);
  unsigned long totalMicros = 0;
  for (int i = 0; i < 128; i++) {
    noInterrupts();
    unsigned long startTime = micros();
    model.inference(input_data, output_data);
    unsigned long elapsedTime = micros() - startTime;
    interrupts();
    totalMicros += elapsedTime;
    Serial.println(elapsedTime);
  }
  Serial.println("Total elapsed time:");
  Serial.println(totalMicros);
}

void loop() {}

The means of all the runs are shown in the table below. If you'd like to see the raw data, check the `inference_times.txt` and `initialization_times.txt` files in each sketch folder. Note also that initialization for the `aot_executor` is effectively instant, as all it does is set three pointers.

### Initialization speed results

| Implementation | Keyword spotting [Nano](https://store.arduino.cc/usa/nano-33-ble) (↓) | Person detection [Nano](https://store.arduino.cc/usa/nano-33-ble) (↓) | Person detection [SPRESENSE](https://developer.sony.com/develop/spresense/) (↓) |
| - | - | - | - |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)     | 14.526 ms | | 66.272 ms |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)       | 0 ms | | 0 ms |
| [Tensorflow Lite Micro](https://github.com/tensorflow/tflite-micro) | 1.206 ms | 71.209 ms | |

### Inference speed results

| Implementation | Keyword spotting [Nano](https://store.arduino.cc/usa/nano-33-ble) (↑) | Person detection [Nano](https://store.arduino.cc/usa/nano-33-ble) (↑) | Person detection [SPRESENSE](https://developer.sony.com/develop/spresense/) (↑) |
| - | - | - | - |
| [TVM `graph_executor`](https://github.com/apache/tvm/pull/8493)     | 101.976 ms | | 1223.217 ms |
| [TVM `aot_executor`](https://github.com/apache/tvm/pull/8578)       | 87.817 ms | | 1423.898 ms |
| [Tensorflow Lite Micro](https://github.com/tensorflow/tflite-micro) | 53.654 ms | 653.005 ms | |

repository: guberti/tvm-arduino-profiling

repo_name: guberti/tvm-arduino-profiling


text:
# How-Old-Is
> This repository contains the Alexa skill to find out how long something or someone has been alive for.

[git]:    https://git-scm.com/
[golang]: https://golang.org/
[modules]: https://github.com/golang/go/wiki/Modules
[golint]: https://github.com/golangci/golangci-lint
[aws-cli]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
[aws-cli-config]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
[aws-sam-cli]: https://github.com/awslabs/aws-sam-cli

## SETUP
> How to configure your Alexa Skill

> Please Configure the Makefile with your own available S3 bucket

1. Create a new Alexa skill with a name of your choice

2. Set Alexa skill invocation method as 'how old is x'

3. Set built-in invent invocations to their relevant phrases i.e. 'help', 'stop', 'cancel', etc.

4. Set a random phrase for the built-in fallback intent, i.e. 'bumbaclart'

5. Create new Intent named 'AgeIntent'

6. Create new intent slot named 'name', with SLOT TYPE 'AMAZON.FirstName'

7. Add invocation phrase for the 'AgeIntent' intent with phrase 'how old is {name}'

8. Configure slot values for the 'AMAZON.FirstName' SLOT TYPE i.e. 'Bob'

9. Edit the 'internal/dom/age.go' file to feature your name and DoB in RFC3339 format

10. Package and deploy how-old-is lambda

11. Configure Alexa skill endpoint lambda ARN:

Once the 'how-old-is' lambda has been deployed,

retrieve the generated lambda ARN using the AWS console or

one of the describe stack methods found above.

input the lambda ARN as the default endpoint of your Alexa skill,

within your Alexa development console!

12. Begin testing your Alexa skill by querying for 'how old is x'

13. Query Alexa 'how old is Bob'

14. Query Alexa 'bumbaclart' or your fallback invocation phrase!

15. Tell Alexa to 'stop'

16. Testing complete!

## Development

To develop `how-old-is` or interact with its source code in any meaningful way, be
sure you have the following installed:

### Prerequisites

- [Git][git]
- [Go 1.12][golang]+
- [golangCI-Lint][golint]
- [AWS CLI][aws-cli]
- [AWS SAM CLI][aws-sam-cli]

>You will need to activate [Modules][modules] for your version of [GO][golang],

> by setting the `GO111MODULE=on` environment variable set

### [golangCI-Lint][golint]
```shell
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin latest
```

### [AWS CLI Configuration][aws-cli-config]
> Make sure you configure the AWS CLI
- AWS Access Key ID
- AWS Secret Access Key
- Default region 'us-east-1'
```shell
aws configure
```

## Build
> How to build the Alexa skill lambda

> **Note***:- Executables are placed in 'dist/handlers/*/main'

```shell
make build
```

**OR**

- **Lint the project FIRST**
> **Note***:-This may throw build **errors**, which **may** not break anything!

```Shell
golangci-lint run
```

- **Build the lambda**
```Shell
GOARCH=amd64 GOOS=linux go build -gcflags='-N -l' -o dist/how-old-is/main  ./lambda/handlers/how-old-is/main.go
```

## Package & Deploy
> This section describes how to validate, compile and deploy the latest Alexa skill.

### Validate
> Validate the template.yml before packaging!

```shell
make validate
```

**OR**

```shell
sam validate
```

### Package
> How to compile template.yml after updating the back-end stack definition.

```shell
make package
```
- runs clean
- runs build
- runs sam validate
- runs sam package

**OR**

```shell
sam package --template-file template.yml --s3-bucket {{bucket-name}} --output-template-file packaged.yml
```

**OR**

```shell
aws cloudformation package --template-file template.yml --output-template-file packaged.yml --s3-bucket {{bucket-name}}
```

### Deploy
> How to deploy the complied packaged.yml to update the serverless stack.

```shell
make deploy
```

**OR**

```shell
sam deploy --template-file ./packaged.yaml --stack-name how-old-is --capabilities CAPABILITY_IAM
```

**OR**

```shell
aws cloudformation deploy --template-file ./packaged.yml --stack-name how-old-is --capabilities CAPABILITY_IAM
```

### Describe Stack
> Get information about the back-end infrastructure

```shell
make describe
```

**OR**

```shell
aws cloudformation describe-stacks  --region us-east-1 --stack-name how-old-is
```

## Contributors

This project exists thanks to **all** the people who contribute.

## Donations
All donations are appreciated!

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](http://paypal.me/crazyjack12)

branch_name: refs/heads/master

extension: md

gha_language: Go

license_type: permissive


text:
# Mirror

This is a sandbox project to mirror classes with virtual methods from a host to a CUDA device. I wanted to let the rubber meet the road, so to speak, with my understanding of memory management on CUDA devices. My interest originated when I wanted to run a kernel for each element of a std::vector<BaseClass*> object. Since classes with virtual methods must be constructed on the device side (i.e. cannot be memcpy'ed), more framework is required.

So far, the project provides:

1. Custom allocators for host, device, and managed (unified) memory types
2. Serialization concepts (via inheritance for now) to mirror objects on the host to the device
3. Vector types that use the custom allocators
4. Smart pointer like objects (see MaybeOwn) that look and feel like pointers, but allow you to control when allocation/deallocation occurs (so you can guarantee it happens on the host)
5. polymorphic_mirror type that allocates a memory pool for the base class pointers, and automatically constructs the polymorphic classes device side.

Full disclosure: It didn't work the way I wanted it too, but it looks like it’s something I can build off.


text:
# Nestlé USA recalls refrigerated cookie dough after receiving reports of rubber pieces in product

Published at: **2019-11-01T23:56:17+00:00**

Author: **WABC**

Original: [ABC7 New York](https://abc7ny.com/business/nestle-recalls-cookie-dough-after-reports-of-pieces-of-rubber/5664366/)

Nestlé USA has issued a voluntary recall of ready-to-bake refrigerated Nestlé Toll House Cookie Dough after receiving reports that there were pieces of rubber in the products.
The recall only covers specific batch codes of the products, which include ready-to-bake refrigerated Nestlé Toll House Cookie Dough bars, tubs and tube-shaped "chubs."
Not impacted by this recall are: Nestlé Toll House Morsels, Nestlé Toll House Ice Cream Sandwiches, Nestlé Toll House Edible Cookie Dough, and Nestlé Professional SKUs.

          View a list of potentially affected products here.

Nestlé USA said it is taking this action out of an abundance of caution after receiving reports of food-grade pieces of rubber in some of the products. The company said it has identified the source of the rubber and has already fixed the issue.
No illnesses or injuries were reported that required medical treatment.
Consumers who may have purchased the products should not prepare or consume them but should instead discard the product. You should retain your proof of purchase and contact Nestlé Consumer Services at<EMAIL_ADDRESS>

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# Plagiarism Helper
This script helps to prepare assignment submissions for plagiarism checking. You need to provide a folder that contains submission for each user (group) and the script will:
- Handles submissions per group (only considers one submission per group)
- Extract files from either `tar.gz` or `zip` format
- Store information about empty submissions
- Collects all specified files format (e.x. *.c, *.cpp, etc.) and puts all of them into a directory named by the person who has submitted.

Once the script is finished, you need to use some plagiarism tools to continue finding plagiarism.

### Requirements
This tool depends on [docopts](https://github.com/docopt/docopts) to parse the input arguments.

repository: etesami/PlagiarismHelper

repo_name: etesami/PlagiarismHelper


text:
# weather-dashboard
![Desktop view](./assets/full.png)
![Mobile view](./assets/mobile.png)
## Description
This is a simple weather dashboard that uses the [Open Weather API](https://openweathermap.org/api/). It features:
- a recent searches list that persists through page refresh via `localstorage`
- mobile-first responsive design
- error message when a city cannot be found

Also makes use of [jQuery](https://jquery.com) for easier ajax handling. Check out the [live](https://brhue.github.io/weather-dashboard/) version.
## Installation
Clone the repository to your local machine.
## Usage
Open `index.html` in your favorite browser. Then enter a city to get the current weather!
## Credits

## License
MIT

license: MIT

repository: brhue/weather-dashboard

branch_name: refs/heads/main

repo_name: brhue/weather-dashboard


text:
# Bas Nijholt's Home Assistant config files

## My cool AppDaemon apps
* [Sunrise emulator app](appdaemon/apps/wake_up_light.py) 🌅
* [Wake up with Spotify app](appdaemon/apps/wake_up_with_spotify.py) that slowly ramps the volume 📢
* [Alarm clock](appdaemon/apps/alarm_clock.py) that uses the volume ramp and sunrise app ⏰

## Noteworthy (useful) automations
* [Automatic `lovelace.json` to `lovelace-ui.yaml` converter](https://github.com/basnijholt/home-assistant-config/blob/master/automations/lovelace.yaml) for version control 🤖

## My devices

### Switches
* TP-Link HS110 (2x)
* Xiaomi Aqara Magic Cube
* Xiaomi Aqara Single Button (4x)

### Sensors
* Xiaomi Aqara Door Sensors (4x)
* Xiaomi Aqara Temperature Sensors (4x)
* Xiaomi Aqara Motion Sensors (4x)

### Vacuum
* Xiaomi Mi Roborock S5

### Media player
* KEF LS50 Wireless speakers

### Lights
* Philips Hue E27 White and Color (10x)
* Xiaomi Yeelight E27 Color (*I do **not** recommend these!*)

### Hubs
* ConBee II

### Server
* Raspberry Pi 4, 4GB RAM, 16GB SD-card, running [*Hass.io*](https://www.home-assistant.io/hassio/)

### Device tracker
* iPhone X with the iOS beta app

## Notes
* I use AppDaemon 4 beta, see the installation instructions [here](appdaemon/hassio_appdaemon4_beta_installation_instructions.md).

## Automation plans
* Turn on lights upon entry after dark
* Notify us when the window is open and it is raining
* Implement scenes: 'movie time', 'dinner time', 'cozy time', 'bed time', and 'party time'


text:
# gophercises

A set of coding exercises for budding gophers

- [Quiz Game](./quiz/) - A quiz game with a timer
- [Guess Game](./guess/) - A game to guess a number from 1 to 100
- [Linear Text Adventure](./linear-story/) - A linear text based adventure using linked list implementation
- [Branching Text Adventure](./branching-story/) - A branched text adventure using tree implementation
- [Test Driven Development](./TDD/) - Basic concepts using TDD approach
- [URL-Shortner](./urlshort) - A package implementing URL shortner and redirection
- [go-tm](./go-tm) - A list of solutions to simple go basics problems

repository: samirprakash/gophercises

repo_name: samirprakash/gophercises


text:
# Introduction

### What is Feast?

Feast \(**Fea**ture **St**ore\) is an operational data system for managing and serving machine learning features to models in production.

![](.gitbook/assets/feast-architecture-diagrams.svg)

### What problems does Feast solve?

**Models need consistent access to data:** ML systems built on traditional data infrastructure are often coupled to databases, object stores, streams, and files. This coupling makes changes in data infrastructure difficult without breaking dependent ML system. To make matters worse, dual implementations of data retrieval for training and serving can lead to inconsistencies in data which in turn causes training-serving skew.

Feast decouples your models from your data infrastructure by providing a single data access layer that abstracts feature retrieval from feature storage. Feast also provides a consistent means of referencing feature data for retrieval, ensuring that models remain portable when moving from training to serving.

**It's hard to get new features into production:** Many ML teams consist out of members with different responsibilities and incentives. Data scientists aim to get features into production as soon as possible, while engineers want to ensure that production systems remain stable, creating an organizational friction that slows time-to-market for new features.

Feast provides a centralized data system to which data scientists can publish features, and a battle-hardened serving layer, making it possible for non-engineering teams to ship features into production with minimal oversight.

**Models need point-in-time correct data:** ML models need a consistent view of data in production than what they were trained on. A challenge that many teams face is preventing the leakage of feature data to models during training. Feast solves data leakage by providing point-in-time correct feature retrieval when exporting feature datasets for model training.

**Feature aren't being reused across projects:** The lack of reuse of features across teams is a cost that many organizations currently bear, and is often driven by the siloed nature of development coupled with the monolithic design of end-to-end ML systems.

Feast tries to address the lack of feature reuse by providing a centralized system to which teams can both contribute and consume features. Data scientists start new ML projects by selecting features from a centralized registry, instead of having to develop new features from scratch.

### What problems does Feast not yet solve?

**Feature engineering:** Feast intends to eventually support light-weight feature engineering as part of its API, but this is not implemented yet. Our current focus is primarily on operational \(ingestion, serving, monitoring\) functionality.

**Feature discovery:** Feast enabled reuse of features through its central registry. However, it still lacks a user interface which would make the exploration and discovery of entities and features a first-class functionality.

**Feature validation:** Feast has very limited support for statistic generation of feature data and validation of this data. We consider data validation a first class problem. We intend to leverage existing data validation tooling to address the operational data validation needs of ML teams.

### What is Feast not?

\*\*\*\*[**ETL**](https://en.wikipedia.org/wiki/Extract,_transform,_load) **or** [**ELT**](https://en.wikipedia.org/wiki/Extract,_load,_transform) **system:** Feast is not \(and does not plan to be\) a general purpose data transformation or pipelining system. Feast plans to eventually have a light-weight feature engineering toolkit, but we encourage teams to integrate Feast with upstream ETL/ELT systems that are specialized on transformation.

**Data warehouse:** Feast is not a replacement for your data warehouse or the source of truth for all transformed data in your organization. It is meant to be a light-weight downstream layer that can serve data from an existing data warehouse \(or other data sources\) to models in production.

**Data catalog:** Feast is not a general purpose data catalog for your organization. Feast is purely focused on cataloging features meant for use in ML pipelines or systems.

### How can I get started?

{% hint style="info" %}
The best way to learn Feast is to use it. Head over to our [Quickstart](quickstart.md) and try out our examples!
{% endhint %}

 Explore the following resources to get started with Feast:

* [Getting Started](getting-started/) provides guides on [Installing Feast](getting-started/install-feast/) and [Connecting to Feast](getting-started/connect-to-feast/).
* [Concepts](./) describes all important Feast API concepts.
* [User guide](user-guide/data-ingestion.md) provides guidance on completing Feast workflows.
* [Examples](https://github.com/feast-dev/feast/tree/master/examples) contains Jupyter notebooks that you can run on your Feast deployment.
* [Advanced](advanced/troubleshooting.md) contains information about both advanced and operational aspects of Feast.
* [Reference](reference/api/) contains detailed API and design documents for advanced users.
* [Contributing](contributing/contributing.md) contains resources for anyone who wants to contribute to Feast.


text:
5G-CASH integration/staging tree
===========================

What is 5G-CASH?
----------------
5G-CASH (VGC) is an experimental digital currency that enables instant payments to
anyone, anywhere in the world. It uses different key features technology to operate
with no central authority allowing everyone to operate the way they want to with new
state of the art privacy coin that uses Sigma and Dandelion++ Protocol along with TOR.

For more information, as well as an immediately useable, binary version of
this software, see https://fiveg.cash/download/, or read the
[original whitepaper](https://fiveg.cash/5g-cash.pdf).

### Key Features
    -Privacy (Anonymous and Untraceable)
    -Sigma Protocol
    -Tor Protocol
    -Dandelion++ Protocol
    -Proof of Work and Proof of Stake (3.0) share 55% of the block reward
    -Masternode gets 45% of the block reward

### Specifications and Block Rewards -----> https://discord.gg/tmQSFV9

Linux Build Instructions and Notes
==================================

Dependencies
----------------------
You can use the "depscript.sh" to automatically install Dependencies to build VGC or manually install them using the syntax below

1.  Update packages

        sudo apt-get update

2.  Install required packages

        sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev libzmq3-dev libminizip-dev

3.  Install Berkeley DB 4.8

        sudo add-apt-repository ppa:bitcoin/bitcoin && sudo apt-get update && sudo apt-get install libdb4.8-dev libdb4.8++-dev
4.  Install QT 5

        sudo apt-get install libminiupnpc-dev && sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler    libqrencode-dev

Building 5G-CASH
----------------------

1. Static compile

    git clone https://github.com/5G-Cash/5G.git

    cd 5G/depends

    make HOST=x86_64-linux-gnu

    cd ..

    ./autogen.sh

    ./configure --prefix=`pwd`/depends/x86_64-linux-gnu

    make

2. Shared binary

    git clone https://github.com/5G-Cash/5G.git

    cd 5G

    ./autogen.sh

    ./configure

    make

3.  It is recommended to build and run the unit tests:

        make check

Setting up a Fivegnode
==================================

Read [contrib/masternode-setup-scripts/README.md](contrib/masternode-setup-scripts/README.md) for instructions.

gha_license_id: MIT


text:
# `sylkie`

A command line tool and library for testing networks for common address
spoofing security vulnerabilities in IPv6 networks using the Neighbor
Discovery Protocol.

## Getting Started

### Dependencies

 - [libseccomp](https://github.com/seccomp/libseccomp)
 - [json-c](https://github.com/json-c/json-c)

### Build

Get the code and compile it!

```
# Get the code
git clone https://github.com/dlrobertson/sylkie
cd ./sylkie

# Compile the code
mkdir -p ./build
cd ./build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install
```

## Basic usage

The following describes the basic usage of `sylkie`. Run `sylkie -h` or
`sylkie <subcommand> -h` for more details.

### DoS (Router Advert)

The basic usage of the `sylkie` router advert command is listed below.
This command will send a Router Advertisement message to the given ip
or the all nodes multicast addres with the Valid and Preferred
Lifetime set to 0 for the router ip and prefix provided.

```
sylkie ra -interface <interface> \
    --target-mac <mac of router> \
    --router-ip <ip of router> \
    --prefix <router prefix> \
    --timeout <time between adverts> \
    --repeat <number of times to send the request>
}
```

As you probably notice that is quite a bit of info, that can be annoying
to type out on the command line. `sylkie` also accepts json to aleviate
this. Were the subcommand (`ra`, `na`) is a key whos value is an array
of objects with the keys and values being the corresponding option
and value. See the examples for details.

Learning is fun. I didn't know much about The ND protocol so I read
[RFC 4861](https://tools.ietf.org/html/rfc4861) and this seemed like
a good way to learn by practice.


text:
# unplugin

[![NPM version](https://img.shields.io/npm/v/unplugin?color=a1b858&label=)](https://www.npmjs.com/package/unplugin)

Unified plugin system for build tools.

Currently supports:
- [Vite](https://vitejs.dev/)
- [Rollup](https://rollupjs.org/)
- [Webpack](https://webpack.js.org/)
- [esbuild](https://esbuild.github.io/)

## Hooks

`unplugin` extends the excellent [Rollup plugin API](https://rollupjs.org/guide/en/#plugins-overview) as the unified plugin interface and provides a compatible layer base on the build tools used with.

###### Supported

| Hook | Rollup | Vite | Webpack 4 | Webpack 5 | esbuild |
| ---- | :----: | :--: | :-------: | :-------: | :-----: |
| [`enforce`](https://rollupjs.org/guide/en/#enforce) | ❌ 1 | ✅ | ✅ | ✅ | ❌ 1 |
| [`buildStart`](https://rollupjs.org/guide/en/#buildstart) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`resolveId`](https://rollupjs.org/guide/en/#resolveid) | ✅ | ✅ | ✅ | ✅ | ✅ |
| `loadInclude`2 | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`load`](https://rollupjs.org/guide/en/#load) | ✅ | ✅ | ✅ | ✅ | ✅ 3 |
| `transformInclude`2 | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`transform`](https://rollupjs.org/guide/en/#transformers) | ✅ | ✅ | ✅ | ✅ | ✅ 3 |
| [`watchChange`](https://rollupjs.org/guide/en/#watchchange) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`buildEnd`](https://rollupjs.org/guide/en/#buildend) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`writeBundle`](https://rollupjs.org/guide/en/#writebundle)4 | ✅ | ✅ | ✅ | ✅ | ✅ |

1. Rollup and esbuild do not support using `enforce` to control the order of plugins. Users need to maintain the order manually.
2. Webpack's id filter is outside of loader logic; an additional hook is needed for better perf on Webpack. In Rollup and Vite, this hook has been polyfilled to match the behaviors. See for following usage examples.
3. Although esbuild can handle both JavaScript and CSS and many other file formats, you can only return JavaScript in `load` and `transform` results.
4. Currently, `writeBundle` is only serves as a hook for the timing. It doesn't pass any arguments.

### Hook Context

###### Supported

| Hook | Rollup | Vite | Webpack 4 | Webpack 5 | esbuild |
| ---- | :----: | :--: | :-------: | :-------: | :-----: |
| [`this.parse`](https://rollupjs.org/guide/en/#thisparse) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`this.addWatchFile`](https://rollupjs.org/guide/en/#thisaddwatchfile) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`this.emitFile`](https://rollupjs.org/guide/en/#thisemitfile)5 | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`this.getWatchFiles`](https://rollupjs.org/guide/en/#thisgetwatchfiles) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`this.warn`](https://rollupjs.org/guide/en/#thiswarn) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [`this.error`](https://rollupjs.org/guide/en/#thiserror) | ✅ | ✅ | ✅ | ✅ | ✅ |

5. Currently, [`this.emitFile`](https://rollupjs.org/guide/en/#thisemitfile) only supports the `EmittedAsset` variant.

## Usage

```ts
import { createUnplugin } from 'unplugin'

export const unplugin = createUnplugin((options: UserOptions) => {
  return {
    name: 'unplugin-prefixed-name',
    // webpack's id filter is outside of loader logic,
    // an additional hook is needed for better perf on webpack
    transformInclude (id) {
      return id.endsWith('.vue')
    },
    // just like rollup transform
    transform (code) {
      return code.replace(/<template>/, `<template><div>Injected</div>`)
    },
    // more hooks coming
  }
})

export const vitePlugin = unplugin.vite
export const rollupPlugin = unplugin.rollup
export const webpackPlugin = unplugin.webpack
export const esbuildPlugin = unplugin.esbuild
```

## Nested Plugins

Since `v0.10.0`, unplugin supports constructing multiple nested plugins to behave like a single one. For example:

###### Supported

| Rollup | Vite | Webpack 4 | Webpack 5 | esbuild |
| :----: | :--: | :-------: | :-------: | :-----: |
| ✅ `>=3.1`6 | ✅ | ✅ | ✅ | ⚠7 |

6. Rollup supports nested plugins since [v3.1.0](https://github.com/rollup/rollup/releases/tag/v3.1.0). Plugin aurthor should ask users to a have a Rollup version of `>=3.1.0` when using nested plugins. For singe plugin format, unplugin works for any versions of Rollup.
7. Since esbuild does not have a built-in transform phase, the `transform` hook of nested plugin will not work on esbuild yet. Other hooks like `load` or `resolveId` work fine. We will try to find a way to support it in the future.

###### Usage

```ts
import { createUnplugin } from 'unplugin'

export const unplugin = createUnplugin((options: UserOptions) => {
  return [
    {
      name: 'plugin-a',
      transform (code) {
        // ...
      }
    },
    {
      name: 'plugin-b',
      resolveId (id) {
        // ...
      }
    }
  ]
})
```

## Plugin Installation

###### Vite

```ts
// vite.config.ts
import UnpluginFeature from './unplugin-feature'

export default {
  plugins: [
    UnpluginFeature.vite({ /* options */ })
  ]
}
```

###### Rollup

```ts
// rollup.config.js
import UnpluginFeature from './unplugin-feature'

export default {
  plugins: [
    UnpluginFeature.rollup({ /* options */ })
  ]
}
```

###### Webpack

```ts
// webpack.config.js
module.exports = {
  plugins: [
    require('./unplugin-feature').webpack({ /* options */ })
  ]
}
```

###### esbuild

```ts
// esbuild.config.js
import { build } from 'esbuild'

build({
  plugins: [
    require('./unplugin-feature').esbuild({ /* options */ })
  ]
})
```

### Framework-specific Logic

While `unplugin` provides compatible layers for some hooks, the functionality of it is limited to the common subset of the build's plugins capability. For more advanced framework-specific usages, `unplugin` provides an escape hatch for that.

```ts
export const unplugin = createUnplugin((options: UserOptions, meta) => {

  console.log(meta.framework) // 'vite' | 'rollup' | 'webpack' | 'esbuild'

  return {
    // common unplugin hooks
    name: 'unplugin-prefixed-name',
    transformInclude (id) { /* ... */ },
    transform (code) { /* ... */  },

    // framework specific hooks
    vite: {
      // Vite plugin
      configureServer(server) {
        // configure Vite server
      },
      // ...
    },
    rollup: {
      // Rollup plugin
    },
    webpack(compiler) {
      // configure Webpack compiler
    },
    esbuild: {
      // change the filter of onResolve and onLoad
      onResolveFilter?: RegExp
      onLoadFilter?: RegExp
      // or you can completely replace the setup logic
      setup?: EsbuildPlugin['setup']
    }
  }
})
```

## Conventions

- Plugins powered by unplugin should have a clear name with `unplugin-` prefix.
- Include `unplugin` keyword in `package.json`.
- To provide better DX, packages could export 2 kinds of entry points:
  - Default export: the returned value of `createUnplugin` function

     ```ts
     import UnpluginFeature from 'unplugin-feature'
     ```

  - Subpath exports: properties of the returned value of `createUnplugin` function for each framework users

     ```ts
     import VitePlugin from 'unplugin-feature/vite'
     ```
  - Refer to [unplugin-starter](https://github.com/antfu/unplugin-starter) for more details about this setup.

## Starter Templates

- [unplugin-starter](https://github.com/antfu/unplugin-starter)
- [create-unplugin](https://github.com/jwr12135/create-unplugin) Community

## Community Showcases

- [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
- [unplugin-vue2-script-setup](https://github.com/antfu/unplugin-vue2-script-setup)
- [unplugin-icons](https://github.com/antfu/unplugin-icons)
- [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
- [unplugin-upload-cdn](https://github.com/zenotsai/unplugin-upload-cdn)
- [unplugin-web-ext](https://github.com/jwr12135/unplugin-web-ext)
- [unplugin-properties](https://github.com/pd4d10/unplugin-properties)
- [unplugin-moment-to-dayjs](https://github.com/1247748612/unplugin-moment-to-dayjs)
- [unplugin-object-3d](https://github.com/m0ksem/unplugin-object-3d)
- [unplugin-parcel-css](https://github.com/ssssota/unplugin-parcel-css)
- [unplugin-vue](https://github.com/sxzz/unplugin-vue)
- [unplugin-vue-macros](https://github.com/sxzz/unplugin-vue-macros)
- [unplugin-vue-define-options](https://github.com/sxzz/unplugin-vue-macros/tree/main/packages/define-options)
- [unplugin-jsx-string](https://github.com/sxzz/unplugin-jsx-string)
- [unplugin-ast](https://github.com/sxzz/unplugin-ast)
- [unplugin-element-plus](https://github.com/element-plus/unplugin-element-plus)
- [unplugin-glob](https://github.com/sxzz/unplugin-glob)
- [unplugin-sentry](https://github.com/kricsleo/unplugin-sentry)
- [unplugin-imagemin](https://github.com/ErKeLost/unplugin-imagemin)

## License

[MIT](./LICENSE) License © 2021-PRESENT Nuxt Contrib

repository: ampm-jbnu/ampm-site

gha_language: JavaScript

repo_name: ampm-jbnu/ampm-site


text:
# About the dist folder
After building the dist version of your project, the generated files are stored in this folder. You should keep it under version control.
#npm install other package
npm install XXXX --save-dev
#run webpack serve
npm run serve:dist
#ctrl + c stop the serve
ctrl + c
#deploy the static html to github gh-pages
git subtree push --prefix=dist origin gh-pages

#git deploy step
git add -A
git commit -m "comment"
git push

# Start for development
npm start # or
npm run serve

# Start the dev-server with the dist version
npm run serve:dist

# Just build the dist version and copy static files
npm run dist

# Run unit tests
npm test

# Auto-run unit tests on file changes
npm run test:watch

# Lint all files in src (also automatically done AFTER tests are run)
npm run lint

# Clean up the dist directory
npm run clean

# Just copy the static assets
npm run copy

repository: zhangzunke/gallery-by-react

repo_name: zhangzunke/gallery-by-react


text:
---
Order: 30
Title: MSBuild Task
Description: |
    Just install with NuGet and GitVersion will automatically generate assembly
    version information that is compiled into the resulting artifact.
CardIcon: collect.svg
RedirectFrom:  docs/usage/msbuild-task
---

The MSBuild Task for GitVersion — **GitVersion.MsBuild** — is a simple solution if
you want to version your assemblies without writing any command line scripts or
modifying your build process.

Just install with NuGet and GitVersion will automatically generate assembly
version information that is compiled into the resulting artifact.

It currently works with desktop `MSBuild`. Support for CoreCLR with `dotnet build`
is coming soon.

> **Note**\
> The nuget package was "_[GitVersionTask](https://www.nuget.org/packages/GitVersionTask/)_" up until version 5.5.1.\
> From version 5.6.0 it has been called "_[GitVersion.MsBuild](https://www.nuget.org/packages/GitVersion.MsBuild/)_"

## TL;DR

### Install the MSTask targets

Add the [GitVersion.MsBuild](https://www.nuget.org/packages/GitVersion.MsBuild/) NuGet
Package into the project you want to be versioned by GitVersion.

From the Package Manager Console:

```shell
Install-Package GitVersion.MsBuild
```

If you're using `PackageReference` style NuGet dependencies (VS 2017+), add
`<PrivateAssets>all</PrivateAssets>` to prevent the task from becoming a
dependency of your package:

```xml
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*">
  <PrivateAssets>All</PrivateAssets>
</PackageReference>
```

### Remove AssemblyInfo attributes

The next thing you need to do is to remove the `Assembly*Version` attributes from
your `Properties\AssemblyInfo.cs` files. This puts GitVersion.MsBuild in charge of
versioning your assemblies.

### WPF specific concerns

One further step needs to be taken for SDK-style WPF projects.

Building projects with .NET Core SDK with a version lower than v5.0.200
requires turning off automatic generation of the different versioning attributes.
GitVersion usually controls these properties but cannot during WPF specific
targets that generate a temporary project.

```xml
<PropertyGroup>
  <!-- Wpf workaround: GitVersion and .NET SDK < v5.0.200 -->
  <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
  <GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
  <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
</PropertyGroup>
```

For .NET Core SDK v5.0.200 to v6.0.0-preview.1, a opt-in flag was introduced to
allow package references to be imported to the temporary project.
You can now remove the previous versioning attributes and replace them with
a single property.

```xml
<PropertyGroup>
  <!-- WPF workaround: GitVersion and .NET SDK between v5.0.200 and v6.0.0-preview.2  -->
  <IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
</PropertyGroup>
```

You can remove all workarounds if you are building with .NET Core SDK
v6.0.0-preview.2 or later as the flag is now opt-out.

### Done!

The setup process is now complete and GitVersion.MsBuild should be working its magic,
versioning your assemblies like a champ. However, more can be done to further
customize the build process. Keep reading to find out how the version variables
are set and how you can use them in MSBuild tasks.

## How does it work?

After being installed into a project, the MSBuild task will wire GitVersion into
the MSBuild pipeline and will then perform several actions. These actions are
described below.

### Inject version metadata into the assembly

The sub-task named `GitVersion.MsBuild.UpdateAssemblyInfo` will inject version
metadata into the assembly where GitVersion.MsBuild has been added to. For each assembly
you want GitVersion to handle versioning, you will need to install
[GitVersion.MsBuild](https://www.nuget.org/packages/GitVersion.MsBuild/) into the corresponding
project via NuGet.

#### AssemblyInfo Attributes

A temporary `AssemblyInfo.cs` will be created at build time. That file will
contain the appropriate SemVer information. This will be included in the build
pipeline.

Default sample:

```csharp
[assembly: AssemblyVersion("<IP_ADDRESS>")]
[assembly: AssemblyFileVersion("<IP_ADDRESS>")]
[assembly: AssemblyInformationalVersion("1.1.0+Branch.main.Sha.722aad3217bd49a6576b6f82f60884e612f9ba58")]
```

Now, when you build:

*   `AssemblyVersion` will be set to the `AssemblySemVer` variable.
*   `AssemblyFileVersion` will be set to the `MajorMinorPatch` variable with `.0`
    appended to it.
*   `AssemblyInformationalVersion` will be set to the `InformationalVersion` variable.

#### Other injected Variables

All other [variables](/docs/reference/variables) will be injected into an
internal static class part of the global namespace similar to this:

```csharp
[CompilerGenerated]
internal static class GitVersionInformation
{
    public static string Major = "1";
    public static string Minor = "1";
    public static string Patch = "0";
    ...All other variables
}
```

### Accessing injected Variables

**NB: depending on the source language of the assembly, the injected variables may be exposed either as fields or as properties. The examples below take care of this.**

#### All variables

```csharp
var assemblyName = assembly.GetName().Name;
var gitVersionInformationType = assembly.GetType("GitVersionInformation");
var fields = gitVersionInformationType.GetFields();

foreach (var field in fields)
{
    Trace.WriteLine(string.Format("{0}: {1}", field.Name, field.GetValue(null)));
}

// The GitVersionInformation class generated from a F# project exposes properties
var properties = gitVersionInformationType.GetProperties();

foreach (var property in properties)
{
    Trace.WriteLine(string.Format("{0}: {1}", property.Name, property.GetGetMethod(true).Invoke(null, null)));
}
```

##### Specific variable

```csharp
var assemblyName = assembly.GetName().Name;
var gitVersionInformationType = assembly.GetType("GitVersionInformation");
var versionField = gitVersionInformationType.GetField("Major");
if (versionField != null)
{
    Trace.WriteLine(versionField.GetValue(null));
}
else
{
    // The GitVersionInformation class generated from a F# project exposes properties
    var versionProperty = gitVersionInformationType.GetProperty("Major");
    if (versionProperty != null)
    {
        Trace.WriteLine(versionProperty.GetGetMethod(true).Invoke(null, null));
    }
}
```

### Populate some MSBuild properties with version metadata

The sub-task `GitVersion.MsBuild.GetVersion` will write all the derived
[variables](/docs/reference/variables) to MSBuild properties so the information
can be used by other tooling in the build pipeline.

The class for `GitVersion.MsBuild.GetVersion` has a property for each variable.
However at MSBuild time these properties are mapped to MSBuild properties that
are prefixed with `GitVersion_`. This prevents conflicts with other properties
in the pipeline.

In addition, the following MSBuild properties are set when `UpdateVersionProperties`
is true (the default): `Version`, `VersionPrefix`, `VersionSuffix`,
`PackageVersion`, `InformationalVersion`, `AssemblyVersion` and `FileVersion`.
These are used by the built-in tasks for generating AssemblyInfo's and NuGet
package versions.

### NuGet packages

The new SDK-style projects available for .NET Standard libraries (and multi-targeting),
have the ability to create NuGet packages directly by using the `pack` target:
`msbuild /t:pack`. The version is controlled by the MSBuild properties described
above.

GitVersionTask generates SemVer 2.0 compliant NuGet package versions by default.
You can disable it by setting `UseFullSemVerForNuGet` to false in your project.
Older NuGet clients do not support SemVer 2.0 package versions, but most of the
modern hosts support it.

#### Accessing variables in MSBuild

Once `GitVersion.MsBuild.GetVersion` has been executed, the MSBuild properties can be
used in the standard way. For example:

```xml
<Message Text="GitVersion_InformationalVersion: $(GitVersion_InformationalVersion)"/>
```

### Communicate variables to current Build Server

The sub-task `GitVersion.MsBuild.WriteVersionInfoToBuildLog` will attempt to write
the version information to the current Build Server log.

If, at build time, it is detected that the build is occurring inside a Build
Server then the [variables](/docs/reference/variables) will be written to the
Build Server log in a format that the current Build Server can consume. See
[Build Server Support](/docs/reference/build-servers).

## Conditional control tasks

Properties `WriteVersionInfoToBuildLog`, `UpdateAssemblyInfo`,
`UseFullSemVerForNuGet`, `UpdateVersionProperties` and `GetVersion` are checked
before running these tasks.

You can disable `GitVersion.MsBuild.UpdateAssemblyInfo` by setting
`UpdateAssemblyInfo` to `false` in your MSBuild script, like
this:

```xml
<PropertyGroup>
  ...
  <UpdateAssemblyInfo>false</UpdateAssemblyInfo>
  ...
</PropertyGroup>
```

For SDK-style projects, `UpdateVersionProperties` controls setting the default
variables: `Version`, `VersionPrefix`, `VersionSuffix`, `PackageVersion`,
`InformationalVersion`, `AssemblyVersion` and `FileVersion`.

### Namespace generation

You can configure GitVersion to generate the `GitVersionInformation` class in a namespace that matches the current assembly. By default this class is created in the global namespace. If `UseProjectNamespaceForGitVersionInformation` is set to true, the `GitVersionInfomation` class will instead be generated in a namespace matching the current project. If the property `<RootNamespace>` is set that value will be used, otherwise the name of the project file is used.

```xml
<PropertyGroup>
  ...
  <UseProjectNamespaceForGitVersionInformation>true</UseProjectNamespaceForGitVersionInformation>
  ...
</PropertyGroup>
```

## Extra properties

There are properties that correspont to certain
[command line arguments](/docs/usage/cli/arguments) for GetVersion task.
In particular, setting `GitVersion_NoFetchEnabled` to `true` disables `git fetch`
during version calculation, setting `GitVersion_NoNormalizeEnabled` to `true` disables
normalize step on a build server, setting `GitVersion_NoCacheEnabled` to `true`
makes GetVersion ignore cache. All the rest command line arguments can be passed via
`GitVersion_CommandLineArguments` variable.

## My Git repository requires authentication. What should I do?

Set the environment variables `GITVERSION_REMOTE_USERNAME` and
`GITVERSION_REMOTE_PASSWORD` before the build is initiated.

repository: GitTools/GitVersion

gha_language: C#

repo_name: GitTools/GitVersion


text:
# Social Metric Graphic

Project in Node.Js and Vue.js that will display a Graphic getting the values from a local file.

## Getting Started

To clone and run this application, you'll need [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) (which comes with [npm](http://npmjs.com)) installed on your computer. From your command line:

### Prerequisites

To install the application you will need to install.
```
* [Node.js](https://nodejs.org/en/)
* [Git](https://git-scm.com/)
```

### Installing

To installing this project will need to open the bash terminal of your preference, examples:

```
 * Power Shell;
 * Git Bash;
 * Linux terminal;
 * Mac Terminal;
```
Then you need to clone the Social Metric Graphic repository from git

# Command To Clone this repository
```
git clone https://github.com/rafaelAmaralMario/social-metric-graphic.git
```

After clone the git repository go to the repository folder
# Commandd to enter into the repository
```
cd social-metric-graphic
```

In the repository folder, you will need to install project dependencies.
As this project was separated into a Server and a Client structure, you will need to install both dependencies.

To install the server and client dependencies we have two ways to do that.

# First Way: installing all project dependencies
```
npm run install-project
```

# Second Way: installing the dependencies separately

## Installing Client Dependencies
```
npm run install-client
```
## Installing Server Dependencies

```
npm run install-server
```

After that, you will need to run the server to access the project.

# Command to run the server
```
npm run dev
```

After running the server, you can finally see the project into:

```
http://localhost:8081/
```

## Deployment

To deploy the Application you will use the deploy command to create the client side configurations.

# Command to build the client
```
npm run build
```
After that will be created the **dist** folder, inside the client folder, with the files minified and configured to deploy.

To run the server in production you will need to start the server with production settings
# Command to run the server in production
```
npm run build
```

## Built With

Client
* [Vue.js](https://vuejs.org/) - Web Framework used in project
* [Vue-Cli](https://cli.vuejs.org/) - Standard Tooling for Vue.js Development
* [Axios](https://github.com/axios/axios) - Promise based HTTP client for the browser and node.js
* [Highcharts](https://highcharts.com/) - Standard Tooling for Vue.js Development
* [Webpack](https://webpack.js.org/) - Standard Tooling for Vue.js Development

Server
* [Node.js](https://nodejs.org/en/) - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
* [Express](http://expressjs.com/) - web framework for Node.js

## Authors

* **Rafael Mario**

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

repository: rafaelAmaralMario/social-metric-graphic

repo_name: rafaelAmaralMario/social-metric-graphic


text:
---
title: "SHWindow class"
keywords: spherical harmonics software package, spherical harmonic transform, legendre functions, multitaper spectral analysis, fortran, Python, gravity, magnetic field
sidebar: mydoc_sidebar
permalink: python-shwindow.html
summary: Classes for localized spectral analyses.
toc: true
folder: mydoc
---

<style>
table:nth-of-type(n) {
    display:table;
    width:100%;
}
table:nth-of-type(n) th:nth-of-type(2) {
    width:65%;
}
</style>

## Subclasses

| Subclass name | Description |
| ------------- | ----------- |
| SHWindowCap | Class for windows concentrated within a spherical cap. |
| SHWindowMask | Class for windows concentrated in an arbitrary domain. |

## Initialization

| Initialization method | Description |
| --------------------- | ----------- |
| `x = SHWindow.from_cap()` | Construct windows concentrated within a spherical cap. |
| `x = SHWindow.from_mask()` | Construct windows concentrated within an arbitrary region. |

## Attributes

| Attribute | Description |
| --------- | ----------- |
| `kind` | Either `'cap'` or `'mask'`. |
| `coeffs` | Array of spherical harmonic coefficients of the rotated spherical-cap localization windows. |
| `shannon` | The Shannon number, which approximates the number of well localized windows. |
| `area` | Area of the concentration domain, in radians. |
| `eigenvalues` | Concentration factors of the localization windows. |
| `orders` | The angular orders for each of the spherical-cap localization windows. |
| `weights` | Taper weights used with the multitaper spectral analyses. Default is `None`. |
| `lmax` | Spherical harmonic bandwidth of the localization windows. |
| `theta` | Angular radius of the spherical-cap localization domain (default in degrees). |
| `theta_degrees` | `True` (default) if theta is in degrees. |
| `nwin` | Number of localization windows. Default is `(lmax+1)**2`. |
| `nwinrot` | The number of best-concentrated spherical cap windows that were rotated and whose coefficients are stored in `coeffs`. |
| `clat`, `clon` | Latitude and longitude of the center of the rotated spherical-cap localization windows (default in degrees). |
| `coord_degrees` | `True` (default) if `clat` and `clon` are in degrees. |
| `taper_degrees` | Boolean or int array defining which spherical harmonic degrees were used to construct the windows. |

## Methods

| Method | Description |
| ------ | ----------- |
| `to_array()` | Return an array of the spherical harmonic coefficients for taper `i`, where `i`=`0` is the best concentrated, optionally using a different normalization convention. |
| `to_shcoeffs()` | Return the spherical harmonic coefficients of taper `i`, where `i`=`0` is the best concentrated, as a new SHCoeffs class instance, optionally using a different normalization convention. |
| `to_shgrid()` | Return as a new SHGrid instance a grid of taper `i`, where `i`=`0`  is the best concentrated window. |
| `number_concentrated()` | Return the number of localization windows that have concentration factors greater or equal to a specified value. |
| `degrees()` | Return an array containing the spherical harmonic degrees of the localization windows, from `0` to `lmax`. |
| `spectra()` | Return the spectra of one or more localization windows. |
| `rotate()` | Rotate the spherical cap tapers, originally located at the north pole, to `clat` and `clon` and save the spherical harmonic coefficients in `coeffs`. |
| `coupling_matrix()` | Return the coupling matrix of the first `nwin`. |
| `biased_spectrum()` | Calculate the multitaper (cross-) spectrum expectation of a localized function. |
| `multitaper_spectrum()` | Return the multitaper spectrum estimate and uncertainty for the input SHCoeffs class instance. |
| `multitaper_cross_spectrum()` | Return the multitaper cross-spectrum estimate and uncertainty for two input SHCoeffs class instances. |
| `variance()` | Compute the theoretical variance of a windowed function for a given input power spectrum. |
| `copy()` | Return a copy of the class instance. |
| `plot_windows()` | Plot the best concentrated localization windows using a simple cylindrical projection. |
| `plot_spectra()` | Plot the spectra of the best concentrated localization windows. |
| `plot_coupling_matrix()` | Plot the multitaper coupling matrix.|
| `info()` | Print a summary of the data stored in the SHWindow instance. |

repository: SHTOOLS/SHTOOLS

gha_language: Python

repo_name: SHTOOLS/SHTOOLS


text:
## Loops Lab 2

1.  Write a for loop that will iterate from 50 to 20.
For each iteration, if the current number is a multiple of 3, console.log the value.

2.  Write out an "infinite loop" below. Don't run the loop in your console unless you are prepared to force quit your browser!!

3.  Loop through this array and print every other value, starting with the first.

```javascript
var classmates = ["Bridjet", "Nathan", "Matias", "Mike", "Jason", "Reuben", "Ben", "Lane", "John", "Chris", "Terry", "Ann", "Katelyn", "Naomi", "Jeff"];
```

4.  Create a new array with the gluten-free options from this menu:

```javascript
var menu = [{name: "pizza", glutenFree: false},{name: "salad", glutenFree: true},{name: "donut", glutenFree: false},{name: "steak", glutenFree: true},{name: "chicken", glutenFree: true},{name: "cheeseburger", glutenFree: false}];
```

### Bonus Question(hard mode)
Create a new array with all the players that have a true value of goat (greatest of all time) from each league.

```javascript
var league = [{name: "NFL", players: [{name: "Tom Brady", goat: false}, {name: "Walter Payton", goat: true}]}, {name: "NBA", players: [{name: "Michael Jordan", goat: true}, {name: "Lebron James", goat: false}]},{name: "MLB", players: [{name: "Babe Ruth", goat: true}, {name: "Alex Rodriguez", goat: false}]}]
```


text:
---
layout: default
---

# 1995-09-11 - Re: Brian Davis' cypherpunk GAK proposal

## Header Data

From<EMAIL_ADDRESS>(Lou Poppler)

To: Brian Davis<EMAIL_ADDRESS>Message Hash: cccccd03209e100886dfd9f9d3746edb7b44c615666e672452f4da1a86ba2dae

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-09-11 16:10:34 UTC

Raw Date: Mon, 11 Sep 95 09:10:34 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Lou Poppler)
Date: Mon, 11 Sep 95 09:10:34 PDT
To: Brian Davis<EMAIL_ADDRESS>Subject: Re: Brian Davis' cypherpunk GAK proposal
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Sun, 3 Sep 1995 21:25:26 -0400 (EDT),
Brian Davis<EMAIL_ADDRESS>wrote:
}
} I, of course, know of the "dislike" of GAK here.  I am curious to know,
} however, if the "dislike" is because government would have access under
} any circumstances or if the primary worry is that government will cheat
} and get access when most would agree that they shouldn't (either by the
} judge "cheating" or a TLA stealing it).

You leave out something here when you say `the judge "cheating"'.
Most of the proposals and draft legislation include words like
"or by other lawful authority" along with the provisions empowering
judges to grant access to keys.  Some versions will list various
combinations of the Attorney General, Director of {TLA}, etc, as
explicitly empowered.  Other versions don't explicate the phrase,
perhaps trusting that those with the need will already know where
their lawful authority lies -- maybe in an anti-terrorist Executive
Order; maybe in legislation authorizing military support in drug
interdiction; perhaps in their organization's charter to protect
"national security".

Part of the concern is that spooks will have routine access to keys
without any cheating -- no stealing or bent judges will be required.
The War on Drugs, the War on Firearms, the War on Terrorists
(on Money Lauderers, on Pedophiles, on Spies) are just too important.

} In other words ... if it took agreement by a review board composed of
} non-LEA members of this list, would the escrow be acceptable??

This would not be acceptable to the government.  Very many sincere,
patriotic government agents believe they currently have the right
and the responsibility to monitor the civilians' possibly-illegal
activities.  Your hypothetical review board of cypherpunks would
unacceptably limit their established right to gather evidence and
intelligence.  Investigations too sensitive to mention here, would
be crippled.  Unless of course, you intended that "or by other lawful
authority" would be included in your scheme?

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Lou Poppler<EMAIL_ADDRESS>| "Understanding is a three-edged      ::
::    http://www.msen.com/~lwp/    | sword..."-- Ambassador Kosh, Babylon5::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

{% endraw %}
```

## Thread

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

+ Return to "[Brian Davis <bdavis@thepoint.net>](/authors/brian_davis_bdavis_at_thepoint_net_)"
+ Return to<EMAIL_ADDRESS>(Duncan J Watson)](/authors/duncan_at_hasp_com_duncan_j_watson_)"
+ Return to "[Jon Lasser <jlasser@rwd.goucher.edu>](/authors/jon_lasser_jlasser_at_rwd_goucher_edu_)"
+ Return to<EMAIL_ADDRESS>(Lou Poppler)](/authors/lwp_at_mail_msen_com_lou_poppler_)"
+ Return to "[Mark Contois <mark@lenox.com>](/authors/mark_contois_mark_at_lenox_com_)"
+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"
+ Return to<EMAIL_ADDRESS>(Patrick May)](/authors/pjm_at_ionia_engr_sgi_com_patrick_may_)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_got_net_timothy_c_may_)"

+ 1995-09-01 (Fri, 1 Sep 95 16:51:13 PDT) - [Surveillance a Growing Problem](/archive/1995/09/835edaa1a876ac91315cea1d4e6cd4f57ec29a7622d3c950bde572bf151960bc) -<EMAIL_ADDRESS>(Timothy C. May)_
  + 1995-09-07 (Thu, 7 Sep 95 08:56:12 PDT) - [Re: GAK](/archive/1995/09/b70be77c9b97e2e8ab812581de5b55dbff4b5b780aa7e96cfa611556db3c53a1) - _Brian Davis<EMAIL_ADDRESS>    + 1995-09-07 (Thu, 7 Sep 95 09:31:21 PDT) - [Re: GAK](/archive/1995/09/90e7ab9e15de42313af28715e48b6e7cdd4391dde1fbacbcc320908df33d7519) - _Mark Contois<EMAIL_ADDRESS>    + 1995-09-07 (Thu, 7 Sep 95 10:29:21 PDT) - [Re: GAK](/archive/1995/09/d09e6cba9af525ac68e9650373d150e0530e9e5ee309a85393b5c9c0cb7343a2) -<EMAIL_ADDRESS>(Duncan J Watson)_
    + 1995-09-07 (Thu, 7 Sep 95 12:12:59 PDT) - [Re: GAK](/archive/1995/09/96d5acd3eb7b993a54a124e63753dc013ee29153047e18c88829e702077ab458) - _Jon Lasser<EMAIL_ADDRESS>    + 1995-09-08 (Thu, 7 Sep 95 21:50:51 PDT) - [Re: GAK](/archive/1995/09/ac0923f7a31d8a151a0c9e5bb93b814ded97cd4cf2455767cfe58f78537237bf) -<EMAIL_ADDRESS>(Anonymous)_
    + 1995-09-11 (Mon, 11 Sep 95 09:10:34 PDT) - Re: Brian Davis' cypherpunk GAK proposal -<EMAIL_ADDRESS>(Lou Poppler)_
  + 1995-09-07 (Thu, 7 Sep 95 11:05:49 PDT) - [Re: GAK](/archive/1995/09/19954f18e3dd2a76569088b8507e63224b9f0cc493c5f4462ee71bb8b0ae5877) -<EMAIL_ADDRESS>(Patrick May)_
  + 1995-09-07 (Thu, 7 Sep 95 11:05:58 PDT) - [Re: GAK](/archive/1995/09/ea76c57f6358732f3eb0c7ec1235a2faae87c86d5bae7428e44fdcc04e322ca6) -<EMAIL_ADDRESS>(Patrick May)_


text:
# Clamex

[![CircleCI](https://circleci.com/gh/szajbus/clamex/tree/master.svg?style=svg)](https://circleci.com/gh/szajbus/clamex/tree/master)

Clamex is a thin, error-friendly and testable wrapper for [ClamAV](https://www.clamav.net) written in elixir.

## Installation

The package can be installed by adding `clamex` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:clamex, "~> 0.2.2"}
  ]
end
```

## Requirements

ClamAV is not included in this package and must be installed separately. Please consult [ClamAV's official documentation](https://www.clamav.net/documents/installing-clamav) on how to install it on your system.

## Configuration

It is recommended to have the ClamAV daemon (`clamd`) running in background and use `clamdscan` as a scanner, instead of `clamscan` which takes few seconds to initialize.

The following is the package's default configuration.

```elixir
config :clamex, scanner: Clamex.Scanner.Clamdscan
```

Alternatively, `Clamex.Scanner.Clamscan` or `Clamex.Scanner.Mock` (in tests, see below) can be used.

## Usage

Check if file is infected:

```elixir
iex> Clamex.virus?("test/files/virus.txt")
true

iex> Clamex.virus?("test/files/safe.txt")
false
```

Check if file is safe:

```elixir
iex> Clamex.safe?("test/files/virus.txt")
false

iex> Clamex.safe?("test/files/safe.txt")
true
```

Note that if the scanner encounters any errors, both `virus?` and `safe?` functions will quietly ignore them and return `false`. If you need to handle errors explicitly use the `scan` function directly.

Perform the file scan:

```elixir
iex> Clamex.scan("test/files/virus.txt")
{:error, :virus_found}

iex> Clamex.scan("test/files/safe.txt")
:ok
```

Please check the documentation for other error reasons that may be returned by `scan`.

## Documentation

Full documentation can be found at [https://hexdocs.pm/clamex](https://hexdocs.pm/clamex).

## Testing

You don't have to set ClamAV up in your test environment to test your application's behaviour with regard to file-scanning. You can simulate different scenarios: safe file, infected file, scanner not available, etc. using provided `Clamex.Scanner.Mock`.

Configure your test environment in `config/test.exs`:

```elixir
config :clamex, scanner: Clamex.Scanner.Mock
```

Please check the [`Clamex.Scanner.Mock` documentation](https://hexdocs.pm/clamex/Clamex.Scanner.Mock.html#content) for example usage.

## State of the library

`Clamex` is still experimental software.

Since it uses third-party scanners by calling external programs behind the scenes, things may go wrong. One of the design goals is to wrap this process in fault-tolerant way, so that the applications using `Clamex` are not susceptible to unpredicted error scenarios.

The most important aspect of the above is error-handling which is based on interpreting exit codes and parsing scanner's output.

There may still be error messages returned by `cladmscan` or `clamscan` that are currently not covered by `Clamex`. If you encounter such situations, feel free to report an issue or send a pull request.

## License

Copyright 2018 Michał Szajbe

Licensed under the MIT license. For more information see the [LICENSE.txt](LICENSE.txt) file.

repository: kwardynski/clamex

repo_name: kwardynski/clamex


text:
---
layout: post
title:      "CLI - Project (First Big Project) Day 1-2"
date:       2021-03-15 17:53:01 +0000
permalink:  cli_-_project_first_big_project_day_1-2
---

I'll preface this by saying that I am not a writer whatsoever. I did my best to skip every writing class in school and college as I could. I am only doing this because I think it is a requirement for the CLI Project. Honestly though, it might do me some good to write down my thoughts as I progress on this. I'm sorry ahead of time for all the typos and errors I will make (If anyone ever reads this)

I've given the project some thought before-hand but these past two days were when I finally hunkered down to plan everything out. To preface, I thought about what I could make that would be useful to me. I organize and produce video game tournaments (fighting games in particular). I figured it would be helpful for the commentary team to have information before a match like:

Player 1 vs Player 2
Player 1: 6 Wins
Player 2: 2 Wins

Something like that to show who's won previous encounters. To make it fit he scope of the project I'll also allow for the user to get additional information.

HERE IS WHERE IT GETS TRICKY.

The api we are using is for Smash.gg, the tournament running site. It's not bad. You query for the user and are able to bring back a lot of information. The issue lies with the rate-limit of the API. I may be able to request a higher rate limit. It will be worth a shot.

I'm sure I will run into many issues along the way. First step is to set up my environment correctly. I would like to be able to use rspec with this project for testing but I am not sure if it is needed. For now, I'll take it slow and go bit by bit.

extension: markdown


text:
---
title: Install Porter
description: Installing the Porter client and mixins
---

> Join our [mailing list] for announcements of releases and announcements of new features.
> Connect with other Porter users and contributors on [Slack].

- [Install or Upgrade Porter](#install-or-upgrade)
- [Clean Install](#clean-install)
- [Install Latest Release](#latest)
- [Install a Canary Build](#canary)
- [Install a Mixin](#mixins)
- [Install a Plugin](#plugins)
- [Install the Porter VS Code Extension][vscode-ext]
- [Customize the Installation Script](#install-script-parameters)
- [Configure Command Completion](#command-completion)

# Install or Upgrade

The examples below use a hard-coded version of Porter. There may be a newer version available which you can check for on our [release] page.
Set VERSION to the most recent [release] version number.

**MacOS**

```bash
export VERSION="v1.0.14"
curl -L https://cdn.porter.sh/$VERSION/install-mac.sh | bash
```

**Linux**

```bash
export VERSION="v1.0.14"
curl -L https://cdn.porter.sh/$VERSION/install-linux.sh | bash
```

**Windows**

```powershell
$VERSION="v1.0.14"
(New-Object System.Net.WebClient).DownloadFile("https://cdn.porter.sh/$VERSION/install-windows.ps1", "install-porter.ps1")
.\install-porter.ps1
```

## Running multiple versions

If you have multiple versions of Porter installed on the same machine, you can switch between then by setting the PORTER_HOME environment variable and adding the desired version of Porter to your PATH.

**Bash**

```bash
export PORTER_HOME=~/.porterv1
export PATH=$PORTER_HOME:$PATH
# Check that you are using the desired version of porter
porter version
```

**Windows**

```powershell
$env:PORTER_HOME="$env:USERPROFILE\.porterv1"
$env:PATH+=";$env:PORTER_HOME"
# Check that you are using the desired version of porter
porter version
```

[vscode-ext]: https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.porter-vscode
[ps-link]: https://www.howtogeek.com/126469/how-to-create-a-powershell-profile/
[mailing list]: https://groups.io/g/porter
[Slack]: /community/#slack

# Clean Install

To perform a clean installation of Porter:

1. Remove the PORTER_HOME directory, which by default is located at `~/.porter`.
2. Start over with a fresh database. If you were using an external database, update your porter configuration file to use a different database.

   Otherwise, if you had not specified a storage plugin or database in the configuration file, then your database is located in a container in Docker.
   Remove the mongodb container and volume, so that when Porter is run again, it creates a new database:

   ```
   docker rm -f porter-mongodb-docker-plugin
   docker volume rm porter-mongodb-docker-plugin-data
   ```

3. Install Porter following the instructions on this page.

# Latest

Install the most recent tagged v1 release of porter and the [exec mixin].

## Latest MacOS

```
curl -L https://cdn.porter.sh/latest/install-mac.sh | bash
```

## Latest Linux

```
curl -L https://cdn.porter.sh/latest/install-linux.sh | bash
```

## Latest Windows

You will need to create a [PowerShell Profile][ps-link] if you do not have one.

```
iwr "https://cdn.porter.sh/latest/install-windows.ps1" -UseBasicParsing | iex
```

# Canary

Install the most recent build of Porter and the [exec mixin] from the main branch.

This saves you the trouble of cloning and building porter and its mixin
repositories yourself. The build may not be stable, but it will have new features
that we are developing.

## Canary MacOS

```
curl -L https://cdn.porter.sh/canary/install-mac.sh | bash
```

## Canary Linux

```
curl -L https://cdn.porter.sh/canary/install-linux.sh | bash
```

## Canary Windows

You will need to create a [PowerShell Profile][ps-link] if you do not have one.

```
iwr "https://cdn.porter.sh/canary/install-windows.ps1" -UseBasicParsing | iex
```

# Mixins

We have a number of [mixins](/mixins) to help you get started.
Only the [exec mixin] is installed with Porter v1.0.0+, other mixins should be installed separately.

You can update an existing mixin, or install a new mixin using the `porter mixin
install` command:

```console
$ porter mixin install terraform --version v1.0.0-rc.1
installed terraform mixin v1.0.0-rc.1 (090064b)
```

All the Porter-authored mixins are published to `https://cdn.porter.sh/mixins/atom.xml`.

# Plugins

We have a couple [plugins](/plugins) which extend Porter and integrate with other cloud providers and software.

You can update an existing plugin, or install a new plugin using the `porter plugin
install` command:

```console
$ porter plugin install azure --version v1.0.0-rc.1
installed azure plugin v1.0.0-rc.1 (d0d98f4)
```

All the Porter-authored plugins are published to `https://cdn.porter.sh/plugins/atom.xml`.

[releases]: https://github.com/getporter/porter/releases

# Install Script Parameters

The installation scripts provide the following parameters. Parameters can be specified with environment variables for the macOS and Linux scripts, and on Windows they are named parameters in the script.

## PORTER_HOME

Location where Porter is installed (defaults to ~/.porter).

**Posix Shells**

```bash
export PORTER_HOME=/alt/porter/home
curl -L REPLACE_WITH_INSTALL_URL | bash
```

**PowerShell**

```powershell
iwr REPLACE_WITH_INSTALL_URL -OutFile install-porter.ps1 -UseBasicParsing
.\install-porter.ps1 -PORTER_HOME C:\alt\porter\home
```

## PORTER_MIRROR

Base URL where Porter assets, such as binaries and atom feeds, are downloaded.
This lets you set up an internal mirror. Note that atom feeds and index files
should be updated in the mirror to point to the mirrored location. Porter does
not alter the contents of these files.

**Posix Shells**

```bash
export PORTER_MIRROR=https://example.com/porter
curl -L REPLACE_WITH_INSTALL_URL | bash
```

**PowerShell**

```powershell
iwr REPLACE_WITH_INSTALL_URL -OutFile install-porter.ps1 -UseBasicParsing
.\install-porter.ps1 -PORTER_MIRROR https://example.com/porter
```

### URL Structure

Configuring a mirror of Porter's assets is out of scope of this document.
Reach out on the Porter [mailing list] for assistance.

Below is the general structure for Porter's asset URLs:

```
PERMALINK/
  - install-linux.sh
  - install-mac.sh
  - install-windows.ps1
  - porter-GOOS-GOARCH[FILE_EXT]
mixins/
  - atom.xml
  - index.json
  - MIXIN/PERMALINK/MIXIN-GOOS-GOARCH[FILE_EXT]
plugins/
  - atom.xml
  - index.json
  - PLUGIN/PERMALINK/PLUGIN-GOOS-GOARCH[FILE_EXT]
```

# Command Completion

Porter provides autocompletion support for Bash, Fish, Zsh, and PowerShell.

> If you use Bash the completion script depends on Bash v4.1 or newer and bash-completion v2.

> The default version for macOS is Bash v3.2 and bash-completion v1. The completion command will not work properly with these versions.
> The Kubernetes project has detailed information for upgrading Bash and installing bash-completion [here].

[here]: https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion

### Initial Setup

The initial setup is to generate a completion script file and have your shell environment source it when you start your shell.

The completion command will generate its output to standard out and you can capture the output into a file. This file should be put in a place where your shell reads completion files.

An example for Bash:

```bash
porter completion bash > /usr/local/etc/bash_completion.d/porter
```

Once your completion script file is in place you will have to source it for your current shell or start a new shell session.

### Completion Usage

To list available commands for Porter, in your terminal run

```console
$ porter [tab][tab]
```

To find a specific command that starts with _bu_

```console
$ porter bu[tab][tab]

build    bundles
```

Commands that have sub-commands will be displayed with completions as well

```console
$ porter credentials [tab][tab]

delete    edit    generate    list    show
```

> Note: Completion commands are available for Porter's built-in commands and flags, future plans include dynamic completion for your project.

[exec mixin]: /mixins/exec/
[release]: https://github.com/getporter/porter/releases

repository: getporter/porter

repo_name: getporter/porter


text:
> **This project is inactive, please consider moving to the fully compatible [zeed-dom](https://github.com/holtwick/zeed-dom) with ESM and Typescript support**

# hostic-dom

- Lightweight virtual DOM in pure Javascript
- Generates HTML and XML
- Parses HTML
- Supports CSS selectors and queries
- Can be used with JSX
- Easy content manipulation (e.g. through `element.handle` helper)
- Pretty print HTML (`tidyDOM`)

**Does not aim for completeness!**

This is a side project of [hostic](https://github.com/holtwick/hostic), the static website generator.

## Example

A simple example without JSX:

```js
import { h, xml } from "hostic-dom"

let dom = h(
  "ol",
  {
    class: "projects",
  },
  [
    h("li", null, "hostic ", h("img", { src: "logo.png" })),
    h("li", null, "hostic-dom"),
  ]
)

console.log(dom.render())
// Output: <ol class="projects"><li>hostic <img src="logo.png"></li><li>hostic-dom</li></ol>

console.log(dom.render(xml))
// Output: <ol class="projects"><li>hostic <img src="logo.png" /></li><li>hostic-dom</li></ol>
```

And this one with JSX:

```jsx
import { h } from "hostic-dom"

let dom = (
  <ol className="projects">
    <li>hostic</li>
    <li>hostic-dom</li>
  </ol>
)

let projects = dom
  .querySelectorAll("li")
  .map((e) => e.textContent)
  .join(", ")

console.log(projects)
// Output: hostic, hostic-dom

dom.handle("li", (e) => {
  if (!e.textContent.endsWith("-dom")) {
    e.remove()
  } else {
    e.innerHTML = "<b>hostic-dom</b> - great DOM helper for static content"
  }
})

console.log(dom.render())
// Output: <ol class="projects"><li><b>hostic-dom</b> - great DOM helper for static content</li></ol>
```

In the second example you can see the special manipulation helper `.handle(selector, fn)` in action. You can also see HTML parsing works seamlessly. You can also parse directly:

```js
import { vdom, tidyDOM } from "hostic-dom"

let dom = vdom("<div>Hello World</div>")
tidyDOM(dom)
console.log(dom.render())
// Output is pretty printed like: <div>
//   Hello World
// </div>
```

These examples are available at [github.com/holtwick/hostic-dom-example](https://github.com/holtwick/hostic-dom-example).

## JSX

Usually JSX is optimized for React i.e. it expect `React.creatElement` to exist and be the factory for generating the nodes. You can of course get the same effect here if you set up a helper like this:

```js
import { html } from "hostic-dom"

var React = {
  createElement: html,
}
```

But more common is the use of `h` as the factory function. Here is how you can set up this behavior for various environments:

### Babel.js

Add required plugins:

```shell script
npm i -D @babel/plugin-syntax-jsx @babel/plugin-transform-react-jsx
```

Then add this to `.babelrc`:

```json
{
  "plugins": [
    "@babel/plugin-syntax-jsx",
    [
      "@babel/plugin-transform-react-jsx",
      {
        "pragma": "h"
      }
    ]
  ]
}
```

### TypeScript

In [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/compiler-options-in-msbuild.html#mappings):

```json
{
  "compilerOptions": {
    "jsx": "react",
    "jsxFactory": "h"
  }
}
```

### ESBuild

In options:

```js
{
  jsxFactory: "h"
}
```

Or alternatively as [command line option](https://github.com/evanw/esbuild#command-line-usage): `--jsx-factory=h`

### Browser DOM

The JSX factory can also be used to directly create HTML DOM nodes in the browser. Just create the `h` function and let it use the browser's `document` object:

```js
const { hFactory } = require("hostic-dom")

export let h = hFactory({ document })
```

### Unpkg

`hostic-dom` is also available via **unpkg** via <https://unpkg.com/hostic-dom>. The global name provided here is `hosticDOM` i.e. you can easily use it like this:

```html
<script crossorigin src="https://unpkg.com/hostic-dom"></script>
<script>
  const { h } = hosticDOM
  // Your code here
</script>
```

## Misc

- To set namespace colons in JSX use double underscore i.e. `<xhtml__link />` becomes `<xhtml:link />`
- To allow `CDATA` use the helper function e.g. `<div>{ CDATA(yourRawData) }</div>`
- `style` attributes can handle objects e.g. `<span style={{backgroundColor: 'red'}} />` becomes `<span style="background-color: red" />`

repository: holtwick/hostic-dom

repo_name: holtwick/hostic-dom


text:
[![CI](https://github.com/m-housh/swift-web-utils/actions/workflows/ci.yml/badge.svg)](https://github.com/m-housh/swift-web-utils/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/m-housh/swift-web-utils/branch/main/graph/badge.svg?token=kdnbd2tgij)](https://codecov.io/gh/m-housh/swift-web-utils)
[![documentation](https://img.shields.io/badge/Api-Documentation-orange)](https://github.com/m-housh/swift-web-utils/wiki)

# swift-web-utils

Extends the [pointfreeco/swift-web](https://github.com/pointfreeco/swift-web) package.  Adds a more convenient
syntax for creating routers.  This was inspired / created after exploring their framework in my
[swift-web-playground](https://github.com/m-housh/swift-web-playground) package, where I created a simple
CRUD server.

It should be noted that `pointfreeco` will likely build wrappers around their framework that may make
this package obsolete in the future, but this can possibly act as a stop gap until then.  This package
also aims to deliver better syntax for small / not too complicated of routes and may breakdown in more
complex scenarios.

# Quickstart Guide

This a swift package, so to use in your project then include it in your project's `Package.swift` file
or using `Xcode`.

```swift
let package = Package(
  name: "swift-web-utils",
  platforms: [
    .macOS(.v10_13)
  ],
  products: [...],
  dependencies: [
    .package(url: "https://github.com/m-housh/swift-web-utils.git", from: "0.1.0"),
    ...
  ],
  targets: [...]
)
```

### Build a router.

Routes are modeled as enum cases.  Below would be how to create router with CRUD routes.

**Routes.swift**
```swift
import Foundation

enum UserRoute: Equatable {

  case fetchAll
  case fetch(id: User.ID)
  case insert(InsertRequest)
  case update(id: User.ID, updates: UpdateRequest)
  case delete(id: User.ID)

  struct InsertRequest: Codable, Equatable {
    let name: String

    init(name: String) {
      self.name = name
    }
  }

  struct UpdateRequest: Codable, Equatable {
    let name: String?

    init(name: String?) {
      self.name = name
    }
  }
}

struct User: Codable, Equatable, Identifiable {

  var id: UUID
  var name: String

  init(id: UUID, name: String) {
    self.id = id
    self.name = name
  }
}
```

Next create the router that handles incoming request connections and parses them into `UserRoutes`.

**Router.swift**
```swift
import RouterUtils

let userRouter: Router<UserRoute> = .routes(
  .get()
    .path("users")
    .case(/UserRoute.fetchAll)
    .end(),

  .get()
    .path("users")
    .pathParam(.uuid)
    .case(/UserRoute.fetch(id:))
    .end(),

  .post()
    .path("users")
    .jsonBody(UserRoute.InsertRequest.self)
    .case(/UserRoute.insert)
    .end(),

  .patch()
    .path("users")
    .tuple(pathParam(.uuid), jsonBody(UserRoute.UpdateRequest.self))
    .case(/UserRoute.update(id:updates:))
    .end(),

  .delete()
    .path("users")
    .pathParam(.uuid)
    .case(/UserRoute.delete(id:))
    .end()
)
```

Creating the router middleware is beyond the scope of this document, but you can check out some of the
[pointfreeco](https://github.com/pointfreeco) projects or my
[swift-web-playground](https://github.com/m-housh/swift-web-playground) for a complete server implementation.

repository: m-housh/swift-web-utils

repo_name: m-housh/swift-web-utils


text:
---
layout: post
title:  Taking screenshots using java
tags:
- Selenium WebDriver
- Java
- Screenshot
---
## Use below code to take screenshots in our java selenium
```java
File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("awesomepicture.png");
```

But you may want to multiple screenshots in your program instead you can write method
in your base test class use it every where. also you may want to put in different directory

```java
public void captureScreenShot(WebDriver driver, String directory, String fileName) throws Exception {
  File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
  FileUtils.copyFile(scrFile, new File("./screenshots/"+directory+"/" + fileName));
}
```

Happy coding.
### sample screenshot by selenium
![sample screenshot](https://www.evernote.com/l/APzrtUX7-FtMkITgNdNhO7nDE9WDM8bib7wB/image.png)


text:
DAVID DREIER (R-CA)

Join Representative David Dreier (R-CA) live at democracy.net for an
interactive discussion of current Internet policy issues, including efforts
to reform US Encryption policy.

Dreier is a name you need to know. As a member of the House Rules
Committee, Representative Dreier will soon be called upon to help reconcile
the various versions of the Security and Freedom Through Encryption Act
(SAFE, HR 695).

Dreier is a sponsor of the original version of SAFE, and supports efforts
to promote privacy and security on the Internet through the widespread
availability of strong encryption.  However, the FBI, and Rules Committee
Chairman Gerald Solomon (R-NY) are pushing for a version of SAFE which
contains sweeping new domestic encryption restrictions.

Representative Dreier is also a leading advocate for the use of the
Internet and other interactive communications technology to make Congress
more open, accountable, and effective, having played a key role in forming
the 21st Century Congress Project. He has sponsored a campaign finance bill
(HR 1780 - http://thomas.loc.gov/cgi-bin/bdquery/z?d105:h.r.1780:) that
would require candidates to file their donations with the Federal Elections
Commission and disclose them rapidly on the Internet, among other issues
the bill tackles.

Dreier is also a member of the Congressional Internet Caucus.

EVENT DETAILS:

 Date:       Wednesday October 8, 1997
 Time:       8:00 pm Eastern (5:00 pm pacific)
 Location:   http://www.democracy.net

HOW THE TOWN HALL MEETING WORKS:

The democracy.net Virtual Town Hall Meeting will include a moderated
discussion between Rep. Dreier and democracy.net moderator Todd Lappin,
cybercast live via RealAudio. Participants can join a simultaneous chat
forum to pose questions for the moderator and discuss the proceedings.
Questions can also be submitted via a form on the democracy.net web site
(http://www.democracy.net/questions/)

WHAT YOU'LL NEED:

You will need a copy of RealAuido and a telnet application to participate.
Both are available free at http://www.democracy.net/

We hope you will join us for an interesting discussion.
_______________________________________________________________________________
REPRESENTATIVE DRIER ON THE SECURITY AND FREEDOM THROUGH ENCRYPTION ACT (SAFE):

  "Export controls on encryption software put U.S. firms at a disadvantage
   against foreign competitors who are permitted to sell more advanced
   software on the international market.  These controls also fail to
   prevent foreign software companies from producing advanced encryption
   software.  I support H.R. 695, the Security and Freedom Through
   Encryption (SAFE) Act, which addresses the concerns of our law
   enforcement and intelligence agencies by permitting the export of
   encryption software which is as advanced as software widely available on
   the international market."

_____________________________________________________________________________
SHORT BIOGRAPHY OF REP. DRIER (from http://www.house.gov/dreier)

Congressman David Dreier (R-CA) is in his ninth term representing the
eastern cities of Los Angeles County.  He serves on the House Rules
Committee and chairs the Subcommittee on Rules and Organization of the
House.  In 1996, the Subcommittee set up the 21st Century Congress
Project to develop and recommend changes in Congress' operations and
legislative procedures that will allow technology to make the
institution more open, accountable and effective.  The subcommittee held
two hearings on the impact of new information technologies on the
legislative process and decision-making.  The first was an interactive
hearing that utilized television, video conference technology, e-mail
and the Internet.  Information about the 21st Century Congress Project
and the testimony and transcripts of the two technology hearings can be
accessed on the Subcommittee Web site at http://www.house.gov/rules_org.

Dreier is a member of the bipartisan, bicameral Congressional Internet
Caucus.  Working with Congressman Rick White, he pushed through the new
House rule requiring committees to put their publications on the
Internet.  Dreier's office Web site is considered one of the most
comprehensive and informative on Capitol Hill.  There, citizens can gain
obtain information on Dreier's legislative priorities, access CRS
reports and other hard-to-find resources on how Congress works, and
communicate directly with the Congressman by Web mail.

Legislatively, Dreier is a cosponsor of the Security and Freedom
Through Encryption (SAFE) Act.  He is also the sponsor of the Voter
Empowerment Act, which reforms the campaign finance by, among other
things, requiring all disclosure information to be made available on the
Internet, and requiring the FEC to publish an expansive Internet site
which would contain a separate page for every Congressional and
Presidential candidate, each PAC, and every national party.

___________________________________________________________________________
ABOUT DEMOCRACY.NET

democracy.net is a joint project of the Center for Democracy and
Technology (CDT) and the Voters Telecommunications Watch (VTW) to explore
ways of enhancing citizen participation in the democratic process via
the Internet.

To this end, democracy.net will host live, interactive cybercasts of
Congressional Hearings and online town hall meetings with key policy makers.

democracy.net is made possible through the generous support of
WebActive, Public Access Networks, theSync, and Democracy Network.
More information about the project and its sponsors can be found at
http://www.democracy.net/about/

To receive democracy.net announcements automatically, please visit our
signup form at http://www.democracy.net/   To stop receiving these
announcements, please send email to<EMAIL_ADDRESS>with
"unsubscribe events" in the body of the message.
_________________________________________________________________________
end update no.14                                                 10/06/97
=========================================================================

{% endraw %}
```

## Thread

+ Return to [October 1997](/archive/1997/10)

+ Return to "[Jonah Seiger <jseiger<span>@</span>democracy.net>](/authors/jonah_seiger_jseiger_at_democracy_net_)"

+ 1997-10-06 (Tue, 7 Oct 1997 03:36:59 +0800) - EVENT - Join Rep. Dreier LIVE Online Wednesday Sept 8 - _Jonah Seiger<EMAIL_ADDRESS>


text:
# diff's Asian Chicken Wings

Growing up on the East Coast and working in some resturants, I came to enjoy "Chinese" chicken wings,
which had not really been Chinese at all. You can't get them in authentic places, but it was still tasty.
After trying for a while without luck to find a worthy replacement in the Bay Area, I decided to essentially
reverse engineer the taste.

## Sauce Ingredients

 - 1/4 cup of sugar
 - 1/8 cup of salt
 - 1/8 cup of msg (You can do without it, though it helps)
 - 1 clove of garlic (I always use more than this)
 - 1/4 cup of light soy sauce
 - 1/4 cup of rice wine
 - 1/4 cup of vinegar (slightly less)
 - 1 tsp of 5 spice powder (replace with habanero for extra heat, but add cumin)
 - 1 tsp of ginger powered
 - 1 tsp real ginger (freshly grated)
 - 1 tsp onion powder
 - 1 tsp paprika
 - 1/2 lemon
 - 1 large onion

Chop onion, juice lemon and combine the rest of the ingredients into a large container. Mix in chicken wings, above
will easily work for 12 - 24 wings depending on the vessel used to marinate.

For best results, put into a bag (or vacuum seal) and freeze, to allow the marinade to penetrade the chicken more.

## Cooking

Remove chicken from container and let excess marinade strain back in - you could likely use this marinade again if
you've liked it. Don't bother with the onion chunks unless you want to add them to some other stir fry dish.

Prefered at home method is grilling, you can use the sauce to baste early on, though it should not be necessary. Stop
basting after the first flip as the marinade has the raw chicken juice in it. As you cool, you can brush with honey to
create a crispier skin.

 - Smoking the chicken wings ends up adding an extra interesting layer, though this just elongates the process
 - Sauce/chicken is fine to sous vide with, this is an awesome alternative to cooking it fully on the grill. Juice will be safe for
basting of making a concetrated dipping sauce.
 - Alternatively you can actually fry the chicken wings, as a resturant would. This just tends to be a bit more messy and
the clean up can be bothersome.


text:
# CsvCheetah

## Motivation

This is the result of a experiment I made out of sheer curiosity. I wanted to know how the performance compares to the popular library [CsvHelper](https://github.com/search?q=CsvHelper).

Keep in mind that CsvHelper has more features and that there may be more recent versions.

## Results

For the given Benchmark (One million "Csv-Lines") CsvHelper took ~3.1 seconds on my machine. The same operation was performed from CsvCheetah in ~1.8 seconds.

Feel free to try it on your machine, if you're curious.

## Further Development

I probably will add some features here and there if I have time & motivation.

Some features missing:

* Parse header lines. Currently only mappings by column index is supported.
* Add more default type converters.
* Add more configuration possibilities
 * Custom Record Separators
 * ChunkSize
* Async APIs
 * IAsyncEnumerable
* Facade similar to CsvHelpers `CsvReader` class, which abstracts many things from the user (for simple cases)
* Map to dynamic
* ...

repository: tobixdev/CsvCheetah

repo_name: tobixdev/CsvCheetah