text:
__A Web scraper for [InfoQ](http://infoq.com).__

InfoQ hosts a lot of great presentations, unfortunately it is not possible to watch them outside of the browser
or if you do not have Flash installed. The video cannot simply be downloaded because the audio stream and the
slide stream are not in the same media. By downloading the video you only get the audio track and a video of
the presenter but you don't get the slide.

`infoqscraper` allows you to:
* list and search for presentations
* download the resources (video, audio track, slides)
* build a movie including the slides and the audio track from the resources

Only Python 2.6 or later is currently supported since PIL is not yet available for Python 3.

# Install

Infoqscraper releases can be installed using `pip` and PyPI.

        pip install [--user] infoqscraper

The `infoqscraper` executable should be available in your path.

If the command cannot be found, you have to add the installation directory
(usually `$HOME/.local/bin` with `--user`) to the `PATH` environment variable
or specify the full path of the command.

# CLI usage

Overview:

        infoqscraper [global options] module [module options] command [command options]

## presentation module

This module allows to list, search and download presentation from the website

### presentation list

The following command displays the 20 latest presentations.

        infoqscraper presentation list -n 20

You can also search for a specific topic:

        infoqscraper presentation list -p agile

By default at most 10 hits are returned and only the latest 80 entries are fetched from the website.
The `-n` and `-m` options can be used to display more hits or to fetch more entries.
Please be a good web citizen and avoid to set `-m` to a very large value. Using a search engine
or the website could be a better idea.

### presentation download

The following command automatically downloads the presentation and creates a movie file
named `Distributed-Systems-with-ZeroMQ-and-gevent.avi`  in the current directory.

        infoqscraper presentation download Distributed-Systems-with-ZeroMQ-and-gevent

## cache module

This module allows to manage the disk cache.

Disk cache is disabled by default and is only useful if you plan to hack on `infoqscraper`. To avoid fetching
the same resource several time from the server, all fetched resources can be put in cache. This is done by setting
the `-c` global option. The resources are stored in the `XDG_CACHE_DIR/infoqscraper` directory.

The following command show the size of the cache:

        infoqscraper cache size

And the clear command allows to wipe the cache

        infoqscraper cache clear

# Dependencies

`infoqscraper` relies on theses 3rd party tools:

1. ffmpeg
2. swftools
3. rtmpdump

If theses tools are not in the PATH, their location can be specified.
Use `infoqscraper presentation download -h` to learn more.

The following python packages are required:

1. BeautifulSoup4
3. PIL

For normal users, they are automatically installed by `pip`. However, if you plan to hack `infoqscraper` you will
most likely install them using the `requirements.txt` file:

        pip install -r requirements.txt

# Compatibility

`infoqscraper` is known to work on:

  - Arch Linux
  - Fedora 17, 18, 19
  - Ubuntu 12.04.2 LTS

`ffmpeg` versions from 0.7 to 2+ are supported. Users of Debian Squeeze or
Ubuntu 10.04 LTS must use a newer `ffmpeg` release than the one provided by
their distro. `ffmpeg` 0.5 is too old to be supported (help wanted).

## Arch linux

Packages `python2`, `swftools`, `rtmpdump` and `ffmpeg` must be installed.

## Ubuntu 12.04 LTS

Packages `ffmpeg`, `rtmpdump` and `libavcodec-extra-53` must be installed.

`swftools` is not available and must installed manually.

## Ubuntu 12.10 and later

Packages `ffmpeg`, `rtmpdump`, `swftools` and `libavcodec-extra-53` must be installed.

## Fedora

Packages `ffmpeg`, `swftools` and `rtmpdump` from rpmfusion must be installed.

`rtmpdump` from Fedora 19 is [currently broken](https://bugzilla.rpmfusion.org/show_bug.cgi?id=2969).
You have to download rtmpdump [source code](http://rtmpdump.mplayerhq.hu/) and compile it.

# Help

Feel free to contact me if you have any question or feature request.

If you find this project useful, any contribution or feedback is welcome. If you are not a developer, improving
the packaging, the documentation or fixing my broken English could be a good start.

repository: KevinGreene/infoqscraper

repo_name: KevinGreene/infoqscraper


text:
# New Tech Web Service
Deploys an ECS Task definition and service to the shared ECS cluster.
The service listens on TCP/9000 by default and integrates with NOMIS API, Alfesco and the New Tech PDF Generator, ElasticSearch and Offender API services.

## IAM
The task runs under 2 IAM roles:

- Execution role = Executes the task, so needs to be able to pull the image, get SSM Parameters for secret env configs
- Task role = This is the role, with any policies, that apply to the running container

The shared ECS cluster is configured with the *ECS_AWSVPC_BLOCK_IMDS=true* config value to prevent tasks from reaching the host level metadata service under the host's own ec2 instance profile.

## Env Configs
New Tech Web specific environment variables are set out in the web_conf variable which is a map.
One or more of the KV pairs can be overridden in the env_configs/{ENVIRONMENT}/sub-projects/new-tech.tfvars file as necessary
Where no override is provided, the default value will be used.

## Secrets
Secrets are stored in SSM Parameter store and pulled into the running containers at runtime via the ECS Secrets task definition config.

license: MIT

branch_name: refs/heads/main

extension: md

gha_language: HCL

gha_license_id: MIT

license_type: permissive


text:
---
title: PeoplePicker Control
author: OGcanviz
description: The PeoplePicker Control is a simple control that allows for selection of one or more users from an organizational AD.
keywords: windows 10, uwp, windows community toolkit, uwp community toolkit, uwp toolkit, PeoplePicker Control
---

# PeoplePicker Control

The [PeoplePicker Control](https://docs.microsoft.com/dotnet/api/microsoft.toolkit.uwp.ui.controls.graph.peoplepicker) is a simple control that allows for selection of one or more users from an organizational AD, see more details [here](https://developer.microsoft.com/en-us/graph/docs/concepts/people_example), it relies on the [MicrosoftGraphService](../services/MicrosoftGraph.md) for authentication.

## Syntax

```xaml
<Page ...
    xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls.Graph"/>

<controls:PeoplePicker x:Name="PeoplePicker1"
    AllowMultiple="True" />
```

## Example Image

![PeoplePicker animation](../resources/images/Graph/PeoplePicker.png)

## Properties

| Property | Type | Description |
| -- | -- | -- |
| RequiredDelegatedPermissions | String[] | Gets required delegated permissions for Graph API access |
| GroupId | String | Search people in this group if specified, otherwise, search the organizational AD |
| AllowMultiple | Boolean | Whether multiple people can be selected |
| SearchResultLimit | Int | Max person returned in the search results |
| PlaceholderText | String | Text to be displayed when no user is selected |
| Selections | ObservableCollection<Person> | The selected person list |

## Sample Code

First of all, initialize the [MicrosoftGraphService](../services/MicrosoftGraph.md) with your [Azure AD v2.0 app](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-app-registration), this should be done globally with the combined and unique [delegate permissions](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-scopes) required by all Graph controls and services used in your app.

```c#
MicrosoftGraphService.Instance.AuthenticationModel = MicrosoftGraphEnums.AuthenticationModel.V2;

MicrosoftGraphService.Instance.Initialize(
    "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    MicrosoftGraphEnums.ServicesToInitialize.UserProfile,
    PeoplePicker.RequiredDelegatedPermissions
);
```

The sign in will be processed by the [AadLogin](AadLogin.md) control, however, you could do sign in with the following alternatively.

```c#
await MicrosoftGraphService.Instance.LoginAsync();
```

[PeoplePicker Sample Page Source](https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/PeoplePicker). You can see this in action in [Windows Community Toolkit Sample App](https://www.microsoft.com/store/apps/9NBLGGH4TLCQ).

## Default Template

[PeoplePicker XAML File](https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PeoplePicker/PeoplePicker.xaml) is the XAML template used in the toolkit for the default styling.

## Requirements

| Device family | Universal, 10.0.15063.0 or higher |
| -- | -- |
| Namespace | Microsoft.Toolkit.Uwp.UI.Controls.Graph |
| NuGet package | [Microsoft.Toolkit.Uwp.UI.Controls.Graph](https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.UI.Controls.Graph/) |

## API

* [PeoplePicker source code](https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PeoplePicker)

repository: XamlBrewer/UWPCommunityToolkit

branch_name: refs/heads/dev

gha_language: C#

gha_license_id: NOASSERTION

repo_name: XamlBrewer/UWPCommunityToolkit


text:
# openshift-silex-application

A Silex skeleton applied to OpenShift structure rules.

[![SensioLabsInsight](https://insight.sensiolabs.com/projects/54d036bc-0adb-4505-937e-18c941fbc5a0/mini.png)](https://insight.sensiolabs.com/projects/54d036bc-0adb-4505-937e-18c941fbc5a0)

### Installing
`git clone` this repository, then use `composer install` to get all Silex dependencies.

### References
I have an eternal gratitude to the authors of the posts below:
+ Matthias Noback and [his excellent tutorial about Silex and project structure](http://php-and-symfony.matthiasnoback.nl/2012/01/silex-getting-your-project-structure-right/)
+ Silex [documentation](http://silex.sensiolabs.org/documentation)

### Contact
Just ping me at [@devdrops](https://twitter.com/devdrops)

repository: devdrops/openshift-silex-application

branch_name: refs/heads/master

gha_language: PHP

repo_name: devdrops/openshift-silex-application


text:
# 30DayMapChallenge2020Metadata

Topi Tjukanov is doing it again: [#30DayMapChallenge is returning in November 2020](https://github.com/tjukanovt/30DayMapChallenge)!

Last year [I collated submissions](https://github.com/dakvid/30DayMapChallenge) from Twitter and made [my own gallery](https://david.frigge.nz/30DayMapChallenge/).
But the repository was large with saved map images, and it wasn't that easy for everyone to collaborate. Plus I didn't start until late November or early December.
Hopefully this year - with pre-planning, a separate text-only repository and Google Sheets - we can get some good crowdsourcing going.
I'll aim to create a similar interactive gallery, but it will also be easier for others to do their own analysis or visualisations of the submissions.

## Contributing

Contributions are eagerly desired. I should do a reasonable job of recording all of the tweets with the hashtag, but crowdsourcing
will be needed to pick up what I miss and to ensure that the classifications are as complete as possible.

The easiest way for me is to submit a pull request on GitHub. The easiest way for you is probably to edit this
[Google spreadsheet](https://docs.google.com/spreadsheets/d/1j2iLnWtBATMxpvDZLXlqaOd0zmcclyg8VIgkPgVMklQ/edit?usp=sharing)
that imports the TSV files from this repository.
I'll get notified of changes by email and will endeavour to manually include those changes as close to once per
day as I can through November.


text:
# Question:

Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal".

**Example**:
```
Input: [5, 4, 3, 2, 1]
Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"]
Explanation: The first three athletes got the top three highest scores, so they got "Gold Medal", "Silver Medal" and "Bronze Medal".
For the left two athletes, you just need to output their relative ranks according to their scores.
```

**Note**:
1. N is a positive integer and won't exceed 10,000.
1. All the scores of athletes are guaranteed to be unique.

# Analysis

这题可能首先想到的是如何进行排序，然后找前三，或许还想到了堆排序吧？其实，这都想复杂了，简单粗暴的方法是，设置一个与输入长度相等的数组，然后，对应于输入数组，其对应位置的名次就是“整个数组中比它大的数的个数+1”.

# Tips

# Code
```go
func findRelativeRanks(nums []int) []string {
	ret := make([]string, len(nums))
	for i := 0; i < len(nums); i++ {
		greaterCount := 0
		for j := 0; j < len(nums); j++ {
			if nums[j] > nums[i] {
				greaterCount++
			}
		}

		var out string
		switch greaterCount {
		case 0:
			out = "Gold Medal"
		case 1:
			out = "Silver Medal"
		case 2:
			out = "Bronze Medal"
		default:
			out = fmt.Sprintf("%d", greaterCount+1)
		}

		ret[i] = out
	}

	return ret
}
```

repository: lylex/leetcode

repo_name: lylex/leetcode


text:
---
layout: post
title: 7 Secrets Of Vishnu
short_title: 7 Secrets Of Vishnu
book: 7-secrets-of-vishnu
author:
- Devdutt Pattanaik
type: kindle
date_read: '2018-11-08'
date_added: '2018-11-03'
tags:
  - mythology
  - religion
  - indian
rating: '4.5'
review: true
other:
  isbn: '9789380658681'
  pages: '250'
  reread_date: ''
---

<!-- {{< figure type="margin" src="/images/books/7-secrets-of-vishnu.jpg" rating="4.5" title="7 Secrets of Vishnu">}} -->

For me, reading this book was to look at the things that I already knew, from a different perspective — not necessarily the view that I agree with. This book starts with Mohini and goes on to tell the stories of all the *mainstream* avatars of Vishnu and what the significance of those avatars was, in their respective time periods.

I am an avid mythology buff since I was a little kid, and having gone through a lot of the Hindu mythological scriptures in one form or other, it was enjoyable to see author's diverse use of symbolism. I was astonished by the author's comparison of Lakshmi and Saraswati and how these two always have conflicts with each other. The author tries to relate Devas and Asuras with Lakshmi and Alakshmi with good arguments. Those who do not know, Alakshmi is the sister of Lakshmi, who always accompanies her wherever she goes and represents strife.

The illustrations provided in the book are cherry on the top and provide insights into the ancient architecture of Indian temples with the associated bubbles of explanations. I read this book on my Kindle Paperwhite, so all the illustrations were B&W for me. However, I am not complaining.

Overall, it was a good one time read. I was not able to appreciate some of the ideas and interpretation of the scriptures by the author, but sometimes, thinking from a perspective which you do not like, can be enlightening.

There are a lot of good quotes in this book, which unfortunately I could not note down as I was too engaged in reading this book. So I revisited the book and found out these quotes were worth mentioning (not in specific order).

# Notes:

- Lakshmi is typically drawn towards places where Saraswati resides. That is why prosperity always follows peace. However, when Lakshmi comes, attention shifts from Saraswati to Lakshmi. Enraged, Saraswati leaves. In her absence, Alakshmi comes to give her sister, Lakshmi, company. With Alakshmi comes strife. With strife ends peace. And in the absence of peace, prosperity eventually wanes. Lakshmi leaves and there is nothing left.

- Devas and Asuras reflect two aspects of human personality: our need for stability and our need for growth. The former makes us either insecure or complacent. The latter makes us frustrated and restless. We crave for Lakshmi mostly. Sometimes we crave for Saraswati, with the sole pursuit of obtaining Lakshmi; for when Lakshmi arrives we ignore Saraswati to our peril. That we experience these emotions is an indicator that we have not yet realised or experienced spiritual reality, which is Vishnu.

- Evil means the 'absence of God'. This idea does not exist in Hinduism because, for Hindus, the whole world is a manifestation of the divine. So, nothing can be evil.

- Divinity cannot be limited by human imagination or human memory. There is always something in the universe that surprises us.

- In the Ramayana, Ram does not lose his composure when he is asked to leave the palace and live in the forest. He is as much at peace in the palace as he is in the forest. He does not derive his identity from material reality. This quality of Vishnu makes him attractive to Lakshmi. Vishnu is therefore called Shri-nivasa or Shri-vatsa, which means abode of Lakshmi.

- Lakshmi is Vishnu’s bhoga-patni, connecting him with the earthly needs of man. Saraswati is Vishnu’s moksha-patni, connecting him with the spiritual needs of man.

- Vijaya is conventional victory, victory over the other, over other’s minds, a victory where there are winners and losers. Jaya, on the other hand, is victory over oneself, over one’s mind, a victory where there are no losers.

repository: yashhere/highlights

gha_language: JavaScript

repo_name: yashhere/highlights


text:
Blurr
=====

[![Join the chat at https://gitter.im/theneiam/blurr](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/theneiam/blurr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Travis](https://travis-ci.org/theneiam/blurr.svg?branch=master)](https://travis-ci.org/theneiam/blurr)
[![Code Climate](https://codeclimate.com/github/theneiam/blurr/badges/gpa.svg)](https://codeclimate.com/github/theneiam/blurr)
[![npm downloads](https://img.shields.io/npm/dm/blurr.svg)](https://www.npmjs.com/package/blurr)
[![NPM](https://nodei.co/npm/blurr.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/blurr)

**Blurr** - powerful routing manager middleware for [Express](https://github.com/strongloop/express)

**Blurr** supports modular application architecture, express router options, REST architecture and can be integrated to the project in a minute.

**Blurr** can be used as a main route manager or it can work along with another routing software (e.g. express native router)

## Installation

Install *Blurr* save it in the dependencies list:

```sh
$ npm install blurr --save
```

To install *Blurr* temporarily, and not add it to the dependencies list, omit the --save option:

```sh
$ npm install blurr
```

## Usage (Super Quick Start)

*we assume that you already installed express and blurr*

Create the following directory structure

```sh
.
+-- app/
|   +-- controllers/
|   |   +-- index.js
+-- app.js
+-- package.json

```
Edit app.js file

```js

// require minimum dependencies
var http = require('http'),
    express = require('express'),
    blurr   = require('blurr');

// create an application instance
var app = express();

// create minimal **Blurr** config
var blurrConfig = {
    paths: {
        controllers: __dirname + '/app/controllers/'
    },
    resources: [
        {
            mount: '/',
            routes: {
                'get / index@index': []
            }
        }
    ]
};

// tell application to use **Blurr**
app.use(blurr(blurrConfig));

// start listening
http
    .createServer(app)
    .listen(5000, function() {
        console.log('Listening on port 5000');
    });

```

Edit app/controllers/index.js

```js
'use strict';

var IndexController = function() {

    return {
        index: function(req, res) {
            res.json({ message: 'Knock knock, Neo.' });
        }
    };
}

module.exports = new IndexController();

```

Run your application and curl (or visit) the http://localhost:5000/

```sh
node app.js
```

```sh
curl http://localhost:5000
```

## API

```js
var blurr = require('blurr');
```

#### Connect Blurr with Express

Create a new **Blurr** instance and make express use it

```js
var express    = require('express'),
    blurr      = require('blurr');

    var app = express();
    app.use(blurr({ ... }));
```

#### Blurr configuration

First of all, let's see a **minimal** config example

```js
var blurrConfig = {

    paths: {
        controllers: '/path/to/controllers/directory/'
    },

    resources: [
        {
            mount: '/',
            routes: {
                'get / index@index': []
            }
        }
    ]

};
```

And here is a **full** config example

```js
var blurrConfiguration = {

    paths: {
        controllers: '/path/to/*/controllers/directory/',
        middleware: '/path/to/middleware/directory/'
    },

    resources: [
        {
            module : 'main'
            mount  : '/',
            routes : {
                'get / index@home': []
            }
        }
    ],

    strict               : false,
    caseSensitive        : false,
    mergeParams          : false,
    preferMountPathMatch : false

}

```

##### Blurr configuration: paths

Paths object should contain *controllers* property with path to controllers directory. Optionally it may contain *middleware*
property with path to the directory with middleware, **blurr** will try to load middleware (if specified) for your resource routes from that directory

```js
paths: {
    controllers: '/path/to/controllers/directory/',
    middleware: '/path/to/middleware/directory/'
}
```

If your application has a modular structure and each module has its own controllers, you can specify a wildcard in controllers path
and **blurr** will automatically resolve it to correct path using resource *module* option

```js
    paths: {
        controllers: '/path/to/modular/*/controllers/directory/',
        middleware: '/path/to/middleware/directory/'
    }

    {
        module: 'messaging',
        mount: '/messages',
        routes: {
            'get / messages@all': []
        }
    }
```

In the example above, the final path to controller will be */path/to/modular/messaging/controllers/directory/*

#####  Blurr configuration: resources

Resource is an object that should include *mount* point to mount a resource to the express and *routes* abject, that contains
resource related routes

```js
{
    mount: '/',
    routes: {
        'get / index@index': [],
        'get /hello/:name index@sayHello': []
    }
}
```

##### Blurr configuration: Resource routes

Each resource route has 2 parts:
    * route config url
    * array with route specific middleware names

Route config url has following structure '{routeType} {routeUrl} {controller}@{action}'

**{routeType}** - get, post, put, delete, all

**{routeUrl}** - resource route url

**{controller}** - name of the controller file

**{action}** - action function that will handle a route

Array with middleware names - list of middleware that will be required for the specific route

```js
routes: {
    'get /message/:id messages@show': ['authenticated']
}
```

##### Blurr configuration: preferMountPathMatch

 This option allows **Blurr** to load resource only if its mount point match request path.
 This option is set to **false** by default.
 This behaviour is useful for application with a lot of resources, it will speed up loading and help to avoid of scanning of resources on each request

##### Blurr configuration: caseSensitive
See [Express router](http://expressjs.com/4x/api.html#router): *caseSensitive* option

##### Blurr configuration: mergeParams
See [Express router](http://expressjs.com/4x/api.html#router): *mergeParams* option

##### Blurr configuration: strict
See [Express router](http://expressjs.com/4x/api.html#router): *strict* option

##### Bonus: Simple controller example

Just a simple controller example, but you can use all your imagination :)

```js
module.exports = {
     show: function(req, res) {
         var massageId = req.params.id;
         res.json({
             text: 'Hello kitty',
             id: messageId
         });
     }
 };
```

## License

(The MIT License)

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

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

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: theneiam/blurr

repo_name: theneiam/blurr


text:
# hosts-etc-cli

> Take control of your hosts file through the command line!

## Installation

```console
$ npm install -g hosts-etc-cli
```

## Usage

Installed globally, so be anywhere in your system. This package uses [`sudo-prompt`](https://github.com/jorangreef/sudo-prompt) to request sudo privelages if required. The easy way around putting your password in (or hitting yes in the Windows UAC) is to `chmod` the hosts file to the level you're after.

Once you're ready for kick off, send this through to understand how to use this tool:

```console
$ hosts --help

   Edits your host file to make you the master!

   Usage:
    - hosts
            Will eventually open in interactive mode...

    - hosts -g [query]
    - hosts --get [query]
            Gets all hosts that match the query. A query can be in any of the
            following types to query for the different types:
             - "#region"   - Will search for regions that exactly match "region"
             - "127.0.x.1" - Will search for hosts that map to "127.0.\d{1,3}.1"
             - "name"      - Will search for hosts whose host contains "name"
             - ommitted    - Will return all hosts
            The result will be a list of all regions with their matching hosts.
            The output type of the result can be specified using '-o' or
            '--output'.

    - hosts -s <address> <host> [region] [comment]
    - hosts --set <address> <host> [region] [comment]
            Sets a host in your system's hostfile. [region] and [comment] are
            optional. To specify a comment and no region, set [region] to \"_\".
            This will run the NPM package 'hosts-etc' using the NPM package
            'sudo-prompt'. The output will be a number identifying how many
            hosts were successfully altered.

    - hosts -r <query>
    - hosts --remove <query>
            Removes hosts from your system's hostfile. <query> in this command
            is identical to [query] from the --get command, in that the
            following types are accepted:
             - "#region"   - Will remove the entire region.
             - "127.0.x.1" - Will remove hosts that map to "127.0.\d{1,3}.1"
             - "name"      - Will remove hosts whose host contains "name"
            The output will be a number identifying how many hosts were removed.

    - hosts -o <type>
    - hosts --output <type>
            Sets the output type of this command to the type specified. This is
            useful for chaining this command with others. The type needs to be
            one of the following (case-insensitive):
             - csv     - Will output the data as comma separated values
             - hosts   - WIll output the data as a host file
             - tabbed  - Will output the data as a tabbed list (DEFAULT)
             - json[x] - Will output the data as JSON. [x] is optional and
                         defines the amount of spaces to use when prettying the
                         result. 0 or ommitted means to uglify result (no spaces
                         and 1 line)

    - hosts --hostFile
            Prints out the location of your system's hostfile.

    - hosts -h
    - hosts --help
            Shows this help text.

```

### Interactive Mode

Usage: `hosts`

**Interactive mode is coming soon...** The idea of interactive mode is to enter a REPL where modifications can be made either using the full syntax of each command, or by prompting for answers to questions.

This hasn't been implemented yet nor planned out, but expect it to be there when we hit 1.2 at least.

 Therefore, query is optional, but if it is provided, it must match the following types:

| Type | Description |
|:----:|:------------|
|`"#region"`| Will search for regions that exactly match `"region"`. |
|`"127.0.x.1`| Will regex search for addresses that match to `/127\.0\.\d{1,3}\.1/`. As in, all 'x's are replaced with `\d{1,3}`. |
|`"name"`| Will search for hosts whose host ***contains*** `"name"`. |
| ommitted | Will return all hosts.|

The output is controlled through the [`--output`](#output) command.

### Set Host

Usage `hosts {-s|--set} <address> <host> [region] [comment]`

Sets a host in your system's hostfile. `[region]` and `[comment]` are optional. To specify a comment and no region, set `[region]` to `"_"`. This will run the NPM package [`hosts-etc`](https://github.com/TheBrenny/hosts-etc) using the NPM package [`sudo-prompt`](https://github.com/jorangreef/sudo-prompt). The output will be a number identifying how many hosts were successfully altered - should only be 0 or 1.

### Remove Host

Usage: `hosts {-r|--remove} <query>`

Removes hosts that match the query, `<query>` in this command is identical to the `[query]` in the [`--get`](#get-hosts) command, except this time it is required. Therefore:

| Type | Description |
|:----:|:------------|
|`"#region"`| Will search for regions that exactly match `"region"`. |
|`"127.0.x.1"`| Will regex search for addresses that match to `/127\.0\.\d{1,3}\.1/`. As in, all 'x's are replaced with `\d{1,3}`. |
|`"name"`| Will search for hosts whose host ***matches*** `"name"`. |

### Output

Usage: `hosts {-o|--output} <type>`

Sets the output type of this command to the type specified. This is useful for chaining this command with others. The type needs to be one of the following (case-insensitive):

| Type | Description |
|:----:|:------------|
|`csv`| Will output the data as a CSV file, ready for spreadsheet tools like MS Excel. |
|`hosts`| Will output the data as a hosts file, ready to be put in place of your system's host file. This uses `hosts-etc`'s built-in `hostifyData(data)` method. |
|`json[x]`| Will output the data as a JSON string. The [x] is optional and defines how many spaces to use when prettying the JSON. Ommitting the value or using `0` will cause the output to be uglified (as specified by `JSON.stringify`). |
|`tabbed`| Will output the data as a tabbed list, where hosts in a region are indented once. |

### Host File

Usage: `hosts --hostFile`

Outputs the absolute path to your system's host file. Nothing much else to it...

## Contributing

Contributions are always welcome! Submit a PR, and we'll go from there!

## License

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

repository: TheBrenny/hosts-etc-cli

repo_name: TheBrenny/hosts-etc-cli


text:
Writes **msg.payload** to the file specified, e.g. to create a log.

The filename can be configured in the node, if left blank it should be set in an incoming message on **msg.filename**.

A newline is added to every message. But this can be turned off if required, for example, to allow binary files to be written.

The default behaviour is to append to the file. This can be changed to overwrite the file each time, for example if you want to output a "static" web page or report.

This node can also be configured to delete a file if required. _Note:_ Using msg.delete is now deprecated.

repository: Orientsoft/borgnix-nodes

gha_language: HTML

repo_name: Orientsoft/borgnix-nodes


text:
# seed-catalogs

The National Agriculture Library and the Internet Archive have digitized
a collection of [18,390 seed catalogs] that were selected from the
[Henry G. Gilbert Nursery and Seed Trade Catalog Collection], which
contains over 200,000 American and foreign catalogs dating from the 1700s.

This GitHub repository is a scratch space for the Digital Curation and
Innovation Center ([DCIC]) at the University of Maryland to work with the
data.

## Utilities:

Before you run anything here make sure you've installed any Python dependencies:

    pip install -r requirements.txt

* fetch.py - download the metadata for all the items in the collection and store it in a [pairtree] directory named `items`.

[18,390 seed catalogs]: https://archive.org/details/usda-nurseryandseedcatalog
[Henry G. Gilbert Nursery and Seed Trade Catalog Collection]: http://specialcollections.nal.usda.gov/guide-collections/henry-g-gilbert-nursery-and-seed-trade-catalog-collection
[DCIC]: http://dcic.umd.edu/
[pairtree]: https://wiki.ucop.edu/display/Curation/PairTree

repository: AI-Collaboratory/seed-catalogs

repo_name: AI-Collaboratory/seed-catalogs


text:
# Incremental 3D Semantic Scene Graph Prediction From RGB Sequences

```
@inproceedings{monossg_cvpr23,
title = {Incremental 3D Semantic Scene Graph Prediction From RGB Sequences},
author = {Wu, Shun-Cheng and Tateno, Keisuke and Navab, Nassir and Tombari, Federico},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {5064--5074},
year = {2023}
}
```

links
- [openaccess](http://openaccess.thecvf.com//content/CVPR2023/html/Wu_Incremental_3D_Semantic_Scene_Graph_Prediction_From_RGB_Sequences_CVPR_2023_paper.html)

gha_language: Jupyter Notebook


text:
# Holochain Open-Dev Blog

Visit the blog: https://holochain-open-dev.github.io/blog/

This is a small blog intended for holochain developers, from the holochain open-dev community.

This is not maintained by the holochain core team, but rather experienced hApps developers that want to share best practices with one another.

This is intended to be a collaborative effort and go through iterations and feedback from all the devs in the community (thus this git repository), so if you have some feedback or contributions around the articles please make a PR or ping us to add you to the contributors of the repo.

## How to contribute

To create a post:

1. Clone this repository.
2. Checkout the `gh-pages` branch.
3. Create a file inside the `_posts` folder, following the format `YYYY-MM-DD-title-of-post.md`.
4. Commit and push.

repository: holochain-open-dev/blog

branch_name: refs/heads/gh-pages

gha_language: SCSS

repo_name: holochain-open-dev/blog


text:
# Sinking-Ship
A simple Yahtzee-like dice game programmed in Python.

This entire project is just an excuse for me to learn new tools in Python. In this case, the main tool I've learned is Tkinter... which is very useful.

[![Run on Repl.it](https://repl.it/badge/github/qwertyu63/Sinking-Ship)](https://repl.it/github/qwertyu63/Sinking-Ship)

# Screenshot
![Image of Sinking Ship](https://github.com/qwertyu63/Sinking-Ship/blob/master/SinkingShipImage.png)

# How to Play
Just run the Python code. Tkinter is required. Click the Help button in game for further instructions or read them mirrored below.

You will roll and reroll 6 dice.
Click the dice you want to keep and click Reroll.
Click a score field to Bank your current roll total as points.
Every time you Bank, you gain 2 more rerolls (max 9).
Each field can only be used once, so plan wisely.
If you reach 0 rerolls and can't bank, the game ends.

# Field Breakdown
Each of the 15 score fields has a different scoring condition. For convience, I will list all of them here. A set of dice is a collection of dice with the same number; seperate sets must be different numbers from each other.

-- Pair: Contains a set of at least two dice.
-- Three of a Kind: Contains a set of at least three dice.
-- Four of a Kind: Contains a set of at least four dice.
-- Five of a Kind: Contains a set of at least five dice.
-- Six of a Kind: Contains a set of six dice.
-- Two Pair: Contains two seperate sets of at least two dice each.
-- Three Pair: Contains three seperate sets of two dice each.
-- Full House: Contains two seperate sets; one must be at least three dice, the other at least two dice.
-- Double Trips: Contains two seperate sets of at three dice each.
-- Four and Pair: Contains two seperate sets; one must be four dice, the other two dice.
-- Three in a Row: Contains three consecutive numbers (123, 234, 345 or 456).
-- Four in a Row: Contains four consecutive numbers (1234, 2345 or 3456).
-- Five in a Row: Contains five consecutive numbers (12345 or 23456).
-- Six in a Row: Contains one of each number (123456).
-- Wild: Any combination.

gha_language: Python


text:
# convertextract
========

[![Build Status](https://travis-ci.org/roedoejet/textract.svg?branch=master)](https://travis-ci.org/roedoejet/textract)
[![Version](https://img.shields.io/pypi/v/convertextract.svg)](https://warehouse.python.org/project/convertextract/)
[![Coverage Status](https://coveralls.io/repos/github/roedoejet/textract/badge.svg?branch=master)](https://coveralls.io/github/roedoejet/textract?branch=master)

Extract and find/replace text based on arbitrary correspondences. This library is a fork from the Textract library by Dean Malmgren. https://github.com/deanmalmgren/textract

# Documentation

## Installation
To install, you must have Python 3.4+ and pip installed.
```{r, engine='python', count_lines}
pip install convertextract
```
Some source libraries need to be installed for different operating systems to support various file formats. Visit <http://textract.readthedocs.org/en/latest/installation.html> for documentation.

=========

## Basic CLI Use

Some basic Textract functions are preserved. Please visit <http://textract.readthedocs.org> for documentation.

#### Converting a file based on pre-existing Mappings in the G2P library

Under the hood, convertextract uses the [g2p](https://github.com/roedoejet/g2p) library to do conversions. There are many mappings available through that library. For a list of all possible mappings, please visit <https://g2pstudio-herokuapp.com/api/v1/langs>.

For this type of call, convertextract requires three arguments:

1. A file containing text to convert (as of Version 1.0.4, this includes **.pptx**, **.docx**, **.xlsx**, and **.txt**)
2. A code corresponding to the input language of the text.
3. A code corresponding to the desired output language of the text.

Running the command:
```{r, engine='python', count_lines}
convertextract path/to/foo.docx -il eng-ipa -ol eng-arpabet
```

Will produce a new file `path/to/foo_converted.docx` which will contain the same content as `path/to/foo.docx` but with find/replace performed for all correspondences listed in the mapping between English IPA (eng-ipa) and English Arpabet (eng-arpabet).

#### Converting a file based on custom mapping
If the mapping you want is not supported by g2p, you should make a pull request there to have it included! Otherwise, you can use a custom file.

Running the command:
```{r, engine='python', count_lines}
convertextract path/to/foo.docx -m path/to/rules.csv
```

Will produce a new file `path/to/foo_converted.docx` which will contain the same content as `path/to/foo.docx` but with find/replace performed for all correspondences listed in the mapping at `path/to/rules.csv`.

#### Creating an .xlsx/.csv/.psv/.tsv correspondence sheet
Your correspondence sheet must be set up as follows:

|    in   |  out           |
|:-:|:-:|
| aa| å|
| oe| ø|
| ae| æ|

Here, this correspondence sheet (do not include headers like "replace with" or "find") would replace all instances of aa, oe, or ae in a given file with å, ø, or æ respectively.

#### Supported conversions

As of Version 3.0, any mappings that are valid in the g2p library are supported. Here are a few:

* Heiltsuk Doulos Font -> Unicode
```{r, engine='python', count_lines}
convertextract path/to/foo.docx -il hei -ol hei-doulos
```

* Heiltsuk Times Font -> Unicode
```{r, engine='python', count_lines}
convertextract path/to/foo.docx -il hei -ol hei-times
```

* Tsilhqot'in Doulos Font -> Unicode
```{r, engine='python', count_lines}
convertextract path/to/foo.docx -il clc -ol clc-doulos
```

* Navajo Times Font -> Unicode
```{r, engine='python', count_lines}
convertextract path/to/foo.docx -il nav -ol nav-times
```

#### Using Regular Expressions

As of Version 1.5, there is support for Regular Expressions. If you do not need to use context-sensitive conversions, you do not need to include them. However, if you do, you should set up your correspondence sheet as follows:

|    in   |  out  |  context_before | context_after |
|:-:|:-:|:-:|:-:|
| aa| å|[k,d]|$|
| aa| æ|t|$|
| aa| a:|||

For more information on how the g2p is acutally processed, please visit <https://github.com/roedoejet/g2p>.

#### Use as Python package
You can use the package in a Python script, which returns converted text, but without formatting. Running the script will still create a `foo_converted.docx` file.
```python
import convertextract
text = convertextract.process('foo.docx', mapping='bar.xlsx')
```

You can also use convertextract to just convert text in Python using `process_text`.

```python
import convertextract
text = convertextract.process_text('test', mapping=[{'in': 't', 'out': 'p', 'context_before': '^', 'context_after': 'e'}])
```

## Use with GUI (Graphical User Interface)

Convertextract can also run in a GUI (for Mac 10.14.6 or higher **only**)

### Installing the GUI
To download the app, go to [https://github.com/roedoejet/convertextract/releases](https://github.com/roedoejet/convertextract/releases) and select the most recent version.

![download](https://raw.githubusercontent.com/roedoejet/convertextract/master/docs/assets/download.png)

Click to unzip the file, and then *right-click* and select `open`. You must *right-click* or the Mac permissions will not allow you to open the app.
![unzip](https://raw.githubusercontent.com/roedoejet/convertextract/master/docs/assets/unzip.png)
![open](https://raw.githubusercontent.com/roedoejet/convertextract/master/docs/assets/open.png)

### Using the GUI
The Convertextract app has four arguments:

1.  A file containing text to convert (As of version 3.2.2 **.csv**,
 **.psv**, **.tsv**, **.doc**, **.docx**, **.txt**, **.eaf**, **.json**, **.pptx**, **.html**, **.xls**, **.xlsx** are supported).

2.  A code that specifies the desired encoding, for example `UTF-8`.

3. A code corresponding to the input language of the text.

4.  A code corresponding to the desired output language of the text.

There is also the option for custom g2p lookup tables if your mapping is not already in the [g2p](https://github.com/roedoejet/g2p) library.

![gui](https://raw.githubusercontent.com/roedoejet/convertextract/master/docs/assets/gui.png)

The GUI will produce a new file `path/to/foo_converted.docx` which will contain the same content as `path/to/foo.docx` but with find/replace performed for all correspondences listed in the mapping. The file format will remain the same as the input file.

# Citation

If you use convertextract in published work, please cite it. To cite this work, please use the following (APA):

Pine, A., & Turin, M. (2018). Seeing the Heiltsuk orthography from font encoding through to Unicode: A case study using convertextract. In Proceedings of the LREC 2018 Workshop “CCURL 2018–Sustaining knowledge diversity in the digital age” (pp. 27-30). European Language Resources Association.

or BibTex:

```
@inproceedings{pine2018convertextract,
  title={{Seeing the Heiltsuk orthography from font encoding through to Unicode: A case study using convertextract}},
  author={Pine, Aidan and Turin, Mark},
  booktitle={{Proceedings of the LREC 2018 Workshop “CCURL 2018--Sustaining knowledge diversity in the digital age”}},
  pages={27--30},
  year={2018},
  organization={{European Language Resources Association}}
}
```

repository: roedoejet/convertextract

repo_name: roedoejet/convertextract


text:
---
title: "Run"
sub_link: "polyaxon-cli/run"
meta_title: "Polyaxonfile Command Line Interface Specification - Run - Polyaxon References"
meta_description: "Polyaxonfile Command Line Interface Specification - Run."
visibility: public
status: published
tags:
    - cli
    - reference
    - polyaxon
    - run
sidebar: "polyaxon-cli"
---

> This command can only be used for a Polyaxon deployment with a scheduler enabled

> You can always access the help menu for this command by adding `--help`

Usage:

```bash
$ polyaxon run [OPTIONS]
```

Run polyaxonfile specification.

Examples:

```bash
$ polyaxon run -f file -f file_override ...
```

Upload before running

```bash
$ polyaxon run -f file -u
```

Start logs after running

```bash
$ polyaxon run -f file -u -l
```

Run and add a ttl of 60 seconds after the experiment is done (succeeds or fails)

```bash
$ polyaxon run -f file --ttl=60
```

Run and set description and tags for this run

```bash
$ polyaxon run -f file -u --description="Description of the current run" --tags="foo, bar, moo"
```
Run and set a unique name for this run

```bash
polyaxon run --name=foo
```

Run for a specific project

```bash
$ polyaxon run -p project1 -f file.yaml
```

Run with updated params

```bash
$ polyaxon run -p project1 -f file.yaml -P param1=234.2 -P param2=relu
```

Options:

option | type | description
-------|------|------------
  -f, --file | PATH | The polyaxon files to run.
  --name [optional] | TEXT | Name to give to this run, must be unique within the project, could be none.
  --description [optional] | TEXT | The description to give to this run.
  --tags [optional] | TEXT | Tags of this run, comma separated values.
  --ttl [optional] | INT | Time to live for the current run after it's done.
  -l [optional] | | To start logs after running.
  -u [optional] | | To upload the repo before running.
  --local | | To start the run locally, with `docker` environment as default.
  -P, --params | | NAME=VALUE  A parameter to override the default params of the run, form `-P name=value`.
  --help | | Show this message and exit.

repository: jjasonkal/polyaxon

repo_name: jjasonkal/polyaxon


text:
## Spring Data JPA - Filtering

This module contains articles about filtering data using Spring Data JPA

### Relevant Articles:
- [An Advanced Tagging Implementation with JPA](https://www.baeldung.com/jpa-tagging-advanced)
- [A Simple Tagging Implementation with JPA](https://www.baeldung.com/jpa-tagging)
- [Spring Data JPA and Null Parameters](https://www.baeldung.com/spring-data-jpa-null-parameters)
- [Spring Data JPA Projections](https://www.baeldung.com/spring-data-jpa-projections)

### Eclipse Config
After importing the project into Eclipse, you may see the following error:
"No persistence xml file found in project"

This can be ignored:
- Project -> Properties -> Java Persistance -> JPA -> Error/Warnings -> Select Ignore on "No persistence xml file found in project"
Or:
- Eclipse -> Preferences - Validation - disable the "Build" execution of the JPA Validator


text:
# 301lab6789-back-end

# Lab 6 Back End

**Author**: Julie Ly and Becca Lee
**Version**: 1.0.0 (increment the patch/fix version number if you make more commits past your first submission)

## Overview
For lab 6, we will convert a location entered by the user into a latitude and longitude, then use those values to request weather information for that location.

## Getting Started
- set up a repo
- set up packages
- deploy to heroku
- get API keys
-

## Architecture
Javascript, node, NPM, Express. dotENV, google geocoding API, Heroku, Github, Postman, Cors

## Change Log
------------
Number and name of feature: Feature #1: Obtain latitude and longitude
Estimate of time needed to complete: 2 hr
Start time: 10:15
Finish time: 11:45
Actual time needed to complete: 1.5 hours
- becca deployed heroku
- julie built server.js, which was taken from lecture class 6

------------
Number and name of feature: ________________________________
Estimate of time needed to complete: _____
Start time: _____
Finish time: _____
Actual time needed to complete: _____

------------
Number and name of feature: ________________________________
Estimate of time needed to complete: _____
Start time: _____
Finish time: _____
Actual time needed to complete: _____

## Credits and Collaborations
- Sam Hamm for notes on how to write server js (from class 6)
- David Stoll helped us when nodemon wouldn't work
-->


text:
# keyscan

Simple keyboard scanning for `node`

```javascript
require('keyscan').make_scanner( (ch) => console.log('Caught ' + ch.parsed) );
```

## Aren't there a thousand of these already?

Yep.  And none of them are what I wanted.

 * One-liner node keypress handling
 * No need to configure beyond saying "this is the handler"
 * Suppress echo by default
 * Configurable (and removable) kill key(s)
 * Special keys (eg arrow keys) interpreted down to common sense strings
 * `readline` various-field defect repaired

# Basic usage

Provide a function to `keyscan`.  That function will be called whenever a non-control keyboard input is detected, with an object describing the input.

The object passed back to your handler function is a single depth flat object with six fields - the five mimicing what is exposed by the [raw mode readline interface](https://nodejs.org/api/readline.html#readline_readline_emitkeypressevents_stream_interface), plus a new field named `parsed`.

Generally you should use `parsed`, which is just `(.name || .sequence)`.  In most cases `.parsed` will contain `.name`, but there are characters (such as `@`) which have no `.name`.  Checking for that and deferring to `.sequence` is a hassle, so, the `.parsed` property now reliably contains that behavior.

It's worth noting that `.name` frequently translates multiple keypresses to single keypresses (which is its purpose.)  As a result, you may get keys represented in `.parsed` as strings like `'pagedown'` and `'backspace'`.

## Example objects

This is the up arrow:
```javascript
{
  "sequence": "\u001b[A",
  "name": "up",
  "ctrl": false,
  "meta": false,
  "shift": false,
  "code": "[A",
  "parsed": "up"
}
```

This is page down:
```javascript
{
  "sequence": "\u001b[6~",
  "name": "pagedown",
  "ctrl": false,
  "meta": false,
  "shift": false,
  "code": "[6~",
  "parsed": "pagedown"
}
```

This is capital A produced with shift (note that only `.sequence` retains case)
```javascript
{
  "sequence": "A",
  "name": "a",
  "ctrl": false,
  "meta": false,
  "shift": true,
  "parsed": "a"
}
```

This is capital A produced with caps lock (note that `.shift` is false here, unlike above)
```javascript
{
  "sequence": "A",
  "name": "a",
  "ctrl": false,
  "meta": false,
  "shift": false,
  "parsed": "a"
}
```

This is `ctrl+z`
```javascript
{
  "sequence": "\u001a",
  "name": "z",
  "ctrl": true,
  "meta": false,
  "shift": false,
  "parsed": "z"
}
```

Because of the integrated approach to control keys, you will ***not*** get events when people hit, say, `shift` or `caps lock` on their own.  This is what most applications want and need, but it's not right for many action games, which may want to use control keys as weapon buttons.

On `Windows` and `Linux` platforms, `meta` is called `alt`.  On `Macintosh`es, `meta` is called `option`.

Code examples are often more readable.

## ES5 Example

For the most part, you'll want the `.parsed` property, which has the lower case character for letters, the symbol for symbols, and a string like 'down' for arrow keys.

If you're in an `es5` environment:

```javascript
console.log('Type ctrl+c to exit.\n-------------------\n');

var echo_ch = function(ks) { console.log('Caught ' + JSON.stringify(ks.parsed)); },

    keyscan = require('../dist/keyscan.js'),
    scanner = keyscan.make_scanner({ out: echo_ch });
```

### Result

You'll see something like this:

```
$ node demo/es5_demo.js

Type ctrl+c to exit.
-------------------

Caught a
Caught b
Caught c
Caught 1
Caught 2
Caught %
Caught ^
Caught up
Caught right
Caught delete
Caught pagedown
Caught end
Caught home
```

## Premades

There are also some convenience pre-made filters, such as

* `scanner.yn(opts)` - for yes/no - pre-configured to filter for `['y','n']`
  * `scanner.ync(opts)` - for yes/no/cancel - pre-configured to filter for `['y','n','c']`
* `scanner.abc(opts)` - for abc multiple choice - pre-configured to filter for `['a','b','c']`
  * `scanner.abcd(opts)` - for abcd multiple choice - pre-configured to filter for `['a','b','c','d']`
* `scanner.d09(opts)` - for star ratings - pre-configured to filter for digits `['0','1','2','3','4','5','6','7','8','9']`
  * `scanner.d14(opts)` - for star ratings - like `.d09()` but only accepts 1-4
  * `scanner.d15(opts)` - for star ratings - like `.d14()` but 1-5
  * `scanner.d19(opts)` - for 1-9 ratings - like `.d09()` but excludes zeroes
* `scanner.d09c(opts)` - for digits - also accepts `'c'`, for cancellation
  * `scanner.d14c(opts)`
  * `scanner.d15c(opts)`
  * `scanner.d19c(opts)`

## ES5 Full-Show Example

If you'd like to see the full keypress data instead, letting you see control modes and the raw character sequence, try this instead:

```javascript
console.log('Type ctrl+c to exit.\n-------------------\n');

var echo_ch = function(ch) { console.log('Caught ' + JSON.stringify(ch)); },

    keyscan = require('../dist/keyscan.js'),
    scanner = keyscan.make_scanner({ out: echo_ch });
```

### Result

You'll see something like this:

```
$ node demo/es5_demo.js

Type ctrl+c to exit.
-------------------

Caught {"sequence":"a","name":"a","ctrl":false,"meta":false,"shift":false,"parsed":"a"}
Caught {"sequence":"s","name":"s","ctrl":false,"meta":false,"shift":false,"parsed":"s"}
Caught {"sequence":"d","name":"d","ctrl":false,"meta":false,"shift":false,"parsed":"d"}
Caught {"sequence":"!","ctrl":false,"meta":false,"shift":false,"parsed":"!"}
Caught {"sequence":"@","ctrl":false,"meta":false,"shift":false,"parsed":"@"}
Caught {"sequence":"\u001b[A","name":"up","ctrl":false,"meta":false,"shift":false,"code":"[A","parsed":"up"}
Caught {"sequence":"\u001b[D","name":"left","ctrl":false,"meta":false,"shift":false,"code":"[D","parsed":"left"}
Caught {"sequence":"\u001b[C","name":"right","ctrl":false,"meta":false,"shift":false,"code":"[C","parsed":"right"}
Caught {"sequence":"\u001b[B","name":"down","ctrl":false,"meta":false,"shift":false,"code":"[B","parsed":"down"}
Caught {"sequence":"\u001b[6~","name":"pagedown","ctrl":false,"meta":false,"shift":false,"code":"[6~","parsed":"pagedown"}
Caught {"sequence":"\u001b[5~","name":"pageup","ctrl":false,"meta":false,"shift":false,"code":"[5~","parsed":"pageup"}
Caught {"sequence":"\u0003","name":"c","ctrl":true,"meta":false,"shift":false,"parsed":"c"}
```

## ES6 Module Example

In an `es6` environment with `module` support (ie, not `node` yet,)

```javascript
console.log('Type ctrl+c to exit.\n-------------------\n');

import { make_scanner } from 'keyscan';

const keyscan = make_scanner({ out: function(ch) { console.log('Caught ' + JSON.stringify(ch)); } });
```

### Result

You'll see something like this:

```
$ node demo/es5_demo.js

Type ctrl+c to exit.
-------------------

Caught {"sequence":"a","name":"a","ctrl":false,"meta":false,"shift":false,"parsed":"a"}
```

# Other features

The key scanner offers other features as well.

## Manually releasing the key scanner

If you want to release the scanning process without requiring the user to abort with `ctrl+c`, just `.release` the scanner.

```javascript
console.log('\nType three things, then this will exit.\n---------------------------------------\n');

var count   = 0,

    keyscan = require('../dist/keyscan.js'),
    scanner,

    echo_3x = function(ch) {
        console.log('Caught ' + JSON.stringify(ch.parsed));
        ++count;
        if (count >= 3) {
            console.log('Three items reached.  Releasing.');
            scanner.release();
        }
    },

    scanner = keyscan.make_scanner({ out: echo_3x });
```

### Result

You'll see something like this:

```
$ node demo/manual_release.js

Type three things, then this will exit.
---------------------------------------

Caught "1"
Caught "2"
Caught "3"
Three items reached.  Releasing.
```

## Replacing the kill keys with `isAbort`

If you want to keep the termination character behavior, but want it to be something other than `ctrl+c` (or multiple things,) write a function, and pass it in as `.isAbort`:

```javascript
console.log('\nType ctrl+x to exit.\n-------------------\n');

var echo_ch = function(ch) { console.log('Caught ' + JSON.stringify(ch.parsed)); },
    use_c_x = function(ch) { return (ch && (ch.ctrl) && (ch.name == 'x')); },

    keyscan = require('../dist/keyscan.js'),
    scanner = keyscan.make_scanner({ out: echo_ch, isAbort: use_c_x });
```

Todo:

* read once only
* unicode symbolic name representations
* prompt (? may not make sense, deciding)
* echo enable (wants unicode)
* map keys to outputs (eg 's' echoes 'save')
* make yn and ync show labels aftwerwards
* `.sync` (inherently `once`)

repository: StoneCypher/keyscan

repo_name: StoneCypher/keyscan


text:
# SpecIF Model Integration Guide for ArchiMate®

## ArchiMate® to SpecIF mapping

### Resources

| [ArchiMate® Open Exchange (XML)](https://www.opengroup.org/xsd/archimate/) | [SpecIF](https://specif.de) |
| --- | --- |
| BusinessActor, BusinessRole, BusinessCollaboration, BusinessInterface, BusinessProcess, BusinessFunction, BusinessInteraction, BusinessService, ApplicationComponent, ApplicationCollaboration, ApplicationInterface, ApplicationFunction, ApplicationInteraction, ApplicationProcess, ApplicationService, Node, Equipment, Facility, DistributionNetwork, Device, SystemSoftware, TechnologyCollaboration, TechnologyInterface, Path, CommunicationNetwork, TechnologyFunction, TechnologyProcess, TechnologyInteraction, TechnologyService, OrJunction, AndJunction | [FMC:Actor](https://specif.de/apps/view#import=../examples/Vocabulary.specifz;view=doc;project=P-SpecIF-Vocabulary;node=N-4NoXVcSzSs07Htg4959SJnDEm0D) |
| Goal, Capability, Contract, Representation, Artefact, Product, BusinessObject, DataObject | [FMC:State](https://specif.de/apps/view#import=../examples/Vocabulary.specifz;view=doc;project=P-SpecIF-Vocabulary;node=N-yeUw4dc3iTxk7PHLdQo7efxLvBc) |
| BusinessEvent, ApplicationEvent, TechnologyEvent, ImplementationEvent | [FMC:Event](https://specif.de/apps/view#import=../examples/Vocabulary.specifz;view=doc;project=P-SpecIF-Vocabulary;node=N-8HwdIxFap0pTQ5JiE31I1BQJ15z) |
| Requirement, Constraint | IREB:Requirement |
| Location, Grouping | [SpecIF:Collection](https://specif.de/apps/view#import=../examples/Vocabulary.specifz;view=doc;project=P-SpecIF-Vocabulary;node=N-MCUw5EHwNYxa9wqMtctM4J2A2G8) |

Where:

* The listed elements are described in the [ArchiMate® 3.1 Specification](https://pubs.opengroup.org/architecture/archimate3-doc/chap04.html).
* All SpecIF resource class terms are defined in the [Vocabulary](https://specif.de/apps/view#import=../examples/Vocabulary.specifz;view=doc;node=N-YpyUlWVLwxYblBgWOr154btbA9u).
* For all entities in the left column the namespace 'archimate:' is used; the XML header defines ```xsi:schemaLocation="http://www.opengroup.org/xsd/archimate/3.0/ http://www.opengroup.org/xsd/archimate/3.1/archimate3_Diagram.xsd"```.
* The original model element type is stored in a property named _dcterms:type_.

### Statements

At present, the following statements are derived from ArchiMate® diagrams, where the _statement terms_ (_predicates_) are highlighted in _italics_:

| [ArchiMate® Open Exchange (XML)](https://www.opengroup.org/xsd/archimate/) |  | [SpecIF](https://specif.de) | Comment |
| --- | --- | --- | --- |
| view |  | SpecIF:shows |  |
| Composition, Aggregation, Realization, Assignment |  | SpecIF:contains | ArchiMate® Structural (or 'unifying') Relationship |
| Access (accessType:Write) |  | SpecIF:writes | ArchiMate® Dependency Relationship |
| Access (accessType:Read) |  | SpecIF:reads | ArchiMate® Dependency Relationship |
| Association |  | SpecIF:isAssociatedWith | ArchiMate® Dependency Relationship |
| Influence |  | SpecIF:influences | ArchiMate® Dependency Relationship |
| Serving |  | SpecIF:serves | ArchiMate® Dependency Relationship |
| Flow, Triggering |  | SpecIF:precedes | ArchiMate® Dynamic Relationship |
| Specialization |  | SpecIF:isSpecializationOf |  |

Where:

* The listed elements are described in the [ArchiMate® 3.1 Specification](https://pubs.opengroup.org/architecture/archimate3-doc/chap05.html).
* All SpecIF statement class terms are defined in the [Vocabulary](https://specif.de/apps/view#import=../examples/Vocabulary.specifz;view=doc;node=N-blM4lfyHM55YlbfBZ3NWj4SYwa3).
* For all entities in the left column the namespace 'archimate:' is used; the XML header defines ```xsi:schemaLocation="http://www.opengroup.org/xsd/archimate/3.0/ http://www.opengroup.org/xsd/archimate/3.1/archimate3_Diagram.xsd"```.
* The original model element type is stored in a property named _dcterms:type_.

### Example

ArchiMate® 3.1 defines numerous viewpoints, 25 in total. Two typical ones are chosen to demonstrate an ArchiMate® to SpecIF transformation.

#### Layered Viewpoint

The following clipping from ArchiMate® Layered Viewpoint represents two data objects, one system service, two application components and a node:

![ArchiMate® Layered Viewpoint Clipping](./images/06_Archimate_Layered_Clipping.png)

The following SpecIF graph expresses the same:

![SpecIF from ArchiMate® Layered Viewpoint Clipping](./images/06_SpecIF_from_Archimate_Layered_Clipping.png)

#### Information Structure Viewpoint

The following clipping from ArchiMate® Information Structure Viewpoint represents five data objects similar to a UML Class Diagram:

![ArchiMate® Information Structure Viewpoint Clipping](./images/06_Archimate_Information-Structure_Clipping.png)

The following SpecIF graph expresses the same:

![SpecIF from ArchiMate® Information Structure Viewpoint Clipping](./images/06_SpecIF_from_Archimate_Information-Structure_Clipping.png)

#### Full Example

The full example can be inspected, here:

* [Telephone Connection Request (Open-Exchange XML)](https://specif.de/examples/Telephone-Connection-Request.xml)
* [Telephone Connection Request (specif)](https://specif.de/examples/Telephone-Connection-Request.specif)
* [Telephone Connection Request (SpecIF-Viewer)](https://specif.de/apps/view#import=../examples/Telephone-Connection-Request.specif.zip)

### Transformation Code
Here you may look at the current code of the [ArchiMate® to SpecIF transformation](https://github.com/GfSE/Archimate-SpecIF-Bridge/blob/master/source/js/archimate2SpecIF.js).

repository: GfSE/SpecIF

repo_name: GfSE/SpecIF


text:
# Category Theory in Coq

This development encodes category theory in Coq, with the primary aim being to
allow representation and manipulation of categorical terms, as well
realization of those terms in various target categories.

- Versions used: [Coq](https://github.com/coq/coq/) 8.14.1, 8.15.2, 8.16+rc1.
- Some parts depend on [Coq-Equations](https://github.com/mattam82/Coq-Equations) 1.2.4, 1.3.

## Usage

It is recommended to include this library in your developments by adding the
following to your `_CoqProject` file:

    -R <path to this library> Category

Then include the primary elements of the library using:

    Require Import Category.Theory.

## Library structure

This library is broken up into several major areas:

  - Core `Theory`, covering topics such as categories, functors, natural
    transformations, adjunctions, kan extensions, etc.

  - Categorical `Structure`, which reveals internal structure of a category by
    way of morphisms related to some universal property.

  - Categorical `Construction`, which introduces external structure by
    building new categories out of existing ones.

  - Species of different kinds of `Functor`, `Natural.Transformation`,
    `Adjunction` and `Kan.Extension`; for example: categories with monoidal
    structure give rise to monoidal functors preserving this structure, which
    in turn leads to monoidal transformations that transform functors while
    preserving their monoidal mapping property.

  - The `Instance` directory defines various categories; some of these are
    fairly general, such as the category of preorders, applicable to any
    `PreOrder` relation, but in general these are either not defined in terms
    of other categories, or are sufficiently specific.

  - When a concept, such as limits, can be defined using more fundamental
    terms, that version of limits can be found in a subdirectory of the
    derived concept, for example there is `Category.Structure.Limit` and
    `Category.Limit.Kan.Extension`. This is done to demonstrate the
    relationship of ideas; for example:
    `Category.Construction.Comma.Natural.Transformation`. As a result, files
    with the same name occur often, with the parent directory establishing
    intent.

### Programming sub-library

Within `Theory.Coq` there is now a sub-library that continues work started in
the [coq-haskell](https://github.com/jwiegley/coq-haskell/) library. This
sub-library is specifically aimed at "applied category theory" for programmers
in the category of Coq types and functions. The aim is to mimic the utility of
Haskell's monad hierarchy -- but for Coq users, similar to what ext-lib
achieves. I've also adjusted a few of my notations to more closely match
ext-lib.

Where this library differs, and what is considered the main contribution of
this work, is that laws are not defined for these structures in the
sub-library. Rather, the programmer establishs that her Monad is lawful by
proving that a mapping exists from that definition into the general definition
of monads (found in `Theory.Monad`) specialized to the category Coq. In this
way the rest of the category-theory library is leveraged to discharge these
proof obligations, while keeping the programmatic side as simple as possible.

For example, it is trivial to define the composition of two Applicatives. What
is not so trivial is proving that this is truly an Applicative, based on that
simple definition. While this proof was done in coq-haskell, it requires a bit
of Ltac magic to keep the size down:

```
Program Instance Compose_ApplicativeLaws
  `{ApplicativeLaws F} `{ApplicativeLaws G} : ApplicativeLaws (F \o G).
Obligation 2. (* ap_composition *)
  (* Discharge w *)
  rewrite <- ap_comp; f_equal.
  (* Discharge v *)
  rewrite <- !ap_fmap, <- ap_comp.
  symmetry.
  rewrite <- ap_comp; f_equal.
  (* Discharge u *)
  apply_applicative_laws.
  f_equal.
  extensionality y.
  extensionality x.
  extensionality x0.
  rewrite <- ap_comp, ap_fmap.
  reflexivity.
Qed.
```

What's ill-gotten about this proof is that it's confined to the very specific
case of Coq applicative endo-functors. However, there is a more general truth,
which is that any two lax monoidal functors in any monoidal category also
compose. So why not appeal to that proof to establish that our programmatic
applicative in Coq is lawful by construction?

This is what the new sub-library does. Since the more general proof is already
completed (and is too large to paste here), one may appeal to it directly to
establish the desired fact:

```
(* The composition of two applicatives is itself applicative. We establish
   this by appeal to the general proofs that:

   1. every Coq functor has strength;
   2. (also, but not needed: any two strong functors compose to a strong
      functor; if it is a Coq functor it is known to have strength); and
   3. any two lax monoidal functors compose to a lax monoidal functor.

Qed.
```

This proof pulls in several instances to establish that the category Coq is
cartesian, closed, and thus closed monoidal, etc.

The hope is this will become a happy marriage of simple, useful computational
constructions for Coq programmers, with relevant proof results from what
category theory tells us about these structures in general, such as the above
fact concerning composition of monoidal functors.

## Duality

The core theory is defined in such a way that "the dual of the dual" is
evident to Coq by mere simplification (that is, "C^op^op = C" follows by
reflexivity for the opposite of the opposite of categories, functors, natural
transformation, adjunctions, isomorphisms, etc.).

For this to be true, certain artificial constructions are necessary, such as
repeating the associativity law for categories in symmetric form, and likewise
the naturality condition of natural transformations. This repeats proof
obligations when constructing these objects, but pays off in the ability to
avoid repetition when stating the dual of whole structures.

As a result, the definition of comonads, for example, is reduced to one line:

    Definition Comonad `{M : C ⟶ C} := @Monad (C^op) (M^op).

Most dual constructions are similarly defined, with the exception of `Initial`
and `Cocartesian` structures. Although the core classes are indeed defined in
terms of their dual construction, an alternate surface syntax and set of
theorems is provided (for example, using `a + b` to indicate coproducts) to
make life is a little less confusing for the reader. For instance, it follows
from duality that `0 + X ≅ X` is just `1 × X ≅ X` in the opposite category,
but using separate notations makes it easier to see that these two
isomorphisms in the *same* category are not identical. This is especially
important because Coq hides implicit parameters that would usually let you
know duality is involved.

## Design decisions

Some features and choices made in this library:

  - Type classes are used throughout to present concepts. When a type class
    instance would be too general -- and thus overlap with other instances --
    it is presented as a definition that can later be added to instance
    resolution with `Existing Instance`.

  - All definitions are in Type, so that `Prop` is not used anywhere except
    specific category instances defined over `Prop`, such as the category
    `Rel` with heterogeneous relations as arrows.

  - No axioms are used anywhere in the core theory; they appear only at times
    when defining specific category instances, mostly for the `Coq` category.

  - Homsets are defined as computationally-relevant homsetoids (that is, using
    `crelation`). This is done using a variant of the `Setoid` type class
    defined for this library; likewise, the category of `Sets` is actually the
    category of such setoids. This increases the proof work necessary to
    establish definitions -- since preservation of the equivalence relation is
    required at all levels -- but allows categories to be flexible in what it
    means for two arrows to be equivalent.

## Notations

There are many notations used through the library, which are chosen in an
attempt to make complex constructions appear familiar to those reading modern
texts on category theory. Some of the key notations are:

 - `≈` is equivalence; equality is almost never used.
 - `≈[Cat]` is equivalence between arrows of some category, here `Cat`; this
   is only needed when type inference fails because it tries to find both the
   type of the arguments, and the type class instance for the equivalence
 - `≅` is isomorphism; apply it with `to` or `from`
 - `≊` is used specifically for isomorphisms between homsets in `Sets`
 - `iso⁻¹` also indicates the reverse direction of an isomorphism
 - `X ~> Y`: a squiggly arrow between objects is a morphism
 - `X ~{C}~> Y`: squiggly arrows may also specify the intended category
 - `id[C]`: many known morphisms allow specifying the intended category;
   sometimes this is even used in the printing format
 - `C ⟶ D`: a long right arrow between categories is a functor
 - `F ⟹ G`: a long right double arrow between functors is a natural
   transformation
 - `f ∘ g`: a small centered circle is composition of morphisms, or horizontal
   composition generally
 - `f ∘[Cat] g`: composition can specify the intended category, as an aid to
   type inference
   composition generally
 - `f ○ g`: a larger hollow circle is composition of functors
 - `f ⊙ g`: a larger circle with a dot is composition of isomorphisms
 - `f ∙ g`: a solid composition dot is composition of natural
   transformations, or vertical composition generally
 - `f ⊚ g`: a larger circle with a smaller circle is composition of
   adjunctions
 - `([C, D])`: A pair of categories in square brackets is another way to give
   the type of a functor, being an object of the category `Fun(C, D)`
 - `F ~{[C, D]}~> G`: An arrow in a functor category is a natural
   transformation
 - `F ⊣ G`: the turnstile is used for adjunctions
 - Cartesian categories use `△` as the `fork` operation and `×` for products
 - Cocartesian categories use `▽` as the `merge` operation and `+` for
   coproducts
 - Closed categories use `^` for exponents and `≈>` for the internal hom
 - As objects, the numbers `0` and `1` refer to initial and terminal objects
 - As categories, the numbers `0` and `1` refer to the initial and terminal
   objects of `Cat`
 - Products of categories can be specified using `∏`, which does not require
   pulling in the cartesian definition of `Cat`
 - Coproducts of categories can be specified using `∐`, which does not require
   pulling in the cocartesian definition of `Cat`
 - Products of functors are given with `F ∏⟶ G`, combining product and functor
   notations; the same for `∐⟶`
 - Comma categories of two functors are given by `(F ↓ G)`
 - Likewise, the arrow category of `C⃗`
 - Slice categories use a unicode forward slash `C̸c`, since the normal forward
   slash is not considered an operator
 - Coslice categories use `c ̸co C`, to avoid ambiguity

## Future directions

### Computational Solver

There are some equivalences in category-theory that are very easily expressed
and proven, but slow to establish in Coq using only symbolic term rewriting.
For example:

    (f ∘ g) △ (h ∘ i) ≈ split f h ∘ g △ i

This is solved by unfolding the definition of split, and then rewriting so
that the fork operation (here given by `△`) absorbs the terms to its left,
followed by observing the associativity of composition, and then simplify
based on the universal properties of products. This is repeated several times
until the prove is trivially completed.

Although this is easy to state, and even to write a tactic for, it can be
extremely slow, especially when the types of the terms involved becomes large.
A single rewrite can take several seconds to complete for some terms, in my
experience.

The goal of this solver is to reify the above equivalence in terms of its
fundamental operations, and then, using what we know about the laws of
category theory, to compute the equivalence down to an equation on indices
between the reduced terms. This is called *computational reflection*, and
encodes the fact that our solution only depends on the categorical structure
of the terms, and not their type.

That is, an incorrectly-built structure will simply fail to solve; but since
we're reflecting over well-typed expressions to build the structure we pass to
the solver, combined with a proof of soundness for that solver, we can know
that solvable, well-typed, terms always give correct solutions. In this way,
we transfer the problem to a domain without types, only indices, solve the
structural problem there, and then bring the solution back to the domain of
full types by way of the soundness proof.

### Compiling to categories

Work has started in `Tools/Abstraction` for compiling monomorphic Gallina
functions into "categorical terms" that can then be instantiated in any
supporting target category using Coq's type class instance resolution.

This is as a Coq implementation of an idea developed by Conal Elliott, which
he first implemented in and for Haskell. It is hoped that the medium of
categories may provide a sound means for transporting Gallina terms into other
syntactic domains, without relying on Coq's extraction mechanism.

## License

This library is made available under the MIT license, a copy of which is
included in the file `LICENSE`. Basically: you are free to use it for any
purpose, personal or commercial (including proprietary derivates), so long as
a copy of the license file is maintained in the derived work. Further, any
acknowledgement referring back to this repository, while not necessary, is
certainly appreciated.

John Wiegley

repository: jwiegley/category-theory

gha_language: Coq

repo_name: jwiegley/category-theory


text:
# Cortinarius acetosus (Velen.) Melot, 1987 SPECIES

#### Status
ACCEPTED

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

#### Published in
Docums Mycol. 17(no. 68): 65 (1987)

#### Original name
Hydrocybe acetosa Velen., 1921

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
Xray
====

### Reveal your your UI's bones

The dev tools available to web developers in modern browsers are great. Many of us can't remember what life was like before "Inspect Element". But what we see in the compiled output sent to our browser is often the wrong level of detail - what about being able to visualize the higher level components of your UI? Controllers, templates, partials, Backbone views, etc.

Xray is the missing link between the browser and your app code. Press **cmd+ctrl+x** to reveal an overlay of what files are powering your UI - click anything to open the associated file in your editor.

![Screenshot](http://dl.dropbox.com/u/156655/Screenshots/xgf7ukh3fya-.png)

## Current Support

Xray is in early stages and currently supports only Rails 3.1+ with use of the asset pipeline as a requirement.

So far, Xray can reveal:

  * Rails views and partials
  * Backbone View instances

## Installation

To use Xray, you'll need at least **jQuery** on your pages. Backbone is optional. Also, `config.assets.debug = true` (the default) must be in development.rb.

Add to your Gemfile, preferably under your development group:

```ruby
group :development do
  ...
  gem 'xray-rails'
end
```

Then bundle and delete your cached assets:

```
$ bundle && rm -rf tmp/cache/assets
```

Restart your app, open your browser, and press `cmd+ctrl+x` to see the overlay.

## Configuration

By default, Xray will open files with Sublime Text, looking for `/usr/local/bin/subl`.

You can configure this to be your editor of choice in Xray's UI, or create `~/.xrayconfig`, a YAML file.

Example `.xrayconfig`:

```yaml
:editor: '/usr/local/bin/mate'
```

Or for something more complex, use the `$file` placeholder.

```yaml
:editor: "/usr/local/bin/tmux split-window -v '/usr/local/bin/vim $file'"
```

## How this works

* During asset compilation, JS files and templates are modified to contain file path information.
* A middleware inserts `xray.js`, `xray.css`, and the Xray bar into all successful HTML response bodies.
* When the overlay is shown, `xray.js` examines the file path information inserted during asset compilation.
* Another middleware piggybacks the Rails server to respond to requests to open file paths with the user's desired editor.

## Contributing

If you have an idea, open an issue and let's talk about it, or fork away and send a pull request.

A laundry list of things to take on:

  * Reveal views from Ember, Knockout, Angular, etc.
  * Overlapping boxes are a problem - parent views in real applications will often be obscured by their children.
  * The current scheme for associating a JS constructor with a filepath is messy and can make stack traces ugly.

Worth noting is that I have plans to solidify xray.js into an API and specification that could be used to aid development in any framework - not just Rails and the asset pipeline.

repository: nneufeld/xray-rails

repo_name: nneufeld/xray-rails


text:
#     Github

List self-hosted runner groups for an organization

The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."

Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.

Method: Get

OperationID: actions/list-self-hosted-runner-groups-for-org

EndPoint:

/orgs/{org}/actions/runner-groups

repository: Ayehu/custom-activities

repo_name: Ayehu/custom-activities


text:
# Contribution Guidelines

Welcome hackers it is really **awesome** have you here! This is an old project and as such the frontend is fairly outdated,
feel free to get in contact about anything and look forward to reviewing your pull request :)

## Getting a development environment

[Docker Compose](https://docs.docker.com/compose/) is used for both local development and live environments

* `docker-composer up -d` will start the development environment with the environment variables defined in `.env.dev`
    * django / web will be available @ http://<IP_ADDRESS>:8000/
    * adminer for viewing the MySQL database is available @ http://<IP_ADDRESS>:8001/ _(see `.env.dev` for login details)_
    * mailhog for viewing sent emails is available @ http://<IP_ADDRESS>:8002/
* Run `docker-compose exec web python manage.py migrate` to install with seeded data
* Run `docker-compose exec web python manage.py createsuperuser` to create an admin user

## Submitting a pull request

1. [Fork](https://github.com/jzahedieh/django-tennis-ladder/fork) and clone the repository
1. Create a new branch: `git checkout -b my-branch-name`
1. Push to your fork and [submit a pull request](https://github.com/jzahedieh/django-tennis-ladder/compare)
1. Pat your self on the back and wait for your pull request to be reviewed and merged.

## Resources

- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
- [GitHub Help](https://help.github.com)

repository: jzahedieh/django-tennis-ladder

repo_name: jzahedieh/django-tennis-ladder


text:
# 2-4: Data Types

## Quiz Questions

**What data type is `["Hello"]`?**

* `str`
* `list`
* `tuple`
* `dict`

**What data type is `7.0`?**

* `int`
* `str`
* `float`
* `tuple`

**What is the most important difference between `list`s and `tuple`s?**

* Lists are mutable and tuples are not
* Tuples are mutable and lists are not
* Tuples are not indexed
* Lists may not have other lists as elements

repository: mttaggart/everlive-python-intro

repo_name: mttaggart/everlive-python-intro


text:
---
path: "/blog/web-animation-and-the-render-pipeline"
date: "2018-10-25T00:00:00.000Z"
title: "Web Animation and the Render Pipeline"
cover_image: "./happening-london-434316-unsplash.jpg"
cover_image_caption: "Just like the render pipeline - a carousel goes round at blazing speeds, produces stunning visuals, and may cause motion sickness if you are not careful."
tags: web animation performance
author: Daniel
load_script: "https://static.codepen.io/assets/embed/ei.js"
---

Being a student of both design and development it sort of makes sense that I would find the art of web animation so fascinating. As a discipline right on the border between the two, the freedom in shaping an intentful motion has to be tempered with knowledge of the browsers' abilities and limitations. The conflict can be frustrating to negotiate at times but also provides an engaging puzzle where the end result is likely not what was imagined in the beginning but has assumed a certain life of its own.

Or, perhaps all of that is just a vain attempt to rationalize the simple joy of making things go "swooosh" on your screen.

Whatever the case, animations are a lot of fun to work with and can, when designed and implemented with care, enhance the user experience significantly. Sometimes though developers seem to neglect good opportunities to animate because they are unsure how to do it. Or, even worse, they might implement the animation but disregard any attempt at performance.

In this article, we will explore some technical considerations imposed by our medium  -  the browser  -  in an attempt to demystify why certain animations perform better than others. More specifically, we will investigate how web browsers render elements to the screen and what this means for your animations.

So grab your hot beverage of choice, and get ready for a crash course of the render pipeline.

## The Render Pipeline

![The five steps of the render pipeline: Script, Styles, Layout, Paint and Composite](./pipeline.png "The five steps of the render pipeline: Script, Styles, Layout, Paint and Composite")

> The five steps of the render pipeline: Script, Styles, Layout, Paint and Composite

Let us take a moment to appreciate just how fast computers are. Whether you are reading this on a computer or a phone its screen is likely refreshing at a rate of 60 times per second  -  allowing each refresh a diminutive ~16 milliseconds to calculate and perform its updates. Any longer than that and you end up with janky movement in your animations. Even at the breakneck speeds of modern computing it's still a pretty tiny needle to thread.

In order to have delightfully animated and interactive pages, it is our job as developers to help the computer minimize the effort involved in updating the screen at each step, and this is much easier to do if you understand the work involved in rendering.

## Step 1: Script

`gist:dnjstrom/806543b1e776d8b40d53ba8722caae8c#script.js`

> The necessary elements of a spinner component is created and assigned classnames.

The first thing that happens in each cycle is that any pending javascript is run. Anything really can happen at this point  -  elements can be added or removed from the DOM, styles or classes modified and element states, like hover, can change. Updates due to CSS Animations or transitions are also part of this stage.

The overwhelming freedom at this point makes it difficult for the computer to automatically optimize the code, however, depending on the situation there are a lot of optimizations you can do as a developer.

### Avoid heavy computations

Maybe you can make sure the collection of posts are pre-sorted on the server.

### Offload heavy computations

Any long-running calculations that can not be avoided should be performed in a separate thread using Service Workers to avoid slowing down rendering.

### Avoid unnecessary DOM modifications

Using a shadow DOM can help minimize the necessary changes.

### Prefer CSS Animations

Their updates are automatically run in a separate thread. Next up in preference should be the Web Animation API and lastly reserve animating with regular javascript as a last resort (if at all).

### Avoid blocking javascript

When doing api calls or reading files from disk, make sure to use callbacks or promises rather than synchronous functions.

### Use requestAnimationFrame

To limit frequent updates to a reasonable rate for the given device.

## Step 2: Styles

`gist:dnjstrom/dd7a7358968dc50fb1ac945c56c15622#style.css`

> Some styles are applied to the body and other elements.

With all dynamic updates calculated it is time to inspect our stylesheets to determine what styles should be applied to what elements. This task is much more well defined than the Script stage which means the browser can be quite smart about how to optimize it. Still, there are things we can do to help it along.

### Minimize the number of selectors

Remove styles that are not relevant to the current page.

### Avoid universal selectors

Selectors like `*` or `[type="url"]` has to be checked for all elements which can add up to a hefty performance cost.

### Avoid the descendant selector

With a selector like `.article p`, all parents of each p tag has to be checked in order to determine if it matches. Use shallow selectors, like `.article > p`, whenever possible.

### Use classes

While a rule like li:nth-child(odd) has a certain elegance, from a performance standpoint it would make more sense to just add a class `.odd-row` to all odd rows.

Preferably, rules should be written so it is quick to determine if it does not apply to a given element. Rules are matched right to left, so a rule like `div .button` is more performant than `.button div` since with the latter the `.button` parent has to be checked for all `div` elements, but in the former the `div` parent only has to be checked for `.button` class elements  -  of which there are likely far fewer.

## Step 3: Layout

`gist:dnjstrom/06ffc937d83c75cde434c545c75130bf#layout.css`

> The elements of our spinner are laid out on the page and given dimensions.

So far we have mostly sorted out what elements there are and their corresponding styles, but at this stage we are ready to start figuring out what element goes where on the page and what size it should be.

![The spinner's and balls' boundry boxes](./spinner-layout.jpg "The spinner elements as the browser knows them during the layout phase.")

> The spinner elements as the browser knows them during the layout phase.

Properties like `position`, `width`, `margin` and `display` all affect how an element is laid out in the page. Many of these, such as increasing an element's height, also affect the layout of elements further down the page as it pushes on them. Consequently these properties tend to be costly to update since you almost always end up updating other elements as well. For animation they should really be avoided as much as possible. Try instead to implement your motion using only Composite-level properties that are much more efficient (more on this later).

## Step 4: Paint

`gist:dnjstrom/8c2f3defeea6dc4cbd7413c0ca14262a#paint.css`

> Colors are assigned to the individual balls and each is promoted to a separate layer.

Having determined where each element goes on the page, the browser starts filling in the content of each block. Paint properties like `background-color` are generally much more performant than layout properties, but things with a blur  -  such as shadows  -  are more demanding to paint than regular colors or images. The most effective optimization at this stage is simply to limit the size of the area that is repainted throughout the animation.

If you have part of the page changing more often than others it might also prove worthwhile to promote this element to its own layer. By specifying `will-change: transform` (or `transform: translateZ(0)` for older browsers) the element gets extracted onto a separate layer where it can easily be modified individually from the rest of the document. If you have ever worked with graphics software, like Photoshop or Gimp, this should feel familiar.

![

Take note though that each layer incurs a cost in terms of memory and computational overhead so make sure the extraction actually makes your animation more performant overall.

## Step 5: Composite

`gist:dnjstrom/5d9a419ea96f6c06df96a3822fc62f69#composite.css`

> We're using transform to create a rotating animation - taking advantage of GPU-acceleration.

The final step of the rendering pipeline is to combine the different layers into a single view for the screen, possibly with some manipulation of the layers first. The properties at this step, `transform` and `opacity`, are by far the most performant ones since they do not cause updates in any other render step and can be performed at blazing speeds on the GPU. The element first has to be moved to a separate layer (using `will-change`) in order for the performance benefits of hardware acceleration to be applicable though.

Counter-intuitively, it is more performant to rotate an element in 3D than it is to change its margin. Again though, make sure the benefits of making another layer outweighs the overhead.

 We also add some animation delay for each ball to make the overall motion more interesting.

As we have seen, each step in the pipeline has implications for what choices to make when animating but also necessitates updates in each subsequent step of the pipeline. As such it is better to try and keep changes towards the end of the pipeline in order to avoid cascading updates.

See the Pen Spinner by Daniel Ström (@dnjstrom) on CodePen.

> Our completed, highly performant, spinner - in all its glory.

Now more familiar with the five steps of the render pipeline, my hope is that exploring web animations will feel more approachable and fun to you, and for the guidelines above to provide a framework for safe exploration. Together, we should put animation to use in making the web more user friendly and delightful  -  in aesthetics as well as performance.

Finally, while this article does not really touch on tooling, anytime you are working with performance it is absolutely crucial to measure and validate the optimizations applied, and there is a bunch of tooling to help you. Check out the recommended reading for more on that and other brilliant resources.

## Further reading

The venerable Nielsen Norman Group has compiled a lot of interesting data on how to use animation to support the user experience.

* https://www.nngroup.com/articles/animation-usability/

Google has written an abundance of great articles on the topic of animation, ranging from UX to performance and tooling.

* http://jankfree.org/
* https://developers.google.com/web/fundamentals/design-and-ux/animations/
* https://developers.google.com/web/fundamentals/performance/rendering/
* https://csstriggers.com/

Anna Migas amazing talk on animation performance at Nordic.js was the primary inspiration that got me writing this article.

* https://twitter.com/szynszyliszys/status/1037668518999846912

repository: dnjstrom/dnjstrom

repo_name: dnjstrom/dnjstrom


text:
## Advocacy docs

This repo is for the Advocacy docs only. These files are in [advocacy_docs/getting-started](https://github.com/rocketinsights/edb_docs_advocacy/tree/master/advocacy_docs/getting-started)

New docs need a `.mdx` suffix to be used by Gatsby.

## frontmatter

Each document requires a `frontmatter` section at the top with a title. This looks like this:

```
---
title: Title of page
---
```

The title can be in quotes, but they are not needed unless you want an apostrophe in there. There also needs to be a space after `title:`

In addition to `title`, there is also the option of adding `navTitle` and `description` to look like this:

```
---
title: An exhaustive guide to all things wonderful about Postgres
navTitle: Postgres guide
description: Everything you need to know about Postgres
---
```

The `navTitle` is used for the left navigation so it can take up less space. It is also used in "cards".

The `description` is used in cards as well.

## Markdown styling

All of these files use Markdown for styling. The options for what can be done can be seen [here](https://github.com/rocketinsights/edb_docs_advocacy/blob/master/docs/playground/1/01_examples/index.mdx)

## Ordering of files

The items in the left nav are sorted alphabetically by file name. This can be done with a numerical prefix. The titles of each page are used for the names in the left nav.

## Running the site locally

Follow this setup to run the site locally. Once started, use the `Installing Postgres` and `Connecting to Postgres` links in the top-right to access the Getting Started content. The rest of the links will not work.

1. This project requires Node 10.13.0 or higher to run Gatsby
2. Install yarn and gatsby with `npm i -g gatsby-cli` and `npm i -g yarn`
3. Install all packages with `yarn`
5. Run `git submodule update --init` to initialize the icons submodule
4. Run the site locally with `gatsby develop`

### Running Katacoda embeds locally
If you need to run the Katacoda embeds during local development, you'll need to have SSL setup locally.

1. Run the server with `gatsby develop --https`. When promped, enter your root password. This will configured a local certificate for the development server to use. If you have issues, see [this Gatsby doc](https://www.gatsbyjs.org/docs/local-https/#manual-installation-of-certutil).

## Icons

We're using the shared [edb-icons repository](https://github.com/rocketinsights/edb-icons) as a git submodule. Any updates to icons should be made in this repository. When you're ready to pull in changes, run `git submodule update --remote`.

## Content submission

To add content to this site, changes must be submitted as a PR. There are two options for this:

Option 1: locally

1. Clone repo
2. Make a new branch
3. Add commits to branch and push to github
4. Create a new PR on github

Option 2: on github

1. Edit a file on github
2. Submit changes as a PR on a new branch

## Advocacy site vs the "main site"

This repo covers all of the advocacy content. This is then used by the main site when the main site builds a new version of the app.

When the main site builds it takes content only from the `advocacy_docs` folder in the `master` branch of this repo. It then builds the whole site along with all of the product docs.

From the perspective of this repo the process of getting content into the main app requires that any commits be merged into the `master` branch and a build is triggered for the main app.

Once content is merged into `master`, this test site will rebuild:

https://edb-docs-advocacy.herokuapp.com

In addition to the content, there is also a
file, `advocacy-index-nav.json`, that is used to create the left nav on the front page of both the advocacy test site and the main site.

Again, for this to show on the main site, changes need to be committed to `master` and the main site built.

## Search

Content is indexed for search when the main site builds.