text:
# Ansible Canopy Connector Monitoring [![Build Status](https://github.com/onaio/ansible-canopy-connector-monitoring/workflows/CI/badge.svg)](https://github.com/onaio/ansible-canopy-connector-monitoring/actions?query=workflow%3ACI)

Use this role to set up [Canopy connector monitoring](https://github.com/onaio/canopy-connector-monitoring).

## Role Variables

Some of the more important variables are briefly described below.  You can see all variables by looking at the [defaults/main.yml](defaults/main.yml) file.

### canopy_connector_nifi_url

This is the URL for the NiFi instance that you wish to monitor.

```yml
canopy_connector_nifi_url: https://nifi-stage.ona.io
```

### canopy_connector_nifi_username

This is the NiFi basic auth username.  This is optional and should be left out if not needed.

```yml
canopy_connector_nifi_username: admin
```

### canopy_connector_nifi_password

This is the NiFi basic auth password.  This is optional and should be left out if not needed.

```yml
canopy_connector_nifi_password: hunter2
```

### canopy_connector_monitoring_setup_cron

Determines whether or not the monitoring command should be set up to run periodically using cron.  This defaults to `true`.

```yml
canopy_connector_monitoring_setup_cron: true
```

### canopy_connector_monitoring_cron_minute

This specifies how often the monitoring command should run.

```yml
canopy_connector_monitoring_cron_minute: "*/5"  # cron format
```

## Dependencies

At this time, this role has no dependencies.

## Example Playbook

```yml
- hosts: servers
  roles:
    - role: ansible-canopy-connector-monitoring
      vars:
        - canopy_connector_nifi_username: admin
        - canopy_connector_nifi_password: hunter2
        - canopy_connector_monitoring_cron_minute: "*/5"
```

## Testing

This project uses molecule for testing.

Start by creating a virtual environment and installing python packages

```sh
pip install -r requirements/dev.in
```

Then to run the full test sequence:

```sh
tox
```

## License

Apache 2

## Authors

[Ona Engineering](https://ona.io)

branch_name: refs/heads/master

extension: md

gha_language: HTML

license_type: permissive


text:
Bbva PHP

PHP client for Bbva API services (version 1.0.0)

This is a client implementing the payment services for Bbva at bbva.mx

What's new?
-----------

Compatibility
-------------

PHP 5.2 or later

Requirements
------------
PHP 5.2 or later
cURL extension for PHP
JSON extension for PHP
Multibyte String extension for PHP

Installation
------------
### Composer
The preferred method is via [composer](https://getcomposer.org). Follow the
[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have
composer installed.

Once composer is installed, execute the following command in your project root to install this library:

```sh
composer require bbva/sdk dev-master
```
Finally, be sure to include the autoloader:

```php
require_once '/path/to/your-project/vendor/autoload.php';
```

### Manual installation

To install, just:

  - Clone the repository or download the library and copy/create a folder named
    **'Bbva'** inside your project folder structure. If you downloaded the
    client library as a compressed file, uncompress it and create the proper
    folder structure.
  - At the top of the PHP script in which the client library will be used (or
    in the section you include other libraries), add the client's library main
    script:

```php
require(dirname(__FILE__) . '/Bbva/Bbva.php');
```

> NOTE: In the example above, the library is located in the directory named
> Bbva, located inside the same directory that the PHP file which is
> including the cliente. Make sure to adjust the paths inside your project,
> otherwise the library will not work.

Implementation
--------------

#### Configuration #####

Before use the library will be necessary to set up your Merchant ID and
Private key. There are three options:

  - Use the methods **Bbva::setId()** and **Bbva::setApiKey()**. Just
    pass the proper parameters to each function:

```php
Bbva::setId('moiep6umtcnanql3jrxp');
Bbva::setApiKey('sk_3433941e467c4875b178ce26348b0fac');
```

  - Pass Merchant ID and Private Key as parameters to the method **Bbva::getInstance()**,
    which is the instance generator:

```php
$bbva = Bbva::getInstance('moiep6umtcnanql3jrxp', 'sk_3433941e467c4875b178ce26348b0fac');
```

  - Configure the Marchant ID and the Private Key as well, as environment
    variables. This method has its own advantages as this sensitive data is not
    exposed directly in any script.

> NOTE: please, refer to PHP documentation for further information about this method.

##### Sandbox/Production Mode #####

By convenience and security, the sandbox mode is activated by default in the
client library. This allows you to test your own code when implementing
Bbva, before charging any credit card in production environment. Once you
have finished your integration, use the method **Bbva::setProductionMode(FLAG)** which
will allow you to active/inactivate the sandbox mode.

````php
Bbva::setProductionMode(true);
````
Also you can use environment variables for this purpose:
````
SetEnv BBVA_PRODUCTION_MODE true
````

If its necessary, you can use the method **Bbva::getProductionMode()** to
determine anytime, which is the sandbox mode status:

````php
// will return TRUE/FALSE, depending on if sandbox mode is activated or not.
Bbva::getProductionMode();
````

#### PHP client library intro #####

Once configured the library, you can use it to interact with Bbva API
services. The first step is get an instance with the generator:

````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');
````

In this example **$bbva** will be an instance of a merchant (root), wich
will be used to call any derived child resource. According to the current version
of the Bbva API, these resources are:

  - charges
  - tokens

You can access all of these resources as public variables of the root instance,
so, if you want to add a new customer you will be able to do it as follows:

````php
$bbva->tokens->add(PARAMETERS);
````

Every call to any resource will return an instance of that resource. In the
example above, calling the method **add()** in the resource **tokens** will
return an instance of Token, calling the method **add()** in the resource **tokens**
will return an instance of Card, and so on. The only exception occurs when you retrieve
a list of resources using the method **getList()**, in which case an array of
instances will be returned:

````
// a SINGLE instance of Customer will be returned
$charge = $bbva->charges->add(PARAMETERS);

// an ARRAY of instances of Customers will be returned
chargersList = $bbva->charges->getList(PARAMETERS);
````

On the other hand, the resources derived from Charge, according to Bbva
API documentation, are:

  - charges
  - tokens

#### Parameters ####

Those methods which receive more than one parameter (for example, when trying
to add a new customer or a new customer's card), must be passed
as associatives arrays:

````php
array('PARAMETER_INTEGER' => VALUE,
      'PARAMETER_STRING'  => 'VALUE');
      'PARAMETER_DERIVED' => array('PARAMETER_INTEGER' => VALUE),
                                   'PARAMETER_STRING'  => 'VALUE'));
````

> NOTE: Please refer to Bbva API docuemntation to determine wich parameters
> are accepted, wich required and which of those are optional, in every case.

#### Error handling ####

The Bbva API generates several types of errors depending on the situation,
to handle this, the PHP client has implemented five type of exceptions:

  - **BbvaApiTransactionError**. This category includes those errors ocurred when
    the transaction does not complete successfully: declined card, insufficient
    funds, inactive destination account, etc.
  - **BbvaApiRequestError**. It refers to errors generated when a request to the
    API fail. Examples: invalid format in data request, incorrect parameters in
    the request, Bbva internal servers errors, etc.
  - **BbvaApiConnectionError**. These exceptions are generated when the library
    try to connect to the API but fails in the attempt. For example: timeouts,
    domain name servers, etc.
  - **BbvaApiAuthError**. Errors which are generated when the authentication
    data are specified in an invalid format or, if are not fully validated on
    the Bbva server (Merchant ID or Private Key).
  - **BbvaApiError**. This category includes all generic errors when processing
    with the client library.

All these error exceptions make available all the information returned by the
Bbva API, with the following methods:

  - **getDescription()**: Error description generated by Bbva server.
  - **getErrorCode()**: Error code generated by Bbva server. When the error
    is generated before the request, this value is equal to zero.
  - **getCategory()**: Error category generated and determined by Bbva server.
    When the error is generated before or during the request, this value is an
    empty string.
  - **getHttpCode()**: HTTP error code generated when request the Bbva
    server. When the error is generated before or during the request, this
    value is equal to zero.
  - **getRequestId()**: ID generated by the Bbva server when process a
    request. When the error is generated before the request, this value is
    an empty string.

The following is an more complete example of error catching:

````php
try {
	Bbva::setProductionMode(true);

	// the following line will generate an error because the
	// private key is empty. The exception generated will be
	// a BbvaApiAuthError
	$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', '');

	$customer = $bbva->customers->get('a9ualumwnrcxkl42l6mh');
 	$customer->name = 'Juan';
 	$customer->last_name = 'Godinez';
 	$customer->save();

} catch (BbvaApiTransactionError $e) {
	error_log('ERROR on the transaction: ' . $e->getMessage() .
	      ' [error code: ' . $e->getErrorCode() .
	      ', error category: ' . $e->getCategory() .
	      ', HTTP code: '. $e->getHttpCode() .
	      ', request ID: ' . $e->getRequestId() . ']', 0);

} catch (BbvaApiRequestError $e) {
	error_log('ERROR on the request: ' . $e->getMessage(), 0);

} catch (BbvaApiConnectionError $e) {
	error_log('ERROR while connecting to the API: ' . $e->getMessage(), 0);

} catch (BbvaApiAuthError $e) {
	error_log('ERROR on the authentication: ' . $e->getMessage(), 0);

} catch (BbvaApiError $e) {
	error_log('ERROR on the API: ' . $e->getMessage(), 0);

} catch (Exception $e) {
	error_log('Error on the script: ' . $e->getMessage(), 0);
}
````

Examples
--------

#### Customers ####

Add a new customer to a merchant:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$customerData = array(
	'name' => 'Teofilo',
	'last_name' => 'Velazco',
	'email' =><EMAIL_ADDRESS>	'phone_number' => '4421112233',
	'address' => array(
			'line1' => 'Privada Rio No. 12',
			'line2' => 'Co. El Tintero',
			'line3' => '',
			'postal_code' => '76920',
			'state' => 'Querétaro',
			'city' => 'Querétaro.',
			'country_code' => 'MX'));

````

#### Tokens ####

**On a merchant:**

Add a token:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$tokenData = array(
	'holder_name' => 'Luis Pérez',
	'card_number' => '4111111111111111',
	'cvv2' => '123',
	'expiration_month' => '12',
	'expiration_year' => '15',
	'address' => array(
		'line1' => 'Av. 5 de Febrero No. 1',
		'line2' => 'Col. Felipe Carrillo Puerto',
		'line3' => 'Zona industrial Carrillo Puerto',
		'postal_code' => '76920',
		'state' => 'Querétaro',
		'city' => 'Querétaro',
		'country_code' => 'MX'));

$token = $bbva->tokens->add($tokenData);
````

Get a token:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$token = $bbva->tokens->get('k9pn8qtsvr7k7gxoq1r5');
````

#### Charges ####

**On a Merchant:**

Make a charge on a merchant:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$chargeData = array(
	'affiliation_bbva' => '781500',
	'amount' => 100,
	'currency' => 'MXN',
	'order_id' => 'ORDEN-00071',
	'customer' => array(
		'name' => 'Teofilo',
		'last_name' => 'Velazco',
		'email' =><EMAIL_ADDRESS>		'phone_number' => '4421112233',
		'address' => array(
			'line1' => 'Privada Rio No. 12',
			'line2' => 'Co. El Tintero',
			'line3' => '',
			'postal_code' => '76920',
			'state' => 'Querétaro',
			'city' => 'Querétaro.',
			'country_code' => 'MX')),
	'description' => 'Cargo inicial a mi merchant'
	'redirect_url' => 'https://sand-portal.ecommercebbva.com/'
	);

$charge = $bbva->charges->create($chargeData);
````

Get a charge:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$charge = $bbva->charges->get('tvyfwyfooqsmfnaprsuk');
````

Make a capture:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$captureData = array('amount' => 150.00 );

$charge = $bbva->charges->get('tvyfwyfooqsmfnaprsuk');
$charge->capture($captureData);
````

Make a refund:
````php
$bbva = Bbva::getInstance('mptdggroasfcmqs8plpy', 'sk_326c6d0443f6457aae29ffbd48f7d1be');

$refundData = array('description' => 'Devolución' );

$charge = $bbva->charges->get('tvyfwyfooqsmfnaprsuk');
$charge->refund($refundData);
````

repository: EcommerceBBVA/BBVA-PHP

gha_language: PHP

repo_name: EcommerceBBVA/BBVA-PHP


text:
Freelancer Jekyll theme
=========================

Jekyll theme based on [Freelancer bootstrap theme ](http://startbootstrap.com/templates/freelancer/)

## How to use
 - Place a image in `/img/portoflio/`
 - Replace<EMAIL_ADDRESS>in `_includes/contact_static.html` with your email address. refer to [formspree](http://formspree.io/) for more information.
 - Create posts to display your projects. Use the follow as an example:
```txt
---
layout: default
modal-id: 1
date: 2014-07-18
img: cabin.png
alt: image-alt
project-date: July 2014
client: The Client
category: Web Development
description: The description of the project

---
```

## Demo
View this jekyll theme in action [here](https://jeromelachaud.github.io/freelancer-theme)

## Screenshot
![screenshot](https://raw.githubusercontent.com/jeromelachaud/freelancer-theme/master/screenshot.png)

=========
For more details, read the [documentation](http://jekyllrb.com/)

Originally the code looked like:

```
{% capture svg %}{% include iconmonstr-globe-4-icon.svg  %}{% endcapture %}
{% assign svgsplit = svg | split: 'svg11.dtd">' %}
{% assign svgpart = svgsplit[1] | escape %}
{{ svgpart }}
```

But this didn't work.  You need to  remove the dtd stuff also.  And the encode turned <svg into <svg which isn't what we want either.

to replace

```html
                    <object data="img/iconmonstr-globe-4-icon.svg"  class="img-responsive light-svg" type="image/svg+xml">
                        <img class="img-responsive" src="img/profile.png" alt="">
                    </object>

```

```
                    <div class="img-responsive light-svg header-icon">
{% capture svg %}{% include {{post.svg}}  %}{% endcapture %}
{% assign svgsplit = svg | split: 'svg11.dtd">' %}
{% assign svgpart = svgsplit[1] | replace_first:'svg11.dtd">','' %}
{{ svgpart }}
                    </div>
```

to replace

```html
                            <object data="img/portfolio/{{ post.svg }}" type="image/svg+xml"  class="img-responsive" >
                                <img src="img/portfolio/{{ post.img }}" class="img-responsive" alt="{{ post.alt }}">
                            </object>
```

node ~/src/db/WebScratchpad/node-server.js

repository: iainbryson/freelancer-theme

gha_language: JavaScript

repo_name: iainbryson/freelancer-theme


text:
# 11_NoteTaker

## Task

Your assignment is to modify starter code to create an application called Note Taker that can be used to write and save notes. This application will use an Express.js back end and will save and retrieve note data from a JSON file.

The application’s front end has already been created. It's your job to build the back end, connect the two, and then deploy the entire application to Heroku.

## User Story

```
AS A small business owner
I WANT to be able to write and save notes
SO THAT I can organize my thoughts and keep track of tasks I need to complete
```

## Acceptance Criteria

```
GIVEN a note-taking application
WHEN I open the Note Taker
THEN I am presented with a landing page with a link to a notes page
WHEN I click on the link to the notes page
THEN I am presented with a page with existing notes listed in the left-hand column, plus empty fields to enter a new note title and the note’s text in the right-hand column
WHEN I enter a new note title and the note’s text
THEN a Save icon appears in the navigation at the top of the page
WHEN I click on the Save icon
THEN the new note I have entered is saved and appears in the left-hand column with the other existing notes
WHEN I click on an existing note in the list in the left-hand column
THEN that note appears in the right-hand column
WHEN I click on the Write icon in the navigation at the top of the page
THEN I am presented with empty fields to enter a new note title and the note’s text in the right-hand column
```

## Table of Contents

If your README is long, add a table of contents to make it easy for users to find what they need.

- [Links to Application](#Links)
- [Mock-Up](#Mock-Up)
- [Install](#installation)
- [Usage](#usage)
- [Credits](#credits)
- [Test](#test)
- [Questions](#questions)

## Links

Below are links to access this live website and repository.

Github: https://github.com/bergannation/11_NoteTaker

Deployed URL (Heroku): https://bergan-notetaker2.herokuapp.com/

## Mock-Up

The following gif shows the web application's appearance and functionality:

![.](./images/notetaker.gif)

## Installation

The note taker application allows for users to write, save and delete two notes organized with a note title and text area. The application was created using express.js to retrieve the user input data.

The site features:

Express.js
Node.js
Heroku (used for site Deployment)

The user will be required to use the Express package via NodeJS & NPM commands. The user will input the following in their command line to install the neccessary packages:

```bash
npm init -y
npm i express
```

## Usage

The user will begin the process by invoking the application in NodeJS. The application will be invoked by using the following command:

```bash
node server.js
```

From there, click on the "Get Started" Button which will direct you to the /notes page allowing you to input pertinent information for the Note Title and Text Area.

![alt text](images/capture1.png)

Users can save, delete, and add new notes from this menu.

![alt text](images/capture2.png)

## Tests

Testing: No testing was needed for this application

## Questions

Here is a link to my github for more information: [Github]: https://github.com/BerganNation

You can reach me with any additional questions by email<EMAIL_ADDRESS>

license: MIT

branch_name: refs/heads/main


text:
---
layout:      post
title:       Building a command line application with the Joomla Framework - Part 7 - More service providers
description: This Joomla Framework tutorial looks at how a service provider can use another service provider via the dependency injection container.
date:        2013-09-04 08:39:17
category:    joomla-framework
image:
  feature:    abstract-8.jpg
  credit:     dargadgetz
  creditlink: http://www.dargadgetz.com/ios-7-abstract-wallpaper-pack-for-iphone-5-and-ipod-touch-retina/
---
## Using services providers within service providers

In the [Part 6][0], I looked at how to make a simple configuration service provider. In this tutorial I'm going to look at how to use that configuration data in another service provider.

The source code for this tutorial is available in under `v1.2` tag on [Github][1].

## Registering command line input in the DI container

I want to allow the Github connector to be configured either from the command line, or from the configuration file. I could possibly make these adjustments in the application, but a better place is right in the Github service provider.

However, to do this, I need to give the DI container access to command line input. So, in the application's `initialise` method, I'm adding "input" to the container directly.

        protected function initialise()
        {
            // New DI stuff!
            $container = new Container;
            $input = $this->input;

            $container->share('input', function (Container $c) use ($input) {
                return $input;
            }, true);

            $container->registerServiceProvider(new Providers\ConfigServiceProvider);
            $container->registerServiceProvider(new Providers\GithubServiceProvider);
            $container->registerServiceProvider(new Providers\LoggerServiceProvider);

            $this->container = $container;
        }

Now, I'm using the `$input` variable as a proxy because in PHP 5.3, `$this` does not evaluate correctly in a closure. In PHP 5.4 I could use somthing like this:

            $container->share('input', function (Container $c) {
                return $this->input;
            }, true);

Either way, we can access the command line input anywhere the DI container is available.

## Using configuration in the Github service provider

Having added the command line input to the DI container, I can now access that in the Github service provider as follows:

    class GithubServiceProvider implements ServiceProviderInterface
    {
        public function register(Container $container)
        {
            $container->share('github', function(Container $c) {

                /* @var $config Registry */
                $config = $c->get('config');

                /* @var $input Joomla\Input\Input */
                $input = $c->get('input');

                $options = new Registry;
                $options->set('headers.Accept', 'application/vnd.github.html+json');
                $options->set('api.username', $input->get('username', $config->get('api.username')));
                $options->set('api.password', $input->get('password', $config->get('api.password')));
                $options->set('api.url', $config->get('api.url'));

                $github = new Github($options);

                return $github;
            }, true);
        }
    }

Here you can see the beauty of the DI container - everything in the container is lazy loaded and the code for, for example, configuration code is only invoked when it is first needed. One thing to watch, however, is that you don't set up circular references where you have two service providers calling each other.

Let's have a look at one of the options I'm giving to the Github object.

    $options->set('api.username', $input->get('username', $config->get('api.username')));

What I am doing here is setting the option to log into Github when making an API request. I'm checking if there is a command line option called "username". If it is available, I'll use that, but if not I'm going to default to checking in the configuration. The order is important because I want the command line to override any default configuration, like this:

    $ php -f bin/tagaliser -- --username=octocat

The password is treated the same way and if one is using an enterprise Github instance, it can be set that in the configuration file (though, it would be perfectly ok to allow this to be changed from the command line if that suited your use case).

## End of Part 7

In the next tutorial I'm going to explain how I added a logging service provider to the command line application.

[0]: /posts/building-a-command-line-application-with-the-joomla-framework-part-6.html "Adding a configuration service provider"
[1]: https://github.com/eddieajau/tagaliser/tree/v1.2 "Click here to see the source code for part 6 of building a command line application with the Joomla Framework."


text:
# Prepare a Linux workspace for EKS

Working with containers and Kubernetes requires you to install a handful of tools
to your machine. To make it easier for you to cleanup after the workshop, you might
want to do the workshop on a different machine than your computer or laptop.

Here, we provide a few options on creating a remote dev environment on AWS,
so you keep installations on your local machine to a minimum:

**Choose one option:**
- [Create a dev environment on AWS Cloud9](#using-aws-cloud9)
- `TODO`

---

## Using AWS Cloud9

[AWS Cloud9][cloud9] is a cloud IDE for writing, running, and debugging code.
We can create a dev environment, then work in it completely from within our browser,
very similarly to how you use your preferred IDE.

### Create a Cloud9 environment

1.
2. Confirm that you're in the right AWS region.
   You should be able to select which region you want to work in on the top-right
   of your screen.

   **If you're not sure which region you should be in**, ask your workshop moderator.

3. Click the `Create environment` button.
4. Give your environment a name and an optional description, then click `Next step`.
5. Confirm the following options:
   - Environment type: **Create a new EC2 instance**
   - Instance type: **Other instance type: `t3.large`**
   - Platform: **Amazon Linux 2**
   - Cost-saving setting: **After four hours**

   Then click `Next step`.
6. Confirm your settings in the next step, then click `Create environment`
   to create your Cloud9 instance.

### Customize your environment

Once the Cloud9 instance becomes available, feel free to customize it as you like.
We suggest you do the following too:

- Close the Welcome screen
- Close the lower work area (by clicking the `𝖷` on the top-right of the lower panel)
- Open a new terminal on the main work area (by clicking `＋` on the main panel,
  and selecting `New Terminal`)

### Install required tools

Just to make things easier during the workshop, we can give our Cloud9 dev environment
admin powers.

> :warning::warning::warning:

> **Always be very, very careful with giving anything admin permissions**.

> Don't give anything more permissions than it requires to function.

> :warning::warning::warning:

1. Open your Settings (by clicking the ⚙ icon on the top-right of the screen).
2. Navigate to `AWS Settings` on the left sidebar, then **disable**
   `AWS managed temporary credentials`.
3. Open a terminal (if you don't have one open yet), and paste in your credentials
   from Event Engine. This gives your terminal temporary credentials.

   ```bash
   # :: example
   export AWS_DEFAULT_REGION=ap-southeast-1
   export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXX
   export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   export AWS_SESSION_TOKEN=<a very long string>
   ```

4. Run the following in your terminal:

   > **IMPORTANT:**

   > Do **not** directly pipe arbitrary scripts in the wild to `bash` like this.

   > (i.e. don't just do `curl some-script.sh | bash` willy-nilly).
   > This is very dangerous. Make sure you trust
   > the script and where the script is coming from.
   >
   > We're just doing this to save a lot of time for the workshop.
   > If you want to inspect what the script does, it's found right here:
   > https://gist.github.com/richardneililagan/b527511214496d4bb701b088ffd89ce3

   ```bash
   curl --silent https://gist.githubusercontent.com/richardneililagan/b527511214496d4bb701b088ffd89ce3/raw/prep-cloud9-eksworkshop.sh | bash
   ```

5. Just to make sure the credentials are completely set, close your current terminal
   and open a new one. :)

---

[cloud9]: https://aws.amazon.com/cloud9
[cloud9-console]: https://console.aws.amazon.com/cloud9


text:
Hacking Guide
=============

Resources
---------
These are helpful for development

* https://code.google.com/p/google-api-go-client/source/browse/mirror/v1/mirror-gen.go
* http://golang.org/doc/effective_go.html

Clock deskew and latency estimation
-----------------------------------
* Glass sends data to server (potentially big) and includes a timestamp (Tg0)
* Server sends ack to glass with its own timestamp (Ts0) and the previous timestamp (Tg0)
* Glass computes new timestamp (Tg1) and sends back (Tg0, Tg1, Ts0, Tg1)
* Server computes k = Tg - Ts (skew), D = D1 = D2  (delay, assuming last two equal), and data delay D0.
* D = .5 * (Ts1 - Ts0), k = Tg1 - Ts1 + D, and D0 = Ts0 + k - tg0

```
Glass        Server
Tg0  - D0 -> Ts0
Tg1 <- D1 -  Ts0
Tg1 -  D2 -> Ts1
```

Notification Clients
--------------------
These are clients for the /notify/ endpoint

* Ruby CLI and irssi plugin: https://gist.github.com/kurtisnelson/6188982
* Python CLI: https://gist.github.com/aeroevan/6197254

Timeline Item Styling
---------------------
For glassware the timeline items are styled using HTML/CSS.  The dev playground helps a lot https://developers.google.com/glass/playground


text:
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)
[![Download](https://api.bintray.com/packages/ezhome/maven/rxpresenter/images/download.svg) ](https://bintray.com/ezhome/maven/rxpresenter/_latestVersion)
[![Build Status](https://travis-ci.org/ezhome/Android-RxPresenter.svg?branch=master)](https://travis-ci.org/ezhome/Android-RxPresenter)
[![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-Spiros%20Economakis-green.svg?style=flat )]( https://android-arsenal.com/details/1/6457 )

# RxPresenter

A Reactive Presenter library for MV**P** pattern for modern Android Apps. This library follows the
lifecycle of an android app component (`Activity`,`AppCompatActivity`,`Fragment`, `DialogFragment`). Specifically relies on [RxLifecycle](https://github.com/trello/RxLifecycle) by Trello.

----
Contents
--------
- [Usage](#usage)
- [Download](#download)
- [Tests](#tests)
- [Code style](#code-style)
- [License](#license)

Usage
-----

This library supports only the support `Activity`,`AppCompatActivity`, `Fragment` and `DialogFragment`. In order to be able to use the library, these
app components must inherit one of the followings, `MvpActivity`, `MvpFragment`

**Activity**
```
bind(activity);
```

**Fragment**
```
bind(fragment);
```

**Dialog Fragment**
```
bind(dialogFragment);
```

Firstly you need to define an interface which representing a View in a MVP pattern and there is a 1-to-1 relationship
and two way communication between View & Presenter. In our case this interface must extends `MvpView` eg.

```java
interface DemoView extends MvpView {

}
```

Then you need to create a Presenter in the MVP pattern. In this library the Presenter must extend `RxPresenter<V>`
where `V` is the `View` interface which we defined above. eg.

```java
class DemoPresenter extends RxPresenter<DemoView> {

  DemoPresenter() {
  }
 }
```

The corresponding android app component must implements the `View` interface! After that you need just
to initialise the presenter and `bind(component)` it to `Fragment` or `DialogFragment`. eg.

**Without Dependency Injection**
```java
public class DemoFragment extends MvpFragment implements DemoView {

  private Presenter presenter = new DemoPresenter();

  @Override public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.presenter.bind(this);
  }
}
```

**With Dependency Injection - Dagger2**
```java
public class DemoFragment extends MvpFragment implements DemoView {

  @Inject Presenter presenter;

  @Override public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    //Dagger2 injection code

    this.presenter.bind(this);
  }
}
```

After the line `this.presenter.bind(this)` the Presenter starts following the Android App Component's
lifecycle and specifically on `onViewCreated` we bound the corresponding interface `View` automatically without the
need to do it explicitly. Then the Presenter follows the typical lifecycle methods `onResume`, `onPause`, `onDestroy`.

`RxPresenter` exposes also helper methods which will help your RxJava observables to follow the Android App Component's
lifecycle (with the use of [RxLifecycle](https://github.com/trello/RxLifecycle) by Trello).

1. By default stops emitting in `FragmentEvent.DESTROY_VIEW` and use a `Subscriber<T>` to "react"
```java
bindLifecycle(@NonNull Observable<T> observable, Subscriber<T>... subscribers)
```

2. By default stops emitting in `FragmentEvent.DESTROY_VIEW` and use an `Action1<T>` to "react"
```java
bindLifecycle(@NonNull Observable<T> observable, Action1<T> action)
```

3. Stops emitting on the provided `FragmentEvent` and use a `Subscriber<T>` to "react"
```java
 bindUntilEvent(@NonNull Observable<T> observable, @NonNull FragmentEvent event, Subscriber<T>... subscribers)
```

4. Stops emitting on the provided `FragmentEvent` and use an `Action1<T>` to "react"
```java
 bindUntilEvent(@NonNull Observable<T> observable, @NonNull FragmentEvent event, Action1<T> action)
```

Download
--------
The project is available on jCenter. In your app build.gradle (or explicit module) you must add this:
```
dependencies {
  //java
  compile 'com.ezhome:rxpresenter:1.3.0'

  //kotlin
  compile 'com.ezhome:rxpresenter-kotlin:1.3.0'
}
```

Tests
----------

```
./gradlew :rxpresenter:test
```

Code style
----------

Code style used in the project is called `SquareAndroid` from Java Code Styles repository by Square available at: https://github.com/square/java-code-styles.

## License

See the [LICENSE](LICENSE.md) file for license rights and limitations (Apache license 2.0).

repository: Tubbz-alt/Android-RxPresenter

repo_name: Tubbz-alt/Android-RxPresenter


text:
# Generator::rewind

Actually, this method can be useful to test a generator before iterating, as it executes your function up to the first yield statement. I.e. if you try to read a non-existent file in a generator, an error will normally occur only in client code foreach()'s first iteration. Sometimes this can be critical to check beforehand.

Take a look at a modified example from here:
http://php.net/manual/ru/language.generators.overview.php#112985

```
<?php

function getLines($file) {
    $f = fopen($file, 'r');
    try {
        while ($line = fgets($f)) {
            yield $line;
        }
    } finally {
        fclose($f);
    }
}

$getLines = getLines('no_such_file.txt');
$getLines->rewind(); // with ->rewind(), a file read error will be thrown here and a log file will not be cleared

openAndClearLogFile();

foreach ($getLines as $n => $line) { // without ->rewind(), the script will die here and your log file will be cleared
    writeToLogFile('reading: ' . $line . "\n");
}

closeLogFile();

?>
```

P.S.: When you iterate over a generator after ->rewind(), you'll get the first yielded value immediately, as the preceding code was already executed.

---

[Official documentation page](https://www.php.net/manual/en/generator.rewind.php)

**[To root](/README.md)**


text:
# About

## Comparison operators

[Comparison operators][comparison-operators] are used to compare values and return a `true` or `false` value.
These operators require 2 values to be compared of the same type.
If the values are not of the same type then the compiler will throw an error.
Here is a list of the comparison operators and an example of when they give a `true` value:

| Method | Description           | Example |
| ------ | --------------------- | ------- |
| ==     | equal                 | 1 == 1  |
| !=     | not equal             | 1 != 2  |
| <      | less than             | 5 < 4   |
| <=     | less than or equal    | 4 <= 4  |
| >      | greater than          | 3 > 1   |
| >=     | greater than or equal | 2 >= 2  |

## If & Else statements

A [conditional statement][conditional-statement] allows you to execute code based on a condition which is either `true` or `false`.
The most basic conditional statement is an [if statement][if] which executes code when the condition is `true`.
To declare an if statement you use the `if` keyword followed by the condition and then the code to execute in curly braces.

```swift
let wheelCount = 4
if wheelCount == 4 {
  print("Your vehicle is a car")
}
// Prints "Your vehicle is a car"
```

If can be combined with else to execute code when the condition is `false`.
The else statement needs to be used with an if statement and cannot be used on its own.
To declare an else statement you use the `else` keyword after an if statements curly braces, followed by the code to execute in curly braces.

```swift
Let precipitationInMM = 0.5
if precipitationInMM > 0.5 {
  print("You will need an umbrella")
} else {
  print("You will not need an umbrella")
}
// Prints "You will not need an umbrella"
```

If statements can also be chained together using else if to check multiple conditions.
It follows the same principle as defining an if statement but the keyword is `else if` instead of `if`.
As If statement don't they need an else statement to be valid, but they can have one if needed.

```swift
let favoriteFruit = "Apple"

if favoriteFruit == "Banana" {
    print("Your favorite fruit is a banana")
} else if favoriteFruit == "Orange" {
    print("Your favorite fruit is an orange")
} else if favoriteFruit == "Apple" {
    print("Your favorite fruit is an apple")
} else {
    print("Your favorite fruit is not a banana, orange or apple")
}
// Prints "Your favorite fruit is an apple"
```

## If expression

If statements can also be used as expressions to assign a value to a variable.
The last statement in the if block is used as the value of the if expression.
This can be useful when you want to assign a value to a variable based on a condition.

```swift
let CpuBits = 32
let largest = if CpuBits == 64 {
  "x86_64"
} else {
  "x86_32"
}

print(largest)
// Prints "x86_32"
```

[comparison-operators]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/basicoperators#Comparison-Operators
[conditional-statement]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/controlflow/#Conditional-Statements
[if]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/controlflow/#If

repository: ericrosko/xswift

repo_name: ericrosko/xswift


text:
# Tarql: SPARQL for Tables

Tarql is a command-line tool for converting CSV files to RDF using SPARQL 1.1 syntax. It's written in Java and based on Apache ARQ.

**See http://tarql.github.io/ for documentation.**

## Building

Get the code from GitHub: http://github.com/tarql/tarql

Tarql uses Maven. To create executable scripts for Windows and Unix in `/target/appassembler/bin/tarql`:

    mvn package appassembler:assemble

Otherwise it's standard Maven.

repository: CatherineChiramel/tarql

repo_name: CatherineChiramel/tarql


text:
# VerifiedDouble

[![Build Status](https://travis-ci.org/gsmendoza/verified_double.png)](https://travis-ci.org/gsmendoza/verified_double)

VerifiedDouble is a gem for verifying rspec mocks. The gem works similar to [rspec-fire](https://github.com/xaviershay/rspec-fire). However, instead of checking if the doubled classes respond to the methods, the gem looks for tests confirming if those mocks are valid.

For example, let's say I mocked the created_at method of a model like this:

    item = VerifiedDouble.of_instance(Item)
    item.should_receive(:created_at).and_return(Time.now)

When running the tests, the gem looks for a "contract test" tagged with the method's signature. This test should ensure that calling #created_at on Item will return a Time object.

    it "tests something", verifies_contract: 'Item#created_at()=>Time' do
      #...
    end

If this test does not exist, the gem will complain that the mock is not verified.

I got the idea from http://www.infoq.com/presentations/integration-tests-scam, an old (2009) talk that still has some fresh insights on dealing with API changes in your mocked tests.

You can learn more about using the gem at https://www.relishapp.com/gsmendoza/verified-double.

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

[Bogus](https://www.relishapp.com/bogus/bogus/v/0-0-3/docs/) is the first gem to implement contract tests. It doesn't rely on rspec tags to verify contracts, so it's probably a lot smarter than VerifiedDouble :) However, I wasn't able to try it out on my own projects because of its own rr-like mock adapter. But do check it out!

Caveats
-------

VerifiedDouble is still in its infancy, but I hope it's usable for the most common cases.

* If you check the RelishApp doc, the gem only supports a subset of rspec-mock's API. Please post an issue at http://github.com/gsmendoza/verified_double if you need support for any particular rspec-mock API.

* The [method documentation](http://rubydoc.info/gems/verified_double) is pretty empty at this point :p I'm planning to use yard-spec to document the methods but that gem doesn't support rspec context blocks. I'll try to work on that soon.

Special thanks
--------------

To [Thomas Sinclair](https://twitter.com/anathematic) and [Inner Core Designs](http://icdesign.com.au) for sponsoring this gem :)


text:
`crucible-llvm` limitations
---------------------------

Address space limitations
=========================

`crucible-llvm` currently assumes that all code uses the default address space
`0`. LLVM's data layout is permitted to declare multiple address spaces with
differing pointer sizes, however. For instance, LLVM 10 and later will
[reserve address spaces 270 through 272](https://reviews.llvm.org/D64931) in
X86 data layouts for the purpose of implementing mixed pointer sizes.
`crucible-llvm`, on the other hand, currently assumes that all pointers in a
given program are the same size, so it is unlikely that `crucible-llvm` would
work on code that uses differently sized address spaces. In practice,
`crucible-llvm` will only look at the part of the data layout which specifies
the default address space when determining what size pointers should be.

Printf accuracy
=====================

The `printf` implementation provided with `crucible-llvm` makes a
reasonable effort to implement the various conversion codes, but there
are some places where the formatting does not strictly conform to
the specification (most notably, regarding displayed precision for
floating-point values). We also do not implement the "%a" conversion
code for binary formatted floating-point values.
We also will simply print a collection of '?' characters for symbolic
values.

Thus the exact printed output, number of characters printed, etc,
may not exactly match that of a conforming implementation.

repository: varosi-chaosgroup/crucible

repo_name: varosi-chaosgroup/crucible


text:
# Polyglot Fizzbuzz TDD
This repo containts the executable source code for the fizzbuzz examples in all our favorite programming languages!

## What Is "Fizzbuzz"?
There are many different variations of the fizzbuzz challenge. For this one in particular we are saying that "fizzbuzz" is the name of the function which takes a string of arbitrary size as it's input and returns the same string but with a few modifications- every third word is replaced with "fizz", every fifth word is replaced with "buzz", and every fifteenth word if replaced with "fizzbuzz".

## What's In Each Folder Here?
Each folder represents one programming language. In that folder there many be one or more implementations of the fizzbuzz problem in that language.

## We Can Hit The Ground Running In Any Language
The truth is that deciding on frameworks, setting up your tooling, and learning the testing conventions for each new language can be pretty difficult. The main purpose of these repos is to provide a set up examples to quickly get developers into a TDD right off the path and without having to wasting a lot of time with tooling differences when frequently switching between languages. The folder for each language contains a project, which consits of:

- a function named "fizzbuzz" that takes a string and returns a "fizzbuzzifies string" (see "What Is "Fizzbuzz" section above for details)
- a unit test file that verifies the output of the fizzbuzz function when passes the "benchmark input strings".
- a command to execute the tests and to execute them in "watch mode" (automatically re-running tests when code is changed).

## System Setup Guides
Each language will have specific things that need to be installed on the local sytem in order to run and compile that type of code, work with depencencies, etc. For each language we try to provide the easiest and most straightforward way possible for getting the necessary things to begin development and run the fizzbuzz code.

## From-Scratch Guides
The From-Scratch Guide walks through how you could re-create the project from scratch, ie. a completely empty project directory.

## Things This Repo Does NOT Cover

- IDE Setup: For most languages either vscode, intellij, or vim will work for you.
- Basic Languages Features
- Windows Setup (😛)

gha_language: C

gha_license_id: MIT


text:
# School_District_Analysis
## Purpose
There was evidence of academic dishonesty in the school district. Maria and her supervisors
requested the removal of the math and reading scores among the 9th graders from Thomas High School.
Then repeat the school district analysis to compare the two results.

## Analysis
### Dependencies
There are two denpendencies for our program.
- We use pandas, a software library written for Python to manipulate and create DataFrames to analyze our data.
- We also use numpy to help replace the 9th grader grades in Thomas High School

The school district provided us two files within the Resources folder, namely schools_complete_csv and students_complete.csv
for our analysis.

## Result

**Disclaimer** All values are rounded to the nearest tenth decimal.

### District Summary Analysis
![](Resources/district_summary_1.PNG)
**The original District Summary including the 9th graders from Thomas High School**

![](Resources/district_summary_2.PNG)
**After the removal of the 9th graders from Thomas High School**

Looking a the district summary upon the removal of the reported data:
- Total Schools is unaffected
- Total Students is unaffected
- Total budget does not change
- __Average Math Score__ fell by 0.1%
- __Average Reading Score__ does not seem to have changed.
- __% Passing Math__ dropped 0.2%
- __% Passing Reading__ dropped by 0.3%.
- __% Overall Passing__ dropped by 0.1%.

### School Summary Analysis

**Disclaimer - All values are rounded to the nearest tenth.

![](Resources/school_summary_1.PNG)
**__The unaltered School Summary including the 9th graders from Thomas High School__**

For the new school summary, I created a new DataFrame for 10th to 12th graders in Thomas High School and calculated
new percentages of students that passed 70 on math, reading, and both based on the grades of 10th-12th graders. Then I
updated the school_summary_df by replacing the __% Passing Math__, __% Passing Reading__, and __% Overall Passing__ that
we just calculated for the 10th to 12th graders in Thomas High School. Giving the following result:

![](Resources/school_summary_2.PNG)
**__The altered School Summary excluding the 9th graders from Thomas High School__**

Taking a quick look a the __% Passing Math__, __% Passing Reading__, and __% Overall Passing__ differences. We notice the following for Thomas High School:

**Disclaimer - All values are rounded to the nearest tenth.

- % Passing Math increased from 66.9% to 93.2
- % Passing Reading increased from 69.7% to 97.0%
- % Overall Passing increased from 65.1% to 90.6%

## School Summary
The result of replaceing the 9th graders math and reading score and updating the average of passing grades to the averge of 10th-12th graders' passing grades changed

### School Summary Overall
The math and reading scores by grade did not change much. The only difference are the values we assigned to 9th graders for Thomas High Schools for, which should be nan for both charts(below):
![](ths_math.PNG)
![](ths_reading.PNG)
**We replaced the grades for the 9th graders from Thomas High School and replaced it with "NaN"

### School Summary by Spending
The only noticible change when we take a look at the spending summary is the change in % Passing Math, % Passing Reading, and % % Overall Passing between the Spending Ranges of $630 to $644.
![](Resources/spending_summary_1.PNG)
![](Resources/spending_summary_2.PNG)

- % Passing Math decreased from 73% to 67% between the Spending Ranges of $630-$644.
- % Passing Reading decreased from 84% to 77% between the Spending Ranges of $630-$644.
- % Overall Passing decreased from 62% to 56% between the Spending Ranges of $630-$644.

### School Summary by Size
There was no change to the Scores by School size when we replaced the averages using the average grades of 10th-12th graders from Thomas High School in the per_school_sumamry_df.

### School Summary by Type
There was no change to the Scores by school type when we replaced the averages using the average grades of 10th-12th graders from Thomas High School in the per_school_sumamry_df.


text:
# Backbone.Tango
Notification library for Backbone.js

## Demo

Demo [here](https://backbone-tango.herokuapp.com "").

## About

Backbone.Tango is a Backbone.js notification library based on [toastr](https://github.com/CodeSeven/toastr "").

## Installation

> Bower

    bower install backbone.tango --save

> npm

    npm install backbone.tango --save

## Usage

Start by including both the javascript and the css files.

```html
<!doctype html>
<html>
    <head>
        <!-- jQuery, Underscore.js and Backbone.js goes here -->
        <script src="path/to/library/js/backbone.tango.js"></script>
        <link rel="stylesheet" href="path/to/library/css/backbone.tango.css" />
        <!-- Default theme, more to come hopefully -->
        <link rel="stylesheet" href="path/to/library/css/themes/tango.toastr.css" />
    </head>
</html>
```

Create a new `Notifier` instance.

```javascript
var notifier = new Backbone.Tango.Notifier();
```

Notifications are generated through the `success`, `info`, `warning` and `error` methods. These methods return an instance of `Backbone.Tango.View`, a subclass of `Backbone.View`.

```javascript
notifier.success('Success!!!');

notifier.info('The more you know...');

notifier.warning('Beware!!!');

notifier.error('Ooops!');
```

An options object can be provided as a second argument.

```javascript
notifier.success('Success!!!', {
    position: 'bottom-left',
    timeout: 3000
});
```

## Options

We can define a default set of options when creating a notifier instance. These options will be applied to all notifications generated from it.

```javascript
var notifier = new Backbone.Tango.Notifier({
    position: 'top-left'
});

notifier.success('Going left');
```

### View options

 * position: Determines the place where notifications are shown. Values accepted: `top-right`, `top-left`, `bottom-right`, `bottom-left`, `top-center`, `bottom-center`, `top-full-width`, `bottom-full-width` (default: `top-right`).
 * timeout: The amount of time (in milliseconds) a notification remains visible (default: `5000`).
 * newestOnTop: Determines if new notifications are rendered on top of old ones (default: true).
 * type: Notification type. Values: `info`, `success`, `error`, `warning`, `loader` (default: `undefined`).
 * render: Determines if the notification is renderer automatically after creation (default: `true`).
 * clearAll: When true, all notifications are removed except for the current one (Default: `false`).
 * clearContainer: When true, all notifications rendered in the same container are hided (Default: `false`).
 * viewClass: The default view class (Default: `Backbone.Tango.View`).

### Style options

 * cssClass: A CSS class used for all notification views. When a notification defines a `type` it will also be used to generate an additional class ("tango-success", "tango-warning", etc) (default: `tango`).
 * showMethod: The jQuery method used to show the current view (default: `fadeIn`).
 * showDuration: The amount of time (in milliseconds) for the specified show animation (default: 250).
 * showEasing: The easing method used for the specified show animation (default: `swing`).
 * hideMethod: The jQuery method used to hide the current view (default: `fadeOut`).
 * hideDuration: The amount of time (in milliseconds) for the specified hide animation (default: `850`).
 * hideEasing: The easing method used for the specified hide animation (default: `swing`).

### Events options

 * tapToDismiss: Determines if a view is removed after a *click* event (default: *true*).
 * extendedTimeout: The time in milliseconds in which a notification remains visible after a hover event (default: 1000).
 * onShown: A function called when a view is shown (default: *undefined*).
 * onHidden: A function called when a view is hdden (default: *undefined*).

### Container options

Containers are elements that wrap one or more notificacions in order to be displayed in the requested position. When a notification is removed from screen it also checks if the current container has any childs left. Empty containers are removed as well.

 * target: The element where all notification containers are appended to (default: `body`).
 * containerBaseId: All containers are generated using and id that combines this option and the position where is rendered (default: `tango-container`).
 * containerClass: A CSS class used for all containers (default: `tango-container`). Containers also include an additional CSS class associated with the position.

### Overlay options

 * overlay: When true, an overlay is appended to the document before showing the notification (Default: `false`).
 * overlayClass: The CSS class used by the overlay (Default `tango-overlay`).

### Template options

 * template: The function used to generate a notification view (default: `undefined`, when no template is found then a default one is used).
 * templateFn: A function that receives a list of options and returns a template function. It has priority over the `template` option (default: `undefined`).
 * includeDefaultVars: When true, additional values like `nid` (notification id) and `cssClass` are added to the template arguments (Default: `true`).
 * templateVars: Additional vars that are provided to the template (Default: `null`).

### Using templates

This example illustrates how to use a default notification template using Undercore.js. We start by adding the following snippet to our page.

```html
<script type="text/template" id="notifier-tpl">
    <div class="tango">
        <h5><%=title%></h5>
        <p><%=message%></p>
    </div>
</script>
```

Now we create a new notifier instance using that template.

```javascript
var Notifier = Backbone.Tango.Notifier;

var notifier = new Notifier({
    template: _.template($('#notifier-tpl').html())
});
```

This template receives a `title` and a `message` argument. We need to provide them using an object.

```javascript
notifier.success({
    title: 'Hello',
    message: 'This is my custom template'
});
```

Notification templates receive an additional argument called `cssClass` that is generated on runtime and contains a string with the predefined CSS classes for that element.

```html
<script type="text/template" id="notifier-tpl">
    <div class="<%=cssClass%>">
        <h5><%=title%></h5>
        <p><%=message%></p>
    </div>
</script>
```

The `cssClass` property is created using the `cssClass` option and the specified notification type. For example, a success notification will receive a `cssClass` containing *"tango tango-success"*. Templates also receive an `nid` and an `options` object. The first contains a numeric value that identifies the generated view while the second contains the options specified for that notification.

## Events

The callbacks `onShown` and `onHidden` are invoked after their respective animations are completed. They receive both the data and the options objects as arguments and use the current view as the context.

```javascript
var notifier = new Backbone.Tango.Notifier();

notifier.warning('Stop right there criminal scum!', {
    onShown: function(data, options) {
        console.log('Message "' + data.message + '" was showed.');
    },

    onHidden: function(data, options) {
        console.log('Notification was showed for about ' + (options.timeout / 1000) + ' seconds.');
    },

    timeout: 7000
});
```

We can also bind a callback to a view event just like any regular *Backbone* view. During its lifetime, a `Tango.View` instance triggers a `shown` and a `hidden` event. Any callback triggered by the `shown` event is called before the `onShown` callback. Same goes for the `hidden` event handler and the `onHidden` callback.

```javascript
var notifier = new Backbone.Tango.Notifier();
var view = notifier.info("The princess is in another castle");

// Bind a callback to the 'shown' event
view.on('shown', function(view, data, options) {
    console.log('Showing view "' + view.cid + '"');
});

// Bind a callback to the 'hidden' event
view.on('hidden', function(view, data, options) {
    console.log('Removing view "' + view.cid + '"');
});
```

## Custom notifications

The next example shows a custom notification view class that includes a closing button. The associated event has been defined through the `events` object in the class declaration. Notice that we also added a static property called `defaults`. This value will be used as the default configuration when creating our notifier object.

```javascript
var View = Backbone.Tango.View;

// CloseableNotification class
var CloseableNotification = View.extend({
    events: {
        "click .close-button": "close"
    },

    close: function(e) {
        e.stopPropagation();
        this.hide(true);
    }
}, {
    defaults: {
        template: _.template($('#closeable-tpl').html()),

        tapToDismiss: false,

        timeout: 0,

        extendedTimeout: 0
    }
});
```

Now we create a new notifier instance using this class as the argument. The notifier instance will then import the configuration from the `defaults` property.

```javascript
var Notifier = Backbone.Tango.Notifier;

// Import defaults from CloseableNotification
var notifier = new Notifier(CloseableNotification);

notifier.info({
    title: 'Welcome',
    message: 'How are you today?'
});
```

We could also use the `make` method instead. This method receives a view class, the data to display and an additional options object.

```javascript
var Notifier = Backbone.Tango.Notifier;

var view = notifier.make(CloseableNotification, {
    title: 'Welcome',
    message: 'How are you today?'
});
```

### Loaders

<br/>
Loaders are a special type of notification that are generated using the `loader` method. By default they include a small css animation just before the text.

```javascript
var notifier = new Backbone.Tango.Notifier();
notifier.loader('Loading...');
```

Loaders have a default `timeout` of 0 and don't listen to the `click` event, which means they'll never disappear unless we call its `hide` method.

```javascript
var notifier = new Backbone.Tango.Notifier();
var view = notifier.loader('Loading...');

// Show loader for 4 seconds
setTimeout(function () {
    view.hide();
}, 4000);
```

## License

This library is distributed under the terms of the MIT license.


text:
# Introduction to neural networks with scikit-learn

This repository contains teaching materials for introducing neural networks, with a short lab to investigate neural nets as universal function approximators.

## To make the slides

```
jupyter-nbconvert --to slides slides.ipynb --reveal-prefix=reveal.js --post serve
```

repository: mbjoseph/intro-neural-nets-sklearn

repo_name: mbjoseph/intro-neural-nets-sklearn


text:
# Autogit Plugin - Confirmation

A plugin for asking for confirmation before proceeding.

It's useful when you want to have a final saying before executing important commands.

## Install

```sh
npm install --save autogit-plugin-confirmation
```

## Usage

#### Options

This plugin uses the following options object:

```js
{
  message: 'Are you sure you want to proceed: (Y/n)', // The confirmation message
  defaultValue: 'Y' // Default confirmation value if none is provided
}
```

If the provided confirmation value starts with a `Y` or `y` we well proceed, otherwise an exception will be thrown and the following plugins won't be executed.

#### Configuration

Add this plugin to a command:

```js
const confirmation = require ( 'autogit-plugin-confirmation' );

module.exports = {
  commands: {
    'my-command': [
      confirmation ({
        message: 'Press enter to confirm:'
      })
    ]
  }
}
```

## License

MIT © Fabio Spampinato


text:
# Notions on machine learning

This repository contains some terminology and descriptions of several aspects regarding machine learning.

## Table of contents

* [Machine learning](pdf/01_machine_learning.pdf)
* Popular algorithms
    * [Linear Regression](pdf/02-01_linear-regression.pdf)
    * [Logistic Regression](pdf/02-02_logistic-regression.pdf)
    * [Naive Bayes](pdf/02-03_naive-bayes.pdf)
    * [Neural Networks](pdf/02-04_neural-networks.pdf)
    * Decision Trees
    * Support vector machines
    * Clustering
* More on neural networks
    * [Definitions](pdf/03_NN_definitions.pdf)
    * [Activation functions](pdf/03_NN_activations.pdf)
    * Optimization
        * [Weight initialization](pdf/03_NN_optimization_initialization.pdf)
        * [Dropout](pdf/03_NN_optimization_dropout.pdf)
        * [Regularization](pdf/03_NN_optimization_regularization.pdf)
        * [Gradient descent with momentum](pdf/03_NN_optimization_momentum.pdf)
        * [Learning rate decay](pdf/03_NN_optimization_LRdecay.pdf)

## Sources

* Books
    * [Real-world machine learning](https://www.manning.com/books/real-world-machine-learning), H.Brink, J. W. Richards, M. Fetherolf, Manning Publications, 2016
    * [Machine learning: the art and science of algorithms that make sense of data](http://www.cs.put.poznan.pl/tpawlak/files/ZMIO/W02.pdf), Peter Flach, Cambridge University Press, 2012
    * [Neural networks and deep learning](http://neuralnetworksanddeeplearning.com/), Michael A. Nielsen, Determination Press, 2015
    * [Deep learning with python](https://www.manning.com/books/deep-learning-with-python), F. Chollet, Manning Publications, 2017
* Videos
    * [Machine learning by Andrew Ng](https://www.youtube.com/playlist?list=PLLssT5z_DsK-h9vYZkQkYNWcItqhlRJLN)
    * [Deep learning by Andrew Ng](https://www.youtube.com/playlist?list=PLBAGcD3siRDguyYYzhVwZ3tLvOyyG5k6K)
    * [Stanford Lecture - Convolutional neural networks for visual recognition](https://www.youtube.com/playlist?list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv)
* Blogs
    *  [elitedatascience.com](https://elitedatascience.com/learn-machine-learning)
    *  [machinelearningmastery.com](https://machinelearningmastery.com/blog/)
* The countless sources available over the internet that are helping to advance the machine learning community

repository: andressamarcal/ml-notions

repo_name: andressamarcal/ml-notions


text:
---
layout: post
title: "Apache Maven Shared Component: Maven Reporting Exec Version 1.5.1"
date: 2020-06-20 12:30:34
comments: true
categories: [Neuigkeiten,BM,Maven,Maven-Shared]
---
The Apache Maven team is pleased to announce the release of the
[Apache Maven Shared Component: Maven Reporting Exec Version 1.5.1](https://maven.apache.org/shared/maven-reporting-exec/).

Classes to prepare report plugins execution with Maven 3, through
[MavenReportExecutor](https://maven.apache.org/shared/maven-reporting-exec/apidocs/org/apache/maven/reporting/exec/MavenReportExecutor.html) ([implementation](https://maven.apache.org/shared/maven-reporting-exec/apidocs/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.html)).

You should specify the version in your project's plugin configuration:

``` xml
<dependency>
  <groupId>org.apache.maven.reporting</groupId>
  <artifactId>maven-reporting-exec</artifactId>
  <version>1.5.1</version>
</plugin>
```

You can download the appropriate sources etc. from the [download page](https://maven.apache.org/shared/maven-reporting-exec/download.cgi).

<!-- more -->

[Release Notes Apache Maven Shared Component: Maven Reporting Exec Version 1.5.1](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317922&version=12348384 )

* Bugs:

  * {%ajl MSHARED-923 %} - upgrade maven-shade-plugin to 3.2.4 to get Reproducible Build
  * {%ajl MSHARED-924 %} - fix Xpp3DomUtils shading relocation
  * {%ajl MSHARED-921 %} - NoSuchMethodError: 'Xpp3Dom.getInputLocation()' with Maven versions < 3.6.1

* Improvements:

  * {%ajl MSHARED-814 %} - Require Java 7
  * {%ajl MSHARED-879 %} - make build Reproducible

* Task:

  * {%ajl MSHARED-663 %} - mark ReportPlugin and ReportSet package private

Enjoy,

-The Apache Maven team

repository: khmarbaise/octopress

gha_language: Ruby

repo_name: khmarbaise/octopress


text:
# vim-mdpreview

This plugin can render Markdown to HTML or a man-page and display them inside Vim. Once called, the render will update on
each save.

## Usage

    :call MDMan()
    :call MDLynx()

## Requirements

Requires Vim>=8.1 with terminal window support.

MDMan() depends on Pandoc, GROFF(1) and LESS(1).

MDLynx() depends on Pandoc and Lynx.

## Installation

With [Pathogen](https://github.com/tpope/vim-pathogen):

      git clone https://github.com/Duologic/vim-mdpreview.git ~/.vim/bundle/vim-mdpreview

## Screenshot

![Screenshot of vim-mdpreview](./screenshot.png)

repository: Duologic/vim-mdpreview

gha_language: Vim script

repo_name: Duologic/vim-mdpreview


text:
# Oxipng

[![Build Status](https://github.com/shssoichiro/oxipng/workflows/oxipng/badge.svg)](https://github.com/shssoichiro/oxipng/actions?query=branch%3Amaster)
[![Version](https://img.shields.io/crates/v/oxipng.svg)](https://crates.io/crates/oxipng)
[![License](https://img.shields.io/crates/l/oxipng.svg)](https://github.com/shssoichiro/oxipng/blob/master/LICENSE)
[![Docs](https://docs.rs/oxipng/badge.svg)](https://docs.rs/oxipng)

## Overview

Oxipng is a multithreaded lossless PNG compression optimizer. It can be used via a command-line
interface or as a library in other Rust programs.

## Installing

Oxipng for Windows can be downloaded from the [Releases](https://github.com/shssoichiro/oxipng/releases) link on the GitHub page.

For MacOS or Linux, it is recommended to install from your distro's package repository, if possible.

Alternatively, oxipng can be installed from Cargo, via the following command:

```
cargo install oxipng
```

Oxipng can be built from source using the latest stable or nightly Rust.
This is primarily useful for developing on oxipng.

```
git clone https://github.com/shssoichiro/oxipng.git
cd oxipng
cargo build --release
cp target/release/oxipng /usr/local/bin
```

The current minimum supported Rust version is **1.65.0**.

Oxipng follows Semantic Versioning.

## Usage

Oxipng is a command-line utility. Basic usage looks similar to the following:

```
oxipng -o 4 -i 1 --strip safe *.png
```

The most commonly used options are as follows:

- Optimization: `-o 1` through `-o 6`, lower is faster, higher is better compression.
  The default (`-o 2`) is sufficiently fast on a modern CPU and provides 30-50% compression
  gains over an unoptimized PNG. `-o 4` is 6 times slower than `-o 2` but can provide 5-10%
  extra compression over `-o 2`. Using any setting higher than `-o 4` is unlikely
  to give any extra compression gains and is not recommended.
- Interlacing: `-i 1` will enable [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm)
  PNG interlacing on any images that are processed. `-i 0` will remove interlacing from all
  processed images. Not specifying either will keep the same interlacing state as the
  input image. Note: Interlacing can add 25-50% to the size of an optimized image. Only use
  it if you believe the benefits outweigh the costs for your use case.
- Strip: Used to remove metadata info from processed images. Used via `--strip [safe,all]`.
  Can save a few kilobytes if you don't need the metadata. "Safe" removes only metadata that
  will never affect rendering of the image. "All" removes all metadata that is not critical
  to the image. You can also pass a comma-separated list of specific metadata chunks to remove.
  `-s` can be used as a shorthand for `--strip safe`.

More advanced options can be found by running `oxipng -h`.

## Git integration via [Trunk]

[Trunk] is an extendable superlinter which can be used to run `oxipng` to automatically optimize `png`s when committing them into a git repo, or to gate any `png`s being added to a git repo on whether they are optimized. The [trunk] oxipng integration is [here](https://github.com/trunk-io/plugins/tree/main/linters/oxipng).

To enable oxipng via [trunk]:

```bash
# to get the latest version:
trunk check enable oxipng

# to get a specific version:
trunk check enable<EMAIL_ADDRESS>```

or modify `.trunk/trunk.yaml` in your repo to contain:

```
lint:
  enabled:
    -<EMAIL_ADDRESS>```

Then just run:

```bash
# to optimize a png:
trunk fmt <file>

# to check if a png is already optimized:
trunk check <file>
```

You can setup [trunk] to [manage your git hooks](https://docs.trunk.io/docs/actions-git-hooks) and automatically optimize any `png`s you commit to git, _when_ you `git commit`. To enable this, run:

```bash
trunk actions enable trunk-fmt-pre-commit
```

[trunk]: https://docs.trunk.io

## Library Usage

Although originally intended to be used as an executable, oxipng can also be used as a library in
other Rust projects. To do so, simply add oxipng as a dependency in your Cargo.toml,
then `extern crate oxipng` in your project. You should then have access to all of the library
functions [documented here](https://docs.rs/oxipng). The simplest
method of usage involves creating an
[Options struct](https://docs.rs/oxipng/3.0.1/oxipng/struct.Options.html) and
passing it, along with an input filename, into the
[optimize function](https://docs.rs/oxipng/3.0.1/oxipng/fn.optimize.html).

It is recommended to disable the "binary" feature when including oxipng as a library. Currently, there is
no simple way to just disable one feature in Cargo, it has to be done by disabling default features
and specifying the desired ones, for example:
`oxipng = { version = "8.0", features = ["parallel", "zopfli", "filetime"], default-features = false }`

## History

Oxipng began as a complete rewrite of the OptiPNG project,
which was assumed to be dead as no commit had been made to it since March 2014.
(OptiPNG has since released a new version, after Oxipng was first released.)
The name has been changed to avoid confusion and potential legal issues.

The core goal of rewriting OptiPNG was to implement multithreading,
which would be very difficult to do within the existing C codebase of OptiPNG.
This also served as an opportunity to choose a more modern, safer language (Rust).

## Contributing

Any contributions are welcome and will be accepted via pull request on GitHub. Bug reports can be
filed via GitHub issues. Please include as many details as possible. If you have the capability
to submit a fix with the bug report, it is preferred that you do so via pull request,
however you do not need to be a Rust developer to contribute.
Other contributions (such as improving documentation or translations) are also welcome via GitHub.

## License

Oxipng is open-source software, distributed under the MIT license.

## Benchmarks

Tested oxipng 5.0.0 (compiled on rustc 1.55.0-nightly (7a16cfcff 2021-07-11)) against OptiPNG version 0.7.7 on AMD Ryzen 7 4800H with Radeon Graphics with 16 logical cores

```

Benchmark #1: ./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png
  Time (mean ± σ):     128.8 ms ±  14.2 ms    [User: 296.0 ms, System: 14.3 ms]
  Range (min … max):    98.8 ms … 152.3 ms    21 runs

Benchmark #2: optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png
  Time (mean ± σ):     254.2 ms ±  16.0 ms    [User: 252.8 ms, System: 1.2 ms]
  Range (min … max):   208.4 ms … 263.8 ms    14 runs

Summary
  './target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
    1.97 ± 0.25 times faster than 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'

Benchmark #1: ./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png
  Time (mean ± σ):     141.4 ms ±  14.9 ms    [User: 611.7 ms, System: 21.1 ms]
  Range (min … max):   100.2 ms … 160.4 ms    23 runs

Benchmark #2: optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png
  Time (mean ± σ):     730.0 ms ±  25.9 ms    [User: 728.0 ms, System: 1.2 ms]
  Range (min … max):   713.3 ms … 768.2 ms    10 runs

Summary
  './target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
    5.16 ± 0.58 times faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'

```

repository: shssoichiro/oxipng

gha_language: Rust

repo_name: shssoichiro/oxipng


text:
## Udacity Deep Reinforcement Learning Nanodegree Projects
Projects' Solutions for Udacity Deep Reinforcement Learning Nanodegree

Projects in this repository are:
1. Taxi in open-AI gym environment.
2. Banana Navigation project using deep Q learning using Unity environment.
3. Deep deterministic policy gradient (DDPG) implementation for Reacher environment.
4. Multi Agent DDPG implementation for tennis environment.

### Dependencies

Refer to [this link](https://github.com/udacity/deep-reinforcement-learning#dependencies) for installation instruction.

### Graduation Certificate

[Certificate](https://confirm.udacity.com/CS9DE6FM)

### Contact
<EMAIL_ADDRESS>


text:
---
name: webm-promises-open-web-video
layout: post
title: WebM promises Open Web Video
time: 2010-05-30 00:12:00 +01:00
---
I've written [about my desire for open web video before][OtherPost],
and now it looks as if it's finally going to happen. Lead by Google's
acquisition of [On2 technologies][On2], the [VP8][] codec has been
renamed as "[WebM][]" and open sourced. [Vorbis][] will be the audio.
[Matroska][] the container for the new format. An Open Source developer
for x264 does a [great teardown of the format vs. h.264 here][teardown].
The patent minefield stateside is still not clear by any means, but with
a strong backer like Google, it's probably the best protection your going
to get. Announcements, including links to nightlies, dev and beta channel
browsers with WebM support are below:<

* [Opera announcement][opera]
* [Mozilla Announcement][mozilla]
* [WebM Announcement][webmproject]
* [Microsoft Announcement][microsoft]
* [Chrome Announcement][chrome]

[OtherPost]: /2008/12/firefox-and-opera-lead-web-video-way.html
[On2]: http://www.on2.com/
[VP8]: http://en.wikipedia.org/wiki/VP8
[WebM]: http://www.webmproject.org/
[Vorbis]: http://en.wikipedia.org/wiki/Vorbis
[Matroska]: http://en.wikipedia.org/wiki/Matroska
[teardown]: http://x264dev.multimedia.cx/?p=377

[opera]: http://labs.opera.com/news/2010/05/19/
[mozilla]: http://blog.mozilla.com/blog/2010/05/19/open-web-open-video-and-webm/
[webmproject]: http://webmproject.blogspot.com/2010/05/introducing-webm-open-web-media-project.html
[microsoft]: http://blogs.msdn.com/ie/archive/2010/05/19/another-follow-up-on-html5-video-in-ie9.aspx
[chrome]: http://blog.chromium.org/2010/05/webm-and-vp8-land-in-chromium.html


text:
# IceBall [![Build Status](https://travis-ci.org/CrystalCraftMC/IceBall.svg)](https://travis-ci.org/CrystalCraftMC/IceBall)

## What is it?
IceBall is a Spigot Minecraft plugin that allows you to have snowball fights with other players in ways you never
expected!

Fight as wizards, clowns, and more as you chunk endless amounts of snowballs at your friends! The more successive hits
you get, the more hit streak awards you are able to earn, such as the legendary air strike and hunger attack!

## How do I use it?
If you are looking to learn how to use or configure IceBall, please visit our wiki (coming soon)!

## Who created it?
This project was started as part of the CrystalCraftMC Development Team, but most credit belongs to Jwood9198 (or
woodrow73 on GitHub), as he designed most of the actual game code and particle effects. Jacc734 also lent him a
great amount of support in this plugin as well! jflory7 only tidied up small things.

Direct concerns to admin@crystalcraftmc.com.

repository: CrystalCraftMC/IceBall

repo_name: CrystalCraftMC/IceBall


text:
# SVD_Movie_Recommender

The data consists of users who have reviewed movies. I have used SVD to recommend movies similar to the one entered by the User as an input.


text:
#### SEADOGS PROJECT 2
For this second project, we will "tell a story" through data visualizations.

Instead of using the "Analytics Paradigm" to explore relationships in "report form", this project should be more focused on providing users an interactive means to explore data themselves.

We will conduct a 10 minute presentation that lays out our theme, coding approach, data munging techniques, and final visualization on Saturday June 09, 2018


text:
Small/Medium projects:
 * Write a function that examines a plot (rendered or otherwise) and reports
   the minimum size needed to render it such that no labels overlap.
   Complain when forced to draw a plot at a size that might cause overlapping.
   Suggest a better size.
 * Something like `geom_crossbar`.
 * Geom.hexbin
 * Something equivalent to xlim/ylim in ggplot2.
 * Handle NaN and Inf gracefully. NaN should be filtered out it most cases. We
   could handle Inf/-Inf like ggplot2 does by placing points at the very edge of
   the plot, but this can be misleading. Maybe filtering them and issuing a
   warning is better.
 * A means by which statistics can modify guides. Particularly I need
   Stat.histogram to add the y-axis label of "Count" or "Frequency", but there's
   no way it can currently.
 * An option to choose the orientation of tick labels.
 * A size aesthetic.
 * A shape aesthetic, for drawing point plots with categorization using shapes.
   People are going to want it, despite the fact that most plots of this variety
   are truly terrible. It's often hard to tell which shapes are which, plus
   choice in shapes makes some categories seem more significant than others.
   Think about ways to mitigate the damage.
 * Polar coordinates.
 * Write up a style guide for julia code in compose/gadfly.
 * Make generated javascript more readable.

Large projects:
 * More interaction by serializing plots and sending them back and forth between
   julia and a browser-based plot viewer. TODO still:
       * Make `webshow` run in tho background, so the repl is still usable.
       * Indicate in the browser when the client in still waiting for a
         response. (A loading widget of some sort.)
       * Some way of editing the json representation that isn't totally
         worthless.
       * Make axis lables editable by clicking on them?
 * Equations in text. jsMath is one possibility, but that would break my
   "coherent without javascript" rule. A better option might be optionally
   requiring latex plus whatever is needed to convert latex output to svg.
 * Scales based on time. Find some good specimens.
 * Rendering and embedding raster graphics. If a plot has many thousands of data
   points, there should be a way to make part of the plot a bitmap. If the cairo
   backend is maintained this should actually be pretty easy: render part of the
   plot to a png, then base 64 encode the png data and embed it in the svg.

Experimental/long-term projects:
 * Would a table geometry be worthwhile? Are there ways tables and plots could
   be combined, possibly along the lines of Tufte's spark lines?

gha_language: Julia

gha_license_id: NOASSERTION


text:
# AndroMemDumper
AndroMemDumper is a tool used to dump the memory of a specific process on Android.

##Dependency
python2.7

##Platform
Tested on Ubuntu12.04_64 and window7_64

##Usage
**Run the following command:**

```Bash
python dump.py -pid <PID> -saddr <start_addr> -eaddr <end_addr>
```
* <PID>: a specific process's pid
* <start_addr>: start address of dumped memory
* <end_addr>: end address of dumped memory
* The address of dumped memory's last byte is actually <end_addr>-1
* The size of dumped memory is <end_addr>-<start_addr>
* The dumped memory will be saved to current work directory

**Example:**

```Bash
python dump.py -pid 1317 -saddr b43ed000 -eaddr b43ef000
```
* Running the cmd above will dump the memory between [b43ed000,b43ef000).

##Note
* The bin/dumpMemory tool works for Android 5.1.1 (32bit-arm) emulator and didn't test on other android versions or real devices.

repository: nswzzyws/AndroMemDumper

repo_name: nswzzyws/AndroMemDumper


text:
LSB Steganography on non-lossy digital audio formats
====================================================

Inspired by the TV-series: Mr. Robot.

Setup
-----

```bash
virtualenv env
source env/bin/activate
pip install ...TODO
```

Usage
-----

```bash
source env/bin/activate
python lsb_steg_audio.py ...
```

Run tests
---------
```bash
python -m doctest -v lsb_steg_audio.py # work in progress (2015-08)
```

Roadmap
=======

First release
-------------
* LSB distribution on samples, denote the end by xor & nand check digits pair, from the start of the steg'd samples
* From the unsteg'd end of the samples, also create a xor & nand check digits pair. Plausible deniability.
* contiguous distribution on samples, denote the end by xor/nand check digits
* unit test with audio sample

To clarify: xor checkdigits in the middle somewhere, nand at the end to double-confirm, thus hopefully inconspicuously validate the steg'd sample set.

Extras
------
* histogram comparison, i.e. before steg, after steg. (KISS, don't)
* payload compression (nah, KISS)

Experimental
------------
* load frames to GPGPU, collate results, then write collated results to file

Research questions
------------------
* What is the LSB space for audio, for humans even, taking psycho-acoustics into account?! Translation: Store hidden message vertically (scalar), with a magic number upper and lower bound for the real amplitude, i.e. loudness(?).
* What is the optimal distribution of samples to evade aural/visual detection?

  * What is the LSB bit-depth, sample distribution that will optimally take advantage of psycho-acoustics? Hide in the non-audible frequencies, this undermines visual invisibility? Just at the edge will do.
  * Instead of integrally populating all samples, how about hijacking a select number of inaudible samples completely for payload distribution?
  * So if we don't destroy LSB's, how do we denote the end of the payload? Apply check digits (xor, nand?), across the samples or per sample or both?
* How does distribution affect post-compression format conversion? I assume bigger post-compression files.

WAV
---
* wav, skip initial 44 kbytes of metadata (microsoft format)
* Determine LSBW (least significant bit width, apparently WAV is little endian), before people start hearing it, although a histogram could easily reveal it...
* Will provide parameter to adjust LSBW, or even variable bit width, e.g. sinusoidal, harmonics, stochastic by hash?

TIFF
----
* WAV to TIFF conversion

FLAC
----
* WAV to FLAC conversion

Ogg-vorbis
----------
* 100% retention (TODO determine how), wav to ogg == ogg to wav
* invariant to psychoacoustic model?

MP3
---
* 100% retention (TODO determine how), idem
* invariant to psychoacoustic model?

Source:
* [paper #1](http://niels.xtdnet.nl/papers/practical.pdf)


text:
# Custom Widgets on iOS

>  The custom widget API is not final yet. It may change without prior notice!

A Tabris.js widget consists of a [JavaScript API](custom-widgets.md) and a native client side implementation. This document describes how to create the native implementation for a custom widget on the iOS platform.

In order to implement a custom widget you will need to build locally. Follow the [Local Build guide](local-build.md).

### Building upon Cordova infrastructure

To create a Tabris.js custom widget, we make use of the Cordova build system. Therefore we create a Cordova plugin that ties into Tabris.js specific APIs. In fact creating a Tabris.js custom widget does not require touching any of the Cordova specific APIs. All interaction with the JavaScript parts is enabled through Tabris.js specific APIs.

By leveraging the Cordova plugin architecture, we make use of the Cordova build chain and provide a `plugin.xml` in our plugin to customize the build process. Once a plugin is defined it can be consumed by an app via the regular `cordova plugin add <plugin-id/git-url>` shell command or a `<plugin />` entry in the config.xml of an app.

:information_source: A working example of the concepts outlined in this document can be found [here](https://github.com/eclipsesource/tabris-maps).

## Implementing your new widget

>  When implementing and/or overriding a method, check if you need to call `super`!

### Initializers

To develop a new widget that can communicate with the JavaScript side, you create a new class that subclasses `BasicWidget`. `BasicWidget` has two initializers you’ll need to override.

The first initializer is `- (instancetype)initWithObjectId:(NSString *)objectId andClient:(TabrisClient *)client`. It is the designated initializer of all widgets and all other initializers should call it. This initializer should contain all the code that is necessary to run the widget (e.g. create new instance of view) and it should always call its `super`.

The second initializer is `- (instancetype)initWithObjectId:(NSString *)objectId properties:(NSDictionary *)properties andClient:(TabrisClient *)client`. This initializer is called directly by the JavaScript and should always call the aforementioned designated initializer (or some other initializer that calls it). The `properties` parameter contains all of the parameters that were passed by constructor in JavaScript. You should extract and set those after the designated initializer has been executed.

### Required methods

Implementation of the following methods is required:

```objc
+ (NSString *)remoteObjectType;
+ (NSMutableSet *)remoteObjectProperties;
- (UIView *)view;
```

`+ (NSString *)remoteObjectType` must return the unique identifier of the widget. Using reverse domain name notation is advised (e.g. `@“com.mydomain.MyWidget”`). It must return the same value as type declared in JavaScript (e.g. `_type: “com.mydomain.MyWidget”`). This method does not require a `super` call.

`+ (NSMutableSet *)remoteObjectProperties` contains all of the widget’s properties that can be accessed by JavaScript. You have to call `super` of this method first. Afterwards add the names of properties defined by your widget to this set, to expose those to JavaScript.

`- (UIView *)view` returns the actual instance of the iOS native widget. You should have property in your class that will be returned by this method. This method does not require a `super` call.

### Calls from the JavaScript

The JavaScript API can invoke methods on the native widget. To do this, you have to register a selector for the specific JavaScript call. Here is an example:

```objc
- (instancetype)initWithObjectId:(NSString *)aId andClient:(TabrisClient *)tabrisClient {
    self = [super initWithObjectId:aId andClient:tabrisClient];
    if (self) {
    	//Prior initialization
        [self registerSelector:@selector(beep:) forCall:@"beep"];
        //Following initialization
    }
    return self;
}

- (void)beep:(NSDictionary *)parameters {
}
```

If the JavaScript invokes a `beep` method, the call will be forwarded to the native `- (void)beep:(NSDictionary *)parameters` method. Please note that methods you are registering have to accept `NSDictionary` as a parameter. This dictionary contains all of the parameters passed by JavaScript to the native side.

### Events

Events are notifications sent from the native side to JavaScript. In order to add an event to your widget, you only have to declare a public boolean property conforming to this naming pattern: `eventNameListener` (e.g. `longPressListener`). Please note you should not change the value of this property inside of your native code.

```objc
@interface MyWidget : BasicWidget
@property (assign) BOOL myEventListener;
@end

@implementation MyWidget

- (void)someMethod {
	//Method implementation
	if (self.myEventListener) {
  		Message<Notification> *message = [[self notifications] forObject:self];
		[message fireEvent:@"myEvent" withAttributes:@{@"key":@"value", @"otherKey":@"otherValue"}];
	}
}
```

### Registering your widget

You have to execute following instructions after you add a plugin (e.g. `cordova plugin add`) to your project. Locate your Xcode project file (typically located in `platforms/ios/`) and open it.

The final step of this process is adding your new widget to widget registry. To do this edit the `AppDelegate.m` in your project to:

* Import your plugins header file (e.g. `#import "MyWidget.h"`)
* Find the `- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions` method. Inside of this method you have add following line `[self.client addRemoteObject:[MyWidget class]];` along the other calls of `addRemoteObject:` method.

## Swift

In order to develop a Tabris plugin in Swift, you’ll have to open your project in Xcode and adjust couple of things:

* Add a new Swift class to your project. Xcode will ask to create a bridging header (if you don't have one). You have to confirm its creation.
* Go to the bridging header and impor the Tabris headers to this file.
* Go to the `Build Settings` of your project and find `Defines Module` and `Enable Modules (C and Objective-C)`. Set both of them to `Yes`.
* There is a second special header file that bridges Swift to Objective-C. It is automatically generated by Xcode upon build time and is not a part of your projects structure. Therefore, after adding new classes or methods in Swift you need to rebuild the project to make them visible on Objective-C. This is very important because you need to register your widgets in `AppDelegate.m`, which is written in Objective-C. This header file has your projects name and the `-Swift.h` suffix (e.g. `MyProject-Swift.h`). You have to import it in `AppDelegate.m`. After you do this, register your widget as stated previously.

repository: niilante/tabris-js

repo_name: niilante/tabris-js


text:
# Flag Quizz Bot
A simple **quizz discord bot** based on countries and other states flags using the `discord.py` library.

## 📦 Install and Play

* Invite the bot onto your server with this [**link**](https://discord.com/api/oauth2/authorize?client_id=714888550667124766&permissions=116800&scope=bot).

* Start a quizz :
   > &quizz

* Eventually, get some help about the commands :
   > &help

## 🔧 Troubleshoot and Feedbacks
Contact me on discord at `HYOUG#3643` or on twitter [@HY0UG](https://twitter.com/HY0UG).

## 📜 License
[MIT](https://choosealicense.com/licenses/mit/) (2021) License protected project.

repository: HYOUG/FlagQuizz

repo_name: HYOUG/FlagQuizz


text:
---
layout: post
title: "Debugging SignedXml"
description: "Debugging SignedXml"
tags: [SignedXml, .Net]
comments: true
---

This super small post is all about how to enable debug log for the SignedXml class which may help you figure out, for example, what the heck goes wrong when the CheckSignature returns false while it is supposed to return true for a valid signed xml document that you feed to it. All you need to you is to put the configuration section below to the web.config/app.config file of your application:

		<system.diagnostics>
		  <sources>
			<source name="System.Security.Cryptography.Xml.SignedXml" switchName="spSwitch">
			  <listeners>
				<add initializeData="C:tempsignedxml-output.txt" type="System.Diagnostics.TextWriterTraceListener"
					name="myLocalListener" />
			  </listeners>
			</source>
		  </sources>
		  <switches>
			<add name="spSwitch" value="Verbose" />
		  </switches>
		  <trace autoflush="true"/>
		</system.diagnostics>

Hope this helps :)


text:
# Code Smells Datasets SLR

This repository contains the scripts used to filter out initial studies in the SLR "A systematic literature review on the code smells datasets and validation mechanisms".

repository: m-zakeri/CodeSmellsDatasetsSLR

repo_name: m-zakeri/CodeSmellsDatasetsSLR


text:
# Steadfast Color Scheme

An easy-on-the-eyes color scheme for the everyday coder. Soft colors and reasonable contrast make it a great choice in any light.

This color scheme is compatible with [Sublime Text](http://www.sublimetext.com) and [TextMate](http://macromates.com).

![View an Example](https://raw.githubusercontent.com/serogers/steadfast_color_scheme/master/examples/ruby/example2.png)

## Installation

**Via Package Control (Recommended)**

This color scheme is hosted via the [Package Control](https://packagecontrol.io) plugin for Sublime. Once Package Control is installed, open the Package Control window, select "Install Package", and search for "Steadfast".

**Manual Install**

To install manually, download this project, unzip it, and place it inside your Sublime Packages directory. The Packages directory can be located by going to "Preferences" and clicking "Browse Packages...."

## Supported Plugins

Steadfast supports the following Sublime plugins:

* [GitGutter](https://github.com/jisaacks/GitGutter)
* [TrailingSpaces](https://github.com/SublimeText/TrailingSpaces)

## Development

Pull requests are welcome for fixes and improvements!

extension: markdown


text:
# Usage

Use this docker to schedule jobs with JSON calls. jq binary is added to parse result:

```sh
docker run --rm --name curl gintsgints/jq_curl:latest /bin/sh -c 'export TOKEN=`curl -H "Content-Type: application/json" --request POST -d "{\"username\":\"apiuser\",\"password\":\"apipassword\"}" http://<IP_ADDRESS>:3001/api/auth/local | jq -r ".token"`
curl -H "Content-Type: application/json" --request GET http://<IP_ADDRESS>:3001/api/vk"
```