text:
package cloudflare

import (
	"context"
	"encoding/json"
	"net/http"
	"net/url"
	"time"

	"github.com/pkg/errors"
)

// OriginCACertificate represents a Cloudflare-issued certificate.
//
// API reference: https://api.cloudflare.com/#cloudflare-ca
type OriginCACertificate struct {
	ID              string    `json:"id"`
	Certificate     string    `json:"certificate"`
	Hostnames       []string  `json:"hostnames"`
	ExpiresOn       time.Time `json:"expires_on"`
	RequestType     string    `json:"request_type"`
	RequestValidity int       `json:"requested_validity"`
	RevokedAt       time.Time `json:"revoked_at,omitempty"`
	CSR             string    `json:"csr"`
}

// UnmarshalJSON handles custom parsing from an API response to an OriginCACertificate
// http://choly.ca/post/go-json-marshalling/
func (c *OriginCACertificate) UnmarshalJSON(data []byte) error {
	type alias OriginCACertificate

	aux := &struct {
		ExpiresOn string `json:"expires_on"`
		*alias
	}{
		alias: (*alias)(c),
	}

	var err error

	if err = json.Unmarshal(data, &aux); err != nil {
		return err
	}

	// This format comes from time.Time.String() source
	c.ExpiresOn, err = time.Parse("2006-01-02 15:04:05.999999999 -0700 MST", aux.ExpiresOn)

	if err != nil {
		c.ExpiresOn, err = time.Parse(time.RFC3339, aux.ExpiresOn)
	}

	if err != nil {
		return err
	}

	return nil
}

// OriginCACertificateListOptions represents the parameters used to list Cloudflare-issued certificates.
type OriginCACertificateListOptions struct {
	ZoneID string
}

// OriginCACertificateID represents the ID of the revoked certificate from the Revoke Certificate endpoint.
type OriginCACertificateID struct {
	ID string `json:"id"`
}

// originCACertificateResponse represents the response from the Create Certificate and the Certificate Details endpoints.
type originCACertificateResponse struct {
	Response
	Result OriginCACertificate `json:"result"`
}

// originCACertificateResponseList represents the response from the List Certificates endpoint.
type originCACertificateResponseList struct {
	Response
	Result     []OriginCACertificate `json:"result"`
	ResultInfo ResultInfo            `json:"result_info"`
}

// originCACertificateResponseRevoke represents the response from the Revoke Certificate endpoint.
type originCACertificateResponseRevoke struct {
	Response
	Result OriginCACertificateID `json:"result"`
}

// CreateOriginCertificate creates a Cloudflare-signed certificate.
//
// This function requires api.APIUserServiceKey be set to your Certificates API key.
//
// API reference: https://api.cloudflare.com/#cloudflare-ca-create-certificate
func (api *API) CreateOriginCertificate(ctx context.Context, certificate OriginCACertificate) (*OriginCACertificate, error) {
	uri := "/certificates"
	res, err := api.makeRequestWithAuthType(ctx, http.MethodPost, uri, certificate, AuthUserService)

	if err != nil {
		return nil, err
	}

	var originResponse *originCACertificateResponse

	err = json.Unmarshal(res, &originResponse)

	if err != nil {
		return nil, errors.Wrap(err, errUnmarshalError)
	}

	if !originResponse.Success {
		return nil, errors.New(errRequestNotSuccessful)
	}

	return &originResponse.Result, nil
}

// OriginCertificates lists all Cloudflare-issued certificates.
//
// This function requires api.APIUserServiceKey be set to your Certificates API key.
//
// API reference: https://api.cloudflare.com/#cloudflare-ca-list-certificates
func (api *API) OriginCertificates(ctx context.Context, options OriginCACertificateListOptions) ([]OriginCACertificate, error) {
	v := url.Values{}
	if options.ZoneID != "" {
		v.Set("zone_id", options.ZoneID)
	}
	uri := "/certificates" + "?" + v.Encode()
	res, err := api.makeRequestWithAuthType(ctx, http.MethodGet, uri, nil, AuthUserService)

	if err != nil {
		return nil, err
	}

	var originResponse *originCACertificateResponseList

	err = json.Unmarshal(res, &originResponse)

	if err != nil {
		return nil, errors.Wrap(err, errUnmarshalError)
	}

	if !originResponse.Success {
		return nil, errors.New(errRequestNotSuccessful)
	}

	return originResponse.Result, nil
}

// OriginCertificate returns the details for a Cloudflare-issued certificate.
//
// This function requires api.APIUserServiceKey be set to your Certificates API key.
//
// API reference: https://api.cloudflare.com/#cloudflare-ca-certificate-details
func (api *API) OriginCertificate(ctx context.Context, certificateID string) (*OriginCACertificate, error) {
	uri := "/certificates/" + certificateID
	res, err := api.makeRequestWithAuthType(ctx, http.MethodGet, uri, nil, AuthUserService)

	if err != nil {
		return nil, err
	}

	var originResponse *originCACertificateResponse

	err = json.Unmarshal(res, &originResponse)

	if err != nil {
		return nil, errors.Wrap(err, errUnmarshalError)
	}

	if !originResponse.Success {
		return nil, errors.New(errRequestNotSuccessful)
	}

	return &originResponse.Result, nil
}

// RevokeOriginCertificate revokes a created certificate for a zone.
//
// This function requires api.APIUserServiceKey be set to your Certificates API key.
//
// API reference: https://api.cloudflare.com/#cloudflare-ca-revoke-certificate
func (api *API) RevokeOriginCertificate(ctx context.Context, certificateID string) (*OriginCACertificateID, error) {
	uri := "/certificates/" + certificateID
	res, err := api.makeRequestWithAuthType(ctx, http.MethodDelete, uri, nil, AuthUserService)

	if err != nil {
		return nil, err
	}

	var originResponse *originCACertificateResponseRevoke

	err = json.Unmarshal(res, &originResponse)

	if err != nil {
		return nil, errors.Wrap(err, errUnmarshalError)
	}

	if !originResponse.Success {
		return nil, errors.New(errRequestNotSuccessful)
	}

	return &originResponse.Result, nil

}


text:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"

output_style = :compressed
line_comments = false
preferred_syntax = :sass

redpajama_set_name: RedPajamaGithub


text:
		Vasileios Boukonis

web, codes and coffee

  	{% include navigation.html %}


text:
This python code can be used to benchmark or evaluate GWAS algorithms.

If you use this code, please cite:

* C. Widmer, C. Lippert, O. Weissbrod, N. Fusi, C. Kadie, R. Davidson, J. Listgarten, and D. Heckerman, Further Improvements to Linear Mixed Models for Genome-Wide Association Studies, _Scientific Reports_ **4**, 6874, Nov 2014 (doi:10.1038/srep06874).

See this website for related software:
http://research.microsoft.com/en-us/um/redmond/projects/MSCompBio/

Our documentation (including live examples) is available as ipython notebook:
https://github.com/MicrosoftGenomics/GWAS_benchmark/blob/master/GWAS_benchmark/simulation.ipynb

(To start ipython notebook locally, type `ipython notebook` at the command line.)

This code contains the following modules:

* semisynth_experiments: the core module for generating synthetic phenotypes based on real snps, running different methods for GWAS and evaluating them all within one pipeline

* cluster_data: module to compute and visualize a hierarchical clustering of GWAS data to get an understanding of its structure (population structure, family structure)

* split_data_helper: helper module for splitting SNPs by chromosome

For testing purposes a small data set is provided at `data/mouse` (see the `README` file within that directory for the data license).

An example run to compute type I error rate on the mouse data using 10 causal SNPs can be executed by running `python run_simulation.py`.

We recommend running this example on a cluster computer as this simulation is computationally demanding. An example result plot (of type I error) is provided in the results directory.

Further, we use the ipython-notebook to demonstrate some of the functionality of the hierarchical clustering module:
http://nbviewer.ipython.org/github/MicrosoftGenomics/GWAS_benchmark/blob/master/GWAS_benchmark/simulation.ipynb

### Quick install:

If you have pip installed, installation is as easy as:

```
pip install GWAS_benchmark
```

### Detailed Package Install Instructions:

fastlmm has the following dependencies:

python 2.7

Packages:

* numpy
* scipy
* matplotlib
* pandas
* scikit.learn (sklearn)
* fastcluster
* fastlmm
* pysnptools
* optional: [statsmodels -- install only required for logistic-based tests, not the standard linear LRT]

#### (1) Installation of dependent packages

We highly recommend using a python distribution such as
Anaconda (https://store.continuum.io/cshop/anaconda/)
or Enthought (https://www.enthought.com/products/epd/free/).
Both these distributions can be used on linux and Windows, are free
for non-commercial use, and optionally include an MKL-compiled distribution
for optimal speed. This is the easiest way to get all the required package
dependencies.

#### (2) Installing from source

Go to the directory where you copied the source code for fastlmm.

On linux:

At the shell, type:
```
sudo python setup.py install
```

On Windows:

At the OS command prompt, type
```
python setup.py install
```

### For developers (and also to run regression tests)

When working on the developer version, just set your PYTHONPATH to point to the directory
above the one named GWAS_benchmark in the source code. For e.g. if GWAS_benchmark is
in the [somedir] directory, then in the unix shell use:
```
export PYTHONPATH=$PYTHONPATH:[somedir]
```
Or in the Windows DOS terminal, one can use:
```
set PYTHONPATH=%PYTHONPATH%;[somedir]
```
(or use the Windows GUI for env variables).

#### Running regression tests

From the directory tests at the top level, run:
```
python test.py
```
This will run a
series of regression tests, reporting "." for each one that passes, "F" for each
one that does not match up, and "E" for any which produce a run-time error. After
they have all run, you should see the string "............" indicating that they
all passed, or if they did not, something such as "....F...E......", after which
you can see the specific errors.

Note that you must set your PYTHONPATH as described above to run the
regression tests, and not "python setup.py install".


text:
<!DOCTYPE html>

  <title>SIUE Chemistry Department</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta charset="UTF-8">
  <meta name="description" content="Chemistry at SIUE">
  <meta name="keywords" content="Chemistry,SIUE">
  <meta name="author" content="Team Porky">
  <link rel="stylesheet" href="contact.css">

The Department of Chemistry offices are located in Science West room 3105.

        Department of Chemistry

        Science Building West, Box - 1652

        Southern Illinois University Edwardsville

        Edwardsville, Illinois - 62026-1652

        Tel - (618)-650-2042

        Fax - (618)-650-3556

        Email - Dr. Leah O'Brien

<--Floor Two


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jam.eccezioni;

/**
 *
 * @author tosco
 */
public class JAMIOException extends JAMException {

    public JAMIOException(Throwable cause) {
        super(cause);
    }

    public JAMIOException() {
        super();
    }

    public JAMIOException(String message) {
        super(message);
    }
}


text:
class CreateProposals < ActiveRecord::Migration
  def change
    create_table :proposals do |t|
      t.string :status, default: "open"
      t.string :proposed_idea
      t.uuid :participation_id

      t.timestamps null: false
    end
    add_foreign_key :proposals, :participations
  end
end


text:
.. index::
   single: Channels

Channels
========

In the modern world of e-commerce your website is no longer the only point of sale for your goods.

**Channel** model represents a single sales channel, which can be one of the following things:

* Webstore
* Mobile application
* Cashier in your physical store

Or pretty much any other channel type you can imagine.

**What may differ between channels?** Particularly anything from your shop configuration: - products, - currencies, - locales (language), - themes.
In order to make the system more convenient for the administrator - there is just one, shared admin panel. Also users are shared among the channels.

.. tip::

   In the dev environment you can easily check what channel you are currently on in the Symfony debug toolbar.

   .. image:: ../_images/channel_toolbar.png
         :align: center

**How to get the current channel?**

You can get the current channel from the channel context.

.. code-block:: php

   $channel = $this->container->get('sylius.context.channel')->getChannel();

.. note::

   The channel is by default determined basing on the hostname, but you can customize that behaviour.
   To do that you have to implement the ``Sylius\Component\Channel\Context\ChannelContextInterface``
   and register it as a service under the ``sylius.context.channel`` tag. Optionally you can add a ``priority="-64"``
   since the default ChannelContext has a ``priority="-128"``, and by default a ``priority="0"`` is assigned.

.. note::

   Moreover if the channel depends mainly on the request you can implement the ``Sylius\Component\Channel\Context\RequestBased\RequestResolverInterface``
   with its ``findChannel(Request $request)`` method and register it under the ``sylius.context.channel.request_based.resolver`` tag.

Learn more
----------

* :doc:`Channel - Component Documentation </components/Channel/index>`.


text:
/* detect.cc
 *
 * Author: Aaron Conrad
 * Last modified: Sept. 16, 2016
 */

#include "detect.hh"

namespace elcano
{
	cv::Mat convertToEdgeMap(cv::Mat input, int lowThresh, int highThresh, int apertureSize) {
		cv::Mat result;
		cv::cvtColor(input, result, CV_BGR2GRAY);
		//Reduce noise with a 3x3 kernel
		cv::blur(result, result, cv::Size(3, 3));
		//Detect edges
		cv::Canny(result, result, lowThresh, highThresh, apertureSize);
		return result;
	}

	/* colorType 0 is RGB; colorType 1 is BGR */
	cv::Mat filterByColor(cv::Mat input, int thresholds[], int colorType) {
		cv::Mat result;

		if (colorType == 0) {
			cv::cvtColor(input, result, cv::COLOR_RGB2HSV);
		}
		else if (colorType == 1) {
			cv::cvtColor(input, result, cv::COLOR_BGR2HSV);
		}
		cv::inRange(result, cv::Scalar(thresholds[0], thresholds[2], thresholds[4]), cv::Scalar(thresholds[1], thresholds[3], thresholds[5]), result);

		//morphological closing (fill small holes in the foreground)
		cv::erode(result, result, cv::getStructuringElement(cv::MORPH_ELLIPSE, cv::Size(5, 5)));
		cv::dilate(result, result, cv::getStructuringElement(cv::MORPH_ELLIPSE, cv::Size(5, 5)));

		return result;
	}

	cv::Point templateMatch(cv::Mat image, cv::Mat target, int matchMethod, double &value) {
		double minVal; double maxVal; cv::Point minLoc; cv::Point maxLoc;
		cv::Point matchLoc;
		cv::Mat result;
		int resultCols = image.cols - target.cols + 1;
		int resultRows = image.rows - target.rows + 1;

		result.create(resultRows, resultCols, CV_32FC1);

		cv::matchTemplate(image, target, result, matchMethod);
		//normalize(result, result, 0, 1, NORM_MINMAX, -1, Mat());
		cv::minMaxLoc(result, &minVal, &maxVal, &minLoc, &maxLoc, cv::Mat());

		//cv::imshow("TemplateMatch", result);

		/// For SQDIFF and SQDIFF_NORMED, the best matches are lower values. For all the other methods, the higher the better
		if (matchMethod == cv::TM_SQDIFF || matchMethod == cv::TM_SQDIFF_NORMED) {
			matchLoc = minLoc;
			value = minVal;
		}
		else {
			matchLoc = maxLoc;
			value = maxVal;
		}

		return matchLoc;
	}
}


text:
BASE_PATH=`pwd`

set -e -x

gunzip -k kurmaos-disk-image/kurmaos-disk.img.gz
qemu-img convert -f raw kurmaos-disk-image/kurmaos-disk.img -O vmdk -o adapter_type=ide kurmaos.vmdk

# remove intermediate files to speed up concourse post-build ops
rm kurmaos-disk-image/kurmaos-disk.img

kurmaos-source/packaging/lib/virtualbox_ovf.sh \
    --vm_name KurmaOS \
    --disk_vmdk kurmaos.vmdk \
    --memory_size 1024 \
    --output_ovf kurmaos.ovf

cp kurmaos-source/LICENSE .
zip kurmaos.zip LICENSE kurmaos.ovf kurmaos.vmdk


text:
[kakao](../../../index.md) / [com.agoda.kakao](../../index.md) / [WebElementBuilder](../index.md) / [KWebInteraction](index.md) / [web](./web.md)

# web

`val web: WebInteraction<*>`

Overrides [WebActions.web](../../-web-actions/web.md)

Overrides [WebAssertions.web](../../-web-assertions/web.md)


text:
interface ilog {
  readonly level: number;
  readonly levels: string[];
  (message?: any, ...optionalParams: any[]): void;
  log(message?: any, ...optionalParams: any[]): void;
  setLevel(level: string | number): void;
  emerg(error?: any): void;
  alert(error?: any): void;
  crit(error?: any): void;
  err(error?: any): void;
  error(error?: any): void;
  warning(error?: any): void;
  notice(message: any): void;
  info(message: any): void;
  debug(message: any, ...optionalParams: any[]): void;
  auto(message: any, ...optionalParams: any[]): void;
  _time(time: Date): string;
  _stringify(obj: any): string;
  _assembleLog(log: string, level: string, time: string): string;
}

declare function ilog (message?: any, ...optionalParams: any[]): void;
declare namespace ilog {
  export const ilog: ilog;
}

export = ilog;


text:
/**
 * Instantiates, sets up and exposes the Potassium (K) object.
 *
 * @param {object} root The host root element.
 */
(function (root) {

    "use strict";

    /**
     * Where the magic happens.
     *
     * Creates the Potassium (K) object trough an IIFE and using the revealing pattern.
     *
     * @param {bool} TRUE A pure boolean true value. Minimization helper.
     * @param {bool} FALSE A pure boolean false value. Minimization helper.
     * @param {null} NULL A pure null value. Minimization helper.
     * @param {undefined} UNDEFINED A pure undefined value. Minimization helper. DO NOT FUCKING USE.
     * @return {object} The Potassium (K) API.
     */
    var K = (function (TRUE, FALSE, NULL, UNDEFINED) {

        /**
         * The Potassium (K) instance holder.
         *
         * @private
         * @type {object}
         */
        var that;

        /**
         * A shortcut to Object.prototype cached for minification reasons.
         *
         * @private
         * @type {object}
         */
        var objectPrototype = Object.prototype;

        /**
         * Whether the Potassium (K) object is already instanced or not.
         *
         * False by default, it'll be changed during the object instantiation.
         * This control will prevent the Potassium (K) object to be (re)instanced multiple times.
         *
         * @private
         * @type {bool}
         */
        var isConstructed = FALSE;

        /**
         * Constructor (sort of)
         *
         * Updates the pointer to the (internally) shared Potassium (K) instance.
         * Don't get it? Look right below the end of the main Potassium (K) IIFE.
         *
         * @return {object} The Potassium (K) instance, so to enable fluent interfaces.
         */
        function construct() {
            if (!isConstructed) {
                that = this;
                isConstructed = TRUE;
            }
            return that;
        }

        /**
         * Safe shortcut to Object.prototype.hasOwnProperty.
         *
         * @param {object} object The object to inspect.
         * @param {string} property The property to check.
         * @return {bool} Whether the property given is an own property of the object.
         */
        function hop(object, property) {
            return objectPrototype.hasOwnProperty.call(object, property);
        }

        /**
         * Checks whether a value is empty.
         *
         * A string and an array can be empty only if their length property is equal to zero.
         * An object is empty only if it has no own members to explore.
         * Undefined and null values are empty by default.
         *
         * @param {mixed} value The value to inspect.
         * @return {bool} Whether the value is empty.
         */
        function isEmpty(value) {
            var member;
            if (isNull(value) || isUndefined(value) || (typeOf(value) in { "Array": 1, "String": 1 } && 0 === value.length)) {
                return TRUE;
            }
            if ("Object" === typeOf(value)) {
                for (member in value) {
                    if (hop(value, member) && pie(value, member)) {
                        return FALSE;
                    }
                }
                return TRUE;
            }
            return FALSE;
        }

        /**
         * Checks whether a value is null.
         *
         * @param {mixed} value The value to inspect.
         * @return {bool} Whether the value is null.
         */
        function isNull(value) {
            return NULL === value;
        }

        /**
         * Checks whether a value is undefined.
         *
         * @param {mixed} value The value to inspect.
         * @return {bool} Whether the value is undefined.
         */
        function isUndefined(value) {
            return UNDEFINED === value;
        }

        /**
         * Creates a new namespace under the Potassium (K) namespace.
         *
         * If no initialization is given an empty object will be used.
         *
         * Example usage:
         *
         * The following will create K.Foo.Bar and will initialize it to {} :
         *
         *     K.namespace("Foo.Bar");
         *
         * The following will create K.Foo.Bar and will initialize it to "baz" :
         *
         *     K.namespace("K.Foo.Bar", "baz");
         *
         *     As you can see, the "K" namespace can be omitted, it'll be skipped internally anyway.
         *
         * A more complex example; the fluent interface can be handy in many ways:
         *
         *     K.namespace("Foo", {
         *         "bar": "baz",
         *         "orly": 1,
         *         "yrly": function () {
         *             return "cool";
         *         }
         *     }).namespace("Apple", (function () {
         *         var fruit;
         *         function pear() {
         *             fruit = "pear";
         *         }
         *         return {
         *             "isModule": true,
         *             "isRevealing": true,
         *             "pear": pear
         *         };
         *     }()));
         *
         *     The above will instantiate two namespaces: K.Foo and K.Apple and each of them will be initialized.
         *
         * @param {string} chain The namespace to initialize.
         * @param {mixed} initialization What will be used to initialize the namespace. Optional.
         * @return {object} The Potassium (K) instance so to enable fluent interfaces.
         */
        function namespace(chain, initialization) {
            var links,
                link,
                last,
                base = that;
            initialization = initialization || {};
            chain = (chain || "").split(".");
            for (link = "K" === chain[0] ? 1 : 0, links = chain.length, last = links - 1; link < links; link += 1) {
                base[chain[link]] = base[chain[link]] || link === last ? initialization : {};
                base = base[chain[link]];
            }
            return that;
        }

        /**
         * A noop. Nuff said.
         */
        function noop() {
            // Nothing here.
        }

        /**
         * Safe shortcut to Object.prototype.propertyIsEnumerable.
         *
         * @param {object} object The object to inspect.
         * @param {string} property The property to check.
         * @return {bool} Whether the given property of the object is enumerable.
         */
        function pie(object, property) {
            return objectPrototype.propertyIsEnumerable.call(object, property);
        }

        /**
         * A 'real' typeof operator alternative that doesn't suck that much.
         *
         * @param {mixed} value The value to inspect.
         * @return {string} The type of the inspected value.
         */
        function typeOf(value) {
            return objectPrototype.toString.call(value).slice(8, -1);
        }

        /**
         * Exposes the public API.
         *
         * @type {object}
         */
        return {
            "construct": construct,
            "hop": hop,
            "isEmpty": isEmpty,
            "isNull": isNull,
            "isUndefined": isUndefined,
            "namespace": namespace,
            "noop": noop,
            "pie": pie,
            "typeOf": typeOf
        };

    }(true, false, null)); // No undefined value ...you get it?

    // Sets up the internal 'this'.
    K.construct();

    // Attaches the inner Potassium (K) instance to the root element.
    root.K = K;

}(this));