text:
# Install Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support {#openvino_docs_install_guides_installing_openvino_linux_fpga}

**NOTES**:
- [Intel® System Studio](https://software.intel.com/en-us/system-studio) is an all-in-one, cross-platform tool suite, purpose-built to simplify system bring-up and improve system and IoT device application performance on Intel® platforms. If you are using the Intel® Distribution of OpenVINO™ with Intel® System Studio, go to [Get Started with Intel® System Studio](https://software.intel.com/en-us/articles/get-started-with-openvino-and-intel-system-studio-2019).
- The Intel® Distribution of OpenVINO™ toolkit was formerly known as the Intel® Computer Vision SDK.
- These steps apply to Ubuntu\*, CentOS\*, and Yocto\*.
- If you are using Intel® Distribution of OpenVINO™ toolkit on Windows\* OS, see the [Installation Guide for Windows*](installing-openvino-windows.md).
- For the Intel Distribution of OpenVINO toolkit without FPGA
support, see [Installation Guide for Linux*](installing-openvino-linux.md).
- CentOS and Yocto installations will require some modifications that
are not covered in this guide.
- An internet connection is required to follow the steps in this guide.

## Product Change Notice
Intel® Distribution of OpenVINO™ toolkit for Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA

    Change Notice Begins
    July 2020

    Change Date
    October 2020

Intel will be transitioning to the next-generation programmable deep-learning solution based on FPGAs in order to increase the level of customization possible in FPGA deep-learning. As part of this transition, future standard releases (i.e., non-LTS releases) of Intel® Distribution of OpenVINO™ toolkit will no longer include the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA.

Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.

## Introduction

The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and solutions that emulate human vision. Based on Convolutional Neural Networks (CNN), the toolkit extends computer vision (CV) workloads across Intel® hardware, maximizing performance. The Intel® Distribution of OpenVINO™ toolkit includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT).

The Intel® Distribution of OpenVINO™ toolkit for Linux\* with FPGA Support:

- Enables CNN-based deep learning inference on the edge
- Supports heterogeneous execution across Intel® CPU, Intel® Integrated Graphics, Intel® FPGA, Intel® Neural Compute Stick 2
- Speeds time-to-market via an easy-to-use library of computer vision functions and pre-optimized kernels
- Includes optimized calls for computer vision standards including OpenCV\* and OpenCL™

**Included with the Installation and installed by default:**

| Component                                                                                | Description                                                                                |
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) | This tool imports, converts, and optimizes models that were trained in popular frameworks to a format usable by Intel tools, especially the Inference Engine.
Popular frameworks include Caffe\*, TensorFlow\*, MXNet\*, and ONNX\*.                                                                                |
| [Inference Engine](../IE_DG/inference_engine_intro.md)               | This is the engine that runs the deep learning model. It includes a set of libraries for an easy inference integration into your applications.                                                                                |
| Drivers and runtimes for OpenCL™ version 2.1                                                        | Enables OpenCL on the GPU/CPU for Intel® processors                                                                                |
| Intel® Media SDK                                                                                | Offers access to hardware accelerated video codecs and frame processing                                                                                |
| Pre-compiled FPGA bitstream samples                                                                 | Pre-compiled bitstream samples for the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA, and Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA SG2.                                                                                |
| Intel® FPGA SDK for OpenCL™ software technology                                                     | The Intel® FPGA RTE for OpenCL™ provides utilities, host runtime libraries, drivers, and RTE-specific libraries and files                                                                                |
| [OpenCV](https://docs.opencv.org/master/)                                   | OpenCV\* community version compiled for Intel® hardware   |
| [Inference Engine Code Samples](../IE_DG/Samples_Overview.md)           | A set of simple console applications demonstrating how to utilize specific OpenVINO capabilities in an application and how to perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more. |
| [Demo Applications](@ref omz_demos_README)           | A set of simple console applications that provide robust application templates to help you implement specific deep learning scenarios. |

## Development and Target Platform

The development and target platforms have the same requirements, but you can select different components during the installation, based on your intended use.

**Hardware**

* 6th to 10th generation Intel® Core™ processors and Intel® Xeon® processors
* Intel® Xeon® processor E family (formerly code named Sandy Bridge, Ivy Bridge, Haswell, and Broadwell)
* 3rd generation Intel® Xeon® Scalable processor (formerly code named Cooper Lake)
* Intel® Xeon® Scalable processor (formerly Skylake and Cascade Lake)
* Intel Atom® processor with support for Intel® Streaming SIMD Extensions 4.1 (Intel® SSE4.1)
* Intel Pentium® processor N4200/5, N3350/5, or N3450/5 with Intel® HD Graphics
* Intel® Neural Compute Stick 2
* Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
* Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA
* Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Mustang-F100-A10) SG2

> **NOTE**: With OpenVINO™ 2020.4 release, Intel® Movidius™ Neural Compute Stick is no longer supported.

> **NOTE**: Intel® Arria 10 FPGA (Mustang-F100-A10) SG1 is no longer supported. If you use Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Mustang-F100-A10) Speed Grade 1, we recommend continuing to use the [Intel® Distribution of OpenVINO™ toolkit 2020.1](https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_VisionAcceleratorFPGA_Configure.html) release.

> **NOTE**: Intel® Arria® 10 GX FPGA Development Kit is no longer supported. For the Intel® Arria® 10 FPGA GX Development Kit configuration guide, refer to the [2019 R1.1 documentation](http://docs.openvinotoolkit.org/2019_R1.1/_docs_install_guides_GX_Configure_2019R1.html).

**Processor Notes:**

- Processor graphics are not included in all processors. See [Product Specifications](https://ark.intel.com/) for information about your processor.
- A chipset that supports processor graphics is required for Intel® Xeon® processors.

**Operating Systems:**

- Ubuntu 18.04 or 16.04 long-term support (LTS), 64-bit: Minimum supported kernel is 4.15
- CentOS 7.4, 64-bit
- Yocto Project v3.0, 64-bit (for target only and requires modifications)

## Overview

This guide provides step-by-step instructions on how to install the Intel® Distribution of OpenVINO™ toolkit with FPGA Support. Links are provided for each type of compatible hardware including downloads, initialization and configuration steps. The following steps will be covered:

1. Install the Intel® Distribution of OpenVINO™ Toolkit
2. Install External software dependencies
3. Configure the Model Optimizer
4. Run the Verification Scripts to Verify Installation and Compile Samples
5. Install your compatible hardware from the list of supported hardware

6. Use the Face Detection Tutorial

## Install the Intel® Distribution of OpenVINO™ Toolkit Core Components

Download the Intel® Distribution of OpenVINO™ toolkit package file from [Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support](https://software.intel.com/en-us/openvino-toolkit/choose-download).
Select the Intel® Distribution of OpenVINO™ toolkit for Linux with FPGA Support package from the dropdown menu.

1. Open a command prompt terminal window.
2. Change directories to where you downloaded the Intel Distribution of
OpenVINO toolkit for Linux\* with FPGA Support package file.

     If you downloaded the package file to the current user's `Downloads`
     directory:
```sh
cd ~/Downloads/
```
By default, the file is saved as `l_openvino_toolkit_fpga_p_<version>.tgz`.

3. Unpack the .tgz file:
```sh
tar -xvzf l_openvino_toolkit_fpga_p_<version>.tgz
```
The files are unpacked to the `l_openvino_toolkit_fpga_p_<version>` directory.

4. Go to the `l_openvino_toolkit_fpga_p_<version>` directory:
```sh
cd l_openvino_toolkit_fpga_p_<version>
```
If you have a previous version of the Intel Distribution of OpenVINO toolkit installed, rename or delete these two directories:
- `/home/<user>/inference_engine_samples`
- `/home/<user>/openvino_models`

**Installation Notes:**
- Choose an installation option and run the related script as root.
- You can use either a GUI installation wizard or command-line instructions (CLI).
- Screenshots are provided for the GUI, but not for CLI. The following information also applies to CLI and will be helpful to your installation where you will be presented with the same choices and tasks.

5. Choose your installation option:
   - **Option 1:** GUI Installation Wizard:
```sh
sudo ./install_GUI.sh
```
   - **Option 2:** Command-Line Instructions:
```sh
sudo ./install.sh
```
6. Follow the instructions on your screen. Watch for informational
messages such as the following in case you must complete additional
steps:
![](../img/install-linux-fpga-01.png)

7. If you select the default options, the **Installation summary** GUI screen looks like this:
![](../img/install-linux-fpga-02.png)
    - **Optional:** You can choose **Customize** and select only the bitstreams for your card. This will allow you to minimize
        the size of the download by several gigabytes.
    - The following bitstreams listed at the bottom of the customization screen are highlighted below. Choose the one for your FPGA:
        ![](../img/install-linux-fpga-04.png)
    - When installed as **root** the default installation directory for the Intel Distribution of OpenVINO is
    `/opt/intel/openvino_fpga_2019.<version>/`.

        For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino/`.

8. A Complete screen indicates that the core components have been installed:
![](../img/install-linux-fpga-05.png)

The first core components are installed. Continue to the next section to install additional dependencies.

## Install External Software Dependencies

These dependencies are required for:

- Intel-optimized build of OpenCV library
- Deep Learning Inference Engine
- Deep Learning Model Optimizer tools

1. Change to the `install_dependencies` directory:
```sh
cd /opt/intel/openvino/install_dependencies
```
2. Run a script to download and install the external software dependencies:
```sh
sudo -E ./install_openvino_dependencies.sh
```

The dependencies are installed. Continue to the next section to configure the Model Optimizer.

## Configure the Model Optimizer

The Model Optimizer is a Python\*-based command line tool for importing
trained models from popular deep learning frameworks such as Caffe\*,
TensorFlow\*, Apache MXNet\*, ONNX\* and Kaldi\*.

The Model Optimizer is a key component of the Intel Distribution of
OpenVINO toolkit. You cannot perform inference on your trained model without
running the model through the Model Optimizer. When you run a
pre-trained model through the Model Optimizer, your output is an
Intermediate Representation (IR) of the network. The Intermediate
Representation is a pair of files that describe the whole model:

-   `.xml`: Describes the network topology
-   `.bin`: Contains the weights and biases binary data

For more information about the Model Optimizer, refer to the [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).

### Model Optimizer Configuration Steps

> **IMPORTANT**: The Internet access is required to execute the following steps successfully. If you have access to the Internet through the proxy server only, please make sure that it is configured in your environment.

You can choose to either configure all supported frameworks at once **OR** configure one framework at a time. Choose the option that best suits your needs. If you see error messages, make sure you installed all dependencies.

> **NOTE**: If you installed the Intel® Distribution of OpenVINO™ to the non-default install directory, replace `/opt/intel` with the directory in which you installed the software.

**Option 1: Configure all supported frameworks at the same time**

1.  Go to the Model Optimizer prerequisites directory:
```sh
cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites
```
2.  Run the script to configure the Model Optimizer for Caffe,
    TensorFlow 1.x, MXNet, Kaldi\*, and ONNX:
```sh
sudo ./install_prerequisites.sh
```

**Option 2: Configure each framework separately**

Configure individual frameworks separately **ONLY** if you did not select **Option 1** above.
1.  Go to the Model Optimizer prerequisites directory:
```sh
cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites
```
2.  Run the script for your model framework. You can run more than one script:
-   For **Caffe**:

```sh
sudo ./install_prerequisites_caffe.sh
```
-   For **TensorFlow 1.x**:
```sh
sudo ./install_prerequisites_tf.sh
```
-   For **TensorFlow 2.x**:
```sh
sudo ./install_prerequisites_tf2.sh
```
-   For **MXNet**:
```sh
sudo ./install_prerequisites_mxnet.sh
```
-   For **ONNX**:
```sh
sudo ./install_prerequisites_onnx.sh
```
-   For **Kaldi**:
```sh
sudo ./install_prerequisites_kaldi.sh
```
The Model Optimizer is configured for one or more frameworks.

You are ready to compile the samples by running the verification scripts.

## Run the Verification Scripts to Verify Installation and Compile Samples

To verify the installation and compile two samples, run the verification applications provided with the product on the CPU:

1. Go to the **Inference Engine demo** directory:
```sh
cd /opt/intel/openvino/deployment_tools/demo
```

2. Run the **Image Classification verification script**:
```sh
./demo_squeezenet_download_convert_run.sh
```
This verification script downloads a SqueezeNet model, uses the Model Optimizer to convert the model to the .bin and .xml Intermediate Representation (IR) files. The Inference Engine requires this model conversion so it can use the IR as input and achieve optimum performance on Intel hardware.

This verification script builds the [Image Classification Sample Async](../../inference-engine/samples/classification_sample_async/README.md) application and run it with the `car.png` image in the demo directory. When the verification script completes, you will have the label and confidence for the top-10 categories:
![](../img/image_classification_script_output_lnx.png)

3. Run the **Inference Pipeline verification script**:
```sh
./demo_security_barrier_camera.sh
```
This verification script builds the [Security Barrier Camera Demo](@ref omz_demos_security_barrier_camera_demo_README) application included in the package.

   This verification script uses the `car_1.bmp` image in the demo directory to show an inference pipeline using three of the pre-trained models. The verification script uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.

   First, an object is identified as a vehicle. This identification is used as input to the next model, which identifies specific vehicle attributes, including the license plate. Finally, the attributes identified as the license plate are used as input to the third model, which recognizes specific characters in the license plate.

  When the verification script completes, you will see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
  ![](../img/security-barrier-results.png)

4. Close the image viewer window to complete the verification script.

To learn about the verification scripts, see the `README.txt` file in `/opt/intel/openvino/deployment_tools/demo`.

For a description of the Intel Distribution of OpenVINO™ pre-trained object detection and object recognition models, see [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_intel_index).

You have completed all required installation, configuration and build steps in this guide to use your CPU to work with your trained models. To use other hardware, see Install and Configure your Compatible Hardware below.

## Install and Configure Your Compatible Hardware

Install your compatible hardware from the list of supported components below.

> **NOTE**: Once you've completed your hardware installation, you'll return to this guide to finish installation and configuration of the Intel® Distribution of OpenVINO™ toolkit.

Links to install and configure compatible hardware
- [The Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA](PAC_Configure.md)
- [The Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA SG2 (Mustang-F100-A10)](VisionAcceleratorFPGA_Configure.md)
- [Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](installing-openvino-linux-ivad-vpu.md)

Congratulations, you have finished the Intel® Distribution of OpenVINO™ toolkit installation for FPGA. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and other resources are provided below.

## Hello World Face Detection Tutorial

Refer to the [OpenVINO™ with FPGA Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/openvino-with-fpga-hello-world-face-detection).

## Troubleshooting

PRC developers might encounter pip installation related issues during OpenVINO™ installation. To resolve the issues, you may use one of the following options at your discretion:
* Add the download source with `-i` parameter in the `pip` command. For example:
```
pip install numpy.py -i https://mirrors.aliyun.com/pypi/simple/
```
Use the `--trusted-host` parameter if the URL above is `http` instead of `https`.

* Modify or create `~/.pip/pip.conf` file to change the default download source with the content below:
```
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
```

**Additional Resources**

- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
- [Inference Engine FPGA plugin documentation](../IE_DG/supported_plugins/FPGA.md)
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
- To learn about pre-trained models for OpenVINO™ toolkit, see the [Pre-Trained Models Overview](https://docs.openvinotoolkit.org/latest/_docs_docs_Pre_Trained_Models.html)
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
- For IoT Libraries & Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).

To learn more about converting models, go to:

- [Convert Your Caffe* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_Caffe.md)
- [Convert Your TensorFlow* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md)
- [Convert Your MXNet* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_MxNet.md)
- [Convert Your ONNX* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md)


text:
# image_sorter
Ruby image sorter, based on image exiff information

Usage:
- `bundle`
- Add the image_sorter.rb file location to your path
- Run `image_sorter.rb` inside any folder you want to sort pictures in.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# docker-local-dev-env

## What is this?

In my [blog post](https://irvinlim.com/blog/setting-up-all-your-local-dev-environments-with-docker/), I outline my personal workflow to set up your own local web development environment for _all_ your projects using Docker, [`jwilder/nginx-proxy`](https://github.com/jwilder/nginx-proxy), [Portainer](https://portainer.io/), and phpMyAdmin.

This repository contains the scripts for the tools as well as a sample project for this particular workflow.

## Why would I need this?

This workflow aims to reduce the friction involved in setting up development environments, by compartmentalising project components with Docker Compose, while allowing other developers to utilise the same configurations without conflict by strictly enforcing host-specific and developer-specific configuration to be placed within `docker-compose.override.yml`, which should not be checked into source control.

At the same time, `nginx-proxy` provides benefits such as managing the virtual hosts for you so that you don't need to worry about setting up your own nginx instance or allocation of ports, and also instantly reloading nginx when a container is started/stopped.

Please see my [blog post](https://irvinlim.com/blog/setting-up-all-your-local-dev-environments-with-docker/) for an in-depth explanation.

## Scripts

The scripts in `scripts/` are provided to assist you to set up the tools required for this workflow.

## License

MIT

repository: underdogg-forks/docker-local-dev-env

repo_name: underdogg-forks/docker-local-dev-env


text:
---
layout: post
title:  "Baba Ghanoush"
date:   2020-07-03 15:00:00
author: oli
image: "/images/blog/baba-ghanoush/baba-ghanoush-003.jpg"
tags: ["babaghanoush", "savoury","vegetarian", "2020"]
---

I've always strayed away from baba ghanoush on menus because I thought it would be slimy.  Last weeks vegetable box included a pair of big purple aubergines and I didn't want them to go to waste. This week I also preserved eight bulbs of garlic by confitting them in olive oil, so I used them instead of raw galic.

## You will need

* 2 aubergine
* 2 tablespoons of tahini
* Juice of half a lemon
* A small handful of mint and parsley (finely chopped)
* A teaspoon of confit garlic and it's oil

## Do

* Half the aubergine lengthwise
* BBQ until almost burnt on both sides
* Let the cool enough to handle and scoop out the flesh (I used a grapefruit spoon)
* Pop the flesh in a sieve to drain for half an hour or so
* Chop the flesh and mix vigorously with the rest of the ingredients

## Result

We had it as a side dish with pita breads, quickled onions and other bits and pieces.  It was good both warm (fresh) and cool the next day

![Confit/deepfried garlic](/images/blog/baba-ghanoush/baba-ghanoush-001.jpg)
![Ingrediants](/images/blog/baba-ghanoush/baba-ghanoush-002.jpg)
![Aubergine on the BBQ](/images/blog/baba-ghanoush/baba-ghanoush-003.jpg)
![Midnight pruple is the best colour](/images/blog/baba-ghanoush/baba-ghanoush-004.jpg)
![Properly burnt](/images/blog/baba-ghanoush/baba-ghanoush-005.jpg)
![Ready for chopping](/images/blog/baba-ghanoush/baba-ghanoush-006.jpg)
![GET IN MY FACE](/images/blog/baba-ghanoush/baba-ghanoush-007.jpg)

repository: coldclimate/omnomfrickinnom

extension: markdown

gha_language: HTML

gha_license_id: MIT

repo_name: coldclimate/omnomfrickinnom


text:
# ruse scheme

[![builds.sr.ht status](https://builds.sr.ht/~amz3/ruse-scheme.svg)](https://builds.sr.ht/~amz3/ruse-scheme?)

Experimental Scheme to JavaScript compiler

![a fox](https://raw.githubusercontent.com/scheme-live/ruse-scheme/master/nathan-anderson-3Lazy6QQR6c-unsplash-small.jpg)

## Abstract

`ruse` will be a pragmatic language and a standard library for the
browser.

`ruse` will integrate well with JavaScript ecosystem in the sense that
it will be easy to use existing JavaScript libraries. Eventually, it
will support [R7RS](http://r7rs.org/) and all its libraries.

`ruse` wants to be a *good enough* framework for building frontend web
applications.

## Rationale

> "I hear and I forget. I see and I remember. I do and I understand."
>
> *Confucius*

The project was started because there is (was?) not existing Scheme
implementation that supported tail-call-optimization in the browser
that is (was?) actually working.

`ruse` is not only a learning project about Scheme programming
language but also an exercices about compilers.

## Documentation

See [TODO](https://github.com/scheme-live/ruse-scheme/issues/1).

## More like this

- BiwaScheme JavaScript interpreter
- Chibi Scheme webassembly build
- Chicken Scheme's Spock egg
- Gambit Scheme JavaScript backend
- Schism Scheme

repository: mugcake/ruse-scheme

repo_name: mugcake/ruse-scheme


text:
# Mars.Rover
.Net Core Mars Rover Console Application

# Design Patterns
![alt text](images/design-patterns.png)

___________________________________________

# Logs
![alt text](images/logs.png)

# References

Encapsulation: https://www.w3schools.com/cs/cs_properties.asp
DI on .NET CORE Console Apps: https://pradeeploganathan.com/dotnet/dependency-injection-in-net-core-console-application/
Command Design Pattern: https://www.syncfusion.com/blogs/post/command-design-pattern-tutorial-with-csharp-examples.aspx
.Net Core Console App Logger Implementation: https://www.blinkingcaret.com/2018/02/14/net-core-console-logging/
Nunit Tests: https://www.c-sharpcorner.com/article/unit-test-in-net-core-application-using-nunit/


text:
# TiberiusHunter's Hassio Configuration

[![Build Status][travis-ci-shield-main]][travis-ci-url]
[![Build Status][travis-ci-shield-dev]][travis-ci-url]
![Project Maintenance][maintenance-shield]
[![MIT License][license-shield]][license-url]

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]

## About

A repository storing and backing up my Home Assistant configuration

## File Structure

The entry point for Hassio is the `configuration.yaml` file. From there I've split up the configuration into various folders and files found under the `/configuration/` directory.

This has simply been to reduce the size of the `configuration.yaml` *especially as my previous installation of Hassio ended up being a nightmare to maintain..* :roll_eyes:

From the `configuration.yaml` file, all the files under the `configuration/integrations/` directory get imported - this lists what you'd likely see in a regular configuration file.

Once an integration contains any entities, sensors, scenes, scripts, etc. I then break that down into it's own file under whichever type of integration it is - For example, for the `camera:` integration I've created a separate file under `configuration/entities/camera/` directory for each camera.

## Usage

This repository has been designed to be used with the default [git pull addon][addon-git-pull] once the build passes on the main branch.

When there are changes to any of the configuration files Hassio will pull the latest changes and automatically restart :tada:

## Contributing

You've found a bug in my config, a mistake in the docs or maybe you want to add a new feature? :thinking:

I'm very open to any and all contributions to my config, please let me know by creating an [issue on the repository][issues-url] and feel free to create a pull request with your changes :heart:

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3.  Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See [LICENSE][license-url] for more information.

## Acknowledgements

* [rxaiver's GitHub Emoji Cheat Sheet][1]
* [Img Shields][2]
* [Choose an Open Source License][3]
* [othneildrew's Best README Template][4]
* [Frenck's Home Assistant Config][5]

## Contact

Owner: Sam Welek

[![GitHub][github-shield]][github-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![Twitter][twitter-shield]][twitter-url]

Project Link: [GitHub][project-url]

[project-url]: https://github.com/tiberiushunter/hassio-config

[travis-ci-shield-dev]: https://img.shields.io/travis/com/tiberiushunter/hassio-config/dev?logo=travis&style=for-the-badge&label=dev
[travis-ci-shield-main]: https://img.shields.io/travis/com/tiberiushunter/hassio-config/main?logo=travis&style=for-the-badge&label=main

[travis-ci-url]: https://travis-ci.com/tiberiushunter/hassio-config

[maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg?style=for-the-badge

[contributors-shield]: https://img.shields.io/github/contributors/tiberiushunter/hassio-config.svg?style=for-the-badge
[contributors-url]: https://github.com/tiberiushunter/hassio-config/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/tiberiushunter/hassio-config.svg?style=for-the-badge
[forks-url]: https://github.com/tiberiushunter/hassio-config/network/members

[stars-shield]: https://img.shields.io/github/stars/tiberiushunter/hassio-config.svg?style=for-the-badge
[stars-url]: https://github.com/tiberiushunter/hassio-config/stargazers

[issues-shield]: https://img.shields.io/github/issues/tiberiushunter/hassio-config.svg?style=for-the-badge
[issues-url]: https://github.com/tiberiushunter/hassio-config/issues

[license-shield]: https://img.shields.io/github/license/tiberiushunter/hassio-config.svg?style=for-the-badge
[license-url]: https://github.com/tiberiushunter/hassio-config/blob/main/LICENSE

[addon-git-pull]: https://github.com/home-assistant/hassio-addons/tree/master/git_pull

[github-shield]: https://img.shields.io/badge/-GitHub-black.svg?style=for-the-badge&logo=github&colorB=555
[github-url]: https://github.com/tiberiushunter

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/sam-welek

[twitter-shield]: https://img.shields.io/badge/-Twitter-black.svg?style=for-the-badge&logo=twitter&colorB=555
[twitter-url]: https://twitter.com/samwelek

[1]: https://gist.github.com/rxaviers/7360908
[2]: https://shields.io
[3]: https://choosealicense.com
[4]: https://github.com/othneildrew/Best-README-Template
[5]: https://github.com/frenck/home-assistant-config

repository: brianmccarty/hassio-config

branch_name: refs/heads/main

repo_name: brianmccarty/hassio-config


text:
# Rainy tutorial

## Run CLI examples
Though this project is still WIP, all examples are verified to work.

First, install [pipenv](https://pipenv.readthedocs.io/en/latest/).
E.g. you can install it via
``` bash
pip3 install pipenv --user
```

Then, clone this repository and create a virtual environment in it.
```bash
git clone https://github.com/kngwyu/Rainy.git
cd Rainy
pipenv --site-packages --three install
```

Now you are ready to start!

```bash
pipenv run python examples/acktr_cart_pole.py train
```

After training, you can run learned agents.

Please replace `(log-directory)` in the below command with your real log directory.
It should be named like `Results/acktr_cart_pole/191119-143319`.
``` bash
pipenv run python acktr_cart_pole.py eval (log-directory) --render
```

You can also plot training results in your log directory.
This command opens an ipython shell with your log file.
``` bash
pipenv run python -m rainy.ipython
```
Then you can plot training rewards via
```python
log = open_log('log-directory')
log.plot_reward(12 * 20, max_steps=int(4e5), title='ACKTR cart pole')
```
![ACKTR cart pole](./pictures/acktr-cart-pole.png)

## MPI/NCCL support
Distributed training is supported via [horovod](https://horovod.readthedocs.io/en/latest/).

E.g., if you want to use it with NCLL, you can install it via
```bash
sudo env HOROVOD_GPU_ALLREDUCE=NCCL pip3 install --no-cache-dir horovod
```

You can run the training script using `horovodrun` command.

E.g., if you want to use two hosts(localhost and anotherhost) and run `ppo_atari.py`, use
```bash
horovodrun -np 2 -H localhost:1,anotherhost:1 pipenv run python examples/ppo_atari.py train
```

repository: kngwyu/Rainy

gha_language: Python

repo_name: kngwyu/Rainy


text:
## Setup

To run Safira locally, you need to have some tools installed. Go to ```bin/setup``` and execute the setup script ```./setup.sh```.

## Database on Docker

We use ```docker-compose``` to deploy a database engine in docker.
Some commands that are useful:

  * ``` docker-compose up -d ```   -> Create a PostgreSQL container.
  * ``` docker-compose down -v ``` -> Destroy the containers and volumes deployed with ```docker-compose up```.

Notes:
  * If you have some trouble running any ```mix``` commands after the container deployment, and the errors match ```key :password not found in:```, then you should leave in blank ```DB_PASSWORD``` field in .env file.

repository: cesium/safira

gha_language: Elixir

repo_name: cesium/safira


text:
# json2cmakelists

## Introduction

`json2cmakelists` is a tool that generates a ***CMakeLists.txt*** from [JSON compilation database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) file ***compile_commands.json***.

A compilation database is a JSON file named *compile_commands.json*, which consist of an array of “command objects”, where each command object specifies one way a translation unit is compiled in the project.

*CMakeLists.txt* is the input to the CMake build system. It contains a set of directives and instructions describing the project's source files and targets, which control the build process.

## How to use

### Basic usage

Goto the directory which containing *compile_commands.json* file, and run this tool.

```sh
cd ${DIR_HAS_compile_commands.json}
json2cmakelists    # in PATH
```

Alternatively, if `json2cmakelists` is not in `PATH`, you can run it simply like this:

```sh
cd ${DIR_HAS_compile_commands.json}
python3 /path/to/json2cmakelists    # force using Python3
```

Done.

### Advanced usage

Default, the tool use *compile_commands.json* as input file, *CMakeLists.txt* as output file.

You can use options such as `-i file` and `-o file` to specify a different input / output file. Use `-h` or `--help` to see help info.

```sh
json2cmakelists -h    # print help
```

Of course, with the generated *CMakeLists.txt*, you can re-generate *compile_commands.json* again in canonical way using `cmake` as you like.

## Problem reports

This tool script is originally written under Python 3.5 on Linux.

If you find a bug, or would like to propose an improvement, please let me know. Patches are also welcome.


text:
# MetaTags: a gem to make your Rails application SEO-friendly

[![CircleCI](https://circleci.com/gh/kpumuk/meta-tags.svg?style=shield)](https://circleci.com/gh/kpumuk/meta-tags)
[![Gem Version](https://badge.fury.io/rb/meta-tags.svg)](https://badge.fury.io/rb/meta-tags)
[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
[![Code Climate](https://codeclimate.com/github/kpumuk/meta-tags/badges/gpa.svg)](https://codeclimate.com/github/kpumuk/meta-tags)
[![Test Coverage](https://codeclimate.com/github/kpumuk/meta-tags/badges/coverage.svg)](https://codeclimate.com/github/kpumuk/meta-tags/coverage)
[![Gem Downloads](https://img.shields.io/gem/dt/meta-tags.svg)](https://badge.fury.io/rb/meta-tags)
[![Changelog](https://img.shields.io/badge/Changelog-latest-blue.svg)](https://github.com/kpumuk/meta-tags/blob/main/CHANGELOG.md)

Search Engine Optimization (SEO) plugin for Ruby on Rails applications.

## Ruby on Rails

MetaTags main branch fully supports Ruby on Rails 5.1+, and is tested against all
major Rails releases up to 7.0.

Ruby versions older than 2.7 are no longer officially supported.

_Please note_ that we no longer support Ruby versions older than 2.6.0 and
Ruby on Rails older than 5.1, because they reached their [End of Life](https://endoflife.date/ruby).

## Installation

Add the "meta-tags" gem to your `Gemfile`.

```ruby
gem "meta-tags"
```

And run `bundle install` command.

## Configuration

MetaTags follows best-practices for meta tags. Although default limits for
truncation have recommended values, you can change them to reflect your own
preferences. Keywords are converted to lowercase by default, but this is also
configurable.

To override the defaults, create an initializer
`config/initializers/meta_tags.rb` using the following command:

```bash
rails generate meta_tags:install
```

By default meta tags are rendered with the key `name`. Since, some meta tags are
required to use `property` instead (like Facebook Open Graph object), MetaTags gem
allows to configure which tags to render with `property` attribute. By default
the pre-configured list includes all possible Facebook Open Graph object types, but
you can add your own in case you need it.

## MetaTags Usage

First, add this code to your main layout:

```erb
<head>
  <%= display_meta_tags site: "My website" %>
</head>
```

Then, to set the page title, add this to each of your views (see below for other options):

```erb
<h1><%= title "My page title" %></h1>
```

When views are rendered, the page title will be included in the right spots:

```html
<head>
  <title>My website | My page title</title>
</head>
<body>
  <h1>My page title</h1>
</body>
```

You can find allowed options for `display_meta_tags` method below.

### Using MetaTags in controller

You can define following instance variables:

```ruby
@page_title = "Member Login"
@page_description = "Member login page."
@page_keywords = "Site, Login, Members"
```

Also you could use `set_meta_tags` method to define all meta tags simultaneously:

```ruby
set_meta_tags(
  title: "Member Login",
  description: "Member login page.",
  keywords: "Site, Login, Members"
)
```

You can find allowed options for `set_meta_tags` method below.

### Using MetaTags in view

To set meta tags you can use following methods:

```erb
<% title "Member Login" %>
<% description "Member login page." %>
<% keywords "Site, Login, Members" %>
<% nofollow %>
<% noindex %>
<% refresh 3 %>
```

Also there is `set_meta_tags` method exists:

```erb
<%
  set_meta_tags(
    title: "Member Login",
    description: "Member login page.",
    keywords: "Site, Login, Members"
  )
%>
```

You can pass an object that implements `#to_meta_tags` method and returns a Hash:

```ruby
class Document < ApplicationRecord
  def to_meta_tags
    {
      title: title,
      description: summary
    }
  end
end

@document = Document.first
set_meta_tags @document
```

The `title` method returns title itself, so you can use it to show the title
somewhere on the page:

```erb
<h1><%= title "Member Login" %></h1>
```

If you want to set the title and display another text, use this:

```erb
<h1><%= title "Member Login", "Here you can login to the site:" %></h1>
```

### Allowed options for `display_meta_tags` and `set_meta_tags` methods

Use these options to customize the title format:

| Option         | Description                                                                                |
| -------------- | -------------------------------------------------------------------------------------------------------------------- |
| `:site`        | site title                                                                                |
| `:title`       | page title                                                                                |
| `:description` | page description                                                                                |
| `:keywords`    | page keywords                                                                                |
| `:charset`     | page character set                                                                                |
| `:prefix`      | text between site name and separator                                                                                |
| `:separator`   | text used to separate website name from page title                                                                   |
| `:suffix`      | text between separator and page title                                                                                |
| `:lowercase`   | when true, the page name will be lowercase                                                                           |
| `:reverse`     | when true, the page and site names will be reversed                                                                  |
| `:noindex`     | add noindex meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings   |
| `:index`       | add index meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings     |
| `:nofollow`    | add nofollow meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings  |
| `:follow`      | add follow meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings    |
| `:noarchive`   | add noarchive meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings |
| `:canonical`   | add canonical link tag                                                                                |
| `:prev`        | add prev link tag                                                                                |
| `:next`        | add next link tag                                                                                |
| `:image_src`   | add image_src link tag                                                                                |
| `:og`          | add Open Graph tags (Hash)                                                                                |
| `:twitter`     | add Twitter tags (Hash)                                                                                |
| `:refresh`     | refresh interval and optionally url to redirect to                                                                   |

And here are a few examples to give you ideas.

```erb
<%= display_meta_tags separator: "—".html_safe %>
<%= display_meta_tags prefix: false, separator: ":" %>
<%= display_meta_tags lowercase: true %>
<%= display_meta_tags reverse: true, prefix: false %>
<%= display_meta_tags og: { title: "The Rock", type: "video.movie" } %>
<%= display_meta_tags alternate: { "zh-Hant" => "http://example.com.tw/base/url" } %>
```

### Allowed values

You can specify `:title` as a string or array:

```ruby
set_meta_tags title: ["part1", "part2"], site: "site"
# site | part1 | part2
set_meta_tags title: ["part1", "part2"], reverse: true, site: "site"
# part2 | part1 | site
```

Keywords can be passed as string of comma-separated values, or as an array:

```ruby
set_meta_tags keywords: ["tag1", "tag2"]
# tag1, tag2
```

Description is a string (HTML will be stripped from output string).

### Mirrored values

Sometimes, it is desirable to mirror meta tag values down into namespaces. A
common use case is when you want open graph's `og:title` to be identical to
the `title`.

Say, you have the following in your application layout:

```ruby
display_meta_tags og: {
  title: :title,
  site_name: :site
}
```

The value of `og[:title]` is a symbol and therefore references the value of the
top level `title` meta tag. With the following in any view:

```ruby
title "my great view"
```

You get this open graph meta tag for free:

```html
<meta property="og:title" content="my great view"></meta>
```

Please note, that title does not include site. If you need to reference the exact
value rendered in the `<title>` meta tag, use `:full_title`.

### Using with Turbolinks

[Turbolinks](https://github.com/turbolinks/turbolinks) is a simple solution for getting
the performance benefits of a single-page application without the added complexity of a
client-side JavaScript framework. MetaTags supports Turbolinks out of the box, no
configuration is necessary.

### Using with pjax

[jQuery.pjax](https://github.com/defunkt/jquery-pjax) is a nice solution for navigation
without full page reload. The main difference is that layout file will not be rendered,
so page title will not change. To fix this, when using a page fragment, pjax will check
the fragment DOM element for a `title` or `data-title` attribute and use any value it finds.

MetaTags simplifies this with `display_title` method, which returns fully resolved
page title (include site, prefix/suffix, etc.) But in this case you will have to
set default parameters (e.g, `:site`) both in layout file and in your views. To minimize
code duplication, you can define a helper in `application_helper.rb`:

```ruby
def default_meta_tags
  {
    title: "Member Login",
    description: "Member login page.",
    keywords: "Site, Login, Members",
    separator: "—".html_safe
  }
end
```

Then in your layout file use:

```erb
<%= display_meta_tags(default_meta_tags) %>
```

And in your pjax templates:

```erb
<!-- set title here, so we can use it both in "display_title" and in "title" -->
<% title "My Page title" %>
<%= content_tag :div, data: { title: display_title(default_meta_tags) } do %>
    <h1><%= title %></h1>
    <!-- HTML goes here -->
<% end %>
```

## SEO Basics and MetaTags

### Titles

Page titles are very important for Search engines. The titles in the
browser are displayed in the title bar. The search engines look at
the title bar to determine what the page is all about.

```ruby
set_meta_tags title: "Member Login"
# <title>Member Login</title>
set_meta_tags site: "Site Title", title: "Member Login"
# <title>Site Title | Member Login</title>
set_meta_tags site: "Site Title", title: "Member Login", reverse: true
# <title>Member Login | Site Title</title>
```

Recommended title tag length: up to 70 characters, 10 words.

Further reading:

- [Title Tag](https://moz.com/learn/seo/title-tag)

### Description

Description tags are called meta tags as they are not displayed by the
browsers unlike the titles. However, these descriptions may be displayed by
some search engines. They are used to describe the contents of a page in
2 or 3 sentences.

```ruby
set_meta_tags description: "All text about keywords, other keywords"
# <meta name="description" content="All text about keywords, other keywords">
```

Recommended description tag length: up to 300 characters.

Further reading:

- [Meta Description](https://moz.com/learn/seo/meta-description)
- [How Long Should Your Meta Description Be? (2018 Edition)](https://moz.com/blog/how-long-should-your-meta-description-be-2018)

### Keywords

Meta keywords tag are used to place your keywords that you think a
surfer would search in Search engines. Repeating keywords unnecessarily
would be considered spam and you may get permanently banned from SERP's

```ruby
set_meta_tags keywords: %w[keyword1 Keyword2 KeyWord3]
# <meta name="keywords" content="keyword1, keyword2, keyword3">
```

Recommended keywords tag length: up to 255 characters, 20 words.

**Please note**, that both Google and Bing publicly indicated that keywords
meta tags is completely ignored.

### Noindex

By using the noindex meta tag, you can signal to search engines to not
include specific pages in their indexes.

```ruby
set_meta_tags noindex: true
# <meta name="robots" content="noindex">
set_meta_tags noindex: "googlebot"
# <meta name="googlebot" content="noindex">
```

This is useful for pages like login, password reset, privacy policy, etc.

Further reading:

- [Blocking Google](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93708)
- [Using meta tags to block access to your site](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93710)

### Index

Although it is not required to add "index" to "robots" as it is default value for Google, some SEO specialists recommend to add it to website

```ruby
set_meta_tags index: true
# <meta name="robots" content="index">
```

### Nofollow

Nofollow meta tag tells a search engine not to follow the links on a specific
page. It's entirely likely that a robot might find the same links on some
other page without a nofollow (perhaps on some other site), and so
still arrives at your undesired page.

```ruby
set_meta_tags nofollow: true
# <meta name="robots" content="nofollow">
set_meta_tags nofollow: "googlebot"
# <meta name="googlebot" content="nofollow">
```

Further reading:

- [About rel="nofollow"](http://www.google.com/support/webmasters/bin/answer.py?answer=96569)
- [Meta tags](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=79812)

### Follow

Follow will work with Noindex meta tag

```ruby
set_meta_tags noindex: true, follow: true
# <meta name="robots" content="noindex, follow">
```

It will not look at this page but will crawl through the rest of the pages on
your website.

### Canonical URL

Canonical link element tells a search engine what is the canonical or main URL
for a content which have multiple URLs. The search engine will always return
that URL, and link popularity and authority will be applied to that URL.

Note: If you like follow a hint of John Mueller that you shouldn't mix canonical with noindex, then you can
set `MetaTags.config.skip_canonical_links_on_noindex = true` and we'll handle it for you.

```ruby
set_meta_tags canonical: "http://yoursite.com/canonical/url"
# <link rel="canonical" href="http://yoursite.com/canonical/url">
```

Further reading:

- [About rel="canonical"](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139394)
- [Canonicalization](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139066)

### Icon

A favicon (short for Favorite icon), also known as a shortcut icon, Web site
icon, tab icon or bookmark icon, is a file containing one or more small icons,
most commonly 16×16 pixels, associated with a particular website or web page.

```ruby
set_meta_tags icon: "/favicon.ico"
# <link rel="icon" href="/favicon.ico" type="image/x-icon">
set_meta_tags icon: "/favicon.png", type: "image/png"
# <link rel="icon" href="/favicon.png" type="image/png">
set_meta_tags icon: [
  {href: "/images/icons/icon_96.png", sizes: "32x32 96x96", type: "image/png"},
  {href: "/images/icons/icon_itouch_precomp_32.png", rel: "apple-touch-icon-precomposed", sizes: "32x32", type: "image/png"}
]
# <link rel="icon" href="/images/icons/icon_96.png" type="image/png" sizes="32x32 96x96">
# <link rel="apple-touch-icon-precomposed" href="/images/icons/icon_itouch_precomp_32.png" type="image/png" sizes="32x32">
```

Further reading:

- [Favicon](https://www.wikiwand.com/en/Favicon)
- [Touch Icons](https://mathiasbynens.be/notes/touch-icons)

### Multi-regional and multilingual URLs, RSS and mobile links

Alternate link elements tell a search engine when there is content that's
translated or targeted to users in a certain region.

```ruby
set_meta_tags alternate: {"fr" => "http://yoursite.fr/alternate/url"}
# <link rel="alternate" href="http://yoursite.fr/alternate/url" hreflang="fr">

set_meta_tags alternate: {"fr" => "http://yoursite.fr/alternate/url",
                          "de" => "http://yoursite.de/alternate/url"}
# <link rel="alternate" href="http://yoursite.fr/alternate/url" hreflang="fr">
# <link rel="alternate" href="http://yoursite.de/alternate/url" hreflang="de">
```

If you need more than just multi-lingual links, you can use an alternative syntax:

```ruby
set_meta_tags alternate: [
  {href: "http://example.fr/base/url", hreflang: "fr"},
  {href: "http://example.com/feed.rss", type: "application/rss+xml", title: "RSS"},
  {href: "http://m.example.com/page-1", media: "only screen and (max-width: 640px)"}
]
```

Further reading:

- [Multi-regional and multilingual sites](https://support.google.com/webmasters/answer/182192)
- [About rel="alternate" hreflang="x"](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=189077)
- [Separate URLs](https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls#annotation-in-the-html)

### Pagination links

Previous and next links indicate indicate the relationship between individual
URLs. Using these attributes is a strong hint to Google that you want us to
treat these pages as a logical sequence.

```ruby
set_meta_tags prev: "http://yoursite.com/url?page=1"
# <link rel="prev" href="http://yoursite.com/url?page=1">
set_meta_tags next: "http://yoursite.com/url?page=3"
# <link rel="next" href="http://yoursite.com/url?page=3">
```

Further reading:

- [Pagination](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1663744)
- [Pagination with rel="next" and rel="prev"](http://googlewebmastercentral.blogspot.ca/2011/09/pagination-with-relnext-and-relprev.html)

### image_src links

Basically, when you submit/share this to Facebook , this helps Facebook determine
which image to put next to the link. If this is not present, Facebook tries to
put in the first image it finds on the page, which may not be the best one to
represent your site.

```ruby
set_meta_tags image_src: "http://yoursite.com/icons/icon_32.png"
# <link rel="image_src" href="http://yoursite.com/icons/icon_32.png">
```

### amphtml links

AMP is a way to build web pages for static content that render fast. If you have
two versions of the page – non-AMP and AMP, you can link the AMP version from
normal one using `amphtml` tag:

```ruby
set_meta_tags amphtml: url_for(format: :amp, only_path: false)
# <link rel="amphtml" href="https://www.example.com/document.amp">
```

To link back to normal version, use `canonical`.

- [What Is AMP?](https://www.ampproject.org/learn/about-amp/)
- [Make Your Page Discoverable](https://www.ampproject.org/docs/guides/discovery)

### Manifest links

```ruby
set_meta_tags manifest: "manifest.json"
# <link rel="manifest" href="manifest.json">
```

- [What is manifest?](https://developer.mozilla.org/en-US/docs/Web/Manifest)

### Refresh interval and redirect URL

Meta refresh is a method of instructing a web browser to automatically
refresh the current web page or frame after a given time interval. It is also
possible to instruct the browser to fetch a different URL when the page is
refreshed, by including the alternative URL in the content parameter. By
setting the refresh time interval to zero (or a very low value), this allows
meta refresh to be used as a method of URL redirection.

```ruby
set_meta_tags refresh: 5
# <meta content="5" http-equiv="refresh">
set_meta_tags refresh: "5;url=http://example.com"
# <meta content="5;url=http://example.com" http-equiv="refresh">
```

Further reading:

- [Meta refresh](http://en.wikipedia.org/wiki/Meta_refresh)
- [What is the Meta Refresh Tag](http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm)

### Open Search

Open Search link element to describe a search engine in a standard and accessible format.

```ruby
set_meta_tags open_search: {
  title: "Open Search",
  href: "/opensearch.xml"
}
# <link href="/opensearch.xml" rel="search" title="Open Search" type="application/opensearchdescription+xml">
```

Further reading:

- [OpenSearch specs](http://www.opensearch.org/Specifications/OpenSearch/1.1)
- [OpenSearch wiki](http://en.wikipedia.org/wiki/OpenSearch)

### Hashes

Any namespace can be built just passing any symbol name and a Hash. For example:

```ruby
set_meta_tags foo: {
  bar: "lorem",
  baz: {
    qux: "ipsum"
  }
}
# <meta property="foo:bar" content="lorem">
# <meta property="foo:baz:qux" content="ipsum">
```

### Arrays

Repeated meta tags can be built just using an Array inside a Hash. For example:

```ruby
set_meta_tags og: {
  image: ["http://example.com/rock.jpg", "http://example.com/rock2.jpg"]
}
# <meta property="og:image" content="http://example.com/rock.jpg">
# <meta property="og:image" content="http://example.com/rock2.jpg">
```

### Open Graph

To turn your web pages into graph objects, you'll need to add Open Graph
protocol `<meta>` tags to your webpages. The tags allow you to specify
structured information about your web pages. The more information you provide, the more opportunities your web pages can be surfaced within Facebook today
and in the future. Here's an example for a movie page:

```ruby
set_meta_tags og: {
  title: "The Rock",
  type: "video.movie",
  url: "http://www.imdb.com/title/tt0117500/",
  image: "http://ia.media-imdb.com/rock.jpg",
  video: {
    director: "http://www.imdb.com/name/nm0000881/",
    writer: ["http://www.imdb.com/name/nm0918711/", "http://www.imdb.com/name/nm0177018/"]
  }
}
# <meta property="og:title" content="The Rock">
# <meta property="og:type" content="video.movie">
# <meta property="og:url" content="http://www.imdb.com/title/tt0117500/">
# <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg">
# <meta property="og:video:director" content="http://www.imdb.com/name/nm0000881/">
# <meta property="og:video:writer" content="http://www.imdb.com/name/nm0918711/">
# <meta property="og:video:writer" content="http://www.imdb.com/name/nm0177018/">
```

Multiple images declared as an **array** (look at the `_` character):

```ruby
set_meta_tags og: {
  title: "Two structured image properties",
  type: "website",
  url: "view-source:http://examples.opengraphprotocol.us/image-array.html",
  image: [
    {
      _: "http://examples.opengraphprotocol.us/media/images/75.png",
      width: 75,
      height: 75
    },
    {
      _: "http://examples.opengraphprotocol.us/media/images/50.png",
      width: 50,
      height: 50
    }
  ]
}
# <meta property="og:title" content="Two structured image properties">
# <meta property="og:type" content="website">
# <meta property="og:url" content="http://examples.opengraphprotocol.us/image-array.html">
# <meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/75.png">
# <meta property="og:image:width" content="75">
# <meta property="og:image:height" content="75">
# <meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
# <meta property="og:image:width" content="50">
# <meta property="og:image:height" content="50">
```

Article meta tags are supported too:

```ruby
set_meta_tags article: {
  published_time: "2013-09-17T05:59:00+01:00",
  modified_time: "2013-09-16T19:08:47+01:00",
  section: "Article Section",
  tag: "Article Tag"
}
# <meta property="article:published_time" content="2013-09-17T05:59:00+01:00">
# <meta property="article:modified_time" content="2013-09-16T19:08:47+01:00">
# <meta property="article:section" content="Article Section">
# <meta property="article:tag" content="Article Tag">
```

Further reading:

- [Open Graph protocol](http://developers.facebook.com/docs/opengraph/)
- [Must-Have Social Meta Tags for Twitter, Google+, Facebook and More](https://moz.com/blog/meta-data-templates-123)

### Twitter Cards

Twitter cards make it possible for you to attach media experiences to Tweets that link to your content.
There are 3 card types (summary, photo and player). Here's an example for summary:

```ruby
set_meta_tags twitter: {
  card: "summary",
  site: "@username"
}
# <meta name="twitter:card" content="summary">
# <meta name="twitter:site" content="@username">
```

Take in consideration that if you're already using OpenGraph to describe data on your page, it’s easy to generate a Twitter card without duplicating your tags and data. When the Twitter card processor looks for tags on your page, it first checks for the Twitter property, and if not present, falls back to the supported Open Graph property. This allows for both to be defined on the page independently, and minimizes the amount of duplicate markup required to describe your content and experience.

When you need to generate a [Twitter Photo card](https://dev.twitter.com/docs/cards/types/photo-card), `twitter:image` property is a string, while image dimensions are specified using `twitter:image:width` and `twitter:image:height`, or a `Hash` objects in terms of MetaTags gems. There is a special syntax to make this work:

```ruby
set_meta_tags twitter: {
  card: "photo",
  image: {
    _: "http://example.com/1.png",
    width: 100,
    height: 100
  }
}
# <meta name="twitter:card" content="photo">
# <meta name="twitter:image" content="http://example.com/1.png">
# <meta name="twitter:image:width" content="100">
# <meta name="twitter:image:height" content="100">
```

Special parameter `itemprop` can be used on a "anonymous" tag "\_" to generate "itemprop" HTML attribute:

```ruby
set_meta_tags twitter: {
  card: "photo",
  image: {
    _: "http://example.com/1.png",
    width: 100,
    height: 100,
    itemprop: "image"
  }
}
# <meta name="twitter:card" content="photo">
# <meta name="twitter:image" content="http://example.com/1.png" itemprop="image">
# <meta name="twitter:image:width" content="100">
# <meta name="twitter:image:height" content="100">
```

Further reading:

- [Twitter Cards Documentation](https://dev.twitter.com/cards/)

### App Links

App Links is an open cross platform solution for deep linking to content in your mobile app. Here's an example for iOS app integration:

```ruby
set_meta_tags al: {
  ios: {
    url: "example://applinks",
    app_store_id: 12345,
    app_name: "Example App"
  }
}
# <meta property="al:ios:url" content="example://applinks">
# <meta property="al:ios:app_store_id" content="12345">
# <meta property="al:ios:app_name" content="Example App">
```

Further reading:

- [App Links Documentation](https://developers.facebook.com/docs/applinks)

### Custom meta tags

Starting from version 1.3.1, you can specify arbitrary meta tags, and they will
be rendered on the page, even if meta-tags gem does not know about them.

Example:

```ruby
set_meta_tags author: "Dmytro Shteflyuk"
# <meta name="author" content="Dmytro Shteflyuk">
```

You can also specify value as an Array, and values will be displayed as a list
of `meta` tags:

```ruby
set_meta_tags author: ["Dmytro Shteflyuk", "John Doe"]
# <meta name="author" content="Dmytro Shteflyuk">
# <meta name="author" content="John Doe">
```

## Maintainers

[Dmytro Shteflyuk](https://github.com/kpumuk), [https://kpumuk.info](http://kpumuk.info/)

repository: kpumuk/meta-tags

gha_language: Ruby

repo_name: kpumuk/meta-tags


text:
`FormInput` enforces common practices for accessible inputs in a form.

### Keyboard Support

| Element | Key | Description |
| --- | --- | --- |

### Label Support

| Element | Label |
| --- | --- |
| Input | Labelled by the label prop |

### React ref API

| Property | Type | Description |
| --- | --- | --- |
| focus | function | Focuses the input element |

### Examples

```js
<FormInput id="example-1" label="Example input" />
```

repository: juanca/react-aria-components

gha_language: JavaScript

repo_name: juanca/react-aria-components


text:
# ScoreKeeper1

## Description
Soccer scorekeeper will keep and update the score, faults, corners and offsides situation.

## What I learned

* Used a spinner for team selection
* Adding button code
* Updated views
* Properly scoping variables
* Finding views by their ID
* Saving state on the device's rotation

## Screenshots

![screenshot_20180830-222949](https://user-images.githubusercontent.com/36914492/44875146-0730fe00-aca6-11e8-8f5e-4b6d32662568.jpg) ![screenshot_20180830-223007](https://user-images.githubusercontent.com/36914492/44875159-0d26df00-aca6-11e8-87ba-dec45b904f8b.jpg)

## License

This project was submited by Lavinia Dragunoi as a part of Udacity Android Basics Nanodegree.

MIT License

Copyright (c) 2018 Lavinia Dragunoi

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

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

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


text:
---
title: Welcome to AfterHoursCode
date: "2020-05-01T22:12:03.284Z"
description: "Hello World"
---

This is my first post on my new fake blog! How exciting!

I'm sure I'll write a lot more interesting things in the future.

Oh, and here's a great quote from this Wikipedia on
[salted duck eggs](http://en.wikipedia.org/wiki/Salted_duck_egg).

> A salted duck egg is a Chinese preserved food product made by soaking duck
> eggs in brine, or packing each egg in damp, salted charcoal. In Asian
> supermarkets, these eggs are sometimes sold covered in a thick layer of salted

```javascript
const coolVariables = true
function bullShit() {
  return false
}
```


text:
# Purpose
--------------

JSReview is a library to help you ask for user feedback on the App Store, after user has been using app for a few days. Currently supporting asking for feedback based on days from first use, we plan on updating it to have more options.

# Supported OS & SDK Versions
-----------------------------

* Supported build target - iOS 10.0

Installation
--------------

## Cocoapods
--------------
Simply add pod
```
'JSReview', :git => 'https://github.com/jlsandrin/JSReview.git', :tag => '1.0.1'
```

to your Podfile and run `pod install`.

Configuration
--------------

Any value used to instantiate a new version of JSReview is stored in USerDefaults and can be replaced if a new object is creatded created with different values.

To instantiate a new object you can use a common init

```
init(appID: String)
```
that starts a new object with default values for days to request user feedback, and default values for localization. Or you can use a more complete init, which you can set every value currently used by JSReview.

```
init(appID: String,
                developmentMode: Bool = false,
                alertTitle: String? = nil,
                message: String? = nil,
                reviewActionTitle: String? = nil,
                rememberActionTitle: String? = nil,
                forgetActionTitle: String? = nil,
                daysUntilRequest: Int = 15,
                daysUntilRemember: Int = 15,
                locale: Locale = .current,
                urlOpener: URLOpenerInterface = URLOpener(),
                userDefaults: UserDefaults = .standard)
```

Each of the values above are used, somehow, by JSReview, so let's get into detail.

```
let appID: String
```

This is required to use JSReview, it's your app's ID on the AppStore. It needs to be in the format of **id[APPID]**, A.K.A., only the numbers of your app.

```
var developmentMode: Bool
```

Whenever this value is set to true, JSReview will alwayas present a new alert asking for user feedback.

```
var alerTitle: String?
```

Message to be used on alert that is going to be presented to the user of the app. This needs to be already localized.

```
var message: String
```

A message asking user to review your app.

```
var reviewActionTitle: String?
```

This will be used as the review button title.

```
var rememberActionTitle: String?
```

This will be used as the Remember-me Later button title.

```
var forgetActionTitle: String?
```

This will be used as the Don't Remember me Later button title.

```
var daysUntilRequest: Int
```

How many days need to pass before JSReview user to review the app for the first time.

```
var daysUntilRemember: Int
```

How many days until JSReviews asks user to review app again, after he/she selected "Remember-me Later" option.

```
var locale: Locale
```

For testing purposes, if you need to check if JSReview is selecting correct messages for different localizations.

```
var urlOpener: URLOpenerInterface
```

Wrapper to check and open URLs in the app. URLOpenerInterface is a protocol to make easier tests.

```
var userDefaults: UserDefaults
```

We use UserDefaults to save JSReview configuration.

repository: jlsandrin/JSReview

repo_name: jlsandrin/JSReview


text:
# Antennopsis R. Heim, 1952 GENUS

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Bull. trimest. Soc. mycol. Fr. 67: 347 (1952)

#### Original name
Antennopsis R. Heim, 1952

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Prep for installation
- Backup existing system and ensure backups are readable
- prepare info for installation
    - firefox account name and password
    - email account access info and password

# Initial OS installation and boot setup
- fix fstab settings
    - add noatime flag to ssd volumes
    - add mountpoints for:
        - efi
        - virtuallbox
        - workspace

# Initial manual install via command line or muon
- ansible
- git
-

```bash
sudo apt update
sudo apt install git
sudo apt install ansible
mkdir desktop-config
cd desktop-config
#
# if browser is available, the next 3 steps can be accomplished by loggin into githu and cloning repository
#
git config --global user.name "Ogden Boone"
git config --global user.email<EMAIL_ADDRESS>sudo git clone https://github.com/oiboone/desktop-config
#
sudo ansible-galaxy install -r requirements.yml
sudo ansible-playbook local.yml
sudo ansible-playbook zotero.yml

```

# Connect to samba share on raspberry pi server
name: <IP_ADDRESS>
server: <IP_ADDRESS>
address: smb://<IP_ADDRESS>/
folder: share

# Configuration of Firefox and Thunderbird
- Set up firefox account
- Install these firefox addins:
    - lastpass (or possibly bitwarden in the future)
    - ublock origin
    - https everywhere
- Install these thunderbird addons
    - lightning calendar
    - google provider
    - enigmail

# setup putty and remmina config files
- Now part of ansible setup (config.yml)

# setup commonly used latex packages
- Now part of ansible setup (config.yml)

# zotero customization

- goto <https://www.zotero.org/download/connectors> and install connectors for firefox and chrome.
- goto <https://github.com/retorquere/zotero-better-bibtex/releases/tag/v5.2.22> and download *.xpi file to downloads directory
- open zotero and
    - install libreoffice addin
    - install better bibtex
    - log into zotero account in edit->preferences

repository: oiboone/original-desktop-config

repo_name: oiboone/original-desktop-config


text:
# Economics Diagrams

Economics diagrams I’ve made using Ti𝑘Z. See also: philosophy, psychoanalysis, computer science, etc.

![world input-output table](/pics/world-io.png)

Antràs & Chor - On the Measurement of Upstreamness and Downstreamness in Global Value Chains (2017)

2018.05.17: Finished  [world input-output table]

![liquidity spiral](/pics/liquidity.png)

Brunnermeier & Pedersen - “Market Liquidity and Funding Liquidity” (2008), fig. 2

2018.05.05: Finished.  [liquidity spiral]

![types of equilibrium](/pics/equilibria.png)

Chiang & Wainwright - Fundamental Methods of Mathematical Economics (4th Ed.), p. 619, fig. 19.3

2018.02.02: Finished.  [types of equilibria]

![spectral analysis](/pics/spectral-analysis.png)

Cooper - “The Use of Spectral Analytic Techniques in Economics” (1972), p. 5, fig. 1

2019.10.26: Finished.  [spectral analysis]

![lewis turning point](/pics/lewis.png)

Das & N’Diaye - “Chronicle of a Decline Foretold: Has China Reached the Lewis Turning Point?” (2013), fig. 1a

2018.03.26: Finished.  [Lewis dual-sector model]

![braess paradox](/pics/braess.png)

Easley & Kleinberg - Networks, Crowds, and Markets (2010), pp. 208-9, fig. 8.1–2

2018.03.04: Finished.  [Braess paradox]

![identification](/pics/identification.png)

Fennell - “Why Functional Form Matters: Revealing the Structure in Structural Models in Econometrics” (2007), fig. 1

2018.03.01: Finished.  [identification problem]

![shadow banking](/pics/shadow.png)

Gorton & Metrick - “Regulating the Shadow Banking System” (2010), fig. 1, 2, 5

2018.05.30: Finished.  [shadow banking]

![business cycle](/pics/cycle.png)

Kwan - “Business Cycle in China since the Lehman Crisis” (2013), fig. 4–5

2018.03.25: Finished.  [business cycles]

![impossible trinity](/pics/trinity.png)

Oxelheim - International Financial Integration (1990),  fig. 1.2

2018.03.27: Finished.  [impossible trinity]

![signaling](/pics/signaling.png)

Zollman, Bergstrom, Huttegger - “Between Cheap and Costly Signals” (2012), fig. 2

2018.02.24: Finished.  [signaling games]

![zhao](/pics/zhao.png)

Zhao - “The Equivalence between Four Economic Theorems and Brouwer’s Fixed Point Theorem” (2002), fig. 2

2018.02.02: Finished.  [equilibrium existence]

![urbanization curve](/pics/urbanization.png)

Zou & Lü - The Research of County Urbanization and County Economy Development (2014), fig. 4

2019.03.23: Finished.  [urbanization curve]

repository: ninocz/Econ-Diagrams

repo_name: ninocz/Econ-Diagrams


text:
BootInspect [project page](http://designmeltdown.github.io/BootInspect/).

BootInspect
===========

A simple tool for visually displaying columns in a Bootstrap 3 based page. The objective was to give a visual outline and labeling of what column sizes are happening at different screen sizes. This helps debug and sort out building layouts with Bootstrap. In particular it proves its worth when mixing in push, pull and offset.

Visit the demo site to see how BootInspect outlines the containers, rows and columns. I think you will love it: [BootInspect Demo](http://hipstersdelight.com/)

Who
==============
BootInspect is the product of [Patrick McNeil](http://pmcneil.com). The creator of [Design Meltdown](http://designmeltdown.com).

jQuery
===========
BootInspect requires that you have jQuery running on the page. I am sure it could easily be adapted to not need it.. However, since this isn't something you leave in a site I went for simplicity of creating it in place of creating a self sustaining utility.  Besides, jQuery and Bootstrap go hand in hand.

How to use it
===========
Download the CSS and JS file and attach them to your page.

Or, simply load the GitHub hosted files into your page with this snippet (this is a hacky approach - but great for quick debugging):
```html
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/designmeltdown/BootInspect/master/bootinspect.css">
<script src="https://cdn.rawgit.com/designmeltdown/BootInspect/master/bootinspect.js"></script>
```

NOTE: BootInspect requires jQuery. Be sure to attach the JS file to your page after your jQuery reference.

Simply remove the CSS and JS file when you are done building your page.

Demonstrations
==================
Seeing what this does is probably even more helpful:

## Container, row and column outlines

![Basic Columns](https://cloud.githubusercontent.com/assets/2159602/4706254/2b8ec640-5883-11e4-8214-776f399f8892.jpg)
Here you can see that BootInspect has outlined containers in blue, rows in red and columns in green. It uses CSS outlines so as to not mess up the spacing of things. Also you will notice it has labeled the columns to indicate which size column it is!

## Communicates inherited column sizes

![Basic Columns](https://cloud.githubusercontent.com/assets/2159602/4706254/2b8ec640-5883-11e4-8214-776f399f8892.jpg)
Note that the XS column is rendered in white while the medium ones are orange. This is because the current display size is medium. So all inherited col sizes are white, while the ones targeting the current size are yellow. If this browser were sized up to be large, the medium ones would turn white. Note, the orange tags are covering up any sm or xs col sizes they override.

## Hides col sizes for larger screens

![Smaller screen](https://cloud.githubusercontent.com/assets/2159602/4706256/2b92d456-5883-11e4-9f3c-ba81e80d39ef.jpg)
Here the same design is shown with a smaller screen size in the small range. Note the purple color used to indicate sm columns.

## Helps with debugging complex layouts

![Helpful for debugging](https://cloud.githubusercontent.com/assets/2159602/4706255/2b9151b2-5883-11e4-80cd-62f397a0e317.jpg)
In this screenshot you can see how it was helpful to debug. I was using push/pull to swap the two columns of content on larger screens in the white band of content. It was confusing where the columns start and end. With BootInspect on it was obvious that the first column was being pulled over one column too far.

## Includes rough presentation of nested rows

![Nested rows](https://cloud.githubusercontent.com/assets/2159602/4706253/2b8a9cd2-5883-11e4-8d96-6451dcb274dd.jpg)
BootInspect roughly handles nested rows (1 layer deep at this time). It moves the nested column labels to the left. In this sample you can see the first column is nested. The outer one is set to col-md-4 while the inner ones are set to col-md-12.

BootLint
===================
This tool is not meant to replace [BootLint](https://github.com/twbs/bootlint). I find that the two work really well together.

Release History
==============
* 2014/10/20 - First formal release in preperation for use at Future of Web Deisgn NYC [Announcement](http://pmcneil.com/2014/10/introducing-bootinspect-for-bootstrap/)

License
==============
Copyright (c) 2014 Patrick McNeil. Licensed under the MIT license.

repository: designmeltdown/BootInspect

repo_name: designmeltdown/BootInspect


text:
---
path: your-super-simple-intro-to-css-variables
date: 2020-12-06T21:09:39.542Z
title: Your super-simple intro to CSS Variables
categories: CSS
description: In this article, I'll go through why you should know what CSS
  Variables are and how you can use them to level-up your CSS skills as a
  developer.
---
![Woman typing on laptop. Decorative image.](/assets/cssvar-bg.jpg "Woman typing on laptop. Decorative image.")
*Photo by [Sigmund](https://unsplash.com/@sigmund) on [Unsplash](https://unsplash.com/s/photos/css)*

I’ve been using CSS variables for quite some time now. They save me a bunch of time and headaches when it comes to writing CSS.

But maybe, you’re not familiar with them (yet 😉).

Maybe you are a little late to the CSS Variable game.

Or you’re just starting your journey as a web-developer and stumbled on the term “CSS Variable” or “CSS Custom Property” somewhere.

Maybe you just want to freshen up your knowledge on the concept.

In this article, I’ll go through why you should know what CSS Variables are and how you can use them to level-up your CSS skills as a developer.

## What are CSS Variables?

*CSS Variables (or CSS Custom Properties) are entities defined by CSS authors that contain specific values to be reused throughout a document.*

Sounds a little technical, right?

Let’s break it down.

A CSS Variable will look a lot like a regular line of CSS.

But instead of using an already existing property like “font-size”, “margin”, or “padding”, we will create our own custom property.

Hence the name “CSS Custom Properties”.

## Okay, that’s cool, but how do I create a CSS Variable?

Declaring a CSS Variable is done using a custom property name that begins with a double hyphen (`--`), and a property value that can be any valid CSS value. Like any other property, this is written inside a ruleset, like so:

![CSS Code Block.](/assets/cssvar-1.png "CSS Code Block.")

```css
element {
  --super-cool-text-color: red;
}
```

Note that the selector given to the ruleset defines the scope that the custom property can be used in.

This is why it is a common practice to add the CSS Variables to the `:root` pseudo-class.

`:root` is a pseudo-class that matches `<html>`. Actually, it's exactly the same as if we had used `html` in place of `:root` (except it has higher specificity).

This means we can now start styling our website using this variable.

## So we created a CSS Variable, now how do I use it?

*A CSS Variable can be accessed using the* `var()` *function in a CSS file.*

Now here is where the power of a CSS Variable really gets to shine.

Whenever you’re working on a large or complex project, your CSS tends to get complex as well.

Imagine you have some custom styling for the headers on your website:

![CSS Code Block.](/assets/cssvar-3.png "CSS Code Block.")

```css
h1 {
  margin: 1rem 0 0.5rem 0;
  color: red;
  font-size: 2rem;
}
h2 {
  margin: 0.75rem 0 0.25rem 0;
  color: red;
  font-size: 1.75rem;
}
h3 {
  margin: 0.5rem 0 0.125rem 0;
  color: red;
  font-size: 1.5rem;
}
```

As you can see, we have used the color red for all of our headers.

But what if we want to change that color?

We’ll have to change it at three different places (for the h1, h2, and h3).

**Now, let’s add our CSS Variable magic:**

![CSS Code Block.](/assets/cssvar-4.png "CSS Code Block.")

```css
/* CREATE OUR CSS VARIABLE */
:root {
  --super-cool-text-color: red;
}
h1 {
  margin: 1rem 0 0.5rem 0;
  /* USE OUR VARIABLE TO SET THE COLOR */
  color: var(--super-cool-text-color);
  font-size: 2rem;
}
h2 {
  margin: 0.75rem 0 0.25rem 0;
  color: var(--super-cool-text-color);
  font-size: 1.75rem;
}
h3 {
  margin: 0.5rem 0 0.125rem 0;
  color: var(--super-cool-text-color);
  font-size: 1.5rem;
}
```

Our color is now only defined once and we can access it from anywhere in our CSS file.

Then, we can access the CSS Variable using the `var()` function in our CSS to set the color of our headers to “red”.

Awesome!

If we now want to change the color of our text, we only have to update the CSS at one place, the variable that we have created:

![CSS Code Block.](/assets/cssvar-5.png "CSS Code Block.")

```css
:root {
  --super-cool-text-color: blue;
}
h1 {
  margin: 1rem 0 0.5rem 0;
  color: var(--super-cool-text-color);
  font-size: 2rem;
}
h2 {
  margin: 0.75rem 0 0.25rem 0;
  color: var(--super-cool-text-color);
  font-size: 1.75rem;
}
h3 {
  margin: 0.5rem 0 0.125rem 0;
  color: var(--super-cool-text-color);
  font-size: 1.5rem;
}
```

And BOOM, all our headers just turned from red to blue.

If you want to fiddle around with this code, I’ve [created a sandbox where you can edit the CSS yourself and see what happens!](https://codesandbox.io/s/css-variables-21hzk?file=/src/styles.css)

## Now that we know the basics, what are some do’s and don’ts?

Something that comes up a lot, is the naming of your variables.

A simple rule that you can keep in mind is:

> **"Don’t name your variable based on its content, but on its purpose."**

For example:

Let’s say you’re creating a variable for the background color of your website.

You might want to call the variable “--light-grey”, because you want the background to be light-grey.

![

You’ll have to remove the “--light-grey” variable and create a new one and also update the variable in the “body” selector.

That’s so much work, work we were looking to avoid using a CSS Variable.

So instead of naming our variable “--light-grey”, let’s name it after its purpose, which is: Being the color of our background.

![CSS Code Block.](/assets/cssvar-7.png "CSS Code Block.")

```css
:root {
  --body-background-color: #eee;
}

body {
  background-color: var(--body-background-color);
}
```

Now, if we want to update the color of our background, we know exactly which variable we need to change and we only need to change it at 1 place.

Saves a ton of time, and a ton of headaches!

## Oh boy, what about Internet Explorer?

Ah, the good old browser compatibility check.

Well, let’s see which browsers do and don’t support CSS Variables:

![Screenshot of MDN, showing the CSS Variables Browser Compatibility.](/assets/cssvar-8.png "Screenshot of MDN, showing the CSS Variables Browser Compatibility.")

Internet Explorer 11 doesn’t and will never support CSS Variables.

If you HAVE to support IE11 and want to use CSS Variables, you’ll have to create fallbacks in case a user is using IE11.

This might look something like this:

![CSS Code Block.](/assets/cssvar-9.png "CSS Code Block.")

```css
:root {
  --body-background-color: #eee;
}
body {
  /* FALLBACK VALUE */
  background-color: #eee;
  /* CSS VARIABLE */
  background-color: var(--body-background-color);
}
```

This looks like it defeats the purpose of CSS Variables, and you’re pretty right to think so!

Thankfully, there is a way to work around this using some JavaScript.

It’s a little more complex, there’s an [awesome article on Readium that goes in-depth on this problem.](https://readium.org/readium-css/docs/CSS07-variables.html#fallback)

## Conclusion - What have we learned?

* We can create our own CSS Variables in the CSS files we’re using.
* We do this by creating a custom property that starts with 2 dashes.
* This property should be named based on its purpose, not on its content.
* Its value can be any valid CSS value.
* We can now use this CSS variable in our CSS file using the “var()” function.

I hope you learned something new today!

Thank you so much for reading. For a little more in-depth knowledge on CSS Variables, definitely check out [the MDN spec for them](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties).

If you like reading about CSS and web-development, you can read about "***[creating your first CSS animation](/blog/your-first-css-animation/)***" or "***[6 Essential JavaScript Tips for the Developer of 2020](/blog/6-essential-javascript-tips-for-the-developer-of-2020/)***".

Thanks! 😄


text:
---
title: About terminology used
description: A detailed description of all terminology used
keywords: Glossary, Terminology
author: einari
---
# Glossary

This describes all the terminology used throughout the project.

| Term                    | Description                                              | Resources |
| ----------------------- | -------------------------------------------------------- | --------- |
| [Command](./command.md) | Represents the users intent in pre-tense. Unlike an event, a command is not a statement of fact; it's only a request, and thus may be refused.                  |           |
| [Event](./events.md)    | Represents what happened as a state change in the system. Since an event represents something in the past, it can be considered a statement of fact and used to take decisions in other parts of the system. |           |
| Immutability            | An immutable object is an object whose state cannot be modified after it is created. Commands and events are immutable.                                                         | https://en.wikipedia.org/wiki/Immutable_object          |
| Convention over configuration | Often in software we have repeated patterns, these can often be defined as an automatic convention instead of us humans repeating them | https://en.wikipedia.org/wiki/Convention_over_configuration |
| [High cohesion](./high_cohesion.md) |                                                          |           |
| Lose coupling           |                                                          |           |
| [Inversion of Control](./inversion_of_control.md)  |                                                          |           |

repository: karolikl/cbs

gha_language: C#

gha_license_id: NOASSERTION

repo_name: karolikl/cbs


text:
(100 XP) Gilded rose - Check your knowledge of conditions, loops, properties,...
# Gilded Rose Requirements Specification

![Gilded Rose](https://miro.medium.com/max/800/1*NoIcn06ksMOa-Ydv1UvYEw.jpeg)

Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a
prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods.
Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. We
would like to have a system in place that updates our inventory for us.
Your task is to implement all the features to our system so that we can begin selling a new category of items.
First an introduction to the system:

	- All items have a SellIn value which denotes the number of days we have to sell the item
	- All items have a Quality value which denotes how valuable the item is
	- At the end of each day our system lowers both values for every item

Pretty simple, right? Well this is where it gets interesting:

	- Once the sell by date has passed, Quality degrades twice as fast
	- The Quality of an item is never negative
	- "Aged Brie" actually increases in Quality the older it gets
	- The Quality of an item is never more than 50
	- "Sulfuras", being a legendary item, never has to be sold or decreases in Quality
	- "Backstage passes", like aged brie, increases in Quality as its SellIn value approaches; Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but Quality drops to 0 after the concert

We have recently signed a supplier of conjured items. This requires an update to our system:

	- "Conjured" items degrade in Quality twice as fast as normal items

Feel free to make any changes to the UpdateQuality method and add any new code as long as everything
still works correctly.

Just for clarification,

    - an item can never have its Quality increase above 50, however
    - "Sulfuras" is a legendary item and as such its Quality is 80 and it never alters.

Implementation of Item class is here:

```csharp
public class Item
{
    public Item(string name)
    {
        Name = name;
    }
    public string Name { get; }
    public int SellIn { get; set; }
    public int Quality { get; set; }
}
```

Here is how items are created and initialized:
```csharp
items = new List<Item>
{
    new Item("+5 Dexterity Vest") {SellIn = 10, Quality = 20},
    new Item("Aged Brie") {SellIn = 2, Quality = 0},
    new Item("Elixir of the Mongoose") {SellIn = 5, Quality = 7},
    new Item("Sulfuras, Hand of Ragnaros") {SellIn = 0, Quality = 80},
    new Item("Backstage passes to a TAFKAL80ETC concert") {SellIn = 15, Quality = 20},
    new Item("Conjured Mana Cake") {SellIn = 3, Quality = 6}
};
```
---

## ToDo

1. Fork this repository to your GitHub account.
2. Open solution file in Visual Studio.
3. Open file `Inventory.cs`.
4. Implement the method `UpdateQuality()` so that all requirements are met.
5. Do not change other existing classes.
6. Run with `CTRL+F5` to test it.
7. If all tests are passed, commit & sync your repository.
8. Send a link to your repository for Lab Master (in #slack) to check it.

repository: martinorion/GildedRose

repo_name: martinorion/GildedRose


text:
# Principal Component Analysis (PCA)

[PCA](https://en.wikipedia.org/wiki/Principal_component_analysis) is used for dimensionality reduction to obtain lower-dimensional representation of the data while preserving as much of the variation as possible.

We will create a function that takes a multi-dimensional JSON array as input and returns principal coordinate axes as JSON.

> You will learn how to pre-load libraries and process the request data using a statistical method on the fly.

You'll need the prerequisites listed [here](https://github.com/analythium/openfaas-rstats-templates/tree/master/examples).

- [Principal Component Analysis (PCA)](#principal-component-analysis-pca)
  - [Create a new function using a template](#create-a-new-function-using-a-template)
  - [Customize the function](#customize-the-function)
  - [Build, push, deploy the function](#build-push-deploy-the-function)
  - [Testing](#testing)

## Create a new function using a template

Create a new function called `r-pca`.

```bash
faas-cli new --lang rstats-base-plumber r-pca
```

## Customize the function

Change the `./r-pca/handler.R` file.
Note: loading libraries is good practice, it makes trouble shooting installation related
issues much easier (i.e. when shared objects are not found doe to not building
the package against specific libraries). Startup messages can also be useful.

```R
library(vegan)
#* PCA
#* @post /
function(req) {
  x <- jsonlite::fromJSON(paste(req$postBody))
  vegan::rda(x)$CA$u
}
```

Edit the `./r-pca/DESCRIPTION` file.

```yaml
Package: OpenFaaStR
Version: 0.0.1
Imports:
  vegan
Remotes:
SystemRequirements:
  libgfortran5
VersionedPackages:
```

Edit the `r-pca.yml` file as required, see [configuration](https://docs.openfaas.com/reference/yaml/) options.

## Build, push, deploy the function

`faas-cli up` is a [shorthand](https://docs.openfaas.com/cli/templates/)
for automating `faas-cli build`, `faas-cli push`, and `faas-cli deploy`.

```bash
faas-cli up -f r-pca.yml
```

## Testing

Test the Docker image locally after `docker run -p 5000:8080 $OPENFAAS_PREFIX/r-pca`:

```bash
curl http://localhost:5000/ -H \
  "Content-Type: application/json" -d \
  '[[-1,3,16],[10,-10,9],[-5,10,-14],[14,3,-12]]'
```

Test the deployed instance:

```bash
curl $OPENFAAS_URL/function/r-pca -H \
  "Content-Type: application/json" -d \
  '[[-1,3,16],[10,-10,9],[-5,10,-14],[14,3,-12]]'
```

The output should be:

```bash
[[0.5099,0.5251,-0.4629],[0.479,-0.4319,0.5779],
[-0.598,0.4699,0.4143],[-0.391,-0.563,-0.5293]]
```

repository: analythium/openfaas-rstats-examples

repo_name: analythium/openfaas-rstats-examples


text:
# UNION ALL/UNION \[DISTINCT\] {#concept_m5k_pkb_wdb .concept}

The UNION operator is used to merge the result set of two or more SELECT statements.

**The syntax format is as follows**:

```
select_statement UNION ALL select_statement;
select_statement UNION [DISTINCT] select_statement;
```

-   UNION ALL: Combines two or multiple data sets returned by a SELECT operation into one data set. If the result contains duplicated rows, all rows that meet the conditions are returned, and deduplication of duplicated rows is not applied.
-   UNION \[DISTINCT\]: In this statement, DISTINCT can be ignored.  It combines two or multiple data sets returned by a SELECT operation into one data set. If the result contains duplicated rows, deduplication is applied.

Following is an example of the UNION ALL operation:

```
Select * From sale_detail where region = 'Hangzhou'
        union all
select * from sale_detail where region = 'shanghai';
```

Following is an example of the UNION operation:

```
SELECT * FROM src1 UNION SELECT * FROM src2;
--The execution effect is equivalent to
SELECT DISTINCT * FROM (SELECT * FROM src1 UNION ALL SELECT * FROM src2) t;
```

**Note:**

-   The number and types of queried columns corresponding to the UNION ALL/UNION operation must be consistent.
-   Generally, MaxCompute allows UNION ALL/UNION operations performed on a maximum of 256 tables. A syntax error is returned if the number of tables exceeds this limit.

The meaning of LIMIT following UNION:

If UNION is followed by CLUSTER BY, DISTRIBUTE BY, SORT BY, ORDER BY, or a LIMIT clause, the clause has an effect on all the preceding UNION results rather than the last SELECT statement of UNION. Currently, MaxCompute adopts this action in `set  odps.sql.type.system.odps2=true;`.

**For example**:

```
set odps.sql.type.system.odps2=true;
SELECT explode(array(3, 1)) AS (a) UNION ALL SELECT explode(array(0, 4, 2)) AS (a) ORDER BY a LIMIT 3;
```

The returned result is as follows:

```

| a |

| 0 |
| 1 |
| 2 |

```

repository: Hetystars/odps

path: /intl.en-US/User Guide/SQL/Select Operation/UNION ALL__UNION [DISTINCT].md

filename: UNION ALL__UNION [DISTINCT].md

repo_name: Hetystars/odps