text:
---
services: active-directory
platforms: dotnet, netcore, osx, linux
author: vibronet
---

# Invoking an API protected by Azure AD from a text-only device

This sample demonstrates how to leverage ADAL .NET to authenticate user calls to a web API (in this case, the directory Graph) from apps that do not have the capability of offering an interactive authentication experience.
The sample uses the OAuth2 device profile flow similar to the one described [here](https://developers.google.com/identity/protocols/OAuth2ForDevices?hl=en). The app is build entirely on .NET Core, hence it can be ran as-is on Windows (including Nano Server), OSX and Linux machines. To emulate a device not capable of showing UX, the sample is packaged as a console application.
The application signs users in with Azure Active Directory (Azure AD), using the Active Directory Authentication Library (ADAL) to obtain a JWT access token through the OAuth 2.0 protocol.  The access token is sent to Azure AD's Graph API to obtain information about other users in their organization.

> Looking for previous versions of this code sample? Check out the tags on the [releases](../../releases) GitHub page.

### About The Sample
If you would like to get started immediately, skip this section and jump to *How To Run The Sample*.

This sample solution is a command line utility that can be used for looking up basic information for users in Azure AD tenants. The project targets .NET Core, hence it can run wherever DNX can run: it has been tested on Windows, OSX and Ubuntu Linux.

The application obtains tokens through a two steps process especially designed for devices and operating systems that cannot display any UX. The idea is that whenever a user authentication is required, the command line app asks the user to use another device (such as an internet-connected smartphone) to navigate to http://aka.ms/devicelogin, where the user will be prompted to enter the code so obtained. That done, the web page will lead the user through a normal authentication experience, including consent prompts and multi factor authentication if necessary. Upon successful authentication, the command line app will receive the required tokens through a back channel and will use it to perform the web API calls it needs.

The code for handling the token acquisition process is extremely simple, as it boils down to one call for obtaining the code to display to the user (via `AcquireDeviceCodeAsync`) and one call to poll the service to retrieve the tokens when available (via `AcquireTokenByDeviceCodeAsync`). You can find both calls in the sample in the static method `GetTokenViaCode`, from the app root class `Program` in program.cs.

## How To Run The Sample

To run this sample you will need:
- An Internet connection
- A Windows machine (necessary if you want to run the app on Windows)
- An OS X machine (necessary if you want to run the app on OSX)
- A Linux machine (necessary if you want to run the app on OSX)
- Visual Studio 2015 (recommended) or DNX command line tools
- An Azure Active Directory (Azure AD) tenant. For more information on how to get an Azure AD tenant, please see [How to get an Azure AD tenant](https://azure.microsoft.com/en-us/documentation/articles/active-directory-howto-tenant/)
- A user account in your Azure AD tenant. This sample will not work with a Microsoft account, so if you signed in to the Azure portal with a Microsoft account and have never created a user account in your directory before, you need to do that now.

### Step 1: Setup .NET core

The ASP.NET documentation pages provide step by step instructions for installing .NET Core (the .NET Execution Environment) for your platform of choice.
#### Windows
If you are targeting Windows, see [this document](https://docs.asp.net/en/latest/getting-started/installing-on-windows.html).
(this readme assumes you will follow the instructions for installing ASP.NET 5 with Visual Studio, but you can also go for the standalone option).
#### Mac OS X
If you are targeting Mac OS X, please follow the instructions [here](https://docs.asp.net/en/latest/getting-started/installing-on-mac.html).
#### Linux
If you are targeting Linux, please follow the instructions [here](https://docs.asp.net/en/latest/getting-started/installing-on-linux.html). This sample has been tested on Ubuntu

### Step 2: Clone or download this repository

Once you have completed the DNX setup, from your shell or command line run:

git clone https://github.com/Azure-Samples/active-directory-dotnet-deviceprofile.git

or download and exact the repository .zip file.

### Step 3: Run the sample

Starting up the sample requires slightly different steps on different platforms, but once it runs it presents the exact same surface across all OSes.

#### Starting up the sample on Windows
Open the solution in Visual Studio, restore the NuGet packages, select the project and start it in the debugger.

#### Starting up the sample on Mac OS X & Linux
Open a terminal and navigate to the project folder (DirSearcherClient).
Restore the packages with the following command:
    dnu restore
Launch the app by entering the following command:
    dnx run

#### Operating the sample

As soon as you start the sample, you will be presented with the following prompt.

>  Enter command (search | clear | printcache | exit | help) >

To see the device code authentication experience in action, enter a command for searching a user in one of your tenants. In my case, I want to search a user with alias `mario` in my tenant `developertenant.onmicrosoft.com`. Hence, the command I'll enter will be:

> search mario developertenant.onmicrosoft.com

The app will respond with the following prompt.

> You need to sign in.
> Message: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code B7D3SVXHV to authenticate. If you're signing in as an Azure AD application, use the --username and --password parameters.

Open a browser on any device (common choices are the computer on which you are running the sample, or even your smartphone) and navigate to [https://aka.ms/devicelogin](https://aka.ms/devicelogin). Once there, type in the code provided by the app (in this sample, I am typing `B7D3SVXHV`) and hit enter.
The web page will proceed to prompt you for authentication: please authenticate as a user (native or guest) in the tenant that you specified in the search command. Note that, thanks t the fact that you are using an external browser or a different, browser capable device, you can authenticate without restrictions: for example, if your tenant requires you to authenticate using MFA, you are able to do so. That would not have been possible if you would have had to drive the authentication operations exclusively in the console
Once you successfully authenticate, go back to the console app. You'll see that the app has now access to the token it needs to query the Directory Graph API. In my case, a mario does exist in my tenant: hence I'll receive the following result.

> Users found.
> displayName: Mario Rossi
> givenName: Mario
> surname: Rossi
> userPrincipalName<EMAIL_ADDRESS>> telephoneNumbe: Not Listed.
> Enter command (search | clear | printcache | exit | help) >
> >

As a next step, you can search for other users. If you search for users in the same tenant, you'll be able to perform the query without extra prompts. If you indicate a new tenant, you will be prompted again. Note that, if your authenticated user is provisioned in the new tenant and your sample app already received consent in that tenant, you'll be able to get tokens for the new tenant without extra prompts as well.

### Optional: configure the sample as an app in your directory tenant

The instructions so far leveraged the Azure AD entry for the app in our test tenant: given that the app is multitenant, anybody can run the sample against that app entry.
Below you'll find instructions to provision the sample in your own tenant, so that you can exercise complete control on the app settings and behavior.

#### Register the app in your tenant

1. Sign in to the [Azure portal](https://portal.azure.com).
2. On the top bar, click on your account and under the **Directory** list, choose the Active Directory tenant where you wish to register your application.
3. Click on **More Services** in the left hand nav, and choose **Azure Active Directory**.
4. Click on **App registrations** and choose **Add**.
5. Enter a friendly name for the application, for example 'DirSearcherClient' and select 'Native' as the Application Type. Enter a Redirect Uri value of your choosing and of the form `http://MyDirSearcherApp`. However note that for the flow in this sample, it will not be used. Click on **Create** to create the application.
6. While still in the Azure portal, choose your application, click on **Settings** and choose **Properties**.
7. Find the Application ID value and copy it to the clipboard.
8. Configure Permissions for your application - in the Settings menu, choose the 'Required permissions' section, click on **Add**, then **Select an API**, and select 'Microsoft Graph' (this is the Graph API). Then, click on  **Select Permissions** and select 'Sign in and read user profile' and 'Read directory data'.

#### Update the sample code to point to the app entry in your tenant

1.Open the solution in Visual Studio 2015.
2.Open the Program.cs file in the DirSearcherClient project.
3.Find the clientId member variable and replace its value with the Client Id you copied from the Azure portal.


text:
# Python Security Tools
Simple python project demonstrating some linting and static analysis

[![Build Status](https://travis-ci.org/deploymentking/pythonsecuritytools.svg?branch=master)](https://travis-ci.org/deploymentking/pythonsecuritytools)

# References
[Top Python Tools for Developing Secure, Quality Code](https://levelup.gitconnected.com/top-python-tools-for-developing-secure-quality-code-4b3f5ec1e2de)

license: MIT

repository: deploymentking/pythonsecuritytools

branch_name: refs/heads/master

extension: md

gha_language: Makefile

gha_license_id: MIT

license_type: permissive

repo_name: deploymentking/pythonsecuritytools


text:
# Welcome to Applicaster Developer's Center

[Applicaster](https://www.applicaster.com) is one of the world’s leading cloud platforms for app developers in the media space, offering fast time-to-market and a rich array of features on a variety of platforms. Using Applicaster’s SaaS cloud platform, broadcasters and content owners can develop and launch apps for an OTT service, or integrate selected modules and functionalities such as engagement and interactivity into third-party apps.

Our app management and development platform is called [Zapp](https://www.applicaster.com/platform).

Zapp enables users to configure and build media apps with **remote configuration** (assets, styles, fonts and localized strings), **layout** (dynamically composed in Zapp App Builder), and **client-side plugins**.

This portal will guide you in the process of creating new products that can integrate into the Zapp platform to further expand your mobile and connected tv apps.

Most of the capabilities are added through **plugins**.
Each one of those plugins is a bundle of code on one or more platforms that expands the capabilities of your apps.

You can find guides here to further expand your products and to build, maintain, debug, and integrate capabilities into existing and new apps.

## Zapp Plugins

Zapp Plugins provide the main way to expand the capabilities of an app by integrating new features into an existing or new app.
Zapp Plugins enables adding native / react native features and integrations.

This website contains the documentation of both the previous-generation plugins, based on native technologies only, to QuickBrick based plugins that can use either native or JavaScript and ReactNative.
The previous generation plugins should only be used in case they target a specific application that cannot be converted to QuickBrick. In genral plugin development and maintenance is much easier with QuickBrick.

In order to learn more about what is a Zapp Plugin and how to develop one, start from [**QuickBrick Introduction**](/quick-brick/intro.md)

For the previous-generation plugins please start from [**Getting Started with Zapp Plugins [previous-generation]**](/getting-started/zapp-plugins.md).

## Contact us & Help-desk

For any question or request, you are welcome to contact us by [email](mailto:support@applicaster.com).

gha_language: HTML


text:
# indent_class_on_colon

Whether to indent based on a class colon instead of the stuff after the colon. Requires `indent_class_colon=true`.

Possible values are _true_ or _false_, default _false_.

There is almost no difference from [indent_constr_colon](indent_constr_colon.md).

#Examples

Both "true" and "false" examples change line with "Round", but there is a small difference.

## true
Config is
```
indent_class_colon = true
indent_class_on_colon = true
```

Code before:
```
class Barrel : Wooden,
	Round {
public:

Barrel();
virtual ~Barrel();

int getWidth() const;

protected:
int width;

};
```
Code after:
```
class Barrel : Wooden,
	     Round {
public:

Barrel();
virtual ~Barrel();

int getWidth() const;

protected:
int width;

};
```

## false

Code before:
```
class Barrel : Wooden,
	Round {
public:

Barrel();
virtual ~Barrel();

int getWidth() const;

protected:
int width;

};
```
Code after:
```
class Barrel : Wooden,
	       Round {
public:

Barrel();
virtual ~Barrel();

int getWidth() const;

protected:
int width;

};
```

#See also
* [indent_class](indent_class.md): Whether the '`class`' body is indented.
* [indent_class_colon](indent_class_colon.md): Whether to indent the stuff after a leading base class colon.
* [indent_constr_colon](indent_constr_colon.md): Whether to indent the stuff after a leading class initializer colon.

license: Unlicense

repository: beardog-ukr/uncrustify-config-examples

repo_name: beardog-ukr/uncrustify-config-examples


text:
## Manifest

This is our manifest for all modules developed in this project.

### Semantic Versioning

* All wcm.io modules are released following the [Semantic versioning](https://www.osgi.org/wp-content/uploads/SemanticVersioning.pdf) rules.
* This applies to both package versions and bundle versions.
* We use the same even-odd Versioning strategy as the Apache Sling project (releases always use a even version number for the third digit).

### Support multi tenancy and configuration

* No configuration is just "global", but can be applied on any configuration level

### Minimal configuration and sensible defaults

* All features should usable "out-of-the-box" without the need of a lot of initial configuration and setup procedures
* Sensible defaults are applied for all configuration options
* Optionally relevant features can be configured and extended

### Good API Design

* Good API design leveraging best practices e.g. How To Design A Good API and Why it Matters (Joshua Bloch), Effective Java 2nd Edition (Joshua Bloch), Clean Code (Robert Martin)
* Export only APIs and SPIs in OSGi, not the implementation
* Enforce separation of concerns

### Internationalization

* Every user-visible part has to use i18n for translations (author and publish environment)
* By default we ship with English and German translations

### Testability

* Design and implement everything for good testability - unit tests, integration tests, acceptance tests

### AEM Product Dependencies

* Targeted at AEM 6 and up
* Targeted primary at the Touch UI, only basic support for Classic UI

### AEM Update-Safeness

* No overlays!
* Do not come into way when upgrading AEM versions or deploying service packs
* Test early with new AEM major versions

repository: wcm-io/wcm-io-tooling

branch_name: refs/heads/develop

repo_name: wcm-io/wcm-io-tooling


text:
# humongous_adventure
Humongous Adventure is a console based conversational adventure written in node

# database
Database is based in MongoDB, and its name is adventure

# Instalation
To grab all necessary modules
```bash
npm install
```

And then just run:
```bash
cd src
node app.js
```

license: ISC


text:
---
layout: post
title: "Multi-Context Term Embeddings: the Use Case of Corpus-based Term Set Expansion"
date: 2019-04-04 11:45:52
categories: arXiv_CL
tags: arXiv_CL Embedding
author: Jonathan Mamou, Oren Pereg, Moshe Wasserblat, Ido Dagan
mathjax: true
---

* content
{:toc}

##### Abstract
In this paper, we present a novel algorithm that combines multi-context term embeddings using a neural classifier and we test this approach on the use case of corpus-based term set expansion. In addition, we present a novel and unique dataset for intrinsic evaluation of corpus-based term set expansion algorithms. We show that, over this dataset, our algorithm provides up to 5 mean average precision points over the best baseline.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1904.02496](http://arxiv.org/abs/1904.02496)

##### PDF
[http://arxiv.org/pdf/1904.02496](http://arxiv.org/pdf/1904.02496)


text:
# hd5

Get only http server based on solo5 unikernel base.

**Experiment only!**

## Installation

```bash
# Dependencies
sudo apt-get update
sudo apt-get install -y gcc build-essential git qemu-kvm libvirt-bin bridge-utils

# Build
./build.sh

# Example network config
ip tuntap add tap100 mode tap
ip addr add <IP_ADDRESS>/24 dev tap100
ip link set dev tap100 up

# Execution
./run.sh
```

There is an additional [script](https://github.com/tz70s/hd5/blob/master/tools/iptables.sh) to port-forward into vm instance.

## License
Copyright Tzu-Chiao Yeh 2018, Licensed under MIT.


text:
1468. Calculate Salaries

Medium

SQL Schema<svg viewBox="0 0 24 24" width="1em" height="1em" class="icon__3Su4"><path fill-rule="evenodd" d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg>

Table Salaries:

+---------------+---------+
| Column Name   | Type    |
+---------------+---------+
| company_id    | int     |
| employee_id   | int     |
| employee_name | varchar |
| salary        | int     |
+---------------+---------+
(company_id, employee_id) is the primary key for this table.
This table contains the company id, the id, the name and the salary for an employee.

Write an SQL query to find the salaries of the employees after applying taxes.

The tax rate is calculated for each company based on the following criteria:

0% If the max salary of any employee in the company is less than 1000$.

24% If the max salary of any employee in the company is in the range [1000, 10000] inclusive.

49% If the max salary of any employee in the company is greater than 10000$.

Return the result table in any order. Round the salary to the nearest integer.

The query result format is in the following example:

Salaries table:
+------------+-------------+---------------+--------+
| company_id | employee_id | employee_name | salary |
+------------+-------------+---------------+--------+
| 1          | 1           | Tony          | 2000   |
| 1          | 2           | Pronub        | 21300  |
| 1          | 3           | Tyrrox        | 10800  |
| 2          | 1           | Pam           | 300    |
| 2          | 7           | Bassem        | 450    |
| 2          | 9           | Hermione      | 700    |
| 3          | 7           | Bocaben       | 100    |
| 3          | 2           | Ognjen        | 2200   |
| 3          | 13          | Nyancat       | 3300   |
| 3          | 15          | Morninngcat   | 7777   |
+------------+-------------+---------------+--------+

Result table:
+------------+-------------+---------------+--------+
| company_id | employee_id | employee_name | salary |
+------------+-------------+---------------+--------+
| 1          | 1           | Tony          | 1020   |
| 1          | 2           | Pronub        | 10863  |
| 1          | 3           | Tyrrox        | 5508   |
| 2          | 1           | Pam           | 300    |
| 2          | 7           | Bassem        | 450    |
| 2          | 9           | Hermione      | 700    |
| 3          | 7           | Bocaben       | 76     |
| 3          | 2           | Ognjen        | 1672   |
| 3          | 13          | Nyancat       | 2508   |
| 3          | 15          | Morninngcat   | 5911   |
+------------+-------------+---------------+--------+
For company 1, Max salary is 21300. Employees in company 1 have taxes = 49%
For company 2, Max salary is 700. Employees in company 2 have taxes = 0%
For company 3, Max salary is 7777. Employees in company 3 have taxes = 24%
The salary after taxes = salary - (taxes percentage / 100) * salary
For example, Salary for Morninngcat (3, 15) after taxes = 7777 - 7777 * (24 / 100) = 7777 - 1866.48 = 5910.52, which is rounded to 5911.

repository: rklarpit/LeetHub

branch_name: refs/heads/main

repo_name: rklarpit/LeetHub


text:
# OpenFOAM Core 2.4.0
This package provides core libraries, binaries and default configuration required
by the OpenFOAM solvers.

## Usage
You only need to require this package and the libraries become available.
In fact, the openfoam.core-2.4.0 package is included in solvers so you shouldn't
need to require this package manually.

Note that configuration files reside inside /openfoam directory so solvers will need
to set WM_PROJECT_DIR=/openfoam environment variable.

repository: mikelangelo-project/capstan-packages

gha_language: Shell

repo_name: mikelangelo-project/capstan-packages


text:
# Command-Line Tools

Racket provides, as part of its standard distribution, a number of
command-line tools that can make racketeering more pleasant.

## 1. Compilation and Configuration: `raco`

The `raco` \(short for “**Ra**cket **co**mmand”\) program provides a
command-line interface to many additional tools for compiling Racket
programs and maintaining a Racket installation.

* `raco make` compiles Racket source to bytecode.

  For example, if you have a program `"take-over-world.rkt"` and you’d
  like to compile it to bytecode, along with all of its dependencies, so
  that it loads more quickly, then run

    `raco make take-over-the-world.rkt`

  The bytecode file is written as `"take-over-the-world_rkt.zo"` in a
  `"compiled"` subdirectory; `".zo"` is the file suffix for a bytecode
  file.

* `raco setup` manages a Racket installation, including manually
  installed packages.

  For example, if you create your own library collection called
  `"take-over"`, and you’d like to build all bytecode and documentation
  for the collection, then run

    `raco setup take-over`

* `raco pkg` manages packages that can be installed through the Racket
  package manager.

  For example, to see the list of installed packages run:

    `raco pkg show`

  To install a new package named `<package-name>` run:

    `raco pkg install <package-name>`

  See \[missing\] for more details about package management.

For more information on `raco`, see \[missing\].

## 2. Interactive evaluation

The Racket REPL provides everything you expect from a modern interactive
environment. For example, it provides an `,enter` command to have a REPL
that runs in the context of a given module, and an `,edit` command to
invoke your editor \(as specified by the `EDITOR` environment variable\)
on the file you entered. A `,drracket` command makes it easy to use your
favorite editor to write code, and still have DrRacket at hand to try
things out.

For more information, see \[missing\].

## 3. Shell completion

Shell auto-completion for `bash` and `zsh` is available in
`"share/pkgs/shell-completion/racket-completion.bash"` and
`"share/pkgs/shell-completion/racket-completion.zsh"`, respectively. To
enable it, just run the appropriate file from your `.bashrc` or your
`.zshrc`.

The `"shell-completion"` collection is only available in the Racket Full
distribution. The completion scripts are also available
[online](https://github.com/racket/shell-completion).

repository: mbutterick/quad

gha_language: Racket

repo_name: mbutterick/quad


text:
# PasswordHashing.NET
Hash passwords (with salting) easily with this library in dotnet core.

```csharp
string hashedPassword = PasswordHasher.Hash("hello123"); //7407630E05834...
PasswordHasher.Validate("hello123", hashedPassword); //true

string hashedPassword2 = PasswordHasher.Hash("hello123"); //1F751907AC51...
PasswordHasher.Validate("hello123", hashedPassword2); //true

bool isSame = hashedPassword == hashedPassword2; //false
```
## Install via NuGet
https://www.nuget.org/packages/PasswordHashing/
```
Install-Package PasswordHashing
```

## Documentation

* It supports 6 different hashing algorithms:
    * MD5, SHA1, SHA256, SHA384, SHA512 and Blake2b
* `PasswordHasher` is the static class that hashes passwords.
    * You can configure the default settings to use one of those supported hashing algorithms and the length of the salt
    * Default hash algorithm is `Blake2b`
    * Default salt length is `16`
* The produced hashed password are string encoded in hexadecimal
* You can also use an instance `PasswordHasherInstance` instead of the static class `PasswordHasher`
    * It works exactly the same like the static class `PasswordHasher`
* You can use all unicode characters
* Validating passwords with different salt size in the configuration is possible
* The produced hashed passwords are always the same length and can be calculated
    * For example, `SHA256` will always produce a byte array of `32` in length
    * And then the byte array will be turned into a string in hexadecimal format
        * Hexadecimal will always turn each byte into a string of `2` in length
    * This means our hashed password will become `64` in length (exclusive salt)
    * So if you configured the salt to be `16` in length, then the final length of hashed password is `80`

### Set default settings on static class
```csharp
PasswordHasher.SetDefaultSettings(HashAlgorithm.SHA384, 20); //Use SHA384 and Salt size of 20
```

### Use instance object to hash passwords
```csharp
//Use Blake2b algorithm with saltsize of 20
var passwordHasher = PasswordHasherInstance.Create(HashAlgorithm.Blake2b, 20);
string hashedPassword = passwordHasher.Hash("hello123"); //AED9BF19B9D5DEB3A...
bool correctPassword = password.Validate("hello123", hashedPassword) //true
```
### You can use all unicode characters
```csharp
PasswordHasher.SetDefaultSettings(HashAlgorithm.Blake2b);
string p1 = "💩😁🙉🥶";
string p2 = "▲↝↯⟳⇨⇶";
string p3 = "七丹亮乪些享";

string h1 = PasswordHasher.Hash(p1);
string h2 = PasswordHasher.Hash(p2);
string h3 = PasswordHasher.Hash(p3);

PasswordHasher.Validate(p1, h1); //true
PasswordHasher.Validate(p2, h2); //true
PasswordHasher.Validate(p3, h3); //true
```

### Validating passwords with different salt size in configuration is possible
```csharp
var passwordHasher1 = PasswordHasherInstance.Create(HashAlgorithm.SHA1, 10);
var passwordHasher2 = PasswordHasherInstance.Create(HashAlgorithm.SHA1, 20);

string hashedPassword = passwordHasher1.Hash("hello123");
passwordHasher2.Validate("hello123", hashedPassword); //true

PasswordHasher.SetDefaultSettings(HashAlgorithm.SHA1, 30); //Test with static class
PasswordHasher.Validate("hello123", hashedPassword); //true
```

### Hashed passwords are always in fixed size
```csharp
PasswordHasher.SetDefaultSettings(HashAlgorithm.Blake2b, 16);
var p1 = PasswordHasher.Hash("u6ClyHyGAj%Oft^j5v6L6PvS45p%j!hEMjR9k");
var p2 = PasswordHasher.Hash("*XXGFG#TA1cA4I1Qa");
var p3 = PasswordHasher.Hash("DNG81T!fY!KJ9YYc0k7ZDjCn6JPUquXx8B&DY1kju87Z2PEIhK3ZIZRgbn*&c!o20El");
var p4 = PasswordHasher.Hash("Xg$k*3PO#mv6%F0HOD890Lhpg5tjds5lNT8Q99lXWMSG9lpH5rg*d");
var p5 = PasswordHasher.Hash("Abc");

//We know the length is 144, because Blake2b will always produce bytearray of 64
//Then we turn the bytearray into a hexidecimal string which becomes 128 in length
//Our salt size is 16, so the final length is 144
Console.WriteLine(p1.Length == 144); //true
Console.WriteLine(p2.Length == 144); //true
Console.WriteLine(p3.Length == 144); //true
Console.WriteLine(p4.Length == 144); //true
Console.WriteLine(p5.Length == 144); //true
Console.WriteLine(PasswordHasher.HashedPasswordSize == 144); //true
```

gha_language: C#


text:
# Contributing

This doc outlines the details of collaborating on this project.

## Installation

* `git clone https://github.com/BBVAEngineering/postcss-selector-scope.git` this repository
* `cd postcss-selector-scope`
* `npm install`

## Eslint

You need to follow our [eslint](https://github.com/BBVAEngineering/javascript/tree/master/eslint-config-bbva) rules.

## Running Tests

* `npm test`

## Committing changes

* `npm run commit`

repository: dimasrakas/postcss-selector-scope

repo_name: dimasrakas/postcss-selector-scope


text:
Indie Studio

How to launch the game :

- On Linux (with a command prompt):
	Create a directory named build (with command `mkdir build`).
	Go in this directory (with the command `cd build`).
	Execute the command `cmake ..`.
	Then execute the command `make` and wait.
	Go back to the previous directory (with the command `cd ..`).
	Finally execute the command `./build/bomberman`.

- On Windows (with a command prompt):
	Create a directory named build (with command `mkdir build`).
	Go in this directory (with the command `cd build`).
	Execute the command `cmake ..`.
	Then execute the command `make` and wait.
	Go back to the previous directory (with the command `cd ..`).
	Finally execute the command `./build/bomberman`.

- On Windows (without command prompt) :
	Go in the directory `bonus` then the directory `mingw32-exe`.
	Double clic on `bomberman.exe`.

How to play :

	You can choose the number of players and the number of AI.
	The number max of players is 4 and the minimum is 2. For example, you can play with 2 players and 2 AI, but can't play with 3 players and 2 AI.

	Commands for each player are defined when you create a new game.
	There are ultimates that you need to charge to use them.
		Sydney : Became invincible and get a boost of movement speed.
		AlphaOne : Throw a chock wave in column or in rows. It destructs everything on its way.
		Lonie : Stun all enemies for a few seconds, then slow them a lot.
		Gunguy : Thorw bombs on feets of his enemies.

	There are bonuses and penalties that can be dropped when you destruct a brick wall.
	- Bonuses :
		Dark green : 1 more bombs.
		Blue : give kick bombs ability.
		Light blue : Wall Pass.
		Red : increase range of bombs by one.
		Yellow : increase speed.
	- Penalties :
		Skull :
			The skull can be given to another player by touching it.
			Effect random among :
				Ultra Speed: Really high speed,
				Ultra Slow: Really low speed,
				Reverse Control: Control reversed,
				No drop: Cannot drop bombs,
				Auto drop: Automaticaly drop bombs

repository: iElden/IndieStudio

repo_name: iElden/IndieStudio


text:
---
layout: post
title: a knockout contacts manager
postclass: codepost
description: |
  A blog post explaining how to use the knockout javascript library to create a
  contacts management app that is backed by local storage.

---

As a follow up to my [previous post][previous] where I rewrote the [spine][]
todo list demo into the knockout style, I decided to take a crack at one of the
[other examples][] that is posted on the spine documentation site. Specifically
the [CRUD Contacts][contacts] example.  I was also able to make a few
enhancements to the example as some of the boundary interactions were not up to
my personal standards of quality.

[previous]: /2011/06/19/a-knockout-todo-list/
[spine]: http://maccman.github.com/spine/
[other examples]: http://maccman.github.com/spine/#h-examples
[contacts]: http://maccman.github.com/spine.contacts/

{% highlight javascript %}
function contact(options) {
  var contact = ko.mapping.fromJS(options.data);

  contact.fullName = ko.dependentObservable(function() {
    var fullName = contact.firstName() + " " + contact.lastName();
    if (fullName === " ") {
      return null;
    } else {
      return fullName;
    }
  }, contact);

  return contact;
}
{% endhighlight %}

To start off with, we define a function for how our contact model will be
created. This is very simple, I use the mapping plugin because like all good
programmers I am lazy. When we come to the newContact method later on we will
see what the actual structure of a contact is. At this point we only need to
augment the structure with one dependentObservable which represents the fullname
of the contact (and if neither the first nor the last name are set, we return
null).

{% highlight javascript %}
var mappingOptions = {
  'contacts': {
    'key': function(item) {
      return ko.utils.unwrapObservable(item.id);
    },
    'create': contact
  }
};

/* initial state */
var defaultData = '{"contacts":[],"editing":false,"filter":"","selectedContactIdx":null,"id":0}';
/* load from local storage if possible */
var jsonData = (window.localStorage && localStorage['contacts']) || defaultData;

window.viewModel = ko.mapping.fromJSON(jsonData, mappingOptions);
{% endhighlight %}

Using the above contact function, and a key mapping that says that the identity
of a contact is determined by its id property, we create the actual view model
object with either the data from the local storage API, or some nice defaults.
The style of this initialisation is primarily due to laziness and simplicity.
The model itself is comprised of a filter string, a selected contact idenfier,
an auto incrementing id, an editing boolean (which represents if we are in the
editing state or not) and an initialy empty list of contacts.

The top level HTML for this demo is a bit longer than I normally like to put in
a single code block, so I will split it and explain each part in turn. Both
parts are wrapped in a div with id "wrapper".

{% highlight html %}

    <input data-bind="value: filter, valueUpdate: 'keyup'" type="search" placeholder="Search" results="0" incremental="true" autofocus>

    <button data-bind="click: newContact">New contact</button>

{% endhighlight %}

The sidebar contains the new contact button, which will call the newContact
function, and the search bar, which mirrors the value of the filter property,
which is simple enough, however it also influences the next part, which is a
rather sophisticated use of the template binding, though way of the foreach
binding: filteredContacts. This template binding also passes along a few helper
functions for managing the state of the selectedContactIdx property (which
should reflect the most recently clicked on contact, influencing which contact
is being edited or viewed).

{% highlight javascript %}
viewModel.newContact = function (event) {
  var blankContact = {
    "firstName": "",
    "lastName":"",
    "email": "",
    "mobile":"",
    "work":"",
    "address":"",
    "notes":"",
    "id": this.id()
  };
  this.contacts.push(contact({data: blankContact}))
  this.id(blankContact.id + 1);
  this.selectedContactIdx(blankContact.id);
  this.editing(true);
};
{% endhighlight %}

The new contact function creates a empty contact object and pushes it to the
contacts array. The auto increment logic of the id property is handled here.
After adding the contact to the list, we want to select the new contact, and
also start editing it.

{% highlight javascript %}
viewModel.filteredContacts = ko.dependentObservable(function () {
  var filter = this.filter();
  if (filter == "") {
    return this.contacts();
  }
  return ko.utils.arrayFilter(this.contacts(), function (item) {
    return ko.utils.arrayFilter(["firstName", "lastName", "email", "mobile", "work", "address", "notes"], function (attr) {
      return ko.utils.unwrapObservable(item[attr]).indexOf(filter) >= 0;
    }).length > 0;
  });
}, viewModel);
{% endhighlight %}

FilteredContacts is a dependent property that is added to the viewModel after
applying the mapping. The filter is pretty simple to understand, only return
contacts that contain the filter string in any of their string fields. The style
of the code is very functional as that is my background.

{% highlight javascript %}
viewModel.selectedContact = ko.dependentObservable(function () {
  return this.contacts()[this.contacts.mappedIndexOf({ id: this.selectedContactIdx() })];
}, viewModel);
{% endhighlight %}

Knowing which contact is currently selected is handled by the selectedContact
dependent property. It uses a unique feature of the mapping plugin that extends
observable arrays to be able to perform lookups of the index of a sub objects
identity key. In this case we perform the lookup based on the id field of
contact objects.

{% highlight javascript %}
viewModel.isSelectedContact = function (idx) {
  return ko.utils.unwrapObservable(idx) === viewModel.selectedContactIdx();
};
viewModel.selectContactIdx = function (idx) {
  return function() {
    viewModel.selectedContactIdx(ko.utils.unwrapObservable(idx));
    viewModel.editing(false);
  }
};
viewModel.selectEditContactIdx = function (idx) {
  return function() {
    viewModel.selectedContactIdx(ko.utils.unwrapObservable(idx));
    viewModel.editing(true);
  }
};
{% endhighlight %}

The next couple of functions are different ways to interact with the
selectedContactIdx property. With isSelectedContact we want to know if an id is
the currently selected id. selectContactIdx sets the selectedContactIdx
property, and also sets the editing context to be false, although sometimes we
do want to enter the editing mode (i.e. we double click on a contact in the
sidebar), so we have that option as well. These callbacks are implemented as
functions that return functions because we want to preserve the id to use based
on which contact is clicked.

{% highlight html %}

{% endhighlight %}

This brings me to the contactsTemplate. While the instantiation of this template
is quite complex because of the amount of behaviour that is associated with it,
the structure itself is very simple. We have an li element that contains some
callbacks (that are passed in via the templateOptions), and a text field which
displays a contacts full name or the string 'No Name'. Other things are when to
apply the particular CSS styles that transform the list item to mean different
things, such as 'this is the currently selected contact', and 'there is no name
associated with this contact'.

{% highlight html %}

Edit contact

Email contact

Save contact

Delete contact

{% endhighlight %}

The second half of the top level HTML represents the working area of the
contacts application. There are two halfs, which represent the two different
states it can be in. Either editing, or not editing. I have also included
additional logic that will hide the working area if there is no selected contact
(this is generally only true of an empty contact list). There are seperate
actions you can perform while in either state. Generally these are to switch
between the two working states, but also there is an email button (that will
attempt to email the contact, which mirrors the functionality found in the spine
example) and a delete button, which is only viewable when editing a contact.

{% highlight javascript %}
viewModel.setEditing = function(v) {
  return function () {
    viewModel.editing(v);
  };
};
{% endhighlight %}

The setEditing callback is really a callback that returns a callback similar to
the selectContact callback used in the sidebar. The reason for doing this is
because click handlers are evaluated when they are created, and then the result
is evaluated once per click. This function returning a function style works with
this behaviour, and since it is a closure, it will never forget what it should
be putting in the editing observable.

{% highlight javascript %}
viewModel.deleteContact = function (event) {
  var id = viewModel.selectedContactIdx();
  var idx = viewModel.contacts.mappedIndexOf({ id: id });
  viewModel.contacts.mappedRemove({ id: id });
  if (viewModel.contacts().length) {
    if (idx >= viewModel.contacts().length) {
      idx--;
    }
    viewModel.selectedContactIdx(viewModel.contacts()[idx].id());
  } else {
    viewModel.selectedContactIdx(null);
  }
  viewModel.editing(false);
};
{% endhighlight %}

The deleteContact callback is a bit more involved. First I need to find the
currently selected contact, as well as where it is in the list of contacts (the
contact id does not necessarily match up with index within the contacts list).
Then using the mappedRemove convenience function I then attempt to select the
contact that took its place in the contacts list, or the previous one if we are
at the end of the list. Also we should go out of editing mode so miss-clicks
don't delete more than we needed.

{% highlight html %}

{% endhighlight %}

Finally we have the two halfs of the work space that bind to the values found in
the contacts data structure. For brevity in the show template I am using the
default value technique to avoid using if statements. I also found that using if
statements directly in the templates didn't work very reliably, so I instead
used the css binding to apply the hidden class where appropriate.

I am very happy with how this turned out and you can try it for yourself,
and view the [source][].

[source]: https://github.com/barkmadley/barkmadley.github.com/blob/74cc50d6cc0cf175322464e1a53e0ccf766b8126/things/contacts.html


text:
# SlideUnlockView
Slide unlock view.

![image](https://github.com/kaku2015/SlidingView/blob/master/sample/screenshots/show.gif)

# Usage
The sliding contents are wrapped in SlideUnlockView.

```
    <com.kaku.sldv.SlideUnlockView
        android:id="@+id/slide_unlock_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        ...
    </com.kaku.sldv.SlideUnlockView>
```
# Note
Here SlideUnlockView inheritance RelativeLayout.

# License
  ```
   Copyright (c) 2016 Kaku咖枯<EMAIL_ADDRESS>|<EMAIL_ADDRESS>
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
```


text:
# Piprobe management
#### Adapted from server_pi for use to manage the piprobe
####Ansible Playbook for management of a set of network probes based on raspian

First update the *hosts* file to use the IP's of your raspberry pi below the [pis] group,

And edit the **/roles/piprobe/tasks/main.yml** file for your own users needs!

Once you've done that simply cd into the piprobe directory and run:
```bash
ansible-playbook piprobe.yml
```

Once it's complete, you should have a functional and up to date piprobe. You will need to expand your SD card as necessary to take advantage of a larger disk.

To complete the expanding of your SD card etc. Also make sure to change the password for the pi user!

Verify it's me from my keybase.io page: https://keybase.io/buraglio

Coffee always welcome or donate some bitcoin to the guy that I forked this from https://keybase.io/daniels

repository: soehlert/piprobe-mgt

gha_license_id: Unlicense

repo_name: soehlert/piprobe-mgt


text:
### FaceRecognitionService

![alt text](https://img.shields.io/pypi/v/face_recognition_service.svg)
![alt text](https://img.shields.io/travis/kedpter/face_recognition_service.svg)
![alt text](https://readthedocs.org/projects/face_recognition_service/badge/?version=latest)

A face recognition service built upon https://github.com/ageitgey/face_recognition.

### Install

```bash
pip install face_recognition_service
```

### Usage

Run server and open http://<IP_ADDRESS>:8080/ to see an example.

gha_language: Python


text:
Aikido movements often result in an attacker being thrown to the floor or pinned using joint locks. To enable safe and continued practice,
we practice falling and rolling safely. These can seem intimidating at first to the beginner, since we have been conditioned to be afraid of falling. However, if you look at a toddler, there is no fear of falling. Learning the techniques to safely fall and roll will help you overcome
this conditioned fear. In fact, when you start aikido, learning to fall safely is the most valuable and applicable skill you learn. It has
certainly saved me (Abhijit) on the road many times.

Ki exercises can be thought of as elements of aikido movement that have been extracted out and are practiced separately as building blocks of
aikido technique. We usually practice these to a count of five, and use this opportunity to understand how to make these foundational
elements more correct.

Technique practice usually starts with more basic movements from a particular attack to practice fundamentals, and then
progresses to more involved techniques or particular applications. We practice as partners, taking turns attacking (as _uke_) and
defending (as _nage_). We emphasize a relaxed flow that allows the defender to diffuse an attack, while maintaining the basic principles himself. This practice cannot really be described in words, and must be experienced kinesthetically to begin to understand and absorb it.

### A note about the black belt

One of the most common questions we get is, how long does it take to get to black belt? There are many philosophic, and many tongue-in-cheek,
answers to this question. However, we think that it is best not to focus on this question but to start your journey and learn. Even after many
years of training, we (the instructors) are still learning.

The black belt is certainly a milestone in a martial artist's path, but it is a beginning, not the end. To us, it signifies the end of the
beginning part of our training, when one has a reasonable grasp of the fundamentals and is ready to move on to deeper understanding of the art.
Some have compared the black belt to a Bachelor's degree, where you know the basics pretty well but aren't really an expert. We would
strongly recommend that you focus not on the goal of a black belt but learn, absorb and understand the art through regular practice. Ranks and belts will come along the way.

### Uniforms

Aikido is typically practiced using Judo gi. We find that a single weave Judo gi or a heavy Karate gi tends to be the most comfortable. Hakama,
or divided skirts, are worn by black belt practitioners. Belts are colored by rank, from white (beginner) through orange, blue and brown, to
black.

__Beginners :__ When you are first starting aikido practice with us, we encourage you to wear long-sleeved clothes like long-sleeved
t-shirts, sweatshirts without hoods and sweatpants. Jewellery like necklaces or dangling earrings are prohibited, and taking off all jewellery
may be the most comfortable. Stone-less rings like some wedding bands and stud earrings may be acceptable; ask your instructor what he or she
would allow on the mat. Please ensure that  your clothing is clean and your nails are trimmed and filed. Cover any cuts you may have with band-aids or bandages, and let the instructor know if  you have any active injuries; we can work around those.

### Attitude

Aikido is a martial art. Though our practice is safe and relatively injury-free, the practice does have the potential to cause injury or harm
to the practitioner if he is not careful. It requires attention and concentration to practice safely, absorb and understand. When you get on
the mat, try and leave all other concerns off the mat and give your practice your undivided attention. This is your time, in your laboratory,
to learn and practice this amazing martial art.


text:
# SF Public Art API

###(Day 1 of The Daily(ish) Project Series)

Here's a restful API that enables you to find information on civic artwork around San Francisco. The data comes from SF Open Data [ADD LINK]. We're hosted at [TKTKTK].

###/artworks/:id
This route returns a JSON object containing information about a single piece of art. It includes the work's address, latitude and longitude, title, dimensions, medium, donation or commission credit, and location name (i.e. "SF Airport" or "Ferry Building"). It also contains the ids for the work's artist(s) and neighborhood. See an example below:

```
{"id":50,"address":"1 Telegraph Hill Boulevard, San Francisco, CA 94133, USA",
"neighborhood_id":1,"latitude":37.8023686,"longitude":-122.4058194,
"title":"Home Life","dimensions":"9' X 34'","medium":"Egg tempura","artist_id":29,
"credit":"Commissioned for Coit Tower","created_at":"2015-07-14T21:52:35.971Z",
"updated_at":"2015-07-14T21:52:35.971Z","location_name":null}
```

### /artworks
This route returns a JSON object containing every piece of civic artwork in San Francisco, with complete information about each artwork.

### /neighborhood/:id
This route returns a JSON object of complete details of every artwork within a given neighborhood.

### /neighborhoods
This route returns a JSON object of every SF neighborhood where public art has been commissioned. There are 51 in total. They are returned alphabetically so that users can easily find the neighborhood they're looking for, as well as its corresponding id.

### /artists
This route returns

repository: saragilford/sf-public-art-api

repo_name: saragilford/sf-public-art-api


text:
This is a *very* simplified version of our application to demonstrate the color contrast issues
we are experiencing.

To test, run
```sh
$ yarn install
$ gulp dev
```

Browser will open `localhost:8014`

Firefox on OS X:
![Firefox](http://i.imgur.com/KVbyeOU.png "Firefox OS X")

Firefox on Windows 10:
![Firefox](http://i.imgur.com/eqXPspu.png "Firefox Windows 10")

repository: nickjvm/grommet-color-contrast

repo_name: nickjvm/grommet-color-contrast


text:
---
layout: post
title: "Inspired by the North"
date: 2016-12-02
excerpt: "I was asked to curate a Christmas Gift Book list for Back Roads Bill in North Bay. Take a look at what I put in Santa's sleigh."
tag:
- books
- nature
---

I was asked by [Back Roads Bill](http://www.steerto.com/) for a list of books that would be great gifts for those who live in Northern Ontario. He wanted to share these books during his regular segment on [CBC Morning North](http://www.cbc.ca/news/canada/sudbury/programs/morningnorth) with [Markus Schwabe](http://www.cbc.ca/news/canada/sudbury/morning-north-1.3123307) so I curated a library that have obvious links to our north and its environment but also books for all of us!

<i class="fa fa-microphone" aria-hidden="true"></i> Here's our conversation December 6, 2016 on CBC Morning North: [Books for the Back Roads](http://www.cbc.ca/player/play/825912899683/ ).

## a back roads library

![alone against the north Picture]({{ site.url }}/images/blog/alone against the north.jpg)

## a memoir for the ADVENTURER in your life

[ALONE AGAINST THE NORTH](https://www.chapters.indigo.ca/en-ca/books/alone-against-the-north-an/9780143193975-item.html?ikwsec=Books&ikwidx=0) by [Adam Shoalts](http://adamshoalts.com/about/bio/)

Anyone who was fortunate enough to spend an evening with [Adam Shoalts](http://adamshoalts.com/about/bio/) at [The Canadian Ecology Centre](http://www.canadianecology.ca/)'s inaugural [Earth Day Book Talk](http://www.canadianecology.ca/spring-eventspackages__trashed/earth-day-book-talk/) in April knows that the age of exploration is not over.

You’ve heard the phrase: where there’s a will, there’s a way. Well consider the iron will of Adam. He is an explorer and a trail blazer trained as a cartographer, historian and archeologist. Basically he can do it all!

[ALONE AGAINST THE NORTH](https://www.chapters.indigo.ca/en-ca/books/alone-against-the-north-an/9780143193975-item.html?ikwsec=Books&ikwidx=0) is his determined story of finding the Again River. What Shoalts discovered as he paddled downriver appeared in no satellite imagery or map: a series of waterfalls that could easily have killed him. Just as astonishing was the media reaction when he got back to civilization. He was crowned ["Canada's Indiana Jones"](http://penguinrandomhouse.ca/authors/275487/adam-shoalts) and was feted by the Royal Canadian Geographical Society and congratulated by the governor general. Shoalts had proved that the world is bigger than we think.

He writes a gripping and often poetic classic adventure story of single-minded obsession, physical hardship, and the restless sense of wonder that every explorer has in common. Shoalts's story makes it clear that the world can become known only by getting out of our cars and armchairs, and setting out into the unfamiliar, where every step is different from the one before and something you may never have imagined lies around the next curve in the river.

I hope this true life adventure story inspires you to make your own discoveries in nature.

![beebook Picture]({{ site.url }}/images/blog/beebook.jpg)

## a reference book for the wanna-BEE KEEPER

[THE BEE BOOK](https://www.dk.com/ca/explore/reference/7-outlandish-bee-facts-to-buzz-about/) from [DK Canada](https://www.dk.com/ca/)

I’m buzzing about this lavish, comprehensive, practical & inspirational bee-utiful book that should fly straight into your house and build a hive in your child’s classroom!

This big (8"x10") book that’s richly illustrated with full-color photographs throughout, covers everything you need to know to start your own backyard hive, from setup to harvest. Practical beekeeping techniques are explained with clear step-by-step sequences, photos, and diagrams so you'll be prepared to establish your own colony, deal with diseases, collect a swarm, and much more.

A comprehensive gardening chapter features planting plans to fill container and border gardens, bee "hotel" and habitat projects, and an at-a-glance flower gallery of bees' favorite plants. The Bee Book also shows you how to harvest honey, beeswax, and propolis from the hive and use these ingredients in 38 recipes for home remedies, beauty treatments, and candle-making.

Discover the wonder of bees in nature, in your garden, and in the hive with [The Bee Book](https://www.chapters.indigo.ca/en-ca/books/the-bee-book/9781465443830-item.html), bound in a beautiful gold-foil and texture cover and perfect for gift-giving.

![whatever the weather Picture]({{ site.url }}/images/blog/whatever the weather.jpg)

## for families & educators who want to inject VITAMIN N into their kids!

[WHATEVER THE WEATHER](http://www.shambhala.com/whatever-the-weather.html) by [Annie Reichmann](https://www.amazon.ca/Whatever-Weather-Science-Experiments-Activities/dp/1611802318)

We all experience weather! It is a universal topic that parents and educators can use to help children engage with nature, regardless of where they live. There are 32 outdoor activities that give children ages 4 to 12 ways to explore the real science behind everyday weather phenomena. Through creative, fun, and engaging projects, children will expand their knowledge, be encouraged to ask questions, and engage their curiosity about the world. Integrating kid-friendly art and experimentation with scientific explanations that are easy to understand but still give kids credit for being clever and capable.

Best part of this book is that it gives parents the tools they need to clearly explain the science behind each activity: A perfect tool for the growing movement of parents and educators who are focused on getting children outdoors where they can interact with the natural world

Don't mourn a rainy day; instead, use it as a leaping-off point for outdoor adventures! I love this book because it  encourages creativity, questioning, and a spirit of curiosity--perfect for budding naturalists.

Full of accessible information about weather science and the way things work, this hands-on guide to exploring the natural world will inspire a sense of wonder and adventure--no matter what the day brings.
Let the weather take the lead and never be bored again! Paint in the rain, send kites soaring in the wind, build ice orbs, and become a snowflake scientist--let the wonders of nature inspire your next adventure.

![nationalgeographickids2017 Picture]({{ site.url }}/images/blog/nationalgeographickids2017.jpg)

## for KIDS of all ages who want to know more about stuff.

[NATIONAL GEOGRAPHIC Kids Almanac 2017, Canadian Edition](https://www.amazon.ca/National-Geographic-Kids-Almanac-Canadian/dp/1426324197/ref=sr_1_1?ie=UTF8&qid=1480357646&sr=8-1&keywords=national+geographic+almanac+2017)

The world's best-selling almanac for kids is back. Targeted to ages 8 and up.

This Globe and Mail bestseller is packed with incredible photos, tons of fun facts, crafts, activities, and fascinating articles about animals, science, nature, technology, and more. New features include a special section on animal friends; an updated "Fun and Games" chapter filled with all-new games, jokes, and comics; a new "Dino Myths Busted" feature; all new weird-but-true facts, crafts, and activities; a new special "15 Facts" feature in every chapter; updated reference material, and much more

This[NATIONAL GEOGRAPHIC Kids Almanac 2017, Canadian Edition](https://www.amazon.ca/National-Geographic-Kids-Almanac-Canadian/dp/1426324197/ref=sr_1_1?ie=UTF8&qid=1480357646&sr=8-1&keywords=national+geographic+almanac+2017) has media features for mobile devices, including videos, photo galleries, and interactive games.

AND there’s a HELP WITH SCHOOLWORK feature where Educational experts give learning tips in homework help sections throughout the book.

![maple Picture]({{ site.url }}/images/blog/maple.jpg)

## for the MAPLE SYRUP lover

[MAPLE](http://www.quirkbooks.com/book/maple) by [Katie Webster](https://www.amazon.ca/Maple-Sweet-Savory-Recipes-Featuring/dp/1594748047)

Ever since [Back Roads Bill](http://www.steerto.com/) gave me a big jug of maple syrup I’ve been looking for a variety of ways to use it as I have to confess I don’t like pancakes.

Did you know that maple syrup is paleo, vegan friendly & naturally gluten free so most everyone can enjoy maple syrup and many of the 100 recipes in the book.

Have you eaten breakfast today? If not, try one of these recipes from the book: Maple Cranberry Walnut Granola, Steel-cut Oats Banana Walnut Bowls  or Maple Sweet Potato Coffee Cake.

At lunch dip into Soups, Side Dishes, and Salads like Carrot Ginger Soup with Maple Yogurt, Slow Cooker Chicken Thigh Hot Pot	or Sweet Potato and Peanut Soup.

For dinner the Main Courses include Maple Wheat Pizza Dough, simple Maple Ginger Chicken Thighs or Vermonter Quesadillas with Maple Cream.

And of course there’s Desserts like Maple apple crumb pie, for Christmas some Maple Shortbread Cookies or Maple lemon squares.

PLUS there’s Drinks including Maple Peach Old Fashioned and a  Mapletini!
A jar of maple syrup is a great gift BUT a jar of maple syrup with a beautiful, comprehensive cook book about what to do with it is even better.

![wenjack Picture]({{ site.url }}/images/blog/wenjack.jpg)

## a must read

[WENJACK](http://penguinrandomhouse.ca/books/549816/wenjack#9780735233386) a novella by [Joseph Boyden](http://penguinrandomhouse.ca/authors/149986/joseph-boyden)

Chanie Wenjack died 50 years ago in October 2016: The Ojibwa boy froze by the side of Northern Ontario train tracks after running away from a residential school. Although his death resulted in Canada’s first inquiry into the practice of removing indigenous children from their families, the 12-year-old’s story isn’t common knowledge.

This novella is written by Scotiabank Giller Prize–winning author Joseph Boyden and beautifully illustrated by acclaimed artist Ken Monkman, Boyden feels that this powerful book should be read even in grade school. He doesn’t think grade seven or eights are too young to read the story, but grandparents aren’t too old to read this book.

Boyden “wants us as Canadians to understand the fuller history of our country, to take it upon him or herself to learn beyond what you weren’t taught in school. And the importance of that. It’s not so we feel guilty or bad for what people we never met did, it’s beyond that. It’s how do we come together as a nation and move forward together.”

![mysterious creatures Picture]({{ site.url }}/images/blog/mysterious creatures.jpg)

## for Bills’s stocking:

[MYSTERIOUS CREATURES](http://penguinrandomhouse.ca/books/538299/mysterious-creatures#9781578266388) by [Leighanna Hoyle](http://penguinrandomhouse.ca/authors/2135764/leighanna-hoyle)

This is a Cryptid Coloring Book and Field Reference Guide containing 20+ illustrations of legendary and mythical creatures known as cryptids.

[What’s a CRYPTID](https://en.wikipedia.org/wiki/List_of_cryptids) you ask?! A cryptid is any creature that may or may not exist. Their existence has been reported, but there has not been any proof they are real. For example, the Sasquatch, the Loch Ness Monster, and more. This unique coloring book is both informative and fun. Details on these mysterious creatures are laid out in a field guy sort of way alongside wonderful illustrations of how they might look like.

[Back Roads Bill](http://www.steerto.com/) is a kid at heart so this book is perfect for him but also young children will appreciate the fun of taking a coloring book page and making it their own. A great stocking stuffer as it offers creativity and an outlet for their own imagination during the holidays.

![booktree Picture]({{ site.url }}/images/blog/booktree.jpg)

## books are naturally a great gift

Books are natural a great gift!
No batteries required
One size fits all
& a book is a gift that keeps giving after the story is finished!


text:
# wordCountJP

Japanese language is different to English in the sense that there is no natural separation between words such as spaces, and punctuation signs are less utilized. The fact that a phrase in Japanese can normally include characters in four different alphabets (romaji, hiragana, katakana and kanji) makes word separation even more complicated.

This repository provides an interface to analyze datasets by constructing a frequency tables for the words contained in a column of strings. The [**jProcessing**](https://github.com/kevincobain2000/jProcessing) library is used to tokenize the phrases provided in an input file, and Python [**Pandas**](http://pandas.pydata.org/) in order to construct the frequency table.

## The following libraries are employed:

- [CRF++ v0.58](https://drive.google.com/drive/folders/0B4y35FiV1wh7fngteFhHQUN2Y1B5eUJBNHZUemJYQV9VWlBUb3JlX0xBdWVZTWtSbVBneU0)
- [Mecab](http://taku910.github.io/mecab/)
- [the Ipa dictionary](http://taku910.github.io/mecab/)
- [CaboCha-0.69](https://drive.google.com/drive/folders/0B4y35FiV1wh7cGRCUUJHVTNJRnM)

## Installation:

1. Clone this repository
2. Navigate to the repository directory: `cd wordCountJP`
3. Build the docker image: `docker build -t wordCountJP .`
4. Run the docker container on the port 8080: 'docker run -p 8080:8080 wordCountJP' (setup your port forwarding options if necessary)
5. Open the interface in your browser by navigating to http://localhost:8080/
6. Upload a `.txt` file encoded in Shift-JIS, containing only one column with phrases on each row. Be sure to delete the empty rows!
7. A file containing the frequency of each word will be downloaded automatically when the analysis is finished.

#LICENSE

Copyright (c) 2016, Juan Nelson Martínez Dahbura<EMAIL_ADDRESS>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


text:
---
title: Deploying on GitHub Pages
layout: content-with-menu.pug
---

# Deploying on GitHub Pages

GitHub offers free hosting for static websites through its [GitHub Pages][1] feature. It also has builtin support for Jekyll website. Once [properly configured][2], every time you push your Jekyll website to GitHub, it will be deployed on a `username.github.io/reponame` url.

But GitHub will only build your website (`jekyll build`), it will not run other commands (like `jekyll algolia`), so if you want to update your search results on each push, you'll have to find another way. This can be done using GitHub Actions, or via a Continuous Integration provider like Travis CI.

We recommend using [Netlify][3] to host the whole pipeline, but if you want to stay hosted on GitHub pages, this page will explain how to keep your search records in sync with your deployed website.

## Using GitHub Actions

First enable [GitHub Actions][6] on your account, and then create this new action under for example `.github/workflows/algolia-search.yml`.

```yaml
on:
  push:
    branches:
      - master
      - main

name: algolia-search

jobs:
  algolia-search:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-ruby@v1
        with:
          ruby-version: '2.6'
      - uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      - name: Bundle install
        run: |
          bundle config path vendor/bundle
          bundle install --jobs 4 --retry 3

      - name: Exec jekyll algolia
        run: bundle exec jekyll algolia
        env:
          ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
```

Then create `ALGOLIA_API_KEY` secret in the repository settings > secrets with the Admin API Key.

## Using Travis CI

### Enabling Travis

[Travis CI][4] is an hosted continuous integration service, and it's free for
open-source projects. It can listen to any changes in your GitHub repository and
run a specific command in response.

We will use it to automatically run `jekyll algolia` every time a new push to
your GitHub Pages is done.

Here are the steps to follow to setup your Travis account for your project:

- Go to [travis-ci.org][5] and open an account
- Click on your avatar and "Profile"
- Find your GitHub repository in the list and activate it

_You should also uncheck the "Build pull request updates" in the options.
This will avoid re-indexing your data every time you receive a pull request._

![Travis configuration](./assets/images/travis-config.png)

### Configuring Travis

Now that Travis is enabled, we have to configure it to tell it what to do on
every new push to your repo. This can be done through the Travis UI, but we
recommend doing it through a `.travis.yml` file in your repository. It makes
keeping track of the configuration easier.

```yaml
# .travis.yml
# This file should be at the root of your project
language: ruby
cache: bundler
before_install:
  - gem install bundler
script:
  - bundle exec jekyll algolia
branches:
  only:
    # Change this to gh-pages if you're deploying using the gh-pages branch
    - master
rvm:
  - 2.4
```

This file will be read by Travis and instruct it to fetch all the dependencies
defined in the `Gemfile` through Bundler. It will then run `bundle exec jekyll algolia` which will actually index your data.

You might have to edit the `branches.only` value to either `master` or
`gh-pages`, depending on which branch is configured to be deployed in your
GitHub Pages configuration.

#### Ignoring vendors

Travis bundles all gems in the `vendor` directory on its servers, which Jekyll
will mistakenly read. This will likely make the process fail. To avoid this,
add `vendor` to the `exclude` list in your `_config.yml` file.

```yml
exclude: [vendor]
```

### Adding the API Key

The plugin will need your Admin API key to push data. Because you don't want to
expose this key in your repository, you'll have to add `ALGOLIA_API_KEY` as an
environment variable to Travis. You can do that through the UI, in your Travis
Settings page.

![Travis environment variables](./assets/images/travis-env.png)

### Done

Commit all the changes you made, and then push your repository. Travis will
catch the event and trigger your indexing for you. You can follow the Travis job
execution directly on your Travis dashboard, with a full log.

[1]: https://pages.github.com/
[2]: https://help.github.com/articles/using-jekyll-as-a-static-site-generator-with-github-pages/
[3]: ./netlify.html
[4]: https://travis-ci.org/
[5]: https://travis-ci.org/
[6]: https://github.com/features/actions

repository: algolia/jekyll-algolia

gha_language: Ruby

repo_name: algolia/jekyll-algolia


text:
# lemur
HPDD HSM Agent and Data Movers for Lustre

## Build

We use Docker for building packages, so as long as you have Docker running,
`make rpm` will take care of everything needed to create a clean build
environment and build a set of Lemur RPMs. The results will be stored in
`./output/RPMS`.

For development and testing, it is generally more convenient to use a Linux host
(or virtual machine) with Lustre installed. We recommend RHEL or CentOS 7.x,
Lustre 2.7 or above, and at least Go 1.6.

## Testing Quickstart

The unit tests are run with `make test` and do not require a Lustre environment
to be configured.

The user acceptance test (UAT) automates basic testing with the agent and
datamovers. The harness does not manage Lustre filesystems -- you will need to
create one and mount a client somewhere, and ensue the Coordinator is enabled on
the MDT. The harness must run as root, because the agent must also run as root in
order to fiddle with secure xattrs and do other root-y stuff.

1. `make rpm`
1. Copy built RPMs to Lustre client host and install them
1. `sudo /usr/libexec/lemur-testing/lemur-uat-runner`

Set [uat/README.md](uat/README.md) for more details on running and confgiuring the user acceptance tests.

repository: lihaofd/lemur

repo_name: lihaofd/lemur


text:
# 8. YUM repositories - Solution

The playbook might look as follows:
```yml
---
- name: Deploy mysql server
  hosts: database
  become: true
  tasks:
  - name: Add definition of the repo
    yum_repository:
      enabled: true
      file: mysql
      description: MySQL 5.7 Community Server
      state: present
      baseurl: http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
      name: mysql57-community
      gpgcheck: true
      gpgkey: https://repo.mysql.com/RPM-GPG-KEY-mysql
  - name: Install mysql server
    yum:
      name: mysql-server
      state: present
  - name: Start and enable the service
    service:
      name: mysqld
      state: started
      enabled: true
...
```

To run it execute
```bash
ansible-playbook yum.yml
```


text:
![react-notion](https://user-images.githubusercontent.com/1440854/79684011-6c948280-822e-11ea-9e23-1644903796fb.png)

An (unofficial) React renderer for Notion pages. It is written in TypeScript. Use it for blogs, documentations or personal sites, while we wait for the official API.

This packages does not include an API wrapper. You can find some interesting projects here: [notionapi-agent](https://github.com/dragonman225/notionapi-agent)

## Install

```bash
npm install react-notion
```

## How to use

```js
import { NotionRenderer } from "react-notion";
import "react-notion/src/styles.css";

import "prismjs/themes/prism-tomorrow.css"; // only needed if you use Code Blocks

export default () => (
  <div style={{ maxWidth: 768 }}>
    <NotionRenderer blockMap={blockMap} />
  </div>
);
```

A working example, built with Next.js, can be found inside the `example` directory.

## Currently supported block types:

- [x] Text
- [x] Headings
- [x] Images
- [x] Quotes
- [x] Bulleted Lists
- [x] Numbered Lists
- [x] Links
- [x] Columns
- [x] iFrames
- [x] Videos
- [x] Divider
- [x] Callout
- [x] Image Captions

Missing

- [ ] Checkboxes
- [ ] Toggle Lists

## Sites using react-notion

* [PS Tunnel](https://pstunnel.com/blog)
* [Splitbee](https://splitbee.io/blog)

## Credits

- [Timo Lins](https://timo.sh) – Helped building this package
- [samwightt](https://github.com/samwightt) – Inspiration & API Typings

repository: tacyarg/react-notion

repo_name: tacyarg/react-notion


text:
# Hack Ideas (& general CS project ideas)

- [ ] An iOS App
- [ ] Tag-able Folders (File System)
- [ ] Realtime Ongoing Classes on Campus
- [ ] ~~CLI Todo & Calendar~~
- [ ] Commonly Useful Git Hooks
- [ ] Query-based Python GUI Package
- [ ] Click-able Fast Scheduling
- [ ] ~~Recognize Constellations~~
- [ ] Make a Simple Shell
- [ ] Make a Simple Compiler
- [ ] Make a Simple OS
- [ ] ~~Extend Tagging System here~~
- [ ] Maintain a Collection of Data Structures/Algorithms in (C, Python, Java)
- [x] Work with Google Maps API
- [x] Work with Here.com API
- [ ] Work with Instagram API
- [ ] Work with GitHub API
- [ ] Work with Stack Exchange API
- [ ] Work with D3.js/Vega
- [ ] Realtime Easy Screenshare
- [ ] Insert ASCII Art from Image into Source File
- [ ] (game) navigating maze through sound guides
- [ ] ~~Moodboards and collection management (like https://electronjs.org/apps/collectie)~~
- [ ] ~~Issue and task management (like https://www.gitkraken.com/)~~
- [ ] ~~Collection support clipboard (like https://electronjs.org/apps/1clipboard)~~
- [ ] A markdown editor, or general code editor, or general clean editor
- [ ] ~~Common image processing toolkit with web technology (i.e. Electron, but maybe not)~~
- [ ] ~~Note taking app with web technology (like [Opus](https://electronjs.org/apps/opus) and [Deer](https://electronjs.org/apps/deer))~~
- [ ] Desktop timer app (like https://electronjs.org/apps/tiny-timer)
- [ ] ~~Collection support code snippets (like https://electronjs.org/apps/cacher)~~
- [ ] YouTube video & music desktop app (like https://electronjs.org/apps/youtube-music-desktop-app)
- [ ] Make a platform for doing amazing race for EXCELs
- [ ] Make a multi-tasking platform - integrate everything into one framework application
- [ ] GPS


text:
# Binary relations

```agda
module foundation.binary-relations where
```

<details><summary>Imports</summary>

```agda
open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
open import foundation.fundamental-theorem-of-identity-types
open import foundation.subtypes
open import foundation.univalence
open import foundation.universe-levels

open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.propositions
```

</details>

## Idea

A **binary relation** on a type `A` is a family of types `R x y` depending on
two variables `x y : A`. In the special case where each `R x y` is a
[proposition](foundation-core.propositions.md), we say that the relation is
valued in propositions. Thus, we take a general relation to mean a
_proof-relevant_ relation.

## Definition

### Relations valued in types

```agda
Relation : {l1 : Level} (l : Level) (A : UU l1) → UU (l1 ⊔ lsuc l)
Relation l A = A → A → UU l

total-space-Relation :
  {l1 l : Level} {A : UU l1} → Relation l A → UU (l1 ⊔ l)
total-space-Relation {A = A} R = Σ (A × A) λ (a , a') → R a a'
```

### Relations valued in propositions

```agda
Relation-Prop :
  (l : Level) {l1 : Level} (A : UU l1) → UU ((lsuc l) ⊔ l1)
Relation-Prop l A = A → A → Prop l

type-Relation-Prop :
  {l1 l2 : Level} {A : UU l1} → Relation-Prop l2 A → Relation l2 A
type-Relation-Prop R x y = pr1 (R x y)

is-prop-type-Relation-Prop :
  {l1 l2 : Level} {A : UU l1} (R : Relation-Prop l2 A) →
  (x y : A) → is-prop (type-Relation-Prop R x y)
is-prop-type-Relation-Prop R x y = pr2 (R x y)

total-space-Relation-Prop :
  {l : Level} {l1 : Level} {A : UU l1} → Relation-Prop l A → UU (l ⊔ l1)
total-space-Relation-Prop {A = A} R =
  Σ (A × A) λ (a , a') → type-Relation-Prop R a a'
```

## Specifications of properties of binary relations

```agda
module _
  {l1 l2 : Level} {A : UU l1} (R : Relation l2 A)
  where

  is-reflexive : UU (l1 ⊔ l2)
  is-reflexive = (x : A) → R x x

  is-symmetric : UU (l1 ⊔ l2)
  is-symmetric = (x y : A) → R x y → R y x

  is-transitive : UU (l1 ⊔ l2)
  is-transitive = (x y z : A) → R y z → R x y → R x z

  is-antisymmetric : UU (l1 ⊔ l2)
  is-antisymmetric = (x y : A) → R x y → R y x → x ＝ y

module _
  {l1 l2 : Level} {A : UU l1} (R : Relation-Prop l2 A)
  where

  is-reflexive-Relation-Prop : UU (l1 ⊔ l2)
  is-reflexive-Relation-Prop = is-reflexive (type-Relation-Prop R)

  is-prop-is-reflexive-Relation-Prop : is-prop is-reflexive-Relation-Prop
  is-prop-is-reflexive-Relation-Prop =
    is-prop-Π (λ x → is-prop-type-Relation-Prop R x x)

  is-symmetric-Relation-Prop : UU (l1 ⊔ l2)
  is-symmetric-Relation-Prop = is-symmetric (type-Relation-Prop R)

  is-prop-is-symmetric-Relation-Prop : is-prop is-symmetric-Relation-Prop
  is-prop-is-symmetric-Relation-Prop =
    is-prop-Π
      ( λ x →
        is-prop-Π
          ( λ y → is-prop-function-type (is-prop-type-Relation-Prop R y x)))

  is-transitive-Relation-Prop : UU (l1 ⊔ l2)
  is-transitive-Relation-Prop = is-transitive (type-Relation-Prop R)

  is-prop-is-transitive-Relation-Prop : is-prop is-transitive-Relation-Prop
  is-prop-is-transitive-Relation-Prop =
    is-prop-Π
      ( λ x →
        is-prop-Π
          ( λ y →
            is-prop-Π
              ( λ z →
                is-prop-function-type
                  ( is-prop-function-type (is-prop-type-Relation-Prop R x z)))))

  is-antisymmetric-Relation-Prop : UU (l1 ⊔ l2)
  is-antisymmetric-Relation-Prop = is-antisymmetric (type-Relation-Prop R)
```

## Properties

### Characterization of equality of binary relations

```agda
equiv-Relation :
  {l1 l2 l3 : Level} {A : UU l1} →
  Relation l2 A → Relation l3 A → UU (l1 ⊔ l2 ⊔ l3)
equiv-Relation {A = A} R S = (x y : A) → R x y ≃ S x y

module _
  {l1 l2 : Level} {A : UU l1} (R : Relation l2 A)
  where

  id-equiv-Relation : equiv-Relation R R
  id-equiv-Relation x y = id-equiv

  is-contr-total-equiv-Relation :
    is-contr (Σ (Relation l2 A) (equiv-Relation R))
  is-contr-total-equiv-Relation =
    is-contr-total-Eq-Π
      ( λ x P → (y : A) → R x y ≃ P y)
      ( λ x →
        is-contr-total-Eq-Π
          ( λ y P → R x y ≃ P)
          ( λ y → is-contr-total-equiv (R x y)))

  equiv-eq-Relation : (S : Relation l2 A) → (R ＝ S) → equiv-Relation R S
  equiv-eq-Relation .R refl = id-equiv-Relation

  is-equiv-equiv-eq-Relation :
    (S : Relation l2 A) → is-equiv (equiv-eq-Relation S)
  is-equiv-equiv-eq-Relation =
    fundamental-theorem-id is-contr-total-equiv-Relation equiv-eq-Relation

  extensionality-Relation : (S : Relation l2 A) → (R ＝ S) ≃ equiv-Relation R S
  pr1 (extensionality-Relation S) = equiv-eq-Relation S
  pr2 (extensionality-Relation S) = is-equiv-equiv-eq-Relation S

  eq-equiv-Relation : (S : Relation l2 A) → equiv-Relation R S → (R ＝ S)
  eq-equiv-Relation S = map-inv-equiv (extensionality-Relation S)
```

### Characterization of equality of prop-valued binary relations

```agda
relates-same-elements-Relation-Prop :
  {l1 l2 l3 : Level} {A : UU l1}
  (R : Relation-Prop l2 A) (S : Relation-Prop l3 A) →
  UU (l1 ⊔ l2 ⊔ l3)
relates-same-elements-Relation-Prop {A = A} R S =
  (x : A) → has-same-elements-subtype (R x) (S x)

module _
  {l1 l2 : Level} {A : UU l1} (R : Relation-Prop l2 A)
  where

  refl-relates-same-elements-Relation-Prop :
    relates-same-elements-Relation-Prop R R
  refl-relates-same-elements-Relation-Prop x =
    refl-has-same-elements-subtype (R x)

  is-contr-total-relates-same-elements-Relation-Prop :
    is-contr (Σ (Relation-Prop l2 A) (relates-same-elements-Relation-Prop R))
  is-contr-total-relates-same-elements-Relation-Prop =
    is-contr-total-Eq-Π
      ( λ x P → has-same-elements-subtype (R x) P)
      ( λ x → is-contr-total-has-same-elements-subtype (R x))

  relates-same-elements-eq-Relation-Prop :
    (S : Relation-Prop l2 A) →
    (R ＝ S) → relates-same-elements-Relation-Prop R S
  relates-same-elements-eq-Relation-Prop .R refl =
    refl-relates-same-elements-Relation-Prop

  is-equiv-relates-same-elements-eq-Relation-Prop :
    (S : Relation-Prop l2 A) →
    is-equiv (relates-same-elements-eq-Relation-Prop S)
  is-equiv-relates-same-elements-eq-Relation-Prop =
    fundamental-theorem-id
      is-contr-total-relates-same-elements-Relation-Prop
      relates-same-elements-eq-Relation-Prop

  extensionality-Relation-Prop :
    (S : Relation-Prop l2 A) →
    (R ＝ S) ≃ relates-same-elements-Relation-Prop R S
  pr1 (extensionality-Relation-Prop S) =
    relates-same-elements-eq-Relation-Prop S
  pr2 (extensionality-Relation-Prop S) =
    is-equiv-relates-same-elements-eq-Relation-Prop S

  eq-relates-same-elements-Relation-Prop :
    (S : Relation-Prop l2 A) →
    relates-same-elements-Relation-Prop R S → (R ＝ S)
  eq-relates-same-elements-Relation-Prop S =
    map-inv-equiv (extensionality-Relation-Prop S)
```

## See also

- [Large binary relations](foundation.large-binary-relations.md)

repository: UniMath/agda-unimath

gha_language: Agda

repo_name: UniMath/agda-unimath


text:
# Heroku buildpack: Clojure / Boot / Org-Babel

This is a Heroku buildpack for use with Clojure projects that use Boot
and are written in a literate programming style with Org-Babel.

Based on https://github.com/pandeiro/heroku-buildpack-boot

## Work in progress

This is not working yet. I did experiment with multiple buildpacks via
https://github.com/ddollar/heroku-buildpack-multi and installing emacs via apt
through https://github.com/ddollar/heroku-buildpack-apt.
Emacs got installed, but binary is not found by other buildpacks then:
https://github.com/ddollar/heroku-buildpack-multi/issues/28

An alternative could be to use a prebuilt emacs binary like it's done in
https://github.com/technomancy/heroku-buildpack-emacs


text:
Con 2022 will be held **virtually** on the weekend of November 12-13!

November 12th will be a day of delightful lightning talks by our amazing speakers. We'll also have a comedy set and musical number. It'll be a great time.

November 13th will be a day of fun and educational workshops that will surprise and delight you.

More information, including a schedule, will be announced Soon™.

## How do I get updates?

For updates on !!Con, follow
[@bangbangcon](https://twitter.com/bangbangcon) on Twitter, or sign up
for our mailing list below.  We send about four or five emails per year for important announcements about our venue,
submission deadlines, registration, and that sort of thing.  No spam, we promise, and it's easy to unsubscribe at any
time.

<form action="https://bangbangcon.us3.list-manage.com/subscribe/post?u=37b924b9d7d71dc7aa1a52b4c&id=9f9ec7c469" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="background-color: inherit;" novalidate>

Email:
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder='your email address'>
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">

"Don't fill this in, it's for bots!"
<input type="text" name="b_37b924b9d7d71dc7aa1a52b4c_9f9ec7c469" value="">

</form>

## What's so great about !!Con?

Here's what some of our past speakers and attendees said about us:

> "@bangbangcon managed to pack **more useful info into one day than most other conferences do in 3**. And it was **10x more fun.**"
> -- [@johnwittrock](https://twitter.com/johnwittrock/status/861206986448404481)
>
> "Virtual @bangbangcon's reminding me **how much fun it is to hear people
> talk about what they're passionate about**"
> -- [@trudake](https://twitter.com/trudake/status/1259231865212481537)
>
> "It's refreshing to **learn 30+ new things about programming in a single weekend** at @bangbangcon, even though I've been programming for so long"
> -- [@pixelyunicorn](https://twitter.com/pixelyunicorn/status/861690031370645504)
>
> "@bangbangcon was awesome!  Learned a lot, met very friendly people, and **left inspired**."
> -- [@bxmani](https://twitter.com/bxmani/status/861400448107937792)
>
> "It's only halfway over, but **@bangbangcon is setting the bar for virtual
> events for me**.  [...]"
> -- [@lazerwalker](https://twitter.com/lazerwalker/status/1259238259328237568)

## Who's organizing all this?

The !!Con 2022 organizing team:
[Erty Seidohl](https://twitter.com/ertyseidohl),
[Julia Evans](https://twitter.com/b0rk),
[Em Lazer-Walker](https://twitter.com/lazerwalker),
[Sarah Withee](https://twitter.com/geekygirlsarah),
[Maggie Zhou](https://twitter.com/zmagg),
and [Joshua Wise](https://joshuawise.com/).

If you'd like, you can [send us some mail](mailto:2022-organizers@exclamation.foundation)!

Organizers emeriti: [Alicja Raszkowska](https://twitter.com/mamrotynka), [Leo Franchi](https://twitter.com/lfranchi), [Nabil Hassein](https://twitter.com/NabilHassein),
[Alex Clemmer](https://twitter.com/hausdorff_space),
[Emily Xie](https://twitter.com/emilyxxie), [Danielle Sucher](https://twitter.com/DanielleSucher),
[Kiran Bhattaram](https://twitter.com/kiranb), [Ahmed Abdalla](https://twitter.com/simplyahmaz1ng),
[Lindsey Kuper](http://composition.al/), and [Dev Purandare](https://twitter.com/Dev14e).

Logo design by
[Lea Albaugh](https://twitter.com/doridoidea).

!!Con 2022 is a project of the [Exclamation Foundation](https://exclamation.foundation).

If you'd like, you can [send us some mail](mailto:2022-organizers@exclamation.foundation)!

EXCELLENT!! Sponsors

.

AWESOME! Sponsors

.

.

## Code of Conduct

We have a [code of conduct](conduct.html) that all !!Con participants are required to observe.


text:
## Contributing to this project

*The BBC is not currently inviting contributions to this project, if you wish to raise issues or pull requests there is no guarantee this will be looked at.*

### Raising Issues

Issues should include:
1. What you expected to see
2. What you actually saw
3. What you did to reproduce the issue
4. Device/Browser details

Ideally screenshots would also be helpful.

### Pull Requests

We do not accept direct commits to the code base.

Any code contributions must:

1. Be submitted via Pull Requests.
2. Include unit tests for any code amended.
3. Include summary of what was changed and why in the Pull Request.
4. Pass the Pull Request Build.
5. NOT include version number changes

## Legal

By creating a pull request you:
1. Grant the copyright to the BBC (section 2 of https://www.apache.org/licenses/icla.txt )
2. Are legally allowed to grant the copyright to the BBC (section 4 of https://www.apache.org/licenses/icla.txt )
3. Assert that the contents of the pull request are your own original creation (section 5 of https://www.apache.org/licenses/icla.txt )

On merging of the first pull request from a particular user, the merger of the pull request should assert (probably via comments on the pull request) that the creator of the pull request has accepted the above conditions. On merging subsequent pull requests from the same user, it can be assumed that the user already accepted the above conditions.

repository: bbc/childrens-games-genie

gha_language: JavaScript

repo_name: bbc/childrens-games-genie


text:
# Presentation: <%= title %>

This is a presentation by <%= author %>.

## Setup

When checking out the repository, make sure to install all the needed dependencies:

```bash
npm install
bower install
```

## Work on it

To get start the presentation and to get live reload for each change made, run the following:

```bash
gulp watch
```

repository: kirjs/generator-shower

repo_name: kirjs/generator-shower


text:
# Testing Web components
It's a guide to create testers from webcomponents

## See how it runs?

### Install dependencies
Install dev dependencies to make it work
```
npm i
```

### Run
```
npm test
```

It will run the following unit tests specified in the `runner.html` inside the `test` folder

## How to copy and use in my code?

#### Have package.json
If you don't have one, run `npm init` to create one.

#### Add these packages inside the devDependencies in package.json
```
"devDependencies": {
  "@polymer/iron-test-helpers": "0.0.3",
  "babel-eslint": "^8.2.1",
  "babel-plugin-external-helpers": "^6.22.0",
  "babel-plugin-transform-object-rest-spread": "^6.26.0",
  "babel-plugin-transform-runtime": "^6.23.0",
  "babel-preset-env": "^1.6.1",
  "chai": "^4.1.2",
  "eslint": "^4.16.0",
  "eslint-config-semistandard": "^12.0.0",
  "eslint-config-standard": "^11.0.0-beta.0",
  "eslint-plugin-chai-friendly": "^0.4.1",
  "eslint-plugin-html": "^3.2.2",
  "eslint-plugin-import": "^2.8.0",
  "eslint-plugin-mocha": "^4.12.1",
  "eslint-plugin-node": "^5.2.1",
  "eslint-plugin-promise": "^3.6.0",
  "eslint-plugin-standard": "^3.0.1",
  "lodash": "^3.10.1",
  "mocha": "^5.0.4",
  "semistandard": "^12.0.1",
  "size-limit": "^0.16.1",
  "wct-browser-legacy": "0.0.1-pre.11",
  "web-component-tester": "^6.5.0"
}
```

These installs the following files that will be needed in linting, sizing, and testing your project.

#### Add these on your scripts in package.json

```
"scripts": {
  "size": "./node_modules/.bin/size-limit",
  "semistandard": "./node_modules/.bin/semistandard",
  "wct": "./node_modules/.bin/wct --npm",
  "wct-prod": "./node_modules/.bin/wct --npm --configFile wct-prod.conf.json",
  "test": "npm run semistandard && npm run size && npm run wct-prod",
  "prepublishOnly": "npm test"
}
```

These allow us to run the test script using `npm test` command or just run specific parts like `npm run wct`.
The scripts are as follows:

- `npm run size` - runs size-limit to check size of element
- `npm run semistandard` - runs linting using semistandard config
- `npm run wct` - runs testing with persistence flag set to true so that you can manually refresh the browser testing machine whenever you update your code
- `npm run wct-prod` - runs testing that opens chrome and firefox
- `npm run prepublishOnly` - runs test before publishing to npm

#### Add these two other attribtues in your package.json

```
"size-limit": [
  {
    "path": "your-component.js",
    "limit": "3KB"
  }
],
"semistandard": {
  "parser": "babel-eslint",
  "ignore": [
    "test/*",
    "dist/*",
    "polyfills/*"
  ],
  "env": [
    "mocha"
  ]
}
```

This allows you to test the size of your element (to be under a specified size) and the linting rules using semistandard

#### Copy the following files in this project to yours
- `.eslintignore` - ignore files or folders when testing lint
- `.eslintrc.js` - for linting rules when using and IDE like VSCode
- `.travis.yml` - allows you to run the test on Travis
- `jsconfig.json` - for VSCode rules on types
- `wct-prod.conf.json` - testing configuration that opens firefox and chrome for testing
- `wct-conf.json` - testing configuration that runs testing with persistence flag set to true so that you can manually refresh the browser testing machine whenever you update your code
- `test/runner.html` - this is where your test starts, see next part

#### Examine Runner.html
```html
<html>
  <head>
    <meta charset="utf-8">
    <script>
      WCT = {
        mochaOptions: {
          timeout: 60000
        }
      }
    </script>
    <script src="../../../node_modules/wct-browser-legacy/browser.js"></script>
  </head>
  <body>
    <script>
      'use script';
      let suites = [
        './unit/test-component.test.html'
      ];
      WCT.loadSuites(suites);
    </script>
  </body>
</html>
```

The changeable part is the `suites`. Add the test config files that you want to add. My recommended pattern is inside the unit folder.

#### Once done, install dependencies and run
```
npm i
npm test
```

repository: tjmonsi/testing-webcomponents

repo_name: tjmonsi/testing-webcomponents