text:
# Akamai CLI for Application Security

*NOTE:* This tool is intended to be installed via the Akamai CLI package manager, which can be retrieved from the releases page of the [Akamai CLI](https://github.com/akamai/cli) tool.

### Local Install, if you choose not to use the akamai package manager
* Node 10
* npm install after *every* update
* Ensure that the 'bin' subdirectory is in your path

### Assumed Defaults
* Version number - if not specified, the tool will assume the latest version is editable and try to execute the actions on the version. If the version is not editable[1](#references), you will get an error.
* Config ID - if not specified, the tool will make an assumption that the user has only one configuration and try to execute the action on the editable[1](#references) version.
* Security policy id - if not provided in commands that required a security policy, the tool will assume that the editable[1](#references) version has only one policy and try to use it. If the said version has more than one policy, an error will be thrown asking for the policy id.

If left to these assumptions, the commands will perform slower than when these options are provided explicitly.
### Credentials
In order to use this configuration, you need to:
* Set up your credential files as described in the [authorization](https://developer.akamai.com/introduction/Prov_Creds.html) and [credentials](https://developer.akamai.com/introduction/Conf_Client.html) sections of the getting started guide on developer.akamai.com.
* When working through this process you need to give grants for the Application Security API.  The section in your configuration file should be called 'appsec' or 'default' unless you would like to pass the section name in every command using the `--section` option.

### Account Switching
Account switching can be performed by providing the `--account-key` option with account ID as the value.
* In order to use this capability, an API client needs to be setup. Detailed information is available here https://learn.akamai.com/en-us/learn_akamai/getting_started_with_akamai_developers/developer_tools/accountSwitch.html

## Overview
The akamai appsec Kit is a set of nodejs libraries that wraps Akamai's {OPEN} APIs to help simplify protection to the properties delivered by Akamai. This kit can be used [as a no-fuss command line utility](#akamai-appsec) to interact with the library.

```
$ akamai appsec
Usage: akamai appsec <command> [options]

Commands:
  accept-recommendation                        Accept a recommendation.
  activate                                     Activate a version.
  activation                                   Get activation status.
  activation-history                           List activation history for the configuration.
  akamai-bot-category                          Display contents of akamai bot category.
  akamai-bot-category-action                   Display contents of akamai bot category action.
  akamai-bot-category-action-list              List all akamai bot category action.
  akamai-bot-category-list                     List all akamai bot category.
  akamai-defined-bot                           Display contents of akamai defined bot.
  akamai-defined-bot-list                      List all akamai defined bot.
  api-endpoints                                List all api endpoints.
  api-request-constraints-action               Display API Request Constraint action.
  api-pii-learning                             Display the API PII Learning settings.
  attack-group                                 Display attack group action in a policy.
  attack-groups                                List all attack group actions in a policy.
  attackgroup-condition-exception              Display attack group exceptions.
  bot-analytics-cookie                         Display contents of bot analytics cookie.
  bot-analytics-cookie-values                  Display contents of bot analytics cookie values.
  bot-detection                                Display contents of bot detection.
  bot-detection-action                         Display contents of bot detection action.
  bot-detection-action-list                    List all bot detection action.
  bot-detection-list                           List all bot detection.
  bot-endpoint-coverage-report                 Display contents of bot endpoint coverage report.
  bot-endpoint-coverage-report-config-version  Display contents of bot endpoint coverage report - config version.
  bot-management-settings                      Display contents of bot management settings.
  bot-protection-exceptions                    Display contents of bot protection exceptions.
  bypass-network-lists                         List all bypass network lists.
  challenge-action                             Display contents of challenge action.
  challenge-action-list                        List all challenge action.
  challenge-injection-rules                    Display contents of challenge injection rules.
  challenge-interception-rules                 (Deprecated) Display contents of challenge interception rules.
  client-side-security                         Display contents of client side security.
  clone                                        Clone a config.
  clone-policy                                 Clone security policy.
  complete-eval                                Complete evaluation in a policy.
  conditional-action                           Display contents of conditional action.
  conditional-action-list                      List all conditional action.
  configs                                      List all available configurations.
  contracts-groups                             List contracts and groups with KSD/WAP line items.
  create-api-match-target                      Creates an API match target.
  create-challenge-action                      Create a challenge action.
  create-conditional-action                    Create a conditional action.
  create-config                                Create a new security config.
  create-custom-bot-category                   Create a custom bot category.
  create-custom-client                         Create a custom client.
  create-custom-defined-bot                    Create a custom defined bot.
  create-custom-deny                           Create-custom-deny action.
  create-custom-deny-action                    Create a custom deny action.
  create-custom-rule                           Create a custom rule.
  create-malware-policy                        Create a malware policy.
  create-match-target                          Creates a website match target.
  create-rate-policy                           Create a rate policy.
  create-recategorized-akamai-defined-bot      Create a recategorized akamai defined bot.
  create-reputation-profile                    Create a reputation profile.
  create-security-policy                       Create a security policy.
  create-serve-alternate-action                Create a serve alternate action.
  create-transactional-endpoint                Create a transactional endpoint.
  custom-bot-category                          Display contents of custom bot category.
  custom-bot-category-action                   Display contents of custom bot category action.
  custom-bot-category-action-list              List all custom bot category action.
  custom-bot-category-list                     List all custom bot category.
  custom-bot-category-sequence                 Display contents of custom bot category sequence.
  custom-client                                Display contents of custom client.
  custom-client-list                           List all custom client.
  custom-defined-bot                           Display contents of custom defined bot.
  custom-defined-bot-list                      List all custom defined bot.
  custom-deny                                  Display contents of custom deny action.
  custom-deny-action                           Display contents of custom deny action.
  custom-deny-action-list                      List all custom deny action.
  custom-deny-list                             List all custom deny actions.
  custom-rule                                  Display contents of custom rule.
  custom-rules                                 List all custom rules.
  decline-recommendation                       Decline a recommendation.
  delete-challenge-action                      Delete a challenge action.
  delete-conditional-action                    Delete a conditional action.
  delete-config                                Delete a security config.
  delete-custom-bot-category                   Delete a custom bot category.
  delete-custom-client                         Delete a custom client.
  delete-custom-defined-bot                    Delete a custom defined bot.
  delete-custom-deny                           Delete a custom deny action.
  delete-custom-deny-action                    Delete a custom deny action.
  delete-custom-rule                           Delete a custom rule.
  delete-malware-policy                        Delete an existing malware policy.
  delete-match-target                          Deletes a match target.
  delete-rate-policy                           Delete a rate policy.
  delete-recategorized-akamai-defined-bot      Delete a recategorized akamai defined bot.
  delete-reputation-profile                    Delete a reputation profile.
  delete-security-policy                       Delete a security policy.
  delete-serve-alternate-action                Delete a serve alternate action.
  delete-transactional-endpoint                Delete a transactional endpoint.
  disable-api-request-constraints              Disable API Request Constraint.
  disable-attack-group                         Disable attack group  in a policy.
  disable-eval-penalty-box                     Disable evaluation penalty box in a policy.
  disable-eval-rule-action                     Disable evaluation rule action in a policy.
  disable-evasive-path-match                   Disable Evasive Path Match.
  disable-http-header-logging                  Disable the HTTP Header Logging settings.
  disable-malware-policy                       Remove actions to an existing malware policy in a firewall policy.
  disable-override-http-header-logging         Disable the HTTP Header Logging Override settings.
  disable-penalty-box                          Disable penalty box in a policy.
  disable-rate-policy                          Removes an action set to an existing rate policy in a policy.
  disable-reputation-profile                   Disable the action for a reputation profile.
  disable-rule-action                          Disable rule action in a policy.
  disable-slow-post                            Disable slow post in a policy.
  enable-api-request-constraints               Set the API Request Constraint action.
  enable-attack-group                          Enable attack group in a policy.
  enable-custom-rule                           Assigns an action (such as alert or deny) to an existing custom rule in a policy.
  enable-eval-penalty-box                      Enable evaluation penalty box in a policy.
  enable-eval-rule-action                      Enable evaluation rule action in a policy.
  enable-evasive-path-match                    Enable Evasive Path Match.
  enable-http-header-logging                   Enable the HTTP Header Logging settings.
  enable-malware-policy                        Assign actions to an existing malware policy in a firewall policy.
  enable-override-http-header-logging          Enable the HTTP Header Logging Override settings.
  enable-penalty-box                           Enable penalty box in a policy.
  enable-rate-policy                           Assigns an action to an existing rate policy in a policy.
  enable-reputation-profile                    Enable and set the action for a reputation profile.
  enable-rule-action                           Enable rule action in a policy.
  enable-slow-post                             Enable slow post in a policy.
  end-eval                                     Stop evaluation in a policy.
  eval-hostnames                               List all hosts under evaluation.
  eval-penalty-box                             Display evaluation penalty box action in a policy.
  eval-rule-action                             Display evaluation rule action in a policy.
  eval-rule-actions                            Display evaluation rules and actions in a policy.
  eval-rule-condition-exception                Display evaluation rule conditions and exceptions in a policy.
  evasive-path-match                           Display the Evasive Path Match settings.
  export                                       Export a configuration version.
  failover-hostnames                           List all failover hostnames on a config.
  hostname-coverage                            Display the Hostname Coverage.
  http-header-logging                          Display the HTTP Header Logging settings.
  ip-geo-firewall                              Display the IP Geo Firewall network lists in a policy
  javascript-injection-rules                   Display contents of javascript injection rules.
  krs-rules-upgrade                            Upgrade the KRS rules in a policy.
  malware-content-types                        List all malware content types.
  malware-policies                             List all malware policies.
  malware-policies-actions                     Display all enabled malware policy actions.
  malware-policy                               Display contents of a malware policy.
  match-target                                 Read a match target.
  match-target-order                           Change the match target sequence.
  match-targets                                List all match targets.
  mode                                         Display the WAF Mode.
  modify-akamai-bot-category-action            Update existing akamai bot category action.
  modify-api-match-target                      Updates an API match target.
  modify-attackgroup-condition-exception       Update attack group exceptions.
  modify-bot-analytics-cookie                  Update existing bot analytics cookie.
  modify-bot-detection-action                  Update existing bot detection action.
  modify-bot-management-settings               Update existing bot management settings.
  modify-bot-protection-exceptions             Update existing bot protection exceptions.
  modify-bypass-network-lists                  Update bypass network lists.
  modify-challenge-action                      Update existing challenge action.
  modify-challenge-injection-rules             Update existing challenge injection rules.
  modify-challenge-interception-rules          (Deprecated) Update existing challenge interception rules.
  modify-client-side-security                  Update existing client side security.
  modify-conditional-action                    Update existing conditional action.
  modify-custom-bot-category                   Update existing custom bot category.
  modify-custom-bot-category-action            Update existing custom bot category action.
  modify-custom-bot-category-sequence          Update existing custom bot category sequence.
  modify-custom-client                         Update existing custom client.
  modify-custom-defined-bot                    Update existing custom defined bot.
  modify-custom-deny                           Update existing custom deny action.
  modify-custom-deny-action                    Update existing custom deny action.
  modify-custom-rule                           Update existing custom rule.
  modify-eval-hostnames                        Modify hostnames under evaluation.
  modify-eval-rule-condition-exception         Update evaluation rule conditions and exceptions in a policy.
  modify-google-recaptcha-secret-key           Update existing google recaptcha secret key.
  modify-hostnames                             Modify hostnames for the configuration version.
  modify-ip-geo-firewall                       Update the IP Geo Firewall network lists in a policy
  modify-javascript-injection-rules            Update existing javascript injection rules.
  modify-malware-policy                        Modify an existing malware policy.
  modify-match-target                          Updates a website match target.
  modify-pragma-header                         Update Pragma Header settings.
  modify-prefetch-requests                     Update the Prefetch Requests settings.
  modify-rate-policy                           Update existing rate policy.
  modify-recategorized-akamai-defined-bot      Update existing recategorized akamai defined bot.
  modify-reputation-profile                    Update existing reputation profile.
  modify-rule-condition-exception              Update rule conditions and exceptions in a policy.
  modify-security-policy                       Update a security policy.
  modify-serve-alternate-action                Update existing serve alternate action.
  modify-siem                                  Modify the SIEM settings.
  modify-transactional-endpoint                Update existing transactional endpoint.
  modify-transactional-endpoint-protection     Update existing transactional endpoint protection.
  modify-version-notes                         Update the version notes.
  penalty-box                                  Display penalty box action in a policy.
  policies                                     List all security policies.
  pragma-header                                Display Pragma Header settings.
  prefetch-requests                            Display the Prefetch Requests settings.
  protect-eval-hostnames                       Move evaluation hostnames to protection.
  protections                                  List all protections of a policy.
  rate-policies                                List all rate policies.
  rate-policies-actions                        List all enabled rate policies actions of a policy.
  rate-policy                                  Display contents of a rate policy.
  recategorized-akamai-defined-bot             Display contents of recategorized akamai defined bot.
  recategorized-akamai-defined-bot-list        List all recategorized akamai defined bot.
  recommendations                              Display recommendations in a policy.
  reputation-profile                           Display contents of a reputation profile.
  reputation-profile-action                    Display the current reputation profile action.
  reputation-profile-actions                   List all reputation profile actions.
  reputation-profile-analysis                  Display the current reputation profile analysis settings.
  reputation-profiles                          List all reputation profiles.
  reset-recommendation                         Reset a recommendation.
  response-actions-list                        List all response actions.
  restart-eval                                 Restart evaluation in a policy.
  rotate-bot-analytics-cookie-values           Rotate bot analytics cookie values.
  rule-action                                  Display rule action in a policy.
  rule-actions                                 List all rule actions in a policy.
  rule-condition-exception                     Display rule conditions and exceptions in a policy.
  security-policy                              Display contents of security policy.
  selectable-hostnames                         List all selectable hostnames.
  selected-hostnames                           List all currently chosen hostnames.
  serve-alternate-action                       Display contents of serve alternate action.
  serve-alternate-action-list                  List all serve alternate action.
  set-mode                                     Set the WAF Mode.
  set-protections                              Update protections of a policy.
  set-reputation-profile-analysis              Set the reputation profile analysis settings.
  siem                                         Display the SIEM settings.
  siem-definitions                             List all siem definitions.
  slow-post                                    Display contents of slow post in a policy.
  start-eval                                   Start evaluation in a policy.
  structured-rule-template                     Prints sample JSON of a structured custom rule.                     [aliases: srt]
  transactional-endpoint                       Display contents of transactional endpoint.
  transactional-endpoint-list                  List all transactional endpoint.
  transactional-endpoint-protection            Display contents of transactional endpoint protection.
  update-eval                                  Update evaluation in a policy.
  upgrade-details                              Display rules updates.
  version                                      Read a config version.
  version-notes                                Display the version notes.
  versions                                     List all config versions.

Command options:
  --json        Print the raw json response. All commands respect this option.                       [boolean]
  --edgerc      The full path to the .edgerc file.                                                    [string]
  --section     The section of .edgerc to use.                                                        [string]
  --help        Prints help information.                                            [commands: help] [boolean]
  --version     Current version of the program.                                                      [boolean]
  --account-key Account ID to switch to when performing the operation                                 [string]
Copyright (C) Akamai Technologies, Inc
Visit http://github.com/akamai/cli-appsec for detailed documentation
```

#### Command details
For details about any individual command including arguments, options, and command options, you can run -
```
akamai appsec <command> --help
```

## akamai-appsec
This script wraps all of the functionality from the library into a command line utility which can be used to support the following use cases.

* [Protect a new host](#Protect-hosts)
* [Add/Update a custom rule](#custom-rule)

## Protect Hosts
Akamai customers can currently configure delivery of a new web property using the PAPI API/CLI. This use case enables protecting these new web properties. This protection is limited to adding the host to an existing security policy. The typical steps are listed in the following table:

|#|Commands|Comments|
|-|---------|--------|
|1|[akamai property create](https://github.com/akamai/cli-property#create)||
|2|[akamai property activate](https://github.com/akamai/cli-property#activate)||
|3|`akamai appsec configs`||
|4|`akamai appsec versions --config <config id>`||
|5|`akamai appsec clone --config <config id>`|Optional. You can skip this step if you choose to use an existing editable[1](#references) configuration version|
|6|`akamai appsec selectable-hostnames`  ||
|7|`akamai appsec modify-hostnames @input.json --append`||
|8a|`akamai appsec policies --config <config id> --version <version number>`||
|8b|`akamai appsec create-match-target --hostnames <comma separated hostnames> --paths <comma separated paths> --policy <security policy id>`||
|8c|`akamai appsec match-target-order --insert <match target id> --config <config id> --version <version number>`  ||
|8d|`akamai appsec modify-match-target <match target id> add-hostname <hostname>`||
|9|`akamai appsec activate --network <activation network> --notes <activation notes> --notify <emails>`||
|10|`akamai appsec activation --activation-id <activation id>`||

## Custom Rule
Adding or updating a custom rule to the protection of a hostname requires a change to a policy.  The custom rule action API is used to enable the custom rule.

|#|Commands|Comments|
|-|---------|--------|
|1|`akamai appsec clone --config <config id>`|Optional. You can skip this step if you choose to use an existing editable[1](#references) configuration version|
|2|`akamai appsec structured-rule-template > structuredRule.json`|This prints a template json to the standard output. You must edit this template appropriately before creating the custom rule|
|3|`vim structuredRule.json`||
|4|`akamai appsec create-custom-rule @structuredRule.json`||
|5|`akamai appsec enable-custom-rule --custom-rule <custom rule id> --policy <security policy id> --action <alert or deny>`||
|6|`akamai appsec activate --network <activation network> --notes <activation notes> --notify <emails>`||
|7|`akamai appsec activation --activation-id <activation id>`||

## Caveats
The Akamai CLI is a new tool and as such we have made some design choices worth mentioning.
* Credentials - the tool looks for credentials in the 'appsec' section in your ~/.edgerc file. If not present, it will look for the section 'default'. Alternatively you can provide the section name using the --section option in every command. If you are unfamiliar with the authentication and provisioning for OPEN APIs, see the "Get Started" section of https://developer.akamai.com

## References
1A configuration version is editable if it is not active currently or in the past in any of the environments(staging or production).

repository: akamai/cli-appsec

repo_name: akamai/cli-appsec


text:
## Events

********************************************
### Event: 'ready'
**Listener**: `function () { }`
Fired when qserver is ready.

********************************************
### Event: 'error'
**Listener**: `function (err) { }`
Fired when there is an error occurs.

********************************************
### Event: 'permitJoining'
**Listener**: `function (joinTimeLeft) {}`
Fired when qserver is allowing for devices to join the network, where `joinTimeLeft` is number of seconds left to allow devices to join the network. This event will be triggered at each tick of countdown (per second).

********************************************
### Event: 'ind'
**Listener**: `function (msg) { }`
Fired when there is an incoming indication message. The `msg` is an object with the properties given in the table:

| Property       | Type             | Description                                                                                |
|----------------|------------------|---------------------------------------------------------------------------------------------------------------------------------|
| type           | String           | Indication type, can be `'devIncoming'`, `'devLeaving'`, `'devUpdate'`, `'devNotify'`, `'devChange'`, and `'devStatus'`.        |
| qnode          | Object \| String | qnode instance, except that when `type === 'devLeaving'`, qnode will be a clientId (since qnode has been removed)               |
| data           | Depends          | Data along with the indication, which depends on the type of indication                                                         |

* ##### devIncoming

  Fired when there is a qnode incoming to the network. The qnode can be either a new registered one or an old one that logs in again.

  * msg.type: `'devIncoming'`
  * msg.qnode: `qnode`
  * msg.data: `undefined`
  * message examples
  ```js
  // example of an Object Instance notification
  {
    type: 'devIncoming',
    qnode: qnode instance
  }
  ```

* ##### devLeaving

  Fired when there is a qnode leaving the network.

  * msg.type: `'devLeaving'`
  * msg.qnode: `'foo_clientId'`, the clientId of which qnode is leaving
  * msg.data: `9e:65:f9:0b:24:b8`, the mac address of which qnode is leaving.
  * message examples
  ```js
  // example of an Object Instance notification
  {
    type: 'devLeaving',
    qnode: 'foo_clientId',
    data: '9e:65:f9:0b:24:b8'
  }
  ```

* ##### devUpdate

  Fired when there is a qnode that publishes an update of its device attribute(s).

  * msg.type: `'devUpdate'`
  * msg.qnode: `qnode`
  * msg.data: An object that contains the updated attribute(s). There may be fields of `status`, `lifetime`, `ip`, and `version` in this object.
  * message examples
  ```js
  // example of an Object Instance notification
  {
    type: 'devUpdate',
    qnode: qnode instance,
    data: {
      ip: '<IP_ADDRESS>',
      lifetime: 82000
    }
  }
  ```

* ##### devNotify

    Fired when there is qnode that publishes a notification of its _Object Instance_ or _Resource_.

    * msg.type: `'devNotify'`
    * msg.qnode: `qnode`
    * msg.data: Content of the notification. This object has fields of `oid`, `iid`, `rid`, and `data`.
        - `data` is an _Object Instance_ if `oid` and `iid` are given but `rid` is null or undefined
        - `data` is a _Resource_ if `oid`, `iid` and `rid` are given (data type depends on the _Resource_)
    * message examples
    ```js
    // example of an Object Instance notification
    {
      type: 'devNotify',
      qnode: qnode instance,
      data: {
        oid: 'humidity',
        iid: 0,
        data: {             // Object Instance
          sensorValue: 32
        }
      }
    }

    // example of a Resource notification
    {
      type: 'devNotify',
      qnode: qnode instance,
      data: {
        oid: 'humidity',
        iid: 0,
        rid: 'sensorValue',
        data: 32            // Resource value
      }
    }
    ```

* ##### devChange

    Fired when the Server perceives that there is any change of _Resources_ from notifications or read/write responses.

    * msg.type: `'devChange'`
    * msg.qnode: `qnode`
    * msg.data: Content of the changes. This object has fields of `oid`, `iid`, `rid`, and `data`.
        - `data` is an object that contains only the properties changed in an Object Instance. In this case, `oid` and `iid` are given but `rid` is null or undefined
        - `data` is the new value of a Resource. If a Resource itself is an object, then `data` will be an object that contains only the properties changed in that Resource. In this case, `oid`, `iid` and `rid` are given (data type depends on the Resource)
    * message examples
    ```js
    // changes of an Object Instance
    {
      type: 'devChange',
      qnode: qnode instance,
      data: {
        oid: 'temperature',
        iid: 0,
        data: {
          sensorValue: 12,
          minMeaValue: 12
        }
      }
    }

    // change of a Resource
    {
      type: 'devChange',
      qnode: qnode instance,
      data: {
        oid: 'temperature',
        iid: 1,
        rid: 'sensorValue',
        data: 18
      }
    }
    ```

    * **Notice!!!** The difference between `'devChange'` and `'devNotify'`:
        - Data along with `'devNotify'` is what a qnode like to notify of even if there is nothing changed. A periodical notification is a good example, a qnode has to report something under observation even there is no change of that thing.
        - If qserver does notice there is really something changed, it will then fire `'devChange'` to report the change(s). It is suggested to use `'devChange'` indication to update your GUI views, and to use `'devNotify'` indication to log data.

* ##### devStatus

  Fired when there is a qnode going online, going offline, or going to sleep.

  * msg.type: `'devStatus'`
  * msg.qnode: `qnode`
  * msg.data: `'online'`, `'sleep'`, or `'offline'`
  * message examples
  ```js
  // example of an Object Instance notification
  {
    type: 'devStatus',
    qnode: qnode instance,
    data: 'online'
  }
  ```

********************************************
### Event: 'message'
**Listener**: `function(topic, message, packet) {}`
Fired when the qserver receives any published packet from any remote qnode.

1. `topic` (_String_): topic of the received packet
2. `message` (_Buffer_): payload of the received packet
3. `packet` (_Object_): the received packet, as defined in [mqtt-packet](https://github.com/mqttjs/mqtt-packet#publish)

license: MIT

repository: lwmqn/shepherd

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: lwmqn/shepherd


text:
# Trisdanvalwen

Trisdanvalwen is a MMORPG made with Django framework, Channels (websocket) and Javascript for client rendering.
It's a minecraft like game with cute pets, we made all models with Magicavoxel to save time, you can chat with everyone and
build creative constructions by your own hands.

It's a school project made during last year of bachelor's computer science from "Université du Maine" in France for "Web architecture" class.

It's still in development so be free to signal any issues with demo on github.

![screengit](https://cloud.githubusercontent.com/assets/15633085/24589764/66176b4a-17e0-11e7-8d2b-a723c2accf7a.png)
![maison](https://cloud.githubusercontent.com/assets/15633085/24629799/a071c7ba-18ba-11e7-9073-06a30a203574.png)
![maison-int](https://cloud.githubusercontent.com/assets/15633085/24629816/b2213950-18ba-11e7-8f05-e84e1e67c9cd.png)

## How it works

Trisdanvalwen make use of Channels for real time part, websocket are used for chatting app and game app currently, we should
update this projet to use WebRTC (UDP packets) as a layer for any packets sent or received by game (excepting chat).

Gunicorn is used as WSGI server because of its lower latency for http requests compared to daphne ASGI server
Daphne is default ASGI server used by channels to handle any websocket request.
Django-redis-cache is used as session backend cache and as application cache for sharing map informations through each worker
and save recurrent changes on map's chunks.

Nginx is used as proxy-server to redirect requests on correct services and for serving static files furthermore it's enable gzip compression and cache for request.

And PostgreSQL is DBMS chosen for this project for low latency and high throughput.

Demo is running on a server using Docker containers for each service (nginx, postgresql, redis etc...).

## Installation

This repo make uses of postgreSQL and redis-server so be sure to have them installed on your machine.

Once you have them installed use pip to install any requirements:

> pip install -r requirements.txt

Before starting, set a new database for running this project then make necessary changes in trisdanvalwen/settings.py file.

Do migrations to create table structure with following command:

> python manage.py migrate

Once you have set up your new installation, you can load some fixtures for testing purpose:

> python manage.py loaddata user/fixtures/user_data.json
>
> python manage.py loaddata user/fixtures/initial_data.json
>
> python manage.py loaddata game/fixtures/initial_data.json

## Running

Once you have all requirements you can run server executing:
>$ ./run.sh

in root's project directory, it's a tiny shell script that run daphne, initialize runtime server and run workers using gunicorn.

repository: DanAurea/Webcraft

repo_name: DanAurea/Webcraft


text:
---
category: post
layout: post
title: "How to Use Anchor Pricing"
image_url: http://farm7.staticflickr.com/6090/6089730465_c92f686e7c_b.jpg
image_credit: Franck Vervial
tags: [marketing, pricing, sales, psychology, cognitive bias]
meta_description: An intersting pshylogical condition with humans can be utilized to sell things at higher price-points.
---
Anchoring describes the human tendency to use the first piece of information presented when making decisions. The first thing offered is called the anchor. We use this anchor to make decisions about anything subsequently offered.

Anchoring can be used multiple ways the most common being with product pricing and price negotiation. The most overly used example of anchoring is when Apple [introduced][1] the iPad.

> "What should we price it at?" asked Jobs. "If you listen to the pundits, we're going to price it at under $1000, which is code for $999."" He put a giant "$999" up on the screen and left it there for ages before finally going on. "I am thrilled to announce to you that the iPad pricing starts not at $999," said Jobs, "but at just $499." On-screen, the $999 price was crushed by a falling "$499."

[1]: http://www.mint.com/blog/how-to/price-anchoring/

The iPad was anchored at $999. When we finally hear the price is actually half what we expect, we go wild.

## Using Anchoring to Price
To use anchoring, a number needs to be anchored in the potential customer's head. The first number they come across will anchor the price. If the anchored price is high, they are willing to pay a higher price. If the anchor is low, then they will want to pay a lower price.

With anchoring, people use the anchored price to determine the overall value of the product being offered. Stores which have perpetual sales use anchoring on every item in the store. When you look at the price tag, it has the original price and the sale price. The original price, at the top of the price tag, tricks your brain into thinking you are getting a deal at the sale price.

## Anchoring Examples

* When Williams-Sonoma introduced bread machines, sales were slow. When they added a "deluxe" version that was 50% more expensive, they started flying off the shelves; the first bread machine now appeared to be a bargain. [source][2]

* Every infomercial you have ever seen does two price anchoring. _Products like this normally cost $399 in the store, but through this special television offer we are offering it at $79.99._

* Manufacturer's Suggested Retail Price (MSRP) is often used as an anchor. The actual price you pay can be a few dollars less than the MSRP and you think you are getting a deal. This strategy is commonly used when selling new cars.

[2]: http://bookoutlines.pbworks.com/w/page/14422685/Predictably%20Irrational

## Avoiding Anchoring
Everyone is susceptible to anchoring, even people who are aware of it. Studies have been [conducted][4] on groups made aware of anchoring and they are still susceptible to it. Another [study][3] attempted to financially motivate people to not be affected by anchoring and they were still affected by it.

Something to do with our monkey brains I'm sure.

[3]: http://www.ncbi.nlm.nih.gov/pubmed/21114351 "The effect of accuracy motivation on anchoring and adjustment: Do people adjust from provided anchors?"
[4]: http://www.ncbi.nlm.nih.gov/pubmed/8945789 "A new look at anchoring effects: Basic anchoring and its antecedents"

gha_language: HTML


text:
# Microsoft Student Partner Community Bangalore

## Create a free Azure account(Students only)

https://azure.microsoft.com/en-in/free/students/

## Session on Introduction to Machine Learning Studio

Get Started : https://studio.azureml.net/

## Session on Azure Cognitive Services

Get Started: https://www.customvision.ai

repository: TANAYTAPANSHU/WoS-Events

repo_name: TANAYTAPANSHU/WoS-Events


text:
---
title: Plumber Licence
permalink: /browse-all-licences/Public-Utilities-Board-(PUB)/Plumber-Licence
third_nav_title: Public Utilities Board (PUB)
---

## Apply for Plumber Licence

Public Utilities Board (PUB)

{% include spcp-text.html type="sp" %}

{% include button.html text="Apply on GoBusiness Licensing" src="https://licence1.business.gov.sg/feportal/web/frontier/eAdvisor?redirection=true&selectedLicenceIds=268" type="primary" %}

Application Details

Application to be a Licensed Plumber to carry out water service and sanitary plumbing works.

FAQ

Do I need a licence?

If you wish to carry out water service work or sanitary work in any premises, a licence is required. Only licensed plumbers are allowed to carry out the above-mentioned works.

Can I carry out water service and sanitary work without a plumber licence?

For the following work, a plumber licence is not required:

Water Service Works (Potable Water)

1. Replacing or removing any tap or mixer.

2. Replacing or removing any of the following accessories connected to a tap:

(a) a shower hose or a showerhead;

(b) a connecting hose with a spring-loaded self-closing nozzle;

(c) a connecting hose to a washing machine or a dish washer;

(d) a flexible hose.

3. Replacing or removing any pipe between a stop valve and an instantaneous water heater.

4. Replacing or removing any of the following parts of a flushing cistern:

(a) a flushing mechanism;

(b) a flexible hose after the ball valve.

Sanitary Works (Used Water)

1. Installing, replacing or removing -

(a) any wash basin or sink, including any bottle trap or fitting trap below the wash basin or sink;

(b) any bath tub, shower tray or shower enclosure;

(c) any floor waste outlet; or

(d) any pipe conveying sullage water into a floor trap.

2. Replacing -

(a) any floor trap grating or cover; or

(b) any floor waste grating or cover.

3. Installing, replacing or removing any urinal, including any fitting trap or any pipe connecting the urinal to a urinal trap.

4. Clearing any blockage in any floor trap, water closet or sanitary appliance.

5. Clearing and flushing any discharge pipe, ventilating pipe, drain-line, fitting, floor trap, inspection chamber, grease trap, pump or any other appurtenance related to the conveyance of sewage or sullage water from any sanitary appliance or sanitary facility to a sewerage system.

What is the minimum requirement to apply for a plumber licence?

(a) Possess a Builder Certificate/Advanced Builder Certificate in Plumbing & Pipe Fitting or Trade Diploma in Plumbing Technology issued by the BCA Academy or Nitec Certificate in Facility Technology issued by ITE; OR

Diploma or Degree in Civil, Building, Environmental or Mechanical Engineering disciplines with at least a Builder Certificate in Plumbing & Pipe Fitting (Practical) AND

(b) At least 2 years' relevant post-qualification experience or concurrent experience. You must show proof that you are working under a licensed plumber's supervision during that period.

What supporting documents do I need to attach?

(a) One full-colour passport-size photograph

(b) NRIC / Foreign Identification (FIN) / Passport / Work Permit (Front & Back)

(c) Relevant certificates

(d) Relevant plumbing works experience with name and signature of PUB Licensed Plumber(s).

How soon can my application be processed?

We will inform you of the outcome of your application after 4 weeks of closing date of applications.

Upon acceptance of my application, what do I need to do?

You will be required to attend a 3 days course which will be conducted by PUB. Upon completion of the course, you are required to sit for a written and oral assessment. Upon passing the assessments, a licence will be issued.

Additional Information

Fees

The licence fee is $90 and is valid for life.

Documents Needed

NRIC/Employment Pass/S Pass/ Work Permit

File format: pdf,jpg,gif,png,bmp

Maximum upload per application: 2 MB

Builders Certificate in Plumbing & Pipe Fitting

File format: pdf,jpg,gif,png,bmp

Maximum upload per application: 2 MB

Colour passport-sized photograph

File format: pdf,jpg,gif,png,bmp

Maximum upload per application: 2 MB

Testimonial from supervising LP

File format: pdf,jpg,gif,png,bmp

Maximum upload per application: 2 MB

repository: isomerpages/govtech-gobusiness

branch_name: refs/heads/staging

gha_license_id: NOASSERTION

repo_name: isomerpages/govtech-gobusiness


text:
## Technical Overview
A portfolio site is essential for every software developer to showcase projects and technical skills which demonstrates what you can do based upon your resume.

So I have built my site using react.js as a front end, node.js as a back-end, and MongoDB as storage, for better performance I have implemented server-side rendering technique which is a very popular technique for rendering client-side webpage on the server and server will send the complete result to the client, and to bundle the module I have used Webpack which is a module bundler to bundle javascript, front-end assets.

<img src='screenshot/thumbnail.png' />

### Website Link
[https://myportfolio.hackbotone.com](https://myportfolio.hackbotone.com)

### MongoDB database import command
Please import the databases after cloning this repo.

`````````````````````````````````````
git clone https://github.com/anshumanpattnaik/reactjs-portfolio-mern-website.git

cd reactjs-portfolio-mern-website/databases

mongoimport --uri "mongodb://<IP_ADDRESS>:27017/portfolio" --collection skills --jsonArray --file skills.json
mongoimport --uri "mongodb://<IP_ADDRESS>:27017/portfolio" --collection projects --jsonArray --file projects.json
mongoimport --uri "mongodb://<IP_ADDRESS>:27017/portfolio" --collection blogs --jsonArray --file blogs.json
`````````````````````````````````````

### Installation
``````````````````````````````````````
cd reactjs-portfolio-mern-website

npm install
npm run start
``````````````````````````````````````
Open http://localhost:9002 to view it in the browser.

### Website Design & Developed by
[Anshuman Pattnaik](https://www.linkedin.com/in/anshuman123/)

### License
This project is licensed under the [MIT License](LICENSE)


text:
[![Build Status](https://travis-ci.org/moteus/lua-bgcrypto-aes.png?branch=master)](https://travis-ci.org/moteus/lua-bgcrypto-aes)
[![Build status](https://ci.appveyor.com/api/projects/status/c06ab28rehq703kh?svg=true)](https://ci.appveyor.com/project/moteus/lua-bgcrypto-aes)
[![Coverage Status](https://coveralls.io/repos/github/moteus/lua-bgcrypto-aes/badge.svg?branch=master)](https://coveralls.io/github/moteus/lua-bgcrypto-aes?branch=master)

Binding to [AES](http://www.gladman.me.uk/cryptography_technology/fileencrypt) encrypt library.

This module has no external dependences.
It works on Windows and *nix.<br/>

!For now this is development version so i can change public API.!

Usage:
```lua
local aes = require "bgcrypto.aes"

-- encrypt key (AES256)
local key = ("1"):rep(32)
-- output file
local out = io.open("test.aes", "wb+")
-- use AES ECB mode
local ecb_encrypt = aes.ecb_encrypt()
-- use callback with context to process encrypted data
ecb_encrypt:set_writer(out.write, out)

ecb_encrypt:open(key)

-- proceed input data stream
while true do
  local chunk = get_next_chunk()
  if not chunk then break end
  ecb_encrypt:write(chunk)
end

```

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/moteus/lua-bgcrypto-aes/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

repository: fslove/lua-bgcrypto-aes

repo_name: fslove/lua-bgcrypto-aes


text:
# Example of Webex Integration (OAuth flow) in Node.js

This Webex Integration example illustrates an OAuth Grant flow at the end of which the Webex Teams user who granted permission will see his fullname displayed.

This code sample comes as a companion to the DevNet learning lab: [Run a Webex Teams Integration locally](https://developer.cisco.com/learning/tracks/collab-cloud/spark-apps/collab-spark-intl/step/1).

![](docs/img/OAuth-Flow-Sumpup.png)

This example leverages a pre-registered Webex OAuth Integration with a Redirect URL on localhost so that it can be run with minimal setup.
The flow initiates at http://localhost:8080/, and the provided Webex Application's Oauth Flow redirects to http://localhost:8080/oauth

For production purpose, you will register and deploy the integration on a public URL. Please check the guide to [register your own integration](#https://github.com/CiscoDevNet/spark-integration-sample#to-register-your-own-spark-oauth-integration).

## Quick start on Glitch

Click [![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/import/github/CiscoDevNet/webex-integration-sample)

Then open the `.env` file and place your OAuth integration settings: CLIENT_ID, CLIENT_SECRET.

Also, place the set of scopes you want your integration to request.

Your integration is all set.

_Note that thanks to Glitch 'PROJECT_DOMAIN' env variable, you do not need to customize the REDIRECT_URI env variable to point to your app domain._

## Run the sample locally

``` bash
git clone https://github.com/CiscoDevNet/webex-integration-sample
cd webex-integration-sample
npm install
DEBUG=oauth* node server.js
```

You're all set, the integration sample is live!
Let's go through the OAuth flow.

Reach to the integration home page from a Web browser: open [http://localhost:8080](http://localhost:8080):

![](docs/img/OAuth-Flow-Step1-Initiate-From-EJS.png)

Click Start, enter your Webex Teams email and click accept (or decline):

![](docs/img/OAuth-Flow-Step2-User-Decline-Accept.png)

If you accepted, the integration you're running locally just got issued a "Webex Teams API access token" so that the code sample can now act on your behalf, and with the set of permissions you provided.
The integration custom code logic uses the provided token to request your Webex Teams account details (GET /people/me) and displays your full name.

![](docs/img/OAuth-Flow-Step3-Custom-Logic.png)

## Registering your own OAuth Integration

To learn more about Webex Integrations, [read the reference documentation](https://developer.webex.com/authentication.html).

In the example above, we were running a pre-registered OAuth integration running on port 8080.
Let's now register a new Webex integration that we will be running on port **9090**.

Go to the [Webex for developers](https://developer.webex.com) portal, click 'Apps', 'add Apps', and then [create an integration](https://developer.webex.com/add-integration.html).

Fill the form fields:
- **Name**: your app name, such as 'My Awesome App' in the snapshot below,
- **Description**: these details are not displayed to your app end-users,
- **Support email**: a valid email address for Webex Spark operations team to reach to you if necessary,
- **App Icon**: simply pick one of the default icons or upload a 512x512 file. Feel free to use this provided sample for now: [https://bit.ly/SparkIntegration-512x512](https://bit.ly/SparkIntegration-512x512)
- **Redirect URI**: enter `http://localhost:9090/oauth` since this is the URL at which the provided code sample will be listening on your local machine. More to come in the next steps if this lab
- **Scopes**: select the `spark:people_read` and `spark:rooms_read` scopes.

![](docs/img/OAuth-Flow-Step0-create-integration.png)

> Note the list of scopes you selected corresponds to the maximum set of scopes that your integration will be entitled to ask for. However, from code, your integration can dynamically [refine the set of scopes asked for](https://github.com/CiscoDevNet/webex-integration-sample/blob/master/server.js#L30) in order to comply with the real needs of your application. A good practice is to start small and extend the set of scopes asked for as the end-users gain trust in your app and is ready to ask more advanced features.

![](docs/img/OAuth-Flow-Step0-select-scopes.png)

Click save, and look for your integration `client id` and `client secret`.

![](docs/img/OAuth-Flow-Step0-client-id-secret.png)

Let's now configure the integration: you can either paste your integration client id and secret into [the code](https://github.com/CiscoDevNet/webex-integration-sample/blob/master/server.js#L26), or set these as env variables on the command line.

Instructions for **Mac, Linux and Windows bash users**
- open a terminal
- on a single command line, type:

    ```shell
    DEBUG=oauth* PORT=9090 REDIRECT_URI="http://localhost:9090/oauth" CLIENT_ID="YOUR_INTEGRATION_ID" CLIENT_SECRET="YOUR_INTEGRATION_SECRET"  node server.js
    ```

Instructions for **Windows command shell users**
- open a command shell
- enter the commands below:

    ```shell
    set DEBUG="oauth*"
    set PORT=9090
    set REDIRECT_URI="http://localhost:9090/oauth"
    set CLIENT_ID="YOUR_INTEGRATION_ID"
    set CLIENT_SECRET="YOUR_INTEGRATION_SECRET"
    node server.js
    ```

**You're all set. Restart your integration, and give it a try: [http://localhost:9090](http://localhost:9090)**

This step by step guide explained how to register a Webex Integration running on a local developer environment.
In the real-world, you will want to deploy your integration, and register its public URL rather than your local machine's.
Check the DevNet learning lab: ['Deploy a Webex OAuth Integration'](https://learninglabs.cisco.com/tracks/devnet-express-cloud-collab-soft-dev/creating-spark-integrations-sd/collab-spark-intd-heroku/step/1) for detailled instructions.

## Integrating with Webex Teams Widgets

Now that you know the basics about Webex Integrations, you can leverage not only REST API Resources but also the full set of Webex Teams SDKs and Widgets.

To experiment with the Webex Teams Widget, simply launch the `widget.js` sample with 2 environment variables:
- BOT_TOKEN: place the token of a bot
- SPACE_ID: place the identifer of a Space that the bot is part of

Once granted authorization to open the widget, the sample will add the user to a demo space, and display the 'Space' Widget.

_Note that the OAuth list of scopes has been changed to `spark:all` as required by the 'Space' Widget. To successfully run this sample, open the [Webex for Developers](https://developer.webex.com) portal, and change the list of scopes that can be requested by your OAuth Integration to **spark:all**_

```
BOT_TOKEN=<your-token> SPACE_ID=<demo-space> node widget.js
```

![](docs/img/Space-Widget.png)

## More about Webex Integrations

Webex Integrations are a way for your apps to request permission to invoke the Webex APIs on behalf of Webex Teams users.
The process used to request permission is called an OAuth Grant Flow, and is documented in the [Integrations guide](https://developer.webex.com/authentication.html).

You can experiment the flow in DevNet Learning lab ["Understand the OAuth Grant flow of Webex Teams Integrations"](https://learninglabs.cisco.com/tracks/collab-cloud/business-messaging/collab-spark-auth/step/1).


text:
# HTTPs

A website must be using HTTPS, a secure protocol for sending/receiving data over the Internet.
Using HTTPS indicates that an additional encryption/authentication layer was added between client and server.
HTTPS should be used by any site that collects sensitive customer data such as credit card information.
Even for sites that do not collect such data, switching to https helps users by improving privacy and overall security.

repository: you-commerce/seo-checklist

repo_name: you-commerce/seo-checklist


text:
# Mixer chat to Minecraft

A simple bot integration to send relevant chat from your Mixer stream to your Minecraft server. The messages will only be visible to the streamer so it could be used in a multiplayer server.

To set it up you are going to need to configure the following things on Mixer, your Minecraft Server and Bot.

## Access Key for your Bot.
To call Mixer APIs, you'll first need to create an OAuth application.

https://mixer.com/lab/oauth

Obtain your access key.

## Minecraft RCON Configuration.
Change your server.properties file

Change -> enable-rcon=true

add -> rcon.password=yourPassword

add -> rcon.port=from 5000 to 65000

Restart your minecraft server. When loading your should have a message like:

```[20:44:30] [RCON Listener #1/INFO]: RCON running on <IP_ADDRESS>:32600```

## Setting up NodeJS and config file.
Install Node JS

Download the this files

Using console on the same folder run:

```npm install```

After everything is ready change your settings in *settings.json*
```
{
	"serverIp":"your minecraft server ip or hostname",
	"rconPort":30002, <- must be numeric
	"rconPassword":"your rcon pass", <- must be string
	"streamerIGN":"_MadCat", <- Your Minecraft IGN
	"botName":"MadCatBot", <- Your Mixer bot name
	"initMessage":"Mixer chat ready!", <- Message when this bot connects to Mixer
	"accessKey":"your access key from https://mixer.com/lab/oauth"
}
```

## Run it

```node minecraft_mixer_chat.js```


text:
The directory `services` contains basic kubernetes resource files for MySQL, Apache Kafka, MySQL and Prometheus for use in development.  The directory `server` contains a Kustomize based directory structure with `dev` and `prod` profiles.  The `dev` profile is configured for use with the resources created in the `services` directory.

`kapp` is a simple deployment tool focused on the concept of a "Kubernetes application" — a set of resources with the same label.  We will install the development services using `kapp`

```
kapp -y deploy -a mysql -f ./services/mysql
```

To uninstall use `kapp delete -a mysql`.

To deploy the Skipper Server in the dev profile

```
kubectl kustomize ./skipper-server/kustomize/overlays/dev | kapp -y deploy -a skipper-server -f -
```

To uninstall use `kapp -y delete -a skipper-server`

To deploy the Data Flow Server in the dev profile

```
kubectl kustomize ./data-flow-server/kustomize/overlays/dev | kapp -y deploy -a data-flow-server -f -
```

To uninstall use `kapp -y delete -a data-flow-server`

repository: ilayaperumalg/spring-cloud-dataflow-ops

repo_name: ilayaperumalg/spring-cloud-dataflow-ops


text:
```python
from __future__ import division, print_function, absolute_import

import tflearn
from tflearn.data_utils import to_categorical, pad_sequences
from tflearn.datasets import imdb
```

### imdb dataset

```python
train, test, _ = imdb.load_data(path='imdb.pkl', n_words=10000,
                                valid_portion=0.1)
```

```python
trainX, trainY = train
testX, testY = test
```

### data preprocessing

```python
# sequence padding
trainX = pad_sequences(trainX, maxlen=100, value=0.)
testX = pad_sequences(testX, maxlen=100, value=0.)
```

```python
len(trainX)
```

    22500

```python
len(testX)
```

    2500

```python
# convert lables to binary vectors
trainY = to_categorical(trainY, nb_classes=2)
testY = to_categorical(testY, nb_classes=2)
```

### buid network

```python
net = tflearn.input_data([None, 100])
net = tflearn.embedding(net, input_dim=10000, output_dim=128)
net = tflearn.lstm(net, 128, dropout=0.8)
net = tflearn.fully_connected(net, 2, activation='softmax')
net = tflearn.regression(net, optimizer='adam', learning_rate=0.001,
                         loss='categorical_crossentropy')

model = tflearn.DNN(net, tensorboard_verbose=0)
```

    WARNING:tensorflow:From /Users/leiming/anaconda2/envs/tflearn/lib/python3.5/site-packages/tflearn/summaries.py:46 in get_summary.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
    Instructions for updating:
    Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
    WARNING:tensorflow:From /Users/leiming/anaconda2/envs/tflearn/lib/python3.5/site-packages/tflearn/summaries.py:46 in get_summary.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
    Instructions for updating:
    Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
    WARNING:tensorflow:From /Users/leiming/anaconda2/envs/tflearn/lib/python3.5/site-packages/tflearn/helpers/trainer.py:766 in create_summaries.: merge_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
    Instructions for updating:
    Please switch to tf.summary.merge.
    WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
    WARNING:tensorflow:From /Users/leiming/anaconda2/envs/tflearn/lib/python3.5/site-packages/tflearn/helpers/trainer.py:130 in __init__.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
    Instructions for updating:
    Use `tf.global_variables_initializer` instead.

```python
model.fit(trainX, trainY, validation_set=(testX, testY), show_metric=True,
          batch_size=128)
```

    Training Step: 1760  | total loss: 0.14025
    | Adam | epoch: 010 | loss: 0.14025 - acc: 0.9608 | val_loss: 0.52050 - val_acc: 0.8160 -- iter: 22500/22500
    Training Step: 1760  | total loss: 0.14025
    | Adam | epoch: 010 | loss: 0.14025 - acc: 0.9608 | val_loss: 0.52050 - val_acc: 0.8160 -- iter: 22500/22500
    --


text:
## Anuvaad - Localize your app in global languages!
An open source tool that you can use to localize your Android Apps!
It supports majority of global languages: Hindi, Spanish, Chinese, Arabic and Russian. I plan to add more as the community requires.

Can't wait to translate your app?
use it now @ [www.androidapptranslator.com](https://androidapptranslator.com)

#### You can translate your entire strings.xml file into any of these languages within few seconds.

![Demo](documentation/demo/demo.gif)

## Up an running locally

### Generating Google Cloud Translation API Key
To get ReactAnuvaad up and running locally, you'll need to create and add a Google API key to enable usage of cloud translation API.
Follow this guide to create a new Google Cloud project and creating an auth API key
https://cloud.google.com/translate/docs/basic/setup-basic

### Using the API key in ReactAnuvaad
 - Create a new file named `.env` in the project root.
 - Create a new variable containing the API key
    ```
    REACT_APP_LANG_TRANSLATION_API_KEY=<your_generated_api_key>
    ```
 - Use the created variable in [LangUtils.ts](https://github.com/swapnil1104/ReactAnuvaad/blob/master/src/components/utils/LangUtils.ts) file.

After this, ReactAnuvaad is ready to run locally using the following steps:

### Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.


text:
# pytrello
Lightweight Trello python client

## Installation

Install the python distribution with `pip`.

```bash
pip install git+https://github.com/vmoret/pytrello.git
```

## Usage

```python
from trello import Trello, NewCard

cards = Trello('<Your API key>', '<Your auth token>')

# print cards
print(cards)

# add new card
cards.append(NewCard('do nothing', '<Your board ID>', labels=['Green']))
```

repository: vmoret/pytrello

gha_language: Python

repo_name: vmoret/pytrello


text:
It's worth keeping in mind.
This project will generate an A4-sized sheet of paper with a grid containing one square for every week of your expected life (which defaults to 78 years).
If you provide your birthdate, it will `x` out the ones that have passed and are therefore only part of your fading memory.

![Picture of a skull](examples/memento-mori.png)

# Usage

The script generates a LaTeX file:

    ./memento.py > page.tex

You can tell it how many years to generate (default: 78) and have it `x` off the weeks you've lived if you provide a birthdate:

    ./memento.py -y 84 -b 1980-07-04 > page.tex

To use an image as the background, use the `--background` and `--opacity` flags:

    ./memento.py --background images/skull.jpg --opacity 0.2 -b 1980-07-04 -y 90 > page.tex

Good opacity values are likely 0.1—0.3, though it will of course depend on what image you are using.

If you prefer, you can use `--watermark` instead, which will put an image behind the table (opacity doesn't work with this option).

Compile with `pdflatex`:

    pdflatex page.tex

This will produce a file, `page.pdf`, which you can print out and hang up.
Put it somewhere where you'll see it---every day.

repository: mjpost/memento-mori

repo_name: mjpost/memento-mori


text:
## Lab 3 - Using AWS Device Farm as a Test Stage in CodePipeline

![df-pipeline](img/Lab3-Stage0-DFPipeline.png)

### Stage 1: Create a Device Farm project

1. Go to Cloud9 IDE
2. Run the following commands to create a new Device Farm project. Note: Device Farm is only available in the Oregon region (us-west-2). Do not change the region in the commands below
    ```console
    aws devicefarm create-project --name AndroidAppTest --region us-west-2
    ```
3. Make note of the project ARN and the project ID (after "_project:_") returned by the command execution
![create-devicefarm](./img/Lab3-Stage1-Create-DeviceFarm.png)
4. Get the ARN of curated list of Top Devices available for the pool. A curated device pool is a pool that is created and managed by AWS Device Farm.
    ```console
    aws devicefarm list-device-pools --arn <<YOUR-PROJECT-ARN>> --type CURATED --region us-west-2 | jq -r '.devicePools[]|select(.name=="Top Devices")|.arn'
    ```
5.  Review the deployment changes by visiting the [Device Farm console](https://us-west-2.console.aws.amazon.com/devicefarm).
![complete-devicefarm](./img/Lab3-Stage1-Complete-DeviceFarm.png)

***

### Stage 2: Add Device Farm Pipeline in the AWS CodePipeline Console

In this step, you will add a new stage to your pipeline, and then add an action — a test with Device Farm.

1. **Edit** the pipeline.
2. Choose the option to add a stage after the **Build** stage with the AWS CodeBuild action. Type a name for the stage (for example, **Test**).
3. Choose **+ Add action group**,
   - Type a name for your Device Farm action (for example, **DeviceFarmTest**).
   - For **Action Provider**, choose **AWS Device Farm**.
   - For **Region**, choose **us-west-2**.
   - For **Input artifacts**, choose **BuildArtifact**.
   - For **ProjectId**, enter the project ID you captured from Stage 1.
   - For **DevicePoolArn**, enter the curated device pool ARN you captured from Stage 1.
   - For **AppType**, enter **Android**
   - For **App**, enter **app-debug.apk**
   - For **TestType**, enter **BUILTIN_FUZZ**
4. Click **Done**. Finally, save changes to pipeline by clicking **Save** button on top

    Learn more about [working with the Built-in Fuzz Test for Device Farm](https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-built-in-fuzz.html)

    ![DeviceFarmAction](./img/Lab3-DeviceFarmAction.png)

***

### Stage 3: Test the Pipeline with Device Farm

To test the function, release the most recent change through the pipeline.

**_To use the console to run the most recent version of an artifact through a pipeline_**

1. On the pipeline details page, choose **Release change**. This will run the most recent revision available in each source location specified in a source action through the pipeline.
2. When the Device Farm action is executing, choose the **Details** link to view the Fuzzy test details in the Device Farm console. Did the test fail? If it did, review the test run in the Device Farm console. Did the test succeed? If so, continue with the manual approval.

![DeviceFarmActionComplete](./img/Lab3-DeviceFarmActionComplete.png)

### Summary

This **concludes Lab 3**. In this lab, we successfully created a Device Farm project to test our application prior to deploying it to Amazon S3.

You can now proceed to Lab 4 to get a bit more hands on with Device Farm

[Hands-on with Device Farm](4_Lab4.md)

repository: raulaldanand/cicd-workshop

repo_name: raulaldanand/cicd-workshop


text:
Apache
=========

Realizara la instalacion y configuracion de un servidor web (apache) en el server01 con moodle.

Requirements
------------

Se requiere php >= 5.0, con los siguientes modulos

- php7.0
- php7.0-xmlrpc
- php7.0-zip
- php7.0-simplexml
- php7.0-intl
- php7.0-pgsql
- php7.0-curl
- php7.0-gd
- php7.0-mbstring
- php7.0-soap
- libapache2-mod-php7.0

Este ultimo para habilitar la ejecucion de codigo php en el servidor apache.

Role Variables
--------------

A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - hosts: servers
      roles:
         - { role: username.rolename, x: 42 }

License
-------

BSD

Jaime N.
------------------

An optional section for the role authors to include contact information, or a website (HTML is not allowed).


text:
# Cloud Build triggers for a GitHub repository

We use Google Cloud Build (GCB) triggers to test applications.

For more information, see the
[`gcloud alpha builds triggers`](https://cloud.google.com/sdk/gcloud/reference/alpha/builds/triggers/)
commands.

## Kubernetes apps

The following sections are concerned to Kubernetes apps.

### Create a new trigger

1.  Make a copy of an existing config file:

    ```shell
    cp k8s/mariadb-galera.yaml "k8s/$APP_NAME.yaml"
    sed -i "s/mariadb-galera/$APP_NAME/g" "k8s/$APP_NAME.yaml"
    sed -i '/^\s\sinstallationId/d' "k8s/$APP_NAME.yaml"
    sed -i '/^id/d' "k8s/$APP_NAME.yaml"
    ```

1.  Open the config file and verify that everything looks correct:

    ```shell
    cat "k8s/$APP_NAME.yaml"
    ```

1.  Run the following command to create a trigger for your Kubernetes
    application:

    ```shell
    gcloud alpha builds triggers create github \
      --trigger-config k8s/$APP_NAME.yaml \
      --project $PROJECT_ID
    ```

    Where:

    *   `$APP_NAME` is the application name for which you want to create a
        trigger.
    *   `$PROJECT_ID` is the GCP project ID of the project where the trigger will be created.

1.  Mark the newly created trigger as required in the GitHub repository settings. For more information, see the [enabling required status checks](https://help.github.com/en/articles/enabling-required-status-checks) documentation.

    > **NOTE**: The trigger must be triggered initially before it is available in the list.

### Update an existing trigger

1.  Run the following command to update a trigger for your Kubernetes
    application:

    > **NOTE**: You can only update an existing trigger if its
    > configuration file contains either that trigger's name or trigger
    > ID. If neither are present within the configuration file, a new
    > trigger will be created.

    ```shell
    gcloud alpha builds triggers import \
      --source k8s/$APP_NAME.yaml \
      --project $PROJECT_ID
    ```

    Where:

    *   `$APP_NAME` is the application name for which you want to update the
        trigger.
    *   `$PROJECT_ID` is the GCP project ID of the project where the trigger will be updated.

### Export an existing trigger

1.  Run the following command to export an existing trigger to a file for your
    Kubernetes application:

    ```shell
    gcloud alpha builds triggers export $TRIGGER \
      --destination k8s/$APP_NAME.yaml \
      --project $PROJECT_ID
    ```

    Where:

    *   `$TRIGGER` is a trigger's ID or fully qualified identifier.
    *   `$APP_NAME` is the name of the application whose configuration you want to
        export.
    *   `$PROJECT_ID` is the GCP project ID of the project where the trigger will
        be exported.

### Get the details of an existing trigger

1.  Run the following command to get details of an existing trigger:

    ```shell
    gcloud alpha builds triggers list \
      --filter="filename:cloudbuild-k8s.yaml AND substitutions._SOLUTION_NAME:$APP_NAME" \
      --project $PROJECT_ID
    ```

repository: GoogleCloudPlatform/click-to-deploy

gha_language: Ruby

repo_name: GoogleCloudPlatform/click-to-deploy


text:
---
layout: page
title: Rolling back
group: Guide
---

# Rolling back

Rolling back should be fast and safe so that you know that your code can be
quickly reverted and to improve metrics like mean time to recovery. Deliverybot
makes rolling back much faster than a revert commits. Since the build pipeline
doesn't need to be run again we simply issue deployment at an earlier commit sha
and trigger just the deployment workflow.

Rolling back is as simple as selecting the safest commit to deploy from the
list below:

![On master deploy](/assets/images/deploy-list.png)

A good practice is to have alerts pipe into the Slack channel where your
deployments are taking place. If errors spike right after a deployment it's
useful to know immediately so you can rollback as quickly as possible.

## Next

[Locking deployments >>](/docs/guide/8-locking/)


text:
# react-document-events

Declarative method for binding handlers to document and window - and cleaning them up.

### Usage

Given an imaginary component that listens to the 'esc' key, but only if its
parent tells it to:

```js
import React from 'react';
import DocumentEvents from 'react-document-events';

class SideEffectingComponent extends React.Component {

  onKeyUp = (e) => {
    if (e.keyCode === 27 /* esc */) this.toggleSomethingOnEsc(e);
  };

  render() {
    var target = process.browser ? document : null;
    return (
      <div>
        <div>Component Innards</div>
        <DocumentEvents enabled={this.props.listenToKeys} onKeyUp={this.onKeyUp} passive={false} capture={false} />
      </div>
    );
  }
}
```

#### Props

* **capture** (`boolean=false`): If true, will add listeners in the `capture` phase.
* **enabled** (`boolean=true`): If true, will attach handlers, if false, will remove them. Safe to add/remove at will.
* **passive** (`boolean=false`): If true, will add listeners with the
  [passive option](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners),
  if supported. A feature test is performed to ensure this does not accidentally set `useCapture`.
* **target** (`(HTMLElement | () => HTMLElement | () => void | void)=document`): The element to attach listeners to.
  May also be a function returning said element. If void, or returning void, this element will noop.
  * To be safe when server rendering, the default is `document`, but only if `process.browser` returns true.
* **on[eventName]** (`EventHandler`): Any valid [event handler name](https://facebook.github.io/react/docs/events.html).
  Note these events are attached directly, so you will receive browser events, not React's `SyntheticEvent`, although the semantics are mostly the same.

repository: STRML/react-document-events

repo_name: STRML/react-document-events


text:
To install the console application, follow the instructions below.

* Download the Arend [jar file](https://github.com/JetBrains/Arend/releases/latest/download/Arend.jar).
  You can also get the latest version of the application by following instructions on [GitHub](https://github.com/JetBrains/Arend/blob/master/README.md).
* Run `java -jar Arend.jar` to check that everything is alright. You should see an output similar to the following:

```
$ java -jar Arend.jar
[INFO] Loading library prelude
[INFO] Loaded library prelude (233ms)
Nothing to load
```

To see command line options, run `java -jar Arend.jar --help`.

repository: marat-rkh/site

repo_name: marat-rkh/site


text:
AD-GROUP-Monitor_MemberShip
============

[Blog Articles on LazyWinAdmin.com](http://www.lazywinadmin.com/2013/11/update-powershell-monitor-and-report.html)

PowerShell script to monitor Active Directory groups and send an email when someone is changing the membership

# Report Example

![alt tag](images/AD-GROUP-Monitor_MemberShip_Report01.png)

# Features

You can specify the group Name, SID(Security Identifier), GUID(Globally Unique IDentifier) or DN (Distinguished Name).
Group name like 'DOMAIN\GROUPNAME' will also work.

**Comparing**
The membership of each group is saved in a CSV file "DOMAIN_GROUPNAME-membership.csv"
If the file does not exist, the script will create one, so the next time it will be able to compare the  membership with this file.

**Change History**
Each time a change is detected (Add or Remove an Account (Nested or Not)) a CSV file will be generated with the following name: "DOMAIN_GROUPNAME-ChangesHistory-yyyyMMdd-hhmmss.csv"

When generating the HTML Report, the script will add this Change History to the Email (if there is one to add)

**Reporting**
Here is an example of report generated when a change is detected.
You can see the user 'catfx' was removed from the group FX\FXGROUP
Also, If the script find some Change History files for this group, it will be added to the report.
Finally at the end of the report, information on when, where and who ran the script.

# Requirements
* Read Permission in Active Directory on the monitored groups
* Module
 * Microsoft ActiveDirectory Module
 * **OR**
 * Quest Active Directory PowerShell Snapin
* A Scheduled Task (in order to check every X seconds/minutes/hours)

# Using the Script
``` powershell
.\TOOL-MONITOR-AD_Group.ps1 -group "FXGroup01","FXGroup02" -Emailfrom<EMAIL_ADDRESS>-Emailto<EMAIL_ADDRESS>-EmailServer <IP_ADDRESS> -Verbose
```
![alt tag](images/AD-GROUP-Monitor_MemberShip_Running01.png)

# Workflow

![alt tag](images/Monitor_ActiveDirectory_Group_Membership_Change-Workflow.png)

# Version History
* 2.0.2	2015.01.14
 * FIX an small issue with the $StateFile which did not contains the domain
 * ADD the property Name into the final output.
 * ADD Support to export the report to a HTML file (-HTMLLog) It will save the report under the folder HTML
 * ADD Support for alternative Email Encoding: Body and Subject. Default is ASCII.

* 2.0.1 	2015.01.05
 * REMOVE the DisplayName property from the email
 * ADD more clear details/Comments
 * RENAME a couple of Verbose and Warning Messages
 * FIX the DN of the group in the Summary
 * FIX SearchBase/SearchRoot Parameter which was not working with AD Module
 * FIX Some other minor issues
 * ADD Check to validate data added to $Group is valid
 * ADD Server Parameter to be able to specify a domain controller

* 2.0	2014.05.04
 * ADD Support for ActiveDirectory module (AD module is use by default)
 * ADD failover to Quest AD Cmdlet if AD module is available
 * RENAME GetQADGroupParams variable to ADGroupParams

* 1.8 	2013.11.27
 * Minor syntax changes
 * UPDATE Help
 * Rename to AD-GROUP-Monitor_MemberShip
 * Update Notes

* 1.7 	2013.11.23
 * ADD ValidateScript on File Parameter
 * ADD Additional information about the Group in the Report
 * CHANGE the format of the $changes output, it will now include the DateTime Property
 * UPDATE Help
 * ADD DisplayName Property in the report

* 1.6 	2013.11.21
 * ADD Support for Organizational Unit (SearchRoot parameter)
 * ADD Support for file input (File Parameter)
 * ADD ParamaterSetNames and parameters GroupType/GroupScope/SearchScope
 * REMOVE [mailaddress] type on $Emailfrom and $EmailTo to make the script available to PowerShell 2.0
 * ADD Regular expression validation on $Emailfrom and $EmailTo

* 1.5 	2013.10.13
 * ADD the full Parameter Names for each Cmdlets used in this script
 * ADD Alias to the Group ParameterName

* 1.4 	2013.10.11
 * CHANGE the 'Change History' filename to "DOMAIN_GROUPNAME-ChangesHistory-yyyyMMdd-hhmmss.csv"
 * UPDATE Comments Based Help
 * ADD Some Variable Parameters

* 1.3 	2013.10.05
 * CHANGE in the PROCESS BLOCK, the TRY CATCH blocks and placed them inside the FOREACH instead of inside the TRY block
 * ADD support for Verbose
 * CHANGE the output file name "DOMAIN_GROUPNAME-membership.csv"
 * ADD a Change History File for each group(s) example: "GROUPNAME-ChangesHistory-yyyyMMdd-hhmmss.csv"
 * ADD more Error Handling
 * ADD a HTML Report instead of plain text
 * ADD HTML header
 * ADD HTML header for change history

* 1.2 	2013.09.23
 * FIX issue when specifying group with domain 'DOMAIN\Group'
 * CHANGE Script Format (BEGIN, PROCESS, END)
 * ADD Minimal Error handling. (TRY CATCH)

* 1.1 	2012.03.13
 * CHANGE to monitor both Domain Admins and Enterprise Admins

* 1.0 	2012.02.01
 * Initial Version

gha_language: PowerShell


text:
Remote working: the why, the how and the never-ever
========================

* Speaker   : Alexandra Marin
* Available : Any time
* Length    : 30 mins

Description
-----------

What would you do for strangers over the internet? How much would you charge? And how far would you let them go?

These are the most important questions you’ll face as a freelancer. I’ll be your guide in negotiating contracts, separating the bad clients from the excellent ones, joining projects you truly find compelling, building a personal work schedule and mastering productivity.

Join me and let’s find out if you’re ready for a career change.

---------------

Speaker Bio
-----------

Alexandra has developed software for Fortune 500 companies in the pharmaceutical, logistics, gaming, video on demand, health, fitness and agricultural industries. Her focus is mobile and crossplatform development with Xamarin, but she's also fluent in C#, .NET and Unity. She blogs at crossplatform.io and loves attending as many user groups, code retreats and conferences as she can find.

Links
-----

* Blog: http://crossplatform.io


text:
## Converting a TextMate Theme

This guide will show you how to convert a [TextMate][TextMate] theme to an Atom
theme.

### Differences

TextMate themes use [plist][plist] files while Atom themes use [CSS][CSS] or
[LESS][LESS] to style the UI and syntax in the editor.

The utility that converts the theme first parses the theme's plist file and
then creates comparable CSS rules and properties that will style Atom similarly.

### Install apm

The `apm` command line utility that ships with Atom supports converting
a TextMate theme to an Atom theme.

Check that you have `apm` installed by running the following command in your
terminal:

```sh
apm help init
```

You should see a message print out with details about the `apm init` command.

If you do not, launch Atom and run the _Atom > Install Shell Commmands_ menu
to install the `apm` and `atom` commands.

You can now run `apm help init` to see all the options for initializing new
packages and themes.

### Convert the Theme

Download the theme you wish to convert, you can browse existing TextMate themes
[here][TextMateThemes].

Now, let's say you've downloaded the theme to `~/Downloads/MyTheme.tmTheme`,
you can convert the theme with the following command:

```sh
apm init --theme ~/.atom/packages/my-theme --convert ~/Downloads/MyTheme.tmTheme
```

You can browse to `~/.atom/packages/my-theme` to see the converted theme.

### Activate the Theme

Now that your theme is installed to `~/.atom/packages` you can enable it
by launching Atom and selecting the _Atom > Preferences..._ menu.

Select the _Themes_ link on the left side and choose _My Theme_ from the
__Syntax Theme__ dropdown menu to enable your new theme.

:tada: Your theme is now enabled, open an editor to see it in action!

### Further Reading

* Check out [Publishing a Package](publishing-a-package.html) for more information
  on publishing the theme you just created to [atom.io][atomio].

[atomio]: https://atom.io
[CSS]: http://en.wikipedia.org/wiki/Cascading_Style_Sheets
[LESS]: http://lesscss.org
[plist]: http://en.wikipedia.org/wiki/Property_list
[TextMate]: http://macromates.com
[TextMateThemes]: http://wiki.macromates.com/Themes/UserSubmittedThemes

gha_language: CoffeeScript


text:
## Homework 10

### C Exercises

Modify the link below so it points to the `ex12` directory in your
student repository.  That's right, Homework 10 is to do Exercise 12.

[Here is a link to the ex12 directory in my repository](https://github.com/adeaver/ExercisesInC/tree/master/exercises/ex12)

### Think OS Chapter 10 reading questions

1) What does it mean to say that a data structure is thread safe?

A data structure is thread safe if multiple threads can access the data structure and not leave the data structure in an inconsistent state.

2) In the circular buffer implementation of a queue, why is the maximum number of elements in the queue `n-1`,
if `n` is the size of the array?

So that next_in and next_out don't make the queue appear empty.

3) If there is no mutex to protect the queue, give an example of a sequence of steps that could leave
the queue in an inconsistent state.

One producer could access the array when next_in is 0. It can prepare to push something to the array in this position, but before that happens, another producer could access the array when next_in has not been modified. In this scenario, both producers would put an element in the first position of the array. Similarly, it's possible that next_in could increment to 2 and not 1 in this case.

4) When a thread calls `cond_wait`, why does it have to unlock the mutex before blocking?

Otherwise the producer would never be able to access the queue.

5) When a thread returns from `cond_wait`, what do we know is definitely true?  What do we think is probably true?

We're definitely sure that the queue is not empty. We're probably sure that the queue is safe to access.

6) What happens if you signal a condition variable when there are no waiting threads?

The signal has no effect.

7) Do you have to lock the mutex to signal a condition variable?

Yes.

8) Does the condition have to be true when you signal a condition variable?

Not necessarily.

repository: adeaver/ExercisesInC

repo_name: adeaver/ExercisesInC


text:
Placeholder

Library provides a placeholder implementation for currying functions,
partial applications, pipe operator, and other syntactic structures
hat allow specifying default values.

## Usage

What is "placeholder"?

```php
<?php

var_dump(is_placeholder('_'));
// expected output: false

var_dump(is_placeholder(_));
// expected output: true

```

For example we can replace each of the placeholders in
the array with the required value.

```php
<?php
use Serafim\Placeholder\Placeholder;

$array = [1, _, 3, _];

$result = Placeholder::map($array, fn() => ' map ');

echo implode(', ', $result);

// expected output: "1, map, 3, map"
```

And... Thats all =)

repository: SerafimArts/Placeholder

repo_name: SerafimArts/Placeholder


text:
Modified Spark Distribution (required for spark submodule)
https://s3-us-west-1.amazonaws.com/fayalite/spark.tar.gz

(For use with IntelliJ, put the assembly jar in /lib/)

See http://github.com/ryleg/spark for building from source

Still experimental. Working on Spark 2.0.0 snapshot REPL integrations

Run :

See gate submodule - org.fayalite.gate.server.SprayServer <- Run this locally
and navigate to http://localhost:8080 to see Scala.js app

Use sbt ~fastOptJS from main project directory to recompile SJS app
Refresh page to reload app

Motivations : https://github.com/ryleg/fayalite/blob/master/doc/Motivations.md

repository: ryleg/fayalite

repo_name: ryleg/fayalite


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

# Limnoria plugin for ZNC's autoop module.

## Introduction

I consider this plugin BETA. It works for me but I'm sure with the nature of a plugin like this
that some things are broken.

First, I can't emphasize enough the dangers of any type of auto-op system. Passwords get stolen
or hacked, hosts have, at times, been spoofed or forged, etc. If you're paranoid, don't run this.
The storage system uses plain-text for this module so, unless this is run on a secure and dedicated
box, it's not secure. ZNC's module is the same so, again, even with the hostmask matching with
challenge, do not consider this secure.

ZNC, the awesome IRC bouncer, includes an autoop module that was designed to work between clients.

http://wiki.znc.in/Autoop

Someone did great work to port this over to TCL (vomit) so that it can work on Eggdrop bots. I decided
to do the same for Supybot/Limnoria.

Grab plugin and load. You will need to then need to add matching users on both the bot and ZNC client.

As both are similar beyond their commands, you basically add a user that matches the other client/hostmask
with the same key and channel. I've tested this with ZNC 1.0 and the latest version of Limnoria.

NOTE: I did NOT implement the __NOKEY__ feature (essentially auto-op for clients not running ZNC)
from the ZNC autoop module because there are other ways to do such a thing, like with AutoMode, already in Supybot.
I have no plans either as it would require a rewrite of some major parts.

## Install

You will need a working Limnoria bot on Python 2.7 for this to work.

## Example Usage

(Must be in priv msg and as at least an admin on the bot where it is an op in #channel.)

```
<spline> zncadduser spline<EMAIL_ADDRESS>key #channel
<myybot> OK
<spline> znclistusers
<myybot> +------------+------------------------------------------+-----------------+----------------------+
<myybot> | USERNAME   | HOSTMASK                                 | KEY             | CHANNEL              |
<myybot> +------------+------------------------------------------+-----------------+----------------------+
<myybot> | spline     |<EMAIL_ADDRESS>                   | key             | #channel             |
<myybot> +------------+------------------------------------------+-----------------+----------------------+
<spline> zncremoveuser spline
<myybot> OK
```

## About

All of my plugins are free and open source. When I first started out, one of the main reasons I was
able to learn was due to other code out there. If you find a bug or would like an improvement, feel
free to give me a message on IRC or fork and submit a pull request. Many hours do go into each plugin,
so, if you're feeling generous, I do accept donations via Amazon or browse my [wish list](http://amzn.com/w/380JKXY7P5IKE).

I'm always looking for work, so if you are in need of a custom feature, plugin or something bigger, contact me via GitHub or IRC

repository: kwaaak/ZNC

repo_name: kwaaak/ZNC


text:
# query-optimizer
Implements a simple query optimizer in a project for CIS 611: Enterprise DB & Parallel Database Systems

## What is this?
This repository houses a semester project I was assigned for CIS 611: Enterprise DB & Parallal Database Systems at CSU.
This project implements a simple query optimizer that given an unoptimized query and a supposedly optimized query attempts to determine the best execution plan based on well known metrics generated for each observed relational operator.


text:
# ElasticSearch [![](https://images.microbadger.com/badges/image/airdock/elasticsearch:latest.svg)](https://microbadger.com/images/airdock/elasticsearch:latest "Get your own image badge on microbadger.com")
Docker Image for [elasticsearch](http://www.elasticsearch.com/) based on airdock/oracle-jdk:1.8

Purpose of this image is:

- install elasticsearch service
- use elasticsearch user account
- integrate tini process management
- based on airdock/oracle-jdk:1.8 (debian jessie)
- use a [web front end](https://github.com/mobz/elasticsearch-head)

> Name: airdock/elasticsearch

***Few links***:

- [Docker Elasticsearch](https://github.com/dockerfile/elasticsearch)
- [Puckel Elasticsearch](https://github.com/puckel/dockerfiles)
- [Installation ES](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html)
- [Configuration](http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html)

# Tags

- 2.4, latest: Elasticsearch 2.4.2 [![](https://images.microbadger.com/badges/image/airdock/elasticsearch:2.4.svg)](https://microbadger.com/images/airdock/elasticsearch:2.4 "Get your own image badge on microbadger.com")
- 1.4: Elasticsearch 1.4.5 [![](https://images.microbadger.com/badges/image/airdock/elasticsearch:1.4.svg)](https://microbadger.com/images/airdock/elasticsearch:1.4 "Get your own image badge on microbadger.com")
- v1.4.3: Elasticsearch 1.4.3 on jdk-8u74 [![](https://images.microbadger.com/badges/image/airdock/elasticsearch:v1.4.3.svg)](https://microbadger.com/images/airdock/elasticsearch:v1.4.3 "Get your own image badge on microbadger.com")

# Usage

## Launch Elastic Search Service

### with default

Execute elastic server with default configuration:
```
	docker run -d -p 9200:9200 -p 9300:9300 --name elasticsearch airdock/elasticsearch
```

Web front end URL will be: ```http://<YOUR HOST>:9200/_plugin/head/```

### With a persistent storage

	'docker run -d -p 9200:9200 -p 9300:9300 -v /var/lib/elasticsearch:/var/lib/elasticsearch --name elasticsearch airdock/elasticsearch'

Take care about your permission on host folder named '/var/lib/elasticsearch'.

The user elasticsearch (uid 4202) in your container should be known into your host.
See :
* [How Managing user in docker container ?](https://github.com/airdock-io/docker-base/wiki/How-Managing-user-in-docker-container)
* [Common User List](https://github.com/airdock-io/docker-base/wiki/Common-User-List)

So you should create an user with this uid:gid:

```
  sudo groupadd elasticsearch -g 4202
  sudo useradd -u 4202  --no-create-home --system --no-user-group elasticsearch
  sudo usermod -g elasticsearch elasticsearch
```

And then set owner and permissions on your host directory:

```
	chown -R elasticsearch:elasticsearch /var/lib/elasticsearch
```

Don't forget to add your current user to this new group.

## Elasticsearch Configuration

### Elastic 2.4

```
# common settings
network:
  host: <IP_ADDRESS>

cluster:
  name: elasticsearch

path:
  logs: /var/log/elasticsearch
  data: /var/lib/elasticsearch
  conf: /etc/elasticsearch

http.cors:
  enabled: true
  allow-origin: "*"

transport:
  tcp:
    port: 9300
    compress: false
```

### Elastic 1.4

```
	# common settings
	cluster.name: elasticsearch
	node.master: true
	node.data: true
	index.number_of_shards: 5
	index.number_of_replicas: 1
	transport.tcp.port: 9300
	transport.tcp.compress: false
	http.port: 9200
	http.jsonp.enable: false

	#Kibana 3 and Elasticsearch 1.4 - CORS problem
	http.cors.enabled: true
	http.cors.allow-origin: "*"

	path.conf: /etc/elasticsearch
	path.data: /var/lib/elasticsearch
	path.work: /tmp/elasticsearch
	path.logs: /var/logs/elasticsearch
	path.plugins: /usr/share/elasticsearch/plugins
```

## Notes

- Configuration path: /etc/elasticsearch
- Data path: /var/lib/elasticsearch
- Log path: /var/logs/elasticsearch
- Plugins installation path: /usr/share/elasticsearch/plugins

# Change Log

## Tag 2.4 (latest)

- install elatsticsearch (2.4.2)
- integrate tini and launch elasticsearch with elasticsearch user
- expose 9200 (http) and 9300 (transport) port
- add plugin mobz/elasticsearch-head
- MIT license

## Tag 1.4

- install elasticsearch
- integrate tini
- define ELASTICSEARCH_VERSION (1.4.5)
- add volume on data folder (/var/lib/elasticsearch) and log folder
- default log ouput to console
- expose 9200 (http) and 9300 (transport) port
- default configuration is a master with node storage capability
- add plugin mobz/elasticsearch-head
- launch elasticsearch with elasticsearch user
- MIT license

# Build

- Install "make" utility, and execute: `make build`
- Or execute: 'docker build -t airdock/elasticsearch:latest --rm .'

See [Docker Project Tree](https://github.com/airdock-io/docker-base/wiki/Docker-Project-Tree) for more details.

# MIT License

```
The MIT License (MIT)

Copyright (c) 2015 Airdock.io

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: airdock-io/docker-elasticsearch

repo_name: airdock-io/docker-elasticsearch