text:
# Things to do manually
## Make mouse work correctly
System Preferences > Mouse > Point & Click
 * Secondary click -> 'Click on right side'
 * Disable 'Scroll direction: Natural'

## Close terminal on exit
Terminal > Preferences > Profiles > Basic > Shell
 * 'When the shell exits' -> 'Close if the shell exited cleanly'

## Change terminal colors
Terminal > Preferences > Profiles > Basic
 * Background -> rgb(28, 28, 28)
 * Text -> White
 * Bold Text -> Cyan
 * Selection -> Orange
 * Cursor -> White (60% Opacity)

## Terminal special keys working
Terminal > Preferences > Profiles > Basic > Keyboard
 * Click plus and add options:
   * Ctrl + Up -> \033[1;5A
   * Ctrl + Right -> \033[1;5C
   * Ctrl + Down -> \033[1;5B
   * Ctrl + Left -> \033[1;5D
 * Remove following options:
   * ⌥ + Right
 * Enable following checkboxes
   * Use Option as Meta key

System Preferences > Keyboard > Shortcuts
 * Disable 'Mission Control/Mission Control'
 * Disable 'Mission Control/Application windows'
 * Disable 'Mission Control/Move left a space'
 * Disable 'Mission Control/Move right a space'

## Customize Terminal Colors for Mac
`vim ~/.bash_aliases`
 * Change the 'HOST_CLR' line

## Install Applications
App Store > Search
 * Install 'Microsoft Remote Desktop'
 * Install 'Keka'

Manually from website:
 * Install 'Google Chrome' from site
 * Install 'flux' from [site](https://justgetflux.com/news/pages/macquickstart)
 * Install 'Spotify' from [site](https://www.spotify.com/us/download/mac)
 * Install 'Zoom' from [site](https://zoom.us/meetings)
 * Install 'Docker' from [site](https://download.docker.com/mac/stable/Docker.dmg)
 * Install 'SpiderOak' from [site](https://spideroak.com/one/download/)
 * Install 'Viscosity' from [site](https://www.sparklabs.com/viscosity/download/)

## Keyboard key repeat delay
System Preferences > Keyboard > Delay Until Repeat
 * Set it to 4 out of 6

repository: jasimmonsv/default-setups

repo_name: jasimmonsv/default-setups


text:
# GitHub-Analysis

This project contains code for parsing and analysis data availabe from githubarchive.org

## Installation

- Download data from http://githubarchive.org. Put each month in separate folder with name year-month (e.g 2012-4)
- [Download gha.jar](https://docs.google.com/folder/d/0Byh8AijvGkRlRzBOeEp5TlpNVm8/edit).

## Run application

Run the application to extract events for particular repository with command:

    java -jar gha.jar params.yaml

Sample params.yaml:
```YAML
# Extract events from repository rails/rails into events.csv where data in range from 2011-11 to 2012-1

command: find_events

repository: rails/rails

date:
  from: 2011-11
  to: 2012-1

datapath: /home/klangner/datasets/github

output: events.csv
```

[See more](github-analysis/blob/master/docs/configs.md)

## Packages

- **com.matrobot.gha.archive** - Contains code to parse githubarchive.org files and create
intermediate csv and json files which can be processed by other packages or
external programs like [weka](http://www.cs.waikato.ac.nz/~ml/weka/).
- **com.matrobot.gha.insights** - Contains code for analyzing data and find patterns in it.
- **com.matrobot.gha.ghapi** - Get data from GitHub API.

Important links
===============

- Visualization: http://matrobot.com
- Data: http://githubarchive.org
- [Google groups for githubarchive.org](https://groups.google.com/forum/?fromgroups=#!forum/github-archive)

Dependencies
============

This project uses Maven to resolve dependencies

license: MIT

repository: aronlindberg/github-analysis

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: aronlindberg/github-analysis


text:
# Health-Track API

## API Endpoints

### Notes
- **userId (String)** - User ID
- **noteId (String)** - Note ID
- **habit (String)** - Habit the note has been recorded for
- **eventDatetime (Datetime)** - Datetime event being noted took place
- **note (String)** - Optional description of noted habit
- **attachment (String)** - Optional filename of attachment
- **createdAt (Datetime)** - Datetime record created

#### createNote
- Creates new note for currently authenticated user
- Path: **/notes**
- Method: **POST**

#### getNote
- Returns note with specified ID for currently authenticated user
- Path: **/notes/{id}**
- Method: **GET**

#### listNotes
- Fetches all notes records for currently authenticated user
- Path: **/notes**
- Method: **GET**

#### updateNote
- Updates the note with the provided ID
- Path: **/notes/{id}**
- Method: **PUT**

#### removeNote
- Deletes the note with the provided ID
- Path: **/notes/{id}**
- Method: **DELETE**

### Configs
- **userId (String)** - User ID
- **habits (String[])** - Array of strings (habits) configured for the user

#### listConfigs
- Fetches configurations  for currently authenticated user
- Path: **/configs**
- Method: **GET**

#### updateConfigs
- Updates configurations for currently authenticated user
- Path: **/configs**
- Method: **PUT**

### Goals
- **userId (String)** - User ID
- **goalId (String)** - Goal ID
- **habit (String)** - Habit the goal is tracking
- **target (Integer)** - Target number of recorded habits to reach goal
- **measure (String)** - Unit of measure for goal (Day, Week, Month)
- **createdAt (Datetime)** - Datetime record created

#### createGoal
- Creates a new goal for currently authenticated user
- Path: **/goals**
- Method: **POST**

#### removeGoal
- Deletes goal with the provided ID
- Path: **/goals/{id}**
- Method: **DELETE**

#### getGoalProgress
- Fetches list of goals for currently authenticated user with 'current' field indicating the progress towards the goal target
- Path: **/goals/progress**
- Method: **GET**

#### getGoalSummary
- Returns aggregate goals for each measure (Day, Week, Month) with current progress
- Path: **/goals/summary**
- Method: **GET**

### Installation
Prerequisites:
- [Install the Serverless Framework](https://serverless.com/framework/docs/providers/aws/guide/installation/)
- [Configure your AWS CLI](https://serverless.com/framework/docs/providers/aws/guide/credentials/)

Install the Node.js packages

``` bash
$ npm install
```

### Usage

To run unit tests on your local

``` bash
$ npm test
```

To run a function on your local

``` bash
$ serverless invoke local --function funcName --path path/to/mock_file
```

To simulate API Gateway locally using [serverless-offline](https://github.com/dherault/serverless-offline)

``` bash
$ serverless offline start
```

We use Jest to run our tests. You can read more about setting up your tests [here](https://facebook.github.io/jest/docs/en/getting-started.html#content).

Deploy your project

``` bash
$ serverless deploy
```

Deploy a single function

``` bash
$ serverless deploy function --function funcName
```

To add environment variables to project
1. Rename `env.example` to `env.yml`.
2. Add environment variables for the various stages to `env.yml`.
3. Uncomment `environment: ${file(env.yml):${self:provider.stage}}` in the `serverless.yml`.
4. Make sure to not commit your `env.yml`.

repository: efonzie/health-track-api

gha_language: JavaScript

gha_license_id: MIT

repo_name: efonzie/health-track-api


text:
# Sanic JWT

[![Latest PyPI version](https://img.shields.io/pypi/v/sanic-jwt.svg)](https://pypi.python.org/pypi/sanic-jwt)
[![Version status](https://img.shields.io/pypi/status/sanic-jwt.svg)](https://pypi.python.org/pypi/sanic-jwt)
[![Python versions](https://img.shields.io/pypi/pyversions/sanic-jwt.svg)](https://pypi.python.org/pypi/sanic-jwt)
[![Build Status](https://travis-ci.org/ahopkins/sanic-jwt.svg?branch=master)](https://travis-ci.org/ahopkins/sanic-jwt)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9727756ffccd45f7bc5ad6292596e03d)](https://www.codacy.com/app/ahopkins/sanic-jwt?utm_source=github.com&utm_medium=referral&utm_content=ahopkins/sanic-jwt&utm_campaign=Badge_Grade)

JSON Web Tokens for [Sanic](https://github.com/channelcat/sanic) applications. This project was originally inspired by [Flask JWT](https://github.com/mattupstate/flask-jwt) and [Django Rest Framework JWT](https://github.com/getBlimp/django-rest-framework-jwt), but some departing decisions have been made.

1. [Getting Started](https://github.com/ahopkins/sanic-jwt#getting-started)
1. [Authenticate](https://github.com/ahopkins/sanic-jwt#authenticate)
    1. [`class_views`](https://github.com/ahopkins/sanic-jwt#class_views)
    1. [`store_refresh_token`](https://github.com/ahopkins/sanic-jwt#store_refresh_token)
    1. [`retrieve_refresh_token`](https://github.com/ahopkins/sanic-jwt#retrieve_refresh_token)
    1. [`retrieve_user`](https://github.com/ahopkins/sanic-jwt#retrieve_user)
1. [Other initialization parameters](https://github.com/ahopkins/sanic-jwt#other-initialization-parameters)
1. [Endpoints](https://github.com/ahopkins/sanic-jwt#endpoints)
    1. [`/auth`](https://github.com/ahopkins/sanic-jwt#auth)
    1. [`/auth/verify`](https://github.com/ahopkins/sanic-jwt#authverify)
    1. [`/auth/me`](https://github.com/ahopkins/sanic-jwt#authme)
    1. [`/auth/refresh`](https://github.com/ahopkins/sanic-jwt#authrefresh)
1. [Protecting routes](https://github.com/ahopkins/sanic-jwt#protecting-routes)
1. [Scopes](https://github.com/ahopkins/sanic-jwt#scopes)
1. [Settings](https://github.com/ahopkins/sanic-jwt#settings)

## Getting Started

Install from pypi using:

    pip install sanic-jwt

In order to add __Sanic JWT__, all you need to do is initialize it by passing the `sanic_jwt.initialize` method the `Sanic()` instance, and an authentication function.

```python
from sanic_jwt import initialize

async def authenticate(request):
    return dict(user_id='some_id')

app = Sanic()
initialize(app, authenticate)
```

## Authenticate

Because Sanic (and this package) are agnostic towards whatever user management system you use, you need to tell __Sanic JWT__ how it should authenticate a user.

You __MUST__ define this method. It should take a `request` argument, and return a subscriptable object with `user_id` key or or object with `user_id` attribute (can be customized by __`SANIC_JWT_USER_ID`__, see [Settings](https://github.com/ahopkins/sanic-jwt#settings) for details).

```python
async def authenticate(request):
    return dict(user_id='some_id')
```

A very basic user management system might be as follows, with its corresponding `authenticate` method:

```python
from sanic_jwt import exceptions

class User(object):
    def __init__(self, id, username, password):
        self.user_id = id
        self.username = username
        self.password = password

    def __str__(self):
        return "User(id='%s')" % self.id

users = [
    User(1, 'user1', 'abcxyz'),
    User(2, 'user2', 'abcxyz'),
]

username_table = {u.username: u for u in users}
userid_table = {u.user_id: u for u in users}

async def authenticate(request, *args, **kwargs):
    username = request.json.get('username', None)
    password = request.json.get('password', None)

    if not username or not password:
        raise exceptions.AuthenticationFailed("Missing username or password.")

    user = username_table.get(username, None)
    if user is None:
        raise exceptions.AuthenticationFailed("User not found.")

    if password != user.password:
        raise exceptions.AuthenticationFailed("Password is incorrect.")

    return user
```

## Other initialization parameters

### __`class_views`__

Default: `None`

Purpose: If you would like to add additional views to the authentication module, you can add them here. They must be [class based views](http://sanic.readthedocs.io/en/latest/sanic/class_based_views.html). Side note, your CBV will probably also need to handle preflight requests, so do not forget to add an `options` response.

Example: The below example could be used in creating a "magic" passwordless login authentication.

    class MagicLoginHandler(HTTPMethodView):
        async def options(self, request):
            return response.text('', status=204)

        async def post(self, request):
            # create a magic login token and email it to the user

            response = {
                'magic-token': token
            }
            return json(response)

    initialize(
        app,
        authenticate=lambda: True,
        class_views=[
            ('/magic-login', MagicLoginHandler)     # The path will be relative to the url prefix (which defaults to /auth)
        ]
    )

### __`store_refresh_token`__

Default: `None`

Purpose: **Required** if `SANIC_JWT_REFRESH_TOKEN_ENABLED` is set to `True` in the config. It is a handler to **store** a refresh token. If you do not set it up, and you have enabled refresh tokens, then the application will raise a `RefreshTokenNotImplemented` exception.

Example:

    def store_refresh_token(user_id, refresh_token, *args, **kwargs):
        key = 'refresh_token_{user_id}'.format(user_id=user_id)

        async def store(key):
            await aredis.set(key, refresh_token)

        app.add_task(store(key))

    initialize(
        app,
        authenticate=lambda: True,
        store_refresh_token=store_refresh_token
    )

### __`retrieve_refresh_token`__

Default: `None`

Purpose: **Required** if `SANIC_JWT_REFRESH_TOKEN_ENABLED` is set to `True` in the config. It is a handler to **retrieve** a refresh token. If you do not set it up, and you have enabled refresh tokens, then the application will raise a `RefreshTokenNotImplemented` exception.

Example:

    def retrieve_refresh_token(user_id, *args, **kwargs):
        key = 'refresh_token_{user_id}'.format(user_id=user_id)

        async def retrieve(key):
            return await aredis.get(key)

        app.add_task(retrieve(key))

    initialize(
        app,
        authenticate=lambda: True,
        retrieve_refresh_token=retrieve_refresh_token
    )

### __`retrieve_user`__

Default: `None`

Purpose: Given a `request` and a `payload`, this is a handler to retrieve a user object from your application to be used, for example in the `/me` endpoint. It should return either a `dict` or an instance of an object that either has a `to_dict` method, or `__dict__` method.

Example:

    class User(object):
        ...

        def to_dict(self):
            properties = ['user_id', 'username', 'email', 'verified']
            return {prop: getattr(self, prop, None) for prop in properties}

    def retrieve_user(request, payload, *args, **kwargs):
        if payload:
            user_id = payload.get('user_id', None)
            user = User.get(user_id=user_id)
            return user
        else:
            return None

    initialize(
        app,
        authenticate=lambda: True,
        retrieve_user=retrieve_user
    )

## Endpoints

### `/auth`

Methods: __POST__

Generates an access token if the `authenticate` method is `True`. Using the example above, pass it a `username` and `password` and return an access token.

    curl -X POST -H "Content-Type: application/json" -d '{"username": "<USERNAME>", "password": "<PASSWORD>"}' http://localhost:8000/auth

The response, if the user credentials are valid:

    {
        "access_token": "<JWT>"
    }

### `/auth/verify`

Methods: __GET__

Returns with whether or not a given access token is valid.

    curl -X GET -H "Authorization: Bearer <JWT>" http://localhost:8000/auth/verify

Assuming that it is valid, the response:

    200 Response
    {
        "valid": true
    }

If it is not valid, you will also be given a reason.

    400 Response
    {
        "valid": false,
        "reason": "Signature has expired"
    }

### `/auth/me`

Methods: __GET__

Returns information about the currently authenticated user.

    curl -X GET -H "Authorization: Bearer <JWT>" http://localhost:8000/auth/me

Assuming that it is valid, the response:

    200 Response
    {
        "user_id": 123456
    }

As discussed, because the application is agnostic about your user management decisions, you need to have a user object that either is a `dict` or a object instance with a `to_dict` or `__dict__` method. The output of these methods will be used to generate the `/me` response.

### `/auth/refresh`

Methods: __POST__

Validates the refresh token, and provides back a new access token.

    curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <JWT>" -d '{"refresh_token": "<REFRESH TOKEN>"}' http://localhost:8000/auth/refresh

The response, if the refresh token is valid.

    {
        "access_token": "<JWT>"
    }

_Note: Right now, you are required to send the access token (aka `JWT`) and the refresh token. Why? Well, it seems like a good idea to facilitate the lookup of refresh tokens by knowing against which user you are trying to look up. The alternative is to lookup the user by refresh token alone. But, with this method, we are explicitly sending the user information in the `JWT`. While there is **NO** verification of the `JWT` at this stage, it is used to pass the payload. This decision may be subject to change in the future._

## Protecting routes

A route can be protected behind authentication simply by applying the `@protected()` decorator.

```python
from sanic_jwt.decorators import protected

@app.route("/")
async def open_route(request):
    return json({"protected": False})

@app.route("/protected")
@protected()
async def protected_route(request):
    return json({"protected": True})
```

## Scopes

In addition to protecting routes to authenticated users, they can be scoped to require one or more scopes by applying the `@scoped()` decorator.

### Requirements for a scope

A **scope** is a string that consists of two parts: *namespace*, and *action(s)*. For example, it might look like this: `user:read`.

**namespace** - A scope can have either one namespace, or no namespaces.
**action** - A scope can have either no actions, or many actions.

### Example scopes

    scope:     user
    namespace: user
    action:    --

    scope:     user:read
    namespace: user
    action:    read

    scope:     user:read:write
    namespace: user
    action:    [read, write]

    scope:     :read
    namespace: --
    action:    read

### How are scopes accepted?

In defining a scoped route, you define one or more scopes that will be acceptable. A scope is accepted if the payload contains a scope that is equal to or higher than what is required. For sake of clarity in the below explanation, `required_scope` means the scope that is required for access, and `user_scope` is the scope the payload has.

A scope is acceptable ...

- If the `required_scope` namespace and the `user_scope` namespace are equal
```
# True
required_scope = 'user'
user_scope = 'user'
```
- If the `required_scope` has actions, then the `user_scope` must be top level (no defined actions), or also has the same actions
```
# True
required_scope = 'user:read'
user_scope = 'user'

# True
required_scope = 'user:read'
user_scope = 'user:read'

# True
required_scope = 'user:read'
user_scope = 'user:read:write'

# True
required_scope = ':read'
user_scope = ':read'
```

### Examples

Here is a list of example scopes and whether they pass or not:

    required scope      user scope(s)                    outcome
    ==============      =============                    =======
    'user'              ['something']                    False
    'user'              ['user']                         True
    'user:read'         ['user']                         True
    'user:read'         ['user:read']                    True
    'user:read'         ['user:write']                   False
    'user:read'         ['user:read:write']              True
    'user'              ['user:read']                    False
    'user:read:write'   ['user:read']                    False
    'user:read:write'   ['user:read:write']              True
    'user:read:write'   ['user:write:read']              True
    'user'              ['something', 'else']            False
    'user'              ['something', 'else', 'user']    True
    'user:read'         ['something:else', 'user:read']  True
    'user:read'         ['user:read', 'something:else']  True
    ':read'             [':read']                        True
    ':read'             ['admin']                        True

### Applying `@scoped()`

In order to protect a route from being accessed by tokens without the appropriate scope(s), pass in one or more scopes:

```python
@app.route("/protected/scoped/1")
@protected()
@scoped('user')
async def protected_route1(request):
    return json({"protected": True, "scoped": True})
```

In the above example, only an access token with a payload containing a scope for `user` will be accepted (such as the payload below).

    {
        "user_id": 1,
        "scopes: ["user"]
    }

You can also define multiple scopes:

```python
@scoped(['user', 'admin'])
```

In the above example, a payload **MUST** have both the `user` and `admin` scopes defined.

But, what if we only want to require one of the scopes, and not both `user` **AND** `admin`? Easy:

```python
@scoped(['user', 'admin'], False)
```

Now, having a scope of either `user` **OR** `admin` will be acceptable.

#### Parameters

The `@scoped()` decorator takes three parameters:

    scoped(scopes, requires_all, require_all_actions)

__`scopes`__
Either a single `string`, or a `list` of strings that are the defined scopes for the route.

```python
@scoped('user')
...

# Or

@scoped(['user', 'admin'])
...
```

__`require_all`__
A `boolean` that determines whether all of the defined scopes, or just one must be satisfied. Defaults to `True`.

```python
@scoped(['user', 'admin'])
...
# A payload MUST have both 'user' and 'admin' scopes

@scoped(['user', 'admin'], require_all=False)
...
# A payload can have either 'user' or 'admin' scope
```

__`require_all_actions`__
A `boolean` that determines whether all of the actions on a defined scope, or just one must be satisfied. Defaults to `True`.

```python
@scoped(':read:write')
...
# A payload MUST have both the `:read` and `:write` actions in scope

@scoped(':read:write', require_all_actions=False)
...
# A payload can have either the `:read` or `:write` action in scope
```

### Example

See `example/scopes.py` for a full working example with various scopes and users.

## Settings

__`SANIC_JWT_ACCESS_TOKEN_NAME`__

Default: `'access_token'`

Purpose: The key to be used in the payload to identify the access token.

__`SANIC_JWT_ALGORITHM`__

Default: `'HS256'`

Purpose: The hashing algorithm used to generate the tokens. Your available options are:

- __HS256__ - HMAC using SHA-256 hash algorithm (default)
- __HS384__ - HMAC using SHA-384 hash algorithm
- __HS512__ - HMAC using SHA-512 hash algorithm
- __ES256__ - ECDSA signature algorithm using SHA-256 hash algorithm
- __ES384__ - ECDSA signature algorithm using SHA-384 hash algorithm
- __ES512__ - ECDSA signature algorithm using SHA-512 hash algorithm
- __RS256__ - RSASSA-PKCS1-v1_5 signature algorithm using SHA-256 hash algorithm
- __RS384__ - RSASSA-PKCS1-v1_5 signature algorithm using SHA-384 hash algorithm
- __RS512__ - RSASSA-PKCS1-v1_5 signature algorithm using SHA-512 hash algorithm
- __PS256__ - RSASSA-PSS signature using SHA-256 and MGF1 padding with SHA-256
- __PS384__ - RSASSA-PSS signature using SHA-384 and MGF1 padding with SHA-384
- __PS512__ - RSASSA-PSS signature using SHA-512 and MGF1 padding with SHA-512

__`SANIC_JWT_AUTHORIZATION_HEADER`__

Default: `'authorization'`

Purpose: The HTTP request header used to identify the token. See also `SANIC_JWT_AUTHORIZATION_HEADER_PREFIX`.

Example:

    Authorization: Bearer <JWT HERE>

__`SANIC_JWT_AUTHORIZATION_HEADER_PREFIX`__

Default: `'Bearer'`

Purpose: The prefix for the JWT in the HTTP request header used to identify the token. See also `SANIC_JWT_AUTHORIZATION_HEADER`.

Example:

    Authorization: Bearer <JWT HERE>

__`SANIC_JWT_AUTHORIZATION_HEADER_REFRESH_PREFIX`__

Default: `'Refresh'`

Purpose: _Not currently in use._

__`SANIC_JWT_CLAIM_AUD`__

Default: `None`

Purpose: The aud (audience) claim identifies the recipients that the JWT is intended for. Each principal intended to process the JWT MUST identify itself with a value in the audience claim. If the principal processing the claim does not identify itself with a value in the aud claim when this claim is present, then the JWT MUST be rejected. In the general case, the aud value is an array of case-sensitive strings, each commonly containing a string or URI value. In the special case when the JWT has one audience, the aud value MAY be a single case-sensitive string containing a string or URI value. Use of this claim is OPTIONAL. If you assign a `str` value, then the aud claim will be generated for all requests, and will be required to verify a token.

__`SANIC_JWT_CLAIM_IAT`__

Default: `None`, requires a `bool` value

Purpose: The iat (issued at) claim identifies the time at which the JWT was issued. This claim can be used to determine the age of the JWT. Its value will be a numeric timestamp. Use of this claim is OPTIONAL. If you assign a `True` value, then the iat claim will be generated for all requests.

__`SANIC_JWT_CLAIM_ISS`__

Default: `None`, requires a `str` value

Purpose: The iss (issuer) claim identifies the principal that issued the JWT. The iss value is a case-sensitive string usually containing a string or URI value. Use of this claim is OPTIONAL. If you assign a `str` value, then the iss claim will be generated for all requests, and will be required to verify a token.

__`SANIC_JWT_CLAIM_NBF`__

Default: `None`

Purpose: The nbf (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing. The processing of the nbf claim requires that the current date/time MUST be after or equal to the not-before date/time listed in the nbf claim. Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. Its value will be a numeric timestamp. Use of this claim is OPTIONAL. If you assign a `True` value, then the nbg claim will be generated for all requests, and will be required to verify a token. If `True`, the nbf claim will be set to the current time of the generation of the token. You can modify this with two additional settings: `SANIC_JWT_CLAIM_NBF_DELTA` (the number of seconds to add to the timestamp) and `SANIC_JWT_LEEWAY` (the number of seconds of leeway you want to allow for).

__`SANIC_JWT_CLAIM_NBF_DELTA`__

Default: `0`

Purpose: The offset in _seconds_ between the moment of token generation and the moment when you would like the token to be valid in the future. See `SANIC_JWT_CLAIM_NBF` for more details.

__`SANIC_JWT_COOKIE_DOMAIN`__

Default: `''`

Purpose: Used when `SANIC_JWT_COOKIE_SET` is set to `True`. When generating the cookie, it will associate it with this domain.

__`SANIC_JWT_COOKIE_HTTPONLY`__

Default: `True`

Purpose: Used when `SANIC_JWT_COOKIE_SET` is set to `True`. It enables HTTP only cookies. **HIGHLY recommended that you do not turn this off, unless you know what you are doing.**

__`SANIC_JWT_COOKIE_SET`__

Default: `False`

Purpose: By default, the application will lookie for access tokens in the HTTP request headers. If you would instead prefer to send them through cookies, enable this to `True`.

__`SANIC_JWT_COOKIE_TOKEN_NAME`__

Default: `SANIC_JWT_ACCESS_TOKEN_NAME`, will take whatever value is set there

Purpose: The name of the cookie to be set for storing the access token if using cookie based authentication.

__`SANIC_JWT_COOKIE_REFRESH_TOKEN_NAME`__

Default: `SANIC_JWT_REFRESH_TOKEN_NAME`, will take whatever value is set there

Purpose: The name of the cookie to be set for storing the refresh token if using cookie based authentication.

__`SANIC_JWT_EXPIRATION_DELTA`__

Default: `60 * 5 * 6`

Purpose: The length of time that the access token should be valid. _Since there is **NO** way to revoke an access token, it is recommended to keep this time period short, and to enable refresh tokens (which can be revoked) to retrieve new access tokens._

__`SANIC_JWT_PAYLOAD_HANDLER`__

Default: `'sanic_jwt.handlers.build_payload'`

Purpose: A handler method used to generate a payload. If you override this method, then you must return a `dict` with a key to the user id. See `SANIC_JWT_USER_ID`. In **MOST** cases, you should not need to override this method. If you would like to add additional information into a payload, the recommended method is to use `SANIC_JWT_HANDLER_PAYLOAD_EXTEND`.

__`SANIC_JWT_HANDLER_PAYLOAD_EXTEND`__

Default: `'sanic_jwt.handlers.extend_payload'`

Purpose: A handler method used to add additional information into a payload. It takes a `payload` as an input, and returns the payload with the additional information. If you have any of the registered claims enabled (see `SANIC_JWT_CLAIM_ISS`, `SANIC_JWT_CLAIM_IAT`, `SANIC_JWT_CLAIM_NBF`, `SANIC_JWT_CLAIM_AUD`), then you must return them with this handler. Therefore, it is recommended to call `sanic_jwt.handlers.extend_payload` inside your custom handler so as to make sure they are assigned properly.

Example:

    from sanic_jwt.handlers import extend_payload

    async def my_foo_bar_payload_extender(authenticator, payload, *args, **kwargs):
        payload = extend_payload(authenticator, payload, *args, **kwargs)

        payload.update({
            'foo': 'bar'
        })

        return payload

__`SANIC_JWT_HANDLER_PAYLOAD_SCOPES`__

Default: `None`

Purpose: A handler method used to add scopes into a payload. It is a convenience method so that you do not need to extend the payload with the more verbose (yet, more flexible) `SANIC_JWT_HANDLER_PAYLOAD_EXTEND`. It should return either a `string` or a `list` of `strings` that meet the scope requirements. See the secion on Scopes for more details. Also, to make it easier for the developer, the `user` instance that is returned by the `authenticate` method is passed in as a parameter as seen below.

Example:

    async def my_scope_extender(user, *args, **kwargs):
        return user.scopes

__`SANIC_JWT_LEEWAY`__

Default: `180`

Purpose: The number of seconds of leeway that the application will use to account for slight changes in system time configurations.

__`SANIC_JWT_REFRESH_TOKEN_ENABLED`__

Default: `False`

Purpose: Whether or not you would like to generate and accept refresh tokens.

__`SANIC_JWT_REFRESH_TOKEN_NAME`__

Default: `'refresh_token'`

Purpose: The key to be used in the payload to identify the refresh token.

__`SANIC_JWT_SCOPES_NAME`__

Default: `'scopes'`

Purpose: The key to be used in the payload to identify the scopes.

__`SANIC_JWT_SECRET`__

Default: `'This is a big secret. Shhhhh'`

Purpose: When generating JWT tokens, a secret is used to uniquely identify and authenticate them. This should be a string unique to your application. Keep it safe.

__`SANIC_JWT_URL_PREFIX`__

Default: `'/auth'`

Purpose: The url prefix used for all URL endpoints. Note, the placement of `/`.

__`SANIC_JWT_USER_ID`__

Default: `'user_id'`

Purpose: The key or property of your user object that contains a user id.

repository: Garito/sanic-jwt

repo_name: Garito/sanic-jwt


text:
# Contributing to Jai

Thank you for your interest in contributing to Jai!

## Feature Requests

Feature requests should be reported in the
[Jai issue tracker](https://github.com/jakeroggenbuck/jai/issues). To reduce the number of
duplicates, please make sure to check the existing

## Bug Reports

Bug reports should be reported in the
[Jai issue tracker](https://github.com/jakeroggenbuck/jai/issues).

If a bug was not present in a previous version of Jai, providing the exact commit which
introduced the regression helps out a lot.

## Patches / Pull Requests

All patches have to be sent on Github as [pull requests](https://github.com/jakeroggenbuck/jai/pulls).

If you are looking for a place to start contributing to Jai, take a look at the
[help wanted](https://github.com/jakeroggenbuck/jai/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
and
[easy](https://github.com/jakeroggenbuck/jai/issues?q=is%3Aopen+is%3Aissue+label%3A%22D+-+easy%22)
issues.

# Contact

If there are any outstanding questions about contributing to Jai, they can be asked on the
[Jai issue tracker](https://github.com/jakeroggenbuck/Jai/issues).

repository: JakeRoggenbuck/jai

branch_name: refs/heads/main

gha_language: Python

repo_name: JakeRoggenbuck/jai


text:
### [CVE-2022-26125](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-26125)
![](https://img.shields.io/static/v1?label=Product&message=FRRouting&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-119&color=brighgreen)

### Description

Buffer overflow vulnerabilities exist in FRRouting through 8.1.0 due to wrong checks on the input packet length in isisd/isis_tlvs.c.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---
name: Bug report
about: Create a report to help us improve
title: "Issue title"
labels: ''
assignees: ''

---

**ISSUES will not receive priority that do not follow this template or cannot be easily reproduced or diagnosed**

**Describe the bug**
A clear and complete description of what the bug is. Please explain in detail what the bug is. Most people are too brief in the description and it results in delays addressing issues as we go back and forth with questions. Please spend some time writing a complete description.

**To Reproduce**

Steps to reproduce the behavior:

1. Clone this repository
2. Edit your reproducible, minimal, stand-alone test case into the test/debug.ts file.
3. Run via `jest debug` or run VS code in the top level directory.

If you don't edit debug.ts and provide snippets of code, then your issue may not receive priority.

Ensure that your debug.ts includes:

1. Your OneTable schema (complete schema with indexes and models).
2. Actual API code that is failing. Don't use code snippets. Add comments where helpful.
3. Run API with params of {log: true} and include generated DynamoDB API calls

Check that:

1. You are using a current version of Node and NPM

**Cut/Paste**

Include the code from your debug.ts here and replace the CODE segment. Remember to preserve the three backticks above and below the code block.  See [Formatting Code](https://www.freecodecamp.org/news/how-to-format-code-in-markdown/) for details.

```
PUT YOUR DEBUG.TS CODE HERE.
```

```
PUT YOUR LOG OUTPUT HERE showing the actual DynamoDB command issued.
```

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
 - OS
 - Node Version
 - OneTable Version

**Additional context**
Add any other context about the problem here.

repository: rjmackay/dynamodb-onetable

repo_name: rjmackay/dynamodb-onetable


text:
# Helicoidal: A Scala wrapper for Apache Helix

*Only a few features are implemented at this point in time.*

## State model creation
```
import im.jeanfrancois.spiral.dsl._

val Master = HelixState("MASTER")
val Slave = HelixState("SLAVE")
val Offline = HelixState("OFFLINE")

val stateModelDef = StateModelDef("My state model")
  .withStates(
    Master priority 1,
    Slave priority 2,
    Offline)
  .withInitialState(Offline)
  .withTransitions(
    Offline → Slave priority 1,
    Slave → Offline,
    Slave → Master,
    Master → Slave
  )
  .withUpperBounds(
    Master upTo 1,
    Slave upTo ReplicaCount,
    Offline upTo NodeCount
  )
```

repository: jfim/helicoidal

repo_name: jfim/helicoidal


text:
## Requirements
* OpenCV 2.4.13
* Python 2.7.12
* PC with a built-in camera

## How to use
`python main.py`

## License
MIT

repository: hashedhyphen/monsterball

repo_name: hashedhyphen/monsterball


text:
# 01.ThrowableHandler

## Description

Showcase on [exception handling](https://www.php.net/manual/en/language.exceptions.php) strategies.

## Examples

### [00.handle-plain.php](00.handle-plain.php)

A basic `try/catch` example. Once the exception gets caught, it is analyzed by the exception handler which is used to generate a plain exception document.

> Output a plain text exception document

### [01.handle-console.php](01.handle-console.php)

Same as `00.handle-plain.php` but generating a colorized console output.

> Output a console exception output for `Whoops...`

### [02.handle-html.php](02.handle-html.php)

Same as `00.handle-plain.php` but generating two documents, for the same caught exception.

> Writes [02.handle-html.php-loud.html](02.handle-html.php-loud.html) and [02.handle-html.php-silent.html](02.handle-html.php-silent.html)

### [03.errors-as-exception.php](03.errors-as-exception.php)

An example using `\set_error_handler` for handling errors as exceptions.

> Output `Caught an error as exception`

### [04.register-handler.php](04.register-handler.php)

An example using `\set_exception_handler` for handling exceptions in the console.

> Output a console exception document

repository: chevere/examples

repo_name: chevere/examples


text:
# 3. Arrow function

```js
// Arrow functions
const years = [1990, 1965, 1982, 1937];

// ES5
var ages5 = years.map(function(el){
    return 2019 - el;
});
console.log(ages5); //[29, 54, 37, 82]

// ES6
let ages6 = years.map(el => 2019 - el);
console.log(ages6); //[29, 54, 37, 82]

ages6 = years.map((el, index) => `Age elment ${index + 1}: ${2019-el}.`);
console.log(ages6);
//["Age elment 1: 29.", "Age elment 2: 54.", "Age elment 3: 37.", "Age elment 4: 82."]

ages6 = years.map((el, index) => {
    const now = new Date().getFullYear();
    const age = now - el;
    return `Age elment ${index + 1}: ${2019-el}.`;
});
console.log(ages6);
//["Age elment 1: 29.", "Age elment 2: 54.", "Age elment 3: 37.", "Age elment 4: 82."]
```

# arraow function 2

```js
var box5 = {
    color: 'green',
    position: 1,
    clickMe: function(){
        document.querySelector('.green').addEventListener('click',function(){
            var str = 'This is box number '+ this.position + ' and it is '+
            this.color;
            alert(str);
        });
    }
}
box5.clickMe();
/* console:
This is box number undefined and it is undefined
 */
```

- The reason is that 'this' keyword, actually points to that object; but in the regular function call
  the this keyword will always point to the global object,
  which, in the case of the brower, is the window object

- However, a very common pattern to avoid this is to simply create a new variable in here
  and store the this variable in that new variable.

```js
// ES5
var box5 = {
    color: 'green',
    position: 1,
    clickMe: function(){
        var self = this;
        document.querySelector('.green').addEventListener('click',function(){
            var str = 'This is box number '+ self.position + ' and it is '+
            self.color;
            alert(str);
        });
    }
}
box5.clickMe(); //This is box number 1 and it is green
```

- we also can using Arrow function to avoid this:

```js
// ES6
const box6 = {
    color: 'green',
    position: 1,
    clickMe: function(){
        document.querySelector('.green').addEventListener('click',
        () => {
            var str = 'This is box number '+ this.position + ' and it is '+
            this.color;
            alert(str);
        });
    }
}
box6.clickMe(); //This is box number 1 and it is green
```

# ES5 this keyword

```js
function Person(name){
    this.name = name;
}

// ES5
Person.prototype.myFriends5 = function(friends){
    var arr = friends.map(function(el)
    {
        return this.name + ' is friends with '+el;
    });
    console.log(arr);
}

var friends = ['Bob', 'Jane', 'Mark'];
new Person('John').myFriends5(friends);
/*  output:
0: " is friends with Bob"
1: " is friends with Jane"
2: " is friends with Mark"
 */
```
### We have passed the 'John' into the Person constructor, but in ES5 .map function,
### which, reference to the gloabl window object.

- To avoid this, outside .map function,

  1. we can add **var self = this**

  2. return **self.name + ...**

### The second way to avoid this; but it sounds a little bit weird

```js
// ES5
function Person(name){
    this.name = name;
}

Person.prototype.myFriends5 = function(friends){
    var arr = friends.map(function(el)
    {
        return this.name + ' is friends with '+el;
    }.bind(this));    //it sounds or looks a little bit weird, but is going to work
    console.log(arr);
}

var friends = ['Bob', 'Jane', 'Mark'];
new Person('John').myFriends5(friends);
/*  output:
0: "John is friends with Bob"
1: "John is friends with Jane"
2: "John is friends with Mark"
 */
```

# ES6 Arrow function to avoid this:

```js
//ES6
function Person(name){
    this.name = name;
}

Person.prototype.myFriends5 = function(friends){
    var arr = friends.map( el => {
        return this.name + ' is friends with '+el;
    });
    console.log(arr);
}
/*  output:
0: "John is friends with Bob"
1: "John is friends with Jane"
2: "John is friends with Mark"
 */
```

- OR:

```js
Person.prototype.myFriends5 = function(friends){
    var arr = friends.map( el => `${this.name} is friends with ${el}`);
    console.log(arr);
}
```

repository: NovemberFall/JavaScript-ObjectOriented

repo_name: NovemberFall/JavaScript-ObjectOriented


text:
# Scale up App Node

## Steps

This step is for creating app node *app2.example.com*. By default, there is only 1 app node.

Most steps are updated by default except ansible hosts file but please check all before you proceed.

If you want to scale up app nodes "app2.example.com"

- Update `app_num: 2` from ./playbooks/scaleup/provision.yaml
- Update `new_nodes` from /etc/ansible/hosts
  ```
  [OSEv3:children]
  masters
  etcd
  nodes
  new_nodes   #<== ADD

  ...

  [new_nodes]
  app2.example.com   openshift_node_group_name='node-config-compute'   # <== ADD

  ```

- Execute Commands:
  - `ansible-playbook ./playbooks/scaleup/provision.yaml -vvvv -e @../../vars/all.yml`
  - `ansible-playbook -i /etc/ansible/hosts ./playbooks/scaleup/install-prerequisites.yaml -vvvv -e @../../vars/all.yml`
  - `ansible-playbook -i /etc/ansible/hosts playbooks/openshift-node/scaleup.yml`

repository: nanox/ansible-playbook-okd-install-kvm

repo_name: nanox/ansible-playbook-okd-install-kvm


text:
---
sort: 3
title: Flowchart
---

# Flowcharts - Basic Syntax

## Graph

This statement declares the direction of the flowchart, either from top to bottom (`TD` or `TB`):

```mermaid-example
graph TD
    Start --> Stop
```

or left to right (`LR`):

```mermaid-example
graph LR
    Start --> Stop
```

## Flowchart Orientation

Possible FlowChart orientations are:

* TB - top to bottom
* TD - top-down (same as top to bottom)
* BT - bottom to top
* RL - right to left
* LR - left to right

## Flowcharts

This renders a flowchart that allows for features such as: more arrow types, multi directional arrows, and linking to and from subgraphs.

Apart from the graph type, the syntax is the same. This is currently experimental.  When the beta period is over, both the graph and flowchart keywords will render in this new way. At this point it is OK to start beta testing flowcharts.

> **Important note** Do not type the word "end" as a Flowchart node. Capitalize all or any one the letters to keep the flowchart from breaking, i.e, "End" or "END". Or you can apply this [workaround](https://github.com/mermaid-js/mermaid/issues/1444#issuecomment-639528897).**

## Nodes and shapes

### A node (default)

```mermaid-example
graph LR
    id
```

> **Note** The id is what is displayed in the box.

### A node with text

It is also possible to set text in the box that differs from the id. If this is done several times, only the last text
found for the node will be rendered. Also if you define edges for the node later on, you can omit text definitions. The
text previously defined will be used when rendering the box.

```mermaid-example
graph LR
    id1[This is the text in the box]
```

## Node Shapes

### A node with round edges

```mermaid-example
graph LR
    id1(This is the text in the box)
```

### A stadium-shaped node

```mermaid-example
graph LR
    id1([This is the text in the box])
```

### A node in a subroutine shape

```mermaid-example
graph LR
    id1[[This is the text in the box]]
```

### A node in a cylindrical shape

```mermaid-example
graph LR
    id1[(Database)]
```

### A node in the form of a circle

```mermaid-example
graph LR
    id1((This is the text in the circle))
```

### A node in an asymmetric shape

```mermaid-example
graph LR
    id1>This is the text in the box]
```
Currently it is only possible to render the shape above, and not its mirror. *This might change with future releases.*

### A node (rhombus)

```mermaid-example
graph LR
    id1{This is the text in the box}
```

### A hexagonal node

```mermaid-example
graph LR
    id1{{This is the text in the box}}
```

### Parallelogram

```mermaid-example
graph TD
    id1[/This is the text in the box/]
```
### Parallelogram alt

```mermaid-example
graph TD
    id1[\This is the text in the box\]
```

### Trapezoid

```mermaid-example
graph TD
    A[/Christmas\]
```
### Trapezoid alt

```mermaid-example
graph TD
    B[\Go shopping/]
```

## Links between nodes

Nodes can be connected with links/edges. It is possible to have different types of links, or attach a text string on a link.

### Link with arrow head

```mermaid-example
graph LR
    A-->B
```

### Open link

```mermaid-example
graph LR
    A --- B
```

### Text on links

```mermaid-example
graph LR
    A-- This is the text! ---B
```

or

```mermaid-example
graph LR
    A---|This is the text|B
```

### Link with arrow head and text

```mermaid-example
graph LR
    A-->|text|B
```

or

```mermaid-example
graph LR
    A-- text -->B
```

### Dotted link

```mermaid-example
graph LR;
   A-.->B;
```

### Dotted link with text

```mermaid-example
graph LR
   A-. text .-> B
```

### Thick link

```mermaid-example
graph LR
   A ==> B
```

### Thick link with text

```mermaid-example
graph LR
   A == text ==> B
```

### Chaining of links

It is possible to declare many links on the same line as per below:
```mermaid-example
graph LR
   A -- text --> B -- text2 --> C
```

It is also possible to declare multiple nodes links in the same line as per below:
```mermaid-example
graph LR
   a --> b & c--> d
```

You can then describe dependencies in a very expressive way. Like the one-liner below:
```mermaid-example
graph TB
    A & B--> C & D
```
If you describe the same diagram using the the basic syntax, it will take four lines:
```mmd
graph TB
    A --> C
    A --> D
    B --> C
    B --> D
```
A word of warning, one could go overboard with this, making the graph harder to read in
markdown form. The Swedish word `lagom` comes to mind. It means, not too much and not too little.
This goes for expressive syntaxes as well.

### New arrow types

When using flowchart instead of graph there are new types of arrows supported as per below:

```mermaid-example
flowchart LR
    A --o B
    B --x C
```

### Multi directional arrows

When using flowchart instead of graph there is the possibility to use multidirectional arrows.

```mermaid-example
flowchart LR
    A o--o B
    B <--> C
    C x--x D
```

### Minimum length of a link

Each node in the flowchart is ultimately assigned to a rank in the rendered
graph, i.e. to a vertical or horizontal level (depending on the flowchart
orientation), based on the nodes to which it is linked. By default, links
can span any number of ranks, but you can ask for any link to be longer
than the others by adding extra dashes in the link definition.

In the following example, two extra dashes are added in the link from node _B_
to node _E_, so that it spans two more ranks than regular links:

```mermaid-example
graph TD
    A[Start] --> B{Is it?};
    B -->|Yes| C[OK];
    C --> D[Rethink];
    D --> B;
    B ---->|No| E[End];
```

> **Note** The rendering engine may cause some links to be longer than
> the number of ranks requested in order to accommodate the overall topology.

When the link label is written in the middle of the link, the extra dashes must
be added on the right side of the link. The following example is equivalent to
the previous one:

```mermaid-example
graph TD
    A[Start] --> B{Is it?};
    B -- Yes --> C[OK];
    C --> D[Rethink];
    D --> B;
    B -- No ----> E[End];
```

For dotted or thick links, the characters to add are equals signs or dots,
as summed up in the following table:

| Length            |    1   |    2    |     3    |
|-------------------|:------:|:-------:|:--------:|
| Normal            |  `---` |  `----` |  `-----` |
| Normal with arrow |  `-->` |  `--->` |  `---->` |
| Thick             |  `===` |  `====` |  `=====` |
| Thick with arrow  |  `==>` |  `===>` |  `====>` |
| Dotted            | `-.-`  | `-..-`  | `-...-`  |
| Dotted with arrow | `-.->` | `-..->` | `-...->` |

## Special characters that break syntax

Use quotes around text in order to render more troublesome characters, as in the example below:

```mermaid-example
graph LR
    id1["This is the (text) in the box"]
```

### Entity codes to escape characters

Special characters (including Unicode) can be included by using HTML escaping syntax:

```mermaid-example
    graph LR
        A["A double quote:#quot;"] -->B["A dec char:#9829;"]
```

## Subgraphs

```
subgraph title
    graph definition
end
```

An example:

```mermaid-example
graph TB
    c1-->a2
    subgraph one
    a1-->a2
    end
    subgraph two
    b1-->b2
    end
    subgraph three
    c1-->c2
    end
 ```

You can also set an explicit id for the subgraph:

```mermaid-example
graph TB
    c1-->a2
    subgraph ide1 [one]
    a1-->a2
    end
 ```

## Flowcharts

With the graphtype `flowchart` it is also possible to set edges to and from subgraphs:

```mermaid-example
flowchart TB
    c1-->a2
    subgraph one
    a1-->a2
    end
    subgraph two
    b1-->b2
    end
    subgraph three
    c1-->c2
    end
    one --> two
    three --> two
    two --> c2
 ```

## Interaction

A node can have click events bound that lead to either a JavaScript callback or to open a new browser tab. **Note**: This functionality is disabled when using `securityLevel='strict'` and enabled when using `securityLevel='loose'`.

```
click nodeId callback
click nodeId call callback()
```

* nodeId is the id of the node
* `callback` is the name of a JavaScript function defined on the page displaying the graph. The function will be called with the nodeId as an incoming parameter.

```html
<script>
  var callback = function (nodeId) {
    alert('A callback was triggered on ' + nodeId);
  };
</script>
```

Examples of tooltip usage:

The tooltip text is surrounded in double quotes. The styles of the tooltip are set by the class .mermaidTooltip.

```mermaid-example
graph LR;
    A-->B;
    B-->C;
    C-->D;
    click A callback "Tooltip for a callback"
    click B "https://www.github.com" "This is a tooltip for a link"
    click A call callback() "Tooltip for a callback"
    click B href "https://www.github.com" "This is a tooltip for a link"
```
> **Success** The tooltip functionality and the ability to link to urls are available from version 0.5.2.

?> Due to limitations with how Docsify handles JavaScript callback functions, an alternate working demo for the above code can be viewed at [this jsfiddle](https://jsfiddle.net/s37cjoau/3/).

Links are opened in the same browser tab/window by default. It is possible to change this by adding a link target to the click definition (`_self`, `_blank`, `_parent` and `_top` are supported):
```mermaid-example
graph LR;
    A-->B;
    B-->C;
    C-->D;
    D-->E;
    click A "https://www.github.com" _blank
    click B "https://www.github.com" "Open this in a new tab" _blank
    click C href "https://www.github.com" _blank
    click D href "https://www.github.com" "Open this in a new tab" _blank
```

Beginner's tip—here's a full example of using interactive links in HTML:

```html
<body>
  <div class="mermaid">
    graph LR;
        A-->B;
        B-->C;
        C-->D;
        click A callback "Tooltip"
        click B "https://www.github.com" "This is a link"
        click C call callback() "Tooltip"
        click D href "https://www.github.com" "This is a link"
  </div>

  <script>
    var callback = function () {
        alert('A callback was triggered');
    };
    var config = {
        startOnLoad: true,
        flowchart: {
            useMaxWidth: true,
            htmlLabels: true,
            curve: 'cardinal'
        },
        securityLevel: 'loose'
    };
    mermaid.initialize(config);
  </script>
</body>
```

### Comments

Comments can be entered within a flow diagram, which will be ignored by the parser.  Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text until the next newline will be treated as a comment, including all punctuation and any flow syntax.

```mmd
graph LR
%% this is a comment A -- text --> B{node}
   A -- text --> B -- text2 --> C
```

## Styling and classes

### Styling links

It is possible to style links. For instance, you might want to style a link that is going backwards in the flow. As links
have no ids in the same way as nodes, some other way of attaching style is required.
So instead of ids, the order number of when the link was defined in the graph is used, starting with zero. Here's a linkStyle statement that would apply style to the fourth link in the graph:

```
linkStyle 3 stroke:#ff3,stroke-width:4px,color:red;
```

You can specify a `default` to apply to all links, or you can give a comma-separated list of link order numbers.

Instead of giving a styles option, you can also use custom d3 curve types with the following syntax:

```
linkStyle default|numList|num interpolate curveType
```

If you want to add both D3 and style options, instead of writing:

```
linkStyle default interpolate cardinal
linkStyle default stroke:#ff3,stroke-width:4px,color:red;
```

You can combine them:

```
linkStyle default interpolate cardinal stroke:#ff3,stroke-width:4px,color:red;
```

### Styling a node

It is possible to apply specific styles such as a thicker border or a different background color to a node.

```mermaid-example
graph LR
    id1(Start)-->id2(Stop)
    style id1 fill:#f9f,stroke:#333,stroke-width:4px
    style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
```

#### Classes

More convenient than defining the style every time is to define a class of styles and attach this class reference to multiple nodes.

here's a class definition:

```
    classDef className fill:#f9f,stroke:#333,stroke-width:4px;
```

and then attaching this class to a node is simply:

```
    class nodeId1 className;
```

It is also possible to attach a class to multiple nodes in one statement:

```
    class nodeId1,nodeId2 className;
```

An even shorter form of adding a class is to attach the classname to the node using the `:::`operator:

```mermaid-example
graph LR
    A:::someclass --> B
    classDef someclass fill:#f96;
```

### Css classes

It is also possible to predefine classes in css styles that can be applied from the graph definition:

**Example style**

```css
.cssClass > rect {
    fill: #FF0000;
    stroke: #FFFF00;
    stroke-width: 4px;
}
```

**Example definition**

```mermaid-example
graph LR;
    A-->B[AAA<span>BBB</span>];
    B-->D;
    class A cssClass;
```

### Default class

If a class is named `default` it will be assigned to all nodes that do not have a specific class definition.

```
    classDef default fill:#f9f,stroke:#333,stroke-width:4px;
```

## Basic support for fontawesome

It is possible to add icons from fontawesome.  These are accessed via the syntax fa:#icon-class-name#.

```mermaid-example
graph TD
    B["fa:fa-twitter for peace"]
    B-->C[fa:fa-ban forbidden]
    B-->D(fa:fa-spinner);
    B-->E(A fa:fa-camera-retro perhaps?);
```

## Graph declarations with spaces between vertices and link and without semicolon

* After release 0.2.16, graph declaration statements do not need to end with a semicolon. (And they can continue to have the ending semicolon—it has now just become optional.) So the below graph declaration is valid along with the old declarations.

* A single space is allowed between vertices and the link, however there should not be any space between a vertex and its text, or a link and its text. The old syntax of graph declarations will also work, so this new feature is optional and is introduced to improve readability.

Below is an example of the new way to declare graph edges. This is valid alongside any old-style declarations of graph edges.

```mermaid-example
graph LR
    A[Hard edge] -->|Link text| B(Round edge)
    B --> C{Decision}
    C -->|One| D[Result one]
    C -->|Two| E[Result two]
```

## Configuration...

Is it possible to adjust the width of the rendered flowchart.

This is done by defining **mermaid.flowchartConfig**, or by the CLI to use a json file with the configuration (which is described in the mermaidCLI page).
In Javascript config parameters can be set by using `mermaid.flowchartConfig`:

```javascript
mermaid.flowchartConfig = {
    width: '100%'
}
```


text:
# Geo-walk
The scope of this project is to generate not so random walks, based on real street data and location of points of interest, like subway and train station.
Those points of interest should influence the generated paths in order to gimmick your local endeavours (i.e. people usually tend to stay closer to train stations).

## Technical preamble

In this project we make use of data highway and subway station data, taken from OpenStreetMaps and the Japanese government available from, respectively:

`http://downloads.cloudmade.com/asia/eastern_asia/japan/tokyo#downloads_breadcrumbs`

`http://nlftp.mlit.go.jp/ksj/gml/gml_datalist.html`

In the case of street data, the shapefiles have several arcs. Those arcs , when put together will build all the street network. With this in mind, the database structure in the project is based to that the first and last points of an arc are indexed. When looking up, only those points will be found. The typical structure of an arc is as follows:

      {
        :idx_loc => {
          :lat =><PHONE_NUMBER>,
          :lon => 38.2345543
        },
        :type => 'head',
        :body => [
        			[139.698028564453, 35.6629943847656],
         			…,
         			[139.6994996, 35.6657032]
         		 ]
      }

The structure of an train line is as follow (we make use of GeoJSON support in Mongo to create a Linestring for each line):

      {
      	:idx_loc => {
        	:type => "LineString",
        	:coordinates => [
        			  			[139.698028564453, 35.6629943847656],
         						…,
         						[139.6994996, 35.6657032]
         					 ]
      	},
      	:code => code,
      	:line => line,
      	:company => company
    }

## Quick guide
To use this project, you need to setup MongoDB and Ruby with the following gems installed:

* mongo
* rgeo
* rgeo-shapefile
* net/http
* oauth
* json
* rack
* active_support
* sinatra

### File description

* **data/** - The data folder has all the shapefiles necessary to generate the needed paths as well as the train station locations

2. **importer.rb** - This file will read, parse and import the geo data into a mongoDB database
3. **server.rb** - Sinatra API server to generate the paths from the imported data
4. **public/demo.html** - Demo page that makes a request to the Sinatra API
5. **sim.rb** - Simulator that makes use of the generated walks and simulates walks that measure energy consumption

### Extra flags
In order to visually validate the simulation, we should be able to inspect the resulting requests in an easy way. For that, we can force the simulator to spit out the simulation data so it is easy to plug into the demo.html file. You can do that by enabling the html_debug flag in the simulator:

`@@html_debug = true`

as well as demo.html file:

`var sim_debug = true;`

and then use the info generated by the simulator in the demo.html file:

`var test_circlesRAW = [{"centers": [[139.698028564453, …`

`var fakeResponse = {"distance":0.01855711480024141,"body":[[139.6994996,35.6657032]…`

`var test_fences = [{"name":"Simulation fence 1","foreign_id":"sim_geofence_1","area":0.661766163884749,"priority":1.0,"access_level":1000 …`

A few static fixed immutable example path that are problematic are hardcoded. To enable it, you need to enable the html_static_test flag in the simulator:

`@@html_static_test = 1`

To disable just change the value to `0` or `false`.

As the name implies, this will always output the same path and fences.

### How to run

#### Import road data from shape files

`ruby importer.rb`

#### MongoDB indexes
Mongo DB needs to have some of the document fields indexed in order to allow proper geographic indexing. The commands needed to achieve that, in this particular case, are:

`db.road_coords.ensureIndex({"idx_loc": "2dsphere"})`
`db.train_station_coords.ensureIndex({"idx_loc": "2dsphere"})`
`db.bus_station_coords.ensureIndex({"idx_loc": "2dsphere"})`
`db.train_lines.ensureIndex({"idx_loc": "2dsphere"})`

For search examples please go to this following gist:
`https://gist.github.com/straypacket/5780848#file-mongo_geo_indexing-pl`

#### Start API server and demo server
`ruby server.rb`

#### Access with

`http://localhost:4570/demo.html`

#### Example API call:

`curl -i -H "Accept: application/json" "http://localhost:4570/?long=139.6941&lat=35.6572&length=2000"`

repository: straypacket/geo-walk

repo_name: straypacket/geo-walk


text:
# AnkiTerminalImporter - Import Cards from the Terminal into Anki

## Description

Add a CSV-File with Anki Cards to any Anki Deck with this `python3`

If you have to

## How to Install
find the `ANKI` folder where anki is installed

```
  cd AnkiTerminalImporter
  cp importAnki.py $ANKI
```

## How to Use

```
  python3 $ANKI/importAnki.py FILE
```

where `FILE` is the filename of a CSV-dile of the following format:

FRONTTEXT1;BACKTEXT1
FRONTTEXT2;BACKTEXT2

The name `FILE` also has to be the same as the name of the deck in which the cards should be imported into.

So if you want to add the cards to the deck "Math", you have to rename your file to "Math" and execute the following command:

```
  python3 $ANKI/importAnki.py Math
```

repository: NWuensche/AnkiTerminalImporter

repo_name: NWuensche/AnkiTerminalImporter


text:
---
title: "Activate directoryRole"
description: "Activate a directory role."
ms.localizationpriority: medium
author: "DougKirschner"
ms.prod: "directory-management"
doc_type: apiPageType
---

# Activate directoryRole

Namespace: microsoft.graph

Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant.

The Company Administrators and the implicit user directory roles (**User**, **Guest User**, and **Restricted Guest User** roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding [directory role template](../resources/directoryroletemplate.md) ID.

## Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).

|Permission type      | Permissions (from least to most privileged)              |
|:--------------------|:---------------------------------------------------------|
|Delegated (work or school account) | RoleManagement.ReadWrite.Directory    |
|Delegated (personal Microsoft account) | Not supported.    |
|Application | RoleManagement.ReadWrite.Directory |

## HTTP request
<!-- { "blockType": "ignored" } -->
```http
POST /directoryRoles

```
## Request headers
| Name       | Description|
|:---------------|:--------|
| Authorization  | Bearer {token}. Required. |
| Content-Type  | application/json  |

## Request body
In the request body, supply a JSON representation of [directoryRole](../resources/directoryrole.md) object.

The following table shows the properties that are required when you activate a directory role.

|Parameter | Type | Description|
|:---------|:---------|:---------|
|roleTemplateId | string | Required. The ID of the [directoryRoleTemplate](../resources/directoryroletemplate.md) that the role is based on. This is the only property that may be specified in the request.|

## Response

If successful, this method returns `201 Created` response code and [directoryRole](../resources/directoryrole.md) object in the response body.

## Example
##### Request

# [HTTP](#tab/http)
<!-- {
  "blockType": "request",
  "name": "create_directoryrole_from_directoryroles"
}-->
```http
POST https://graph.microsoft.com/v1.0/directoryRoles
Content-type: application/json

{
  "roleTemplateId": "fe930be7-5e62-47db-91af-98c3a49a38b1"
}
```

# [C#](#tab/csharp)

```csharp

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var directoryRole = new DirectoryRole
{
	RoleTemplateId = "fe930be7-5e62-47db-91af-98c3a49a38b1"
};

await graphClient.DirectoryRoles
	.Request()
	.AddAsync(directoryRole);

```

 For details about how to [add the SDK](/graph/sdks/sdk-installation) to your project and [create an authProvider](/graph/sdks/choose-authentication-providers) instance, see the [SDK documentation](/graph/sdks/sdks-overview).

repository: microsoftgraph/msgraph-sdk-dotnet

branch_name: refs/heads/dev

gha_language: C#

gha_license_id: NOASSERTION

repo_name: microsoftgraph/msgraph-sdk-dotnet


text:
---
layout: simple-page
title: Auto Dustbin Lid
permalink: /raffles-girls-primary-auto-dustbin-lid/
breadcrumb: Auto Dustbin Lid
---

Some people litter due to the inconvenience associated with having to open dustbin lids. Students attempt to solve this problem by creating a dustbin lid that automatically opens as people approach.

Download the lesson plan [here](/files/lesson-plans/primary-schools/design-and-technology/Raffles-Girls-Primary-Auto-Dustbin-Lid.zip)

To view more lesson ideas, please return to the Lesson Ideas page by [clicking here](/in-schools/digital-maker/lesson-ideas-primary/)

repository: jadynLau/dlp

repo_name: jadynLau/dlp


text:
---
layout: post-read
title: "Book Review: Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones"
shortTitle: "Atomic Habits"
author: Julien Sobczak
date: '2021-12-07'
category: read
subject: Habits
headline: The art of making new habits
note: 18
stars: 5
tags:
  - productivity
image: 'https://i.gr-assets.com/images/S/compressed.photo.goodreads.com/books/1535115320l/40121378._SY475_.jpg'
metadata:
  authors: James Clear
  publisher: "Avery"
  datePublished: '2018-10-16'
  numberOfPages: 319
links:
  amazon: 'https://www.amazon.com/gp/product/B07D23CFGR/'
  goodreads: 'https://www.goodreads.com/book/show/40121378-atomic-habits'
  goodreads_review: 'https://www.goodreads.com/review/show/4448953538'
---

We are literally what we do every day. Our habits define us and changing who we are always implies changing our habits. Bad habits are easy. You often get immediate pleasure by doing them like eating fast food. Good habits are hard.  But in the long-term, good habits are the ones that really make a difference and make you happier.

If you want to break bad habits and form better ones, you have found the perfect book. _Atomic Habits_ is one of my all-time favorite books. James Clear condenses in the same book all essential techniques, perfectly organized around 4 laws: make the new habit obvious, attractive, easy, and satisfying.

The content is not new. Productivity and habits are popular subjects. But how techniques are introduces in the book is remarkable. The book is very well-written and the examples are always practical. It's a book that motivates me to take action. Forming new habits is still hard, but I feel better equipped to endure and make them last.

Read this book. Subscribe to James Clear's newsletter, and become a better you.

repository: julien-sobczak/blog

repo_name: julien-sobczak/blog


text:
# Production Systems

## Preview

First time talking about learning.
Production systems are kind of a cognitive architecture, in which knowledge is represented in the form of rules.
Last topic under the fundamental topics of the course:  Semantic Networks, Generate and Test, Production Systems, Means-End Analysis, and Problem Reduction

Will talk about cognitive architecture, in general, and focus on production systems then talk about a mechanism of learning called chunking

## Exercise: A Pitcher

How might intelligent agents make complex decisions about the world?
Given that David has a lot of knowledge about baseball, he can use that knowledge to make a decision.
How is her using his knowledge to make a decision?  What is the architecture?  What is the reasoning that leads him to make that specific decision?

## Function of a Cognitive Architecture

Percepts -> Action.  Maps a particular history into an action.  What should we do next?

## Levels of Cognitive Architectures

Task / Knowledge Level (e.g. selecting a pitch, playing baseball)

Algorithm / Symbol Level (e.g. means-ends analysis, semantic networks)

Hardware / Implmentation Level (e.g. a brain, a transistor)

David Mark talked about 3 levels which he called computational theory. the level of algorithms and the level of implementation.

The three levels are transitive for architectures:  Hardware/Impl Level is an architecture for Algorithm/Symbol Level.  Algorith/Symbol Level is an architecture for Task/Knowledge Level.

In reverse, the three levels are content for another:  Task/Knowledge Level is content for Algorithm/Symbol Level.  Algorithm/Symbol Level is content for Hardware/Impl Level.

Semantic network is represented by Knowledge Level.  What is the content of the knowledge in order to do a particular task.

Want to build theories at all three of these different levels of abstractions.

Most of AI work is done at the top two levels.

## What are the layers of Watson?

Physical Computer(Hardware layer), Searching & Decision-Making(Algorithm Layer), and answering the inputted clue(Knowledge Layer).

## Assumptions of Cognitive Architectures

* Goal-oriented
* Rich,complex environment
* Significant knowledge
* Symbols and abstractions
* Flexible and function of the environment

## Architecture + Content = Behavior

Function for cognitive architectures:  Percepts -> Action

Similiar to computer architecture, stored memory is operated on to get an action.

What is a good architecture?

## A Cognitive Architecture for Production Systems

Deliberation:  Reasoning <-> Learning <-> Memory

SOAR:  Procedural Semantic Episodic
             \       |      /
             Working Memory

SOAR has been worked on for the last 30 years by Neville, Lear and Rosenbloom.

Episodic knowledge has to do with events.
Semantic knowledge has to do with generalizations in the forms of concepts and models of the world.
Procedural has to do with how to do certain things.

## Return to the Pitcher

How do baseball Percepts get mapped into action?
Pitcher has certain knowledge.  Can perceive from the world.  For example, can perceive the bases, batter, current state of game, specific batter, positions of own team mates.  Picture has goals.

## Action Selection

State 0.  Feature1 : value1.  Pitcher wants to get to goal state.  Path from current state to goal state.  Illustrated in abstract state space.

## Putting Content in the Architecture

Inning : 7th
portion : top
runners : 2nd and 3rd
outs : 2
batter : prado
average : .256
bats: right-handed
score: 3-2
goal: escape inning (don't let batter hit the ball)

## Bringing in Memory

Using the previous knowledge, present production rules.

i.e. If goal is to Escape, I perceive 2 outs, I perceive a runner on 2nd and I perceive no runner on 1st. THEN suggest goal intenionlaly walk batter (Intentional Walk)

another example, If goal is Intentional Walk THEN suggest intentional-walk operator

Capturing these rules in SOAR's long term memory.

Knowledge is very detailed in these examples.

## Chunking

A technique used to dismiss an operator to use when there is a conflict between multiple operator choices.

## Assignment

How would a production system be used to design an agent that can solve RPMS?
* Address incoming problems.  Knows what to look for in a new problem and it knows how to reply when it finds those things.

OR

* Production rules that are specific to a given problem.  When the agent receives a new problem, it induces some production rules that govern the transformation between certain figures and then transfers that to other rows and columns.  Learns from the problem it receives.

How is the learning going to take place?
How is it actually going to write these production rules, based on a new problem?
What do we get out of actually having these production rules, that are written based on individual problems?

## Wrap Up

Cognitive Architecture.

Fundamental units of learning.

SOAR framework implements production systems.

Production systems enable action selection.

Map percepts -> action.

When a production hits an impass, it can use chunking to learn a new rule to overcome the impass.

## Cognitive Connection

Working memory correlates to short-term memory in humans.

Similiary between SOAR and human behavior when faced with problems of arithmetic algebra.

AI can be good in closed world problems but cannot perform as well as humans in open world problems.

How can human knowledge be captured at large so that it can be used for problems in the open?


text:
# VT100 - A pure julia terminal emulator

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

VT100.jl attempts to implement a small and hackable terminal emulator, mostly intended for automatic verification of Terminal based UIs. The current implementation is very simple and ignores most of the more complicated ascepts of terminal emulation, including colors, attributes and Unicode combining characters, but is nevertheless useful for UI validation in regression tests. Support for those features will be added as the need arises

# Usage

```julia
# Create an Emulator
em = VT100.Emulator()
# Feed the emulator some io
VT100.parse!(em, IOBuffer("\e[37mHello World\n"))
# Create an actual fake terminal
pty = VT100.create_pty()
# [Should pass pty.slave to C library, e.g. ncurses here]
# Now obtain a debug dump of the screen state
buf = IOBuffer()
VT100.dump(buf,devnull,em)
# buf now contains the screen contents of the emulator
```
For more examples, see the test directory.

# Usage for terminal regression tests

The package [TerminalRegressionTests.jl](https://github.com/JuliaDebug/TerminalRegressionTests.jl) has a collection of utilities
to simplify writing regression tests for terminal applications.

gha_language: Julia


text:
# ovirt\_disk\_attachment

Manages a Disk attachment resource within oVirt.

## Example Usage

```hcl
resource "ovirt_disk_attachment" "diskattachment" {
  vm_id                = "5ba458c1-01fd-00eb-0140-000000000351"
  disk_id              = "67f88160-396b-441b-8824-f2c22e80bf82"
  active               = true
  bootable             = true
  interface            = "virtio"
  pass_discard         = true
  read_only            = true
  use_scsi_reservation = false
}
```

## Argument Reference

The following arguments are supported:

* `vm_id` - (Required) The ID of VM the disk attached to. Changing this creates a new disk attachment.
* `disk_id` - (Required) The ID of attached disk. Changing this creates a new disk attachment.
* `active` - (Optional) The flag to indicate whether the disk is active. Default is `true`. Changing this updates the attachment's active.
* `bootable` - (Optional) The flag to indicate whether the disk is bootable. Default is `false`. Changing this updates the attachment's bootable.
* `interface` - (Required) The interface of the attachment. Valid values are `ide`, `sata`, `spapr_vscsi`, `virtio` and `virtio_scsi`. Changing this creates a new attachment.
* `pass_discard` - (Optional) The flag to indicate whether the VM passes discard commands to the storage. Changing this creates a new attachment.
* `read_only` - (Optional) The flag to indicate whether the disk is connected to the VM as read only. Default is `false`. Changing this creates a new attachment.
* `use_scsi_reservation` - (Optional) The flag to indicate whether SCSI reservation is enabled for this disk. Default is `false`. Changing this creates a new attachment.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The composite ID of oVirt Disk Attachment which is constituted by the ID of the vm and the ID of the disk within oVirt.

## Import

Disk attachment can be imported using the composite `id`, e.g.

```
$ terraform import ovirt_disk_attachment.diskattachment 3d88d40c-3230-4266-9228-fff5c1348081:c76d73db-2e81-49a5-a2d2-7065650680e5
```

repository: Gal-Zaidman/terraform-provider-ovirt

repo_name: Gal-Zaidman/terraform-provider-ovirt


text:
Player State Condition
=============

## Description

Checks a few states of the client player.

<br />

## Fields

| Name     | Type   | Description | Additional Info |
| -------- | ------ | ----------- | --------------- |
| *`type`* | String |      Internal ID for serialisation: `playerState`       |         Not seen in the Editor.        |
| *`state`* | String |      State to check (use one): `alive`, `invisible`, `onFire`, `onGround`, `poisoned`, `sleeping`, `sneaking`, `swimming`, `isInWater`, `isInWaterOrRain`, `isInWaterOrBubble`, `isInWaterRainOrBubble`, `usingItem`, `withering`, `exists`       |                 |

///Footnotes Go Here///

[^-1]: Fields in *italics* are required for the Object to be valid.


text:
# Left Join - David Chambers/Sara Bahrini

## Summary
Problem Domain: Create a function that receives two hashmaps and returns a data structure that combines the shared keys and values. It is assumed there is access to a HashTable class that contains a serialize method.

## Challenge
The biggest challenge is we don't know what keys are in the hashmap and will have to serialize to work with the individual objects.

## functions/methods
### `leftJoin(arity 2)`
* Used to LEFT JOIN two hashmaps
* Receives two hashmaps to join
* Returns an array of objects -> `[ {key: [valueA, valueB/(null)]}, ...]`

## Testing
Tests passed with 100% coverage:
* Tested that two hashmaps are passed to the function.
* Tested that the hashmaps passed to the function are not empty.
* Tested that the hasmaps combine correctly.

![Whiteboard](https://raw.githubusercontent.com/dlchambersjr/data-structures-and-algorithms/master/assets/left-join.jpg)


text:
If the commit is not present in the default branch, will only return open pull requests associated with the commit.

```js
octokit.rest.repos.listPullRequestsAssociatedWithCommit({
  owner,
  repo,
  commit_sha,
});
```

## Parameters

      name
      required
      description

owner	yes

The account owner of the repository. The name is not case sensitive.

repo	yes

The name of the repository without the `.git` extension. The name is not case sensitive.

commit_sha	yes

The SHA of the commit.

per_page	no

The number of results per page (max 100).

page	no

Page number of the results to fetch.

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit).

gha_language: TypeScript


text:
Release Process
===============

 1.  Ensure `version` in `build.gradle` is set to the version you want to release.
 2.  Update `README.md` with the version about to be released.
 3.  Commit: `git commit -am "Prepare version X.Y.X"`
 4.  Tag: `git tag -a X.Y.Z -m "Version X.Y.Z"`
 5.  Update `version` in `build.grade` to the next development version. For example, if
     you just tagged version 1.0.4 you would set this value to 1.0.5. Do NOT append "-SNAPSHOT" to
     this value, it will be added automatically.
 6.  Commit: `git commit -am "Prepare next development version."`
 7.  Push: `git push && git push --tags`
 8.  Add the new release with notes (https://github.com/dsrees/JavaPhoenixClient/releases).


text:
# OpenRGB-python-FX

## REPLACED BY [The effect engine plugin](https://gitlab.com/OpenRGBDevelopers/OpenRGBEffectPlugin)

## Effect List

* Rainbow wave (rainbow.py)

* Spectrum cycling (cycle.py) (Credit to James Potkukelkka on discord for this one)

* Gradient cycling (GradCycle.py)

* Breathing

* Ambient (credit to usrErr0r on discord for this one, Not working on linux due to ImageGrab not having an import)

* Rain (**Massive** thanks and credit to Bahorn on discord for this one)

* Cram

* Chase (Per request of Titanium on Discord)

* Chase Fade (Created by @ Fmstrat on GitHub) (Supports multi-color and rolling colors (matrix wave) for smooth scrolling across LEDs)

* Rave (Basically multiple instances of rain with different colors that make a cool effect, Discovered by Saint Mischievous on discord)

* Stary Night (Per request of BrandonPotter on the discord)

* TempAware (Created by @ M_Ouz on the discord) (Only tracks GPU temp atm)

## Usage

* start the openRGB sdk server, otherwise this *will not work*

* you may need to install the sdk binding ```pip install openrgb-python``` or ```pip3 install openrgb-python``` (you may also need to add --user at the end for linux)

* clone the repository or download the effect you want

* cd into the folder with the python files

* run using ```python3 file.py``` or ```python file.py```

* enjoy the effect :)

### Most effects support flags, See the table below for details

Effect (left to right), Flag (top to bottom)

|           | Ambient| Breathing | Chase | Chase Fade | Cram | Cycle | Gradcycle | Rain | Rainbow wave | Rave| Stary Night (Twinkle) | TempAware |
|-----------|--------|-----------|-------|------------|------|-------|-----------|------|--------------|-----|-----------------------|-----------|
|C1         | No     | Yes       | Yes   | Yes        | Yes  | No    | Yes       | Yes  | No           | No  | Yes                   | No        |
|C2         | No     | No        | Yes   | Yes        | No   | No    | Yes       | No   | No           | No  | No                    | No        |
|Colors     | No     | No        | No    | Yes        | No   | No    | No        | No   | No           | No  | No                    | No        |
|Speed      | No     | Yes       | No    | Yes        | No   | No    | Yes       | No   | Yes          | No  | No                    | No        |
|Reversed   | No     | No        | Yes   | Yes        | No   | No    | Yes       | Yes  | Yes          | Yes | No                    | No        |
|Only-Set   | No     | Yes       | Yes   | Yes        | Yes  | Yes   | Yes       | Yes  | Yes          | Yes | Yes                   | No        |
|Only-Zones | No     | No        | No    | Yes        | No   | No    | No        | No   | No           | No  | No                    | No        |

* ``--C1``: AKA Color 1. Usage is ``python file.py --C1 Value(0 - 255) Value(0 - 255) Value(0-255)`` or ``python file --C1 0 0 255``

* ``--C2``: AKA Color 2. Same Usage as C1 but with a different flag

* ``--colors``: An optional replacement for C1 and C2 on effects that support it when you want to use more than 2 colors. Usage is ``python file.py --colors "255 0 0, 0 255 0, 0 0 255"``

* ``--speed``: Self explanitory, It is kinda hard to implement or I am lazy so it isn't in a lot of effects. Usage is ``python file.py --speed int`` (any number is fine but I haven't tested over 50)

* ``--reversed``: Reverses effects for specific devices. Usage is ``python file.py --reversed "example device"`` or ``python file.py --reversed "device 1 , device 2`` for multiple devices. seperate the devices by `` , ``(space comma space)

* ``--only-set``: Used if you only want to apply the effect to one device. I made it a goal for all effects to use this flag. Enables all devices if the flag isn't called. Also same usage as --reversed but with a different flag

* ``--only-zones``: Used if you only want to apply the effect to specific zones. Enables all zones if the flag isn't called. Also same usage as --reversed but with a different flag

## Writing effects

For an Effect to be added it need to follow a set of guidelines

1. Must be somewhat legible

2. Have support for single device effects (see most of the already added effects for an example)

3. Must support being added as a module (The effect is a function(``def effect(args):``) and it is run through a ``if __name__ == "__main__":`` statement)

4. if a zone type is not supported then make sure that you add an if statement that just doesn't set that particular zone (see rainbow.py)

If you have an effect please create an MR with the effect or just @ me on discord about it and I will make any nescissary changes and add it (with credit to you in the readme of course)

Effects are stored in their own .py file for now

```python
import openrgb , time , string , colorsys , sys
from openrgb.utils import RGBColor , ModeData , DeviceType , ZoneType

client = openrgb.OpenRGBClient()

Dlist = client.devices
```

is a good starting point

## Notes

While this is system wide, there are some limitations.

if the device isn't in openRGB then the effect *will not* apply to it

currently rainbow is poorly optimized due to a lack of big brainedness on my part (I did do some optimizations that allows me to use .show() and that made it more readable for other people)

Ambient grabs the entire screen leading to some shade of white or black. hopefully this will get fixed soon

## *Special Usage**

### TempAware

You may need to set a full path for the DLL if it doesn't run correctly

Python also uses escape characters so if you need to use a \ (Backslash) then you will need to use 2 of them (``\\`` == ``\`` in python)


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][keep-a-changelog],
and this project adheres to [Semantic Versioning][semantic-versioning].

Extending the adopted spec, each change should have a link to its
corresponding pull request appended.

## [1.0.0] - 2020-08-06

This is the initial release of the module, with support for bulk IAM
management.

[modes]: README.md#additive-and-authoritative-modes
[keep-a-changelog]: https://keepachangelog.com/en/1.0.0/
[semantic-versioning]: https://semver.org/spec/v2.0.0.html
[stackdriver-agent-roles-example]: examples/stackdriver_agent_roles
[subnet-example]: examples/subnet
[usage-example]: README.md#usage
[caveats]: README.md#caveats


text:
cd prisma-examples/typescript/postgis-express
npm install
```

</details>

### 2. Setup PostgreSQL

- The recommended way of trying this out would be using a Docker image of PostgreSQL with Postgis extensions that can be pulled from [here](https://github.com/postgis/docker-postgis).

- A [docker-compose.yml](./docker-compose.yml) is included for a quick start so that you do not need any prior setup. Just run `docker-compose up -d` and Postgres will be up and running on PORT 5432 with username **postgres** and database **geoexample**.

- Connect to Postgres by any database viewer of your choice.

- Rename the `.env.example` to `.env` and replace the _DBNAME_ placeholder with the database name `geoexample` created in the above step.

Run the following command to create the tables and the function required for this example.

```
npx prisma migrate deploy
```

- Lastly run the following command to generate Prisma Client.

```
npx prisma generate
```

**_Limitation_**: Currently Prisma doesn't support custom data types, so querying for the _geography_ type in the normal Prisma models is not possible. Operations can only be performed on the types via `prisma.$queryRaw` or `prisma.$executeRaw`. You can learn more about unsupported types [here](https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#unsupported).

repository: prisma/prisma-examples

branch_name: refs/heads/latest

repo_name: prisma/prisma-examples


text:
![][license-badge]

# mvn

Maven plugin for [Oh My Fish][omf-link].

## Install

```fish
$ omf install mvn
```

## Usage

This plugin will colorize maven output.

```fish
$ mvn
```

# License

[MIT][mit] © [benc][author] et [al][contributors]

[mit]:            http://opensource.org/licenses/MIT
[author]:         http://github.com/benc
[contributors]:   https://github.com/benc/pkg-mvn/graphs/contributors
[omf-link]:       https://www.github.com/fish-shell/oh-my-fish

[license-badge]:  https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square

repository: benc/pkg-mvn

gha_language: Shell

repo_name: benc/pkg-mvn


text:
# FroshAdminer

Manage the database in administration

## Versions

* [FroshAdminer](https://github.com/FriendsOfShopware/FroshAdminer) = Shopware 5
* FroshPlatformAdminer = Shopware Platform

## MySQL
![Adminer in Shopware](https://i.imgur.com/XuUWCaz.png)

# Installation

## Zip Installation package for the Shopware Plugin Manager

* Download the latest plugin version (e.g. `FroshAdminer-1.3.0.zip`)
* Upload and install plugin using Plugin Manager

## Install with composer
* Change to your root Installation of shopware
* Run command `composer require frosh/adminer-platform` and install and active plugin with Plugin Manager

repository: FriendsOfShopware/FroshPlatformAdminer

gha_language: PHP

repo_name: FriendsOfShopware/FroshPlatformAdminer


text:
GMImagePicker
=============

An image & video picker supporting multiple selection and several customizations. Powered by the new iOS 8 **Photo framework**.

### Screenshots

![Screenshot](GMImagePickerDemo.gif "Screenshot")

### Features
1. Allows selection of multiple photos and videos, even from different albums.
2. Optional single selection mode.
3. Optional camera access.
4. Optional bottom toolbar with information about users selection.
5. Full and customizable acces to smart collections(**Favorites**, **Slo-mo** or **Recently deleted**).
6. Filter by collections & albums.
7. Filter by media type.
8. Customizable colors, fonts and labels to ease branding of the App.
9. By default mimics UIImagePickerController in terms of features, appearance and behaviour.
10. Dynamically sized grid view, easy to customize and fully compatible with iPhone 6/6+ and iPad.
11. Works in landscape orientation and allow screen rotation!
12. It can be used as Popover on iPad, with customizable size.
13. Fast & small memory footprint powered by PHCachingImageManager.
14. Full adoption of new iOS8 **PhotoKit**. Returns and array of PHAssets.

## Usage

#### Installation

###### Using CocoaPods
```ruby
pod 'GMImagePicker', '~> 0.0.2'
```

If you don't know yet what CocoaPods is, you should ASAP. It is the standard dependency manager for iOS projects. You can read a good tutorial by [Ray Wenderlich here](http://www.raywenderlich.com/64546/introduction-to-cocoapods-2)

###### Manually
Download and import GMImagePicker folder into your project.

#### Import header file

```` objective-c
#import "GMImagePickerController.h"
````
#### Initialize the picker, set the delegate and present it.

```` objective-c
	GMImagePickerController *picker = [[GMImagePickerController alloc] init];
    picker.delegate = self;
    [self presentViewController:picker animated:YES completion:nil];
````

#### Delegate
Implement the `GMImagePickerControllerDelegate` protocol in your class

```` objective-c
@interface YourViewController : UIViewController <GMImagePickerControllerDelegate>
````
Implement the `didFinishPickingAssets` delegate method. Note you are responsible for dismissing the picker when the operation completes and process the returned `(NSArray *)assetArray` :

```` objective-c
- (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)assetArray
{
    [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
    NSLog(@"GMImagePicker: User ended picking assets. Number of selected items is: %lu", (unsigned long)assetArray.count);
}
````

You can also implement optional `assetsPickerControllerDidCancel`
```` objective-c
-(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker
{
    NSLog(@"GMImagePicker: User pressed cancel button");
}
````

#### Customization
Before presenting the picker, you can customize some of its properties
```` objective-c
    ...
    //Display or not the selection info Toolbar:
    picker.displaySelectionInfoToolbar = YES;

    //Display or not the number of assets in each album:
    picker.displayAlbumsNumberOfAssets = YES;

    //Customize the picker title and prompt (helper message over the title)
    picker.title = @"Custom title";
    picker.customNavigationBarPrompt = @"Custom helper message!";

    //Customize the number of cols depending on orientation and the inter-item spacing
    picker.colsInPortrait = 3;
    picker.colsInLandscape = 5;
    picker.minimumInteritemSpacing = 2.0;

    //You can pick the smart collections you want to show:
    _customSmartCollections = @[@(PHAssetCollectionSubtypeSmartAlbumFavorites),
                                @(PHAssetCollectionSubtypeSmartAlbumRecentlyAdded),
                                @(PHAssetCollectionSubtypeSmartAlbumVideos),
                                @(PHAssetCollectionSubtypeSmartAlbumSlomoVideos),
                                @(PHAssetCollectionSubtypeSmartAlbumTimelapses),
                                @(PHAssetCollectionSubtypeSmartAlbumBursts),
                                @(PHAssetCollectionSubtypeSmartAlbumPanoramas)];

    //Disable multiple selecion
    picker.allowsMultipleSelection = NO;

    //Show a promt to confirm single selection
    picker.confirmSingleSelection = YES;
    picker.confirmSingleSelectionPrompt = @"Do you want to select the image you have chosen?";

    //Camera integration
    picker.showCameraButton = YES;
    picker.autoSelectCameraImages = YES;

    //Select the media types you want to show and filter out the rest
    picker.mediaTypes = @[@(PHAssetMediaTypeImage)];

    //UI color & text customizations
    picker.pickerBackgroundColor = [UIColor blackColor];
    picker.pickerTextColor = [UIColor whiteColor];
    picker.toolbarBarTintColor = [UIColor darkGrayColor];
    picker.toolbarTextColor = [UIColor whiteColor];
    picker.toolbarTintColor = [UIColor redColor];
    picker.navigationBarBackgroundColor = [UIColor blackColor];
    picker.navigationBarTextColor = [UIColor whiteColor];
    picker.navigationBarTintColor = [UIColor redColor];
    picker.pickerFontName = @"Verdana";
    picker.pickerBoldFontName = @"Verdana-Bold";
    picker.pickerFontNormalSize = 14.f;
    picker.pickerFontHeaderSize = 17.0f;
    picker.pickerStatusBarStyle = UIStatusBarStyleLightContent;
    picker.useCustomFontForNavigationBar = YES;
    ...
````

## Use it as popover on iPad
Also works as Popover on the iPad! (with customizable size)

![Screenshot](ipad.jpg "Screenshot")

This code works in both iPhone & iPad
```` objective-c
    ...
    GMImagePickerController *picker = [[GMImagePickerController alloc] init];
    picker.delegate = self;

    picker.title = @"Custom title";
    picker.customNavigationBarPrompt = @"Custom helper message!";
    picker.colsInPortrait = 3;
    picker.colsInLandscape = 5;
    picker.minimumInteritemSpacing = 2.0;
    picker.modalPresentationStyle = UIModalPresentationPopover;

    UIPopoverPresentationController *popPC = picker.popoverPresentationController;
    popPC.permittedArrowDirections = UIPopoverArrowDirectionAny;
    popPC.sourceView = _gmImagePickerButton;
    popPC.sourceRect = _gmImagePickerButton.bounds;

    [self showViewController:picker sender:nil];
````

#### Minimum Requirement
Xcode 6 and iOS 8.

### License

The MIT License (MIT)

Copyright (c) 2014 Guillermo Muntaner

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

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

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

repository: talk-to/GMImagePicker

gha_language: Objective-C

repo_name: talk-to/GMImagePicker


text:
markdownfmt
===========

[![Build Status](https://travis-ci.org/shurcooL/markdownfmt.svg?branch=master)](https://travis-ci.org/shurcooL/markdownfmt) [![GoDoc](https://godoc.org/github.com/shurcooL/markdownfmt?status.svg)](https://godoc.org/github.com/shurcooL/markdownfmt)

Like `gofmt`, but for Markdown.

![Markdown Format Demo](https://github.com/shurcooL/atom-markdown-format/blob/master/Demo.gif?raw=true)

Note that `markdownfmt` works with pure Markdown files. If you want to use it with Markdown files that have front matter, consider one of [alternatives](#alternatives) that supports that.

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

```bash
go get -u github.com/shurcooL/markdownfmt
```

Add `$GOPATH/bin` to your `$PATH` or copy `$GOPATH/bin/markdownfmt` to your `$PATH`.

Usage
-----

```
usage: markdownfmt [flags] [path ...]
  -d=false: display diffs instead of rewriting files
  -l=false: list files whose formatting differs from markdownfmt's
  -w=false: write result to (source) file instead of stdout
```

Editor Plugins
--------------

-	[vim-markdownfmt](https://github.com/moorereason/vim-markdownfmt) for Vim.
-	[emacs-markdownfmt](https://github.com/nlamirault/emacs-markdownfmt) for Emacs.
-	Built-in in Conception.
-	[markdown-format](https://atom.io/packages/markdown-format) for Atom (deprecated).
-	Add a plugin for your favorite editor here?

Alternatives
------------

-	[`mdfmt`](https://github.com/moorereason/mdfmt) - Fork of `markdownfmt` that adds front matter support.
-	[`tidy-markdown`](https://github.com/slang800/tidy-markdown) - Project with similar goals, but written in JS and based on a slightly different [styleguide](https://github.com/slang800/markdown-styleguide).

License
-------

-	[MIT License](https://opensource.org/licenses/mit-license.php)

repository: jlevy/markdownfmt

repo_name: jlevy/markdownfmt