text:
<!-- This file is machine generated: DO NOT EDIT! -->

# Layers (contrib)
[TOC]

Ops for building neural network layers, regularizers, summaries, etc.

## Higher level ops for building neural network layers.

This package provides several ops that take care of creating variables that are
used internally in a consistent way and provide the building blocks for many
common machine learning algorithms.

- - -

### `tf.contrib.layers.convolution2d(*args, **kwargs)` {#convolution2d}

Adds a 2D convolution followed by an optional batch_norm layer.

`convolution2d` creates a variable called `weights`, representing the
convolutional kernel, that is convolved with the `inputs` to produce a
`Tensor` of activations. If a `normalizer_fn` is provided (such as
`batch_norm`), it is then applied. Otherwise, if `normalizer_fn` is
None and a `biases_initializer` is provided then a `biases` variable would be
created and added the activations. Finally, if `activation_fn` is not `None`,
it is applied to the activations as well.

##### Args:

*  <b>`inputs`</b>: a 4-D tensor  `[batch_size, height, width, channels]`.
*  <b>`num_outputs`</b>: integer, the number of output filters.
*  <b>`kernel_size`</b>: a list of length 2 `[kernel_height, kernel_width]` of
    of the filters. Can be an int if both values are the same.
*  <b>`stride`</b>: a list of length 2 `[stride_height, stride_width]`.
    Can be an int if both strides are the same. Note that presently
    both strides must have the same value.
*  <b>`padding`</b>: one of `VALID` or `SAME`.
*  <b>`activation_fn`</b>: activation function.
*  <b>`normalizer_fn`</b>: normalization function to use instead of `biases`. If
    `normalize_fn` is provided then `biases_initializer` and
    `biases_regularizer` are ignored and `biases` are not created nor added.
*  <b>`normalizer_params`</b>: normalization function parameters.
*  <b>`weights_initializer`</b>: An initializer for the weights.
*  <b>`weights_regularizer`</b>: Optional regularizer for the weights.
*  <b>`biases_initializer`</b>: An initializer for the biases. If None skip biases.
*  <b>`biases_regularizer`</b>: Optional regularizer for the biases.
*  <b>`reuse`</b>: whether or not the layer and its variables should be reused. To be
    able to reuse the layer scope must be given.
*  <b>`variables_collections`</b>: optional list of collections for all the variables or
    a dictionay containing a different list of collection per variable.
*  <b>`outputs_collections`</b>: collection to add the outputs.
*  <b>`scope`</b>: Optional scope for `variable_op_scope`.

##### Returns:

  a tensor representing the output of the operation.

- - -

### `tf.contrib.layers.fully_connected(*args, **kwargs)` {#fully_connected}

Adds a fully connected layer.

`fully_connected` creates a variable called `weights`, representing a fully
connected weight matrix, which is multiplied by the `inputs` to produce a
`Tensor` of hidden units. If a `normalizer_fn` is provided (such as
`batch_norm`), it is then applied. Otherwise, if `normalizer_fn` is
None and a `biases_initializer` is provided then a `biases` variable would be
created and added the hidden units. Finally, if `activation_fn` is not `None`,
it is applied to the hidden units as well.

Note: that if `inputs` have a rank greater than 2, then `inputs` is flattened
prior to the initial matrix multiply by `weights`.

##### Args:

*  <b>`inputs`</b>: A tensor of with at least rank 2 and value for the last dimension,
    i.e. `[batch_size, depth]`, `[None, None, None, channels]`.
*  <b>`num_outputs`</b>: Integer, the number of output units in the layer.
*  <b>`activation_fn`</b>: activation function.
*  <b>`normalizer_fn`</b>: normalization function to use instead of `biases`. If
    `normalize_fn` is provided then `biases_initializer` and
    `biases_regularizer` are ignored and `biases` are not created nor added.
*  <b>`normalizer_params`</b>: normalization function parameters.
*  <b>`weights_initializer`</b>: An initializer for the weights.
*  <b>`weights_regularizer`</b>: Optional regularizer for the weights.
*  <b>`biases_initializer`</b>: An initializer for the biases. If None skip biases.
*  <b>`biases_regularizer`</b>: Optional regularizer for the biases.
*  <b>`reuse`</b>: whether or not the layer and its variables should be reused. To be
    able to reuse the layer scope must be given.
*  <b>`variables_collections`</b>: Optional list of collections for all the variables or
    a dictionay containing a different list of collection per variable.
*  <b>`outputs_collections`</b>: collection to add the outputs.
*  <b>`scope`</b>: Optional scope for variable_op_scope.

##### Returns:

   the tensor variable representing the result of the series of operations.

##### Raises:

*  <b>`ValueError`</b>: if x has rank less than 2 or if its last dimension is not set.

Aliases for fully_connected which set a default activation function are
available: `relu`, `relu6` and `linear`.

## Regularizers

Regularization can help prevent overfitting. These have the signature
`fn(weights)`. The loss is typically added to `tf.GraphKeys.REGULARIZATION_LOSS`

- - -

### `tf.contrib.layers.apply_regularization(regularizer, weights_list=None)` {#apply_regularization}

Returns the summed penalty by applying `regularizer` to the `weights_list`.

Adding a regularization penalty over the layer weights and embedding weights
can help prevent overfitting the training data. Regularization over layer
biases is less common/useful, but assuming proper data preprocessing/mean
subtraction, it usually shouldn't hurt much either.

##### Args:

*  <b>`regularizer`</b>: A function that takes a single `Tensor` argument and returns
    a scalar `Tensor` output.
*  <b>`weights_list`</b>: List of weights `Tensors` or `Variables` to apply
    `regularizer` over. Defaults to the `GraphKeys.WEIGHTS` collection if
    `None`.

##### Returns:

  A scalar representing the overall regularization penalty.

##### Raises:

*  <b>`ValueError`</b>: If `regularizer` does not return a scalar output.

- - -

### `tf.contrib.layers.l1_regularizer(scale)` {#l1_regularizer}

Returns a function that can be used to apply L1 regularization to weights.

L1 regularization encourages sparsity.

##### Args:

*  <b>`scale`</b>: A scalar multiplier `Tensor`. 0.0 disables the regularizer.

##### Returns:

  A function with signature `l1(weights, name=None)` that apply L1
  regularization.

##### Raises:

*  <b>`ValueError`</b>: If scale is outside of the range [0.0, 1.0] or if scale is not a
  float.

- - -

### `tf.contrib.layers.l2_regularizer(scale)` {#l2_regularizer}

Returns a function that can be used to apply L2 regularization to weights.

Small values of L2 can help prevent overfitting the training data.

##### Args:

*  <b>`scale`</b>: A scalar multiplier `Tensor`. 0.0 disables the regularizer.

##### Returns:

  A function with signature `l2(weights, name=None)` that applies L2
  regularization.

##### Raises:

*  <b>`ValueError`</b>: If scale is outside of the range [0.0, 1.0] or if scale is not a
  float.

- - -

### `tf.contrib.layers.sum_regularizer(regularizer_list)` {#sum_regularizer}

Returns a function that applies the sum of multiple regularizers.

##### Args:

*  <b>`regularizer_list`</b>: A list of regularizers to apply.

##### Returns:

  A function with signature `sum_reg(weights, name=None)` that applies the
  sum of all the input regularizers.

## Initializers

Initializers are used to initialize variables with sensible values given their
size, data type, and purpose.

- - -

### `tf.contrib.layers.xavier_initializer(uniform=True, seed=None, dtype=tf.float32)` {#xavier_initializer}

Returns an initializer performing "Xavier" initialization for weights.

This function implements the weight initialization from:

Xavier Glorot and Yoshua Bengio (2010):
         Understanding the difficulty of training deep feedforward neural
         networks. International conference on artificial intelligence and
         statistics.

This initializer is designed to keep the scale of the gradients roughly the
same in all layers. In uniform distribution this ends up being the range:
`x = sqrt(6. / (in + out)); [-x, x]` and for normal distribution a standard
deviation of `sqrt(3. / (in + out))` is used.

##### Args:

*  <b>`uniform`</b>: Whether to use uniform or normal distributed random initialization.
*  <b>`seed`</b>: A Python integer. Used to create random seeds. See
    [`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
    for behavior.
*  <b>`dtype`</b>: The data type. Only floating point types are supported.

##### Returns:

  An initializer for a weight matrix.

- - -

### `tf.contrib.layers.xavier_initializer_conv2d(uniform=True, seed=None, dtype=tf.float32)` {#xavier_initializer_conv2d}

Returns an initializer performing "Xavier" initialization for weights.

This function implements the weight initialization from:

Xavier Glorot and Yoshua Bengio (2010):
         Understanding the difficulty of training deep feedforward neural
         networks. International conference on artificial intelligence and
         statistics.

This initializer is designed to keep the scale of the gradients roughly the
same in all layers. In uniform distribution this ends up being the range:
`x = sqrt(6. / (in + out)); [-x, x]` and for normal distribution a standard
deviation of `sqrt(3. / (in + out))` is used.

##### Args:

*  <b>`uniform`</b>: Whether to use uniform or normal distributed random initialization.
*  <b>`seed`</b>: A Python integer. Used to create random seeds. See
    [`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
    for behavior.
*  <b>`dtype`</b>: The data type. Only floating point types are supported.

##### Returns:

  An initializer for a weight matrix.

- - -

### `tf.contrib.layers.variance_scaling_initializer(factor=2.0, mode='FAN_IN', uniform=False, seed=None, dtype=tf.float32)` {#variance_scaling_initializer}

Returns an initializer that generates tensors without scaling variance.

When initializing a deep network, it is in principle advantageous to keep
the scale of the input variance constant, so it does not explode or diminish
by reaching the final layer. This initializer use the following formula:
  if mode='FAN_IN': # Count only number of input connections.
    n = fan_in
  elif mode='FAN_OUT': # Count only number of output connections.
    n = fan_out
  elif mode='FAN_AVG': # Average number of inputs and output connections.
    n = (fan_in + fan_out)/2.0

    truncated_normal(shape, 0.0, stddev=sqrt(factor / n))

To get http://arxiv.org/pdf/1502.01852v1.pdf use (Default):
  - factor=2.0 mode='FAN_IN' uniform=False
To get http://arxiv.org/abs/1408.5093 use:
  - factor=1.0 mode='FAN_IN' uniform=True
To get http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf use:
  - factor=1.0 mode='FAN_AVG' uniform=True.
To get xavier_initializer use either:
  - factor=1.0 mode='FAN_AVG' uniform=True.
  - factor=1.0 mode='FAN_AVG' uniform=False.

##### Args:

*  <b>`factor`</b>: Float.  A multiplicative factor.
*  <b>`mode`</b>: String.  'FAN_IN', 'FAN_OUT', 'FAN_AVG'.
*  <b>`uniform`</b>: Whether to use uniform or normal distributed random initialization.
*  <b>`seed`</b>: A Python integer. Used to create random seeds. See
    [`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
    for behavior.
*  <b>`dtype`</b>: The data type. Only floating point types are supported.

##### Returns:

  An initializer that generates tensors with unit variance.

##### Raises:

*  <b>`ValueError`</b>: if `dtype` is not a floating point type.
*  <b>`TypeError`</b>: if `mode` is not in ['FAN_IN', 'FAN_OUT', 'FAN_AVG'].

## Optimization

Optimize weights given a loss.

- - -

### `tf.contrib.layers.optimize_loss(loss, global_step, learning_rate, optimizer, gradient_noise_scale=None, gradient_multipliers=None, clip_gradients=None, moving_average_decay=0.9, learning_rate_decay_fn=None, variables=None, name=None)` {#optimize_loss}

Given loss and parameters for optimizer, returns a training op.

##### Args:

*  <b>`loss`</b>: Tensor, 0 dimensional.
*  <b>`global_step`</b>: Tensor, step counter for each update.
*  <b>`learning_rate`</b>: float or Tensor, magnitude of update per each training step.
*  <b>`optimizer`</b>: string, class or optimizer instance, used as trainer.
             string should be name of optimizer, like 'SGD',
               'Adam', 'Adagrad'. Full list in OPTIMIZER_CLS_NAMES constant.
             class should be sub-class of tf.Optimizer that implements
               `compute_gradients` and `apply_gradients` functions.
             optimizer instance should be instantion of tf.Optimizer sub-class
               and have `compute_gradients` and `apply_gradients` functions.
*  <b>`gradient_noise_scale`</b>: float or None, adds 0-mean normal noise scaled by this
                        value.
*  <b>`gradient_multipliers`</b>: dict of variables or variable names to floats.
                        If present, gradients for specified
                        variables will be multiplied by given constant.
*  <b>`clip_gradients`</b>: float or `None`, clips gradients by this value.
*  <b>`moving_average_decay`</b>: float or None, takes into account previous loss
                        to make learning smoother due to outliers.
*  <b>`learning_rate_decay_fn`</b>: function, takes `learning_rate` and `global_step`
                          `Tensor`s, returns `Tensor`.
                          Can be used to implement any learning rate decay
                          functions.
                          For example: tf.train.exponential_decay.
*  <b>`variables`</b>: list of variables to optimize or
             `None` to use all trainable variables.
*  <b>`name`</b>: The name for this operation is used to scope operations and summaries.

##### Returns:

  Training op.

##### Raises:

*  <b>`ValueError`</b>: if optimizer is wrong type.

## Summaries

Helper functions to summarize specific variables or ops.

- - -

### `tf.contrib.layers.summarize_activation(op)` {#summarize_activation}

Summarize an activation.

This applies the given activation and adds useful summaries specific to the
activation.

##### Args:

*  <b>`op`</b>: The tensor to summarize (assumed to be a layer activation).

##### Returns:

  The summary op created to summarize `op`.

- - -

### `tf.contrib.layers.summarize_tensor(tensor, tag=None)` {#summarize_tensor}

Summarize a tensor using a suitable summary type.

This function adds a summary op for `tensor`. The type of summary depends on
the shape of `tensor`. For scalars, a `scalar_summary` is created, for all
other tensors, `histogram_summary` is used.

##### Args:

*  <b>`tensor`</b>: The tensor to summarize
*  <b>`tag`</b>: The tag to use, if None then use tensor's op's name.

##### Returns:

  The summary op created or None for string tensors.

- - -

### `tf.contrib.layers.summarize_tensors(tensors, summarizer=summarize_tensor)` {#summarize_tensors}

Summarize a set of tensors.

- - -

### `tf.contrib.layers.summarize_collection(collection, name_filter=None, summarizer=summarize_tensor)` {#summarize_collection}

Summarize a graph collection of tensors, possibly filtered by name.

The layers module defines convenience functions `summarize_variables`,
`summarize_weights` and `summarize_biases`, which set the `collection` argument
of `summarize_collection` to `VARIABLES`, `WEIGHTS` and `BIASES`, respectively.

- - -

### `tf.contrib.layers.summarize_activations(name_filter=None, summarizer=summarize_activation)` {#summarize_activations}

Summarize activations, using `summarize_activation` to summarize.


text:
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then
    vendor/bin/test-reporter --stdout > codeclimate.json
    curl -X POST -d @codeclimate.json -H "Content-Type: application/json" -H "User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)" https://codeclimate.com/test_reports
fi;

redpajama_set_name: RedPajamaGithub


text:
var mediaPlugins = "";

if (mediaPickerEnabled) {
    mediaPlugins += " mediapicker";
}

if (mediaLibraryEnabled) {
    mediaPlugins += " medialibrary";
}

tinyMCE.init({
    selector: "textarea.tinymce",
    theme: "modern",
    schema: "html5",
    plugins: [
        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
        "searchreplace wordcount visualblocks visualchars code fullscreen",
        "insertdatetime media nonbreaking table contextmenu directionality",
        "emoticons template paste textcolor colorpicker textpattern",
        "fullscreen autoresize" + mediaPlugins
    ],
    toolbar: "undo redo cut copy paste | bold italic | bullist numlist outdent indent formatselect | alignleft aligncenter alignright alignjustify ltr rtl | " + mediaPlugins + " link unlink charmap | code fullscreen",
    convert_urls: false,
    valid_elements: "*[*]",
    // Shouldn't be needed due to the valid_elements setting, but TinyMCE would strip script.src without it.
    extended_valid_elements: "script[type|defer|src|language]",
    //menubar: false,
    //statusbar: false,
    skin: "orchardlightgray",
    language: language,
    auto_focus: autofocus,
    directionality: directionality,
    setup: function (editor) {
        $(document).bind("localization.ui.directionalitychanged", function(event, directionality) {
            editor.getBody().dir = directionality;
        });
    }
});


text:
from collections import defaultdict
from utility import to_words, from_words
from utility import expand_sided_value, collapse_sided_value

class StylesContainer(dict):

  # e. g. 'border', 'padding', etc.
  prefix = None

  # names that are available within prefix,
  # e. g. 'color' (full name 'border-color').
  subnames = []

  # default values for properties
  defaults = {}

  def __init__(self, something = None, **kwargs):
    self.node = None
    if isinstance(something, dict):
      super(StylesContainer, self).__init__(something, **kwargs)
    else:
      super(StylesContainer, self).__init__(**kwargs)
      if something is not None:
        self.set_to_value(something)

  def apply_to(self, node):
    self.node = node
    for subitem in self.values():
      if isinstance(subitem, StylesContainer):
        subitem.apply_to(node)

  def __str__(self):
    try:
      as_value = self.get_as_value()
      if as_value == self:
        return repr(self)
      return str(as_value)
    except (NotImplementedError, ValueError):
      return repr(self)

  def __repr__(self):
    return '%s(%s)' % (type(self).__name__, dict.__repr__(self))

  def get_as_value(self):
    """Returns CSS representation of the whole style object.

    >>> Border().get_as_value()
    (0, 'none', 'transparent')
    """
    raise NotImplementedError # abstract

  def set_to_value(self, value):
    """Gets style object from representation.

    >>> b = Border()
    >>> b = 1, 'solid', 'black'
    >>> b['border-style']
    'solid'
    """
    raise NotImplementedError # abstract

  def on_change(self):
    pass

  def create_default(self, subname):
    default = self.defaults.get(subname)
    if hasattr(default, '__call__'):
      result = default()
      self.set_by_subname(subname, result)
      return result
    else:
      return None

  def get_by_subname(self, subname):
    if subname not in self.subnames:
      raise KeyError(
        '%r not in %s' % (subname, self.prefix or 'style'))
    subobject = super(StylesContainer, self).get(subname)
    if subobject is None:
      subobject = self.create_default(subname)
    return subobject

  def set_by_subname(self, subname, value):
    if subname not in self.subnames:
      raise KeyError(
        '%r not in %s' % (subname, self.prefix or 'style'))
    super(StylesContainer, self).__setitem__(subname, value)

  def __getitem__(self, which):
    words = to_words(which)
    if self.prefix is None:
      words = [None] + words
    assert(words[0] == self.prefix)
    if len(words) == 1:
      return self.get_as_value()
    subname = words[1]
    subobject = self.get_by_subname(subname)
    if isinstance(subobject, StylesContainer):
      return subobject[words[1:]]
    elif len(words) == 2:
      return subobject
    else:
      raise KeyError(which)

  def __setitem__(self, which, value):
    words = to_words(which)
    if self.prefix is None:
      words = [None] + words
    assert(words[0] == self.prefix)
    if len(words) == 1:
      self.set_to_value(value)
      return
    subname = words[1]
    currobject = self.get_by_subname(subname)
    if isinstance(currobject, StylesContainer):
      currobject[words[1:]] = value
    else:
      self.set_by_subname(subname, value)
    self.on_change()

  def __getattr__(self, which):
    try:
      return super(StylesContainer, self).__getattr__(self, which)
    except AttributeError:
      return self.get_by_subname(which)

  def update(self, other={}, **kwargs):
    other = dict(other)
    other.update(kwargs)
    for key, value in other.items():
      if isinstance(value, StylesContainer):
        own = self.get_by_subname(key)
        if own is None:
          self.set_by_subname(key, value)
        else:
          own.update(value)
      elif key in self.subnames:
        own = self.get_by_subname(key)
        if isinstance(own, StylesContainer):
          own.set_to_value(value)
        else:
          self.set_by_subname(key, value)
      else:
        self.__setitem__(key, value)

class SidedStylesContainer(StylesContainer):
  subnames = ['top', 'right', 'bottom', 'left']
  # WARNING: order is important here. this order
  # corresponds to CSS specifications.

class _AbstractIndent(SidedStylesContainer):
  def get_as_value(self):
    values = map(self.get_by_subname, self.subnames)
    if None in values:
      raise ValueError
    return collapse_sided_value(values)

  def set_to_value(self, value):
    value = expand_sided_value(value)
    for i, subname in enumerate(self.subnames):
      self.set_by_subname(subname, value[i])

class Margin(_AbstractIndent):
  prefix = 'margin'

class Padding(_AbstractIndent):
  prefix = 'padding'

class Style(StylesContainer):
  defaults = {
    'margin' : Margin,
    'padding': Padding,
  }
  subnames = [
    'display', 'position',
    'left', 'top', 'width', 'height',
    'margin', 'padding',
  ]

  def get_as_value(self):
    return self

  def set_to_value(self, value):
    self.update(value)

styles = defaultdict(Style)

styles['*'] = Style({
    'width': 'auto',
    'height': 'auto',
    'margin': Margin(0),
    'padding': Padding(0),
    'display': 'block',
    'position': 'static',
    'left': 'auto',
    'top': 'auto',
})


text:
<meta name="viewport" content="width=device-width, user-scalable=no" />

HTML5


text:
package io.motown.utils.rest.jax_rs;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import javax.persistence.EntityNotFoundException;
import javax.ws.rs.core.Response;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

@RunWith(MockitoJUnitRunner.class)
public class EntityNotFoundExceptionMapperTest {
    private static final int NOT_FOUND = 404;

    @Mock
    private EntityNotFoundException exception;

    @Test
    public void testEntityNotFoundExceptionMapper() {
        EntityNotFoundExceptionMapper mapper = new EntityNotFoundExceptionMapper();
        Response response = mapper.toResponse(exception);

        assertNotNull(response);
        assertEquals(NOT_FOUND, response.getStatus());
    }
}


text:
class GURL;

template <class T>
class scoped_refptr;

namespace network {
class SharedURLLoaderFactory;
}

namespace payments {

// Downloads payment method manifests from the test server.
//
// Sample usage #1:
//
//   TestDownloader downloader(context);
//   downloader.AddTestServerURL("https://", "https://127.0.0.1:7070");
//   // Actual URL downloaded is https://127.0.0.1:7070/alicepay.com/webpay.
//   downloader.DownloadPaymentMethodManifest(
//       "https://alicepay.com/webpay", callback);
//
// Sample usage #2:
//
//   TestDownloader downloader(context);
//   downloader.AddTestServerURL(
//       "https://alicepay.com", "https://127.0.0.1:8080");
//   downloader.AddTestServerURL(
//       "https://bobpay.com", "https://127.0.0.1:9090");
//   // Actual URL downloaded is https://127.0.0.1:8080/webpay.
//   downloader.DownloadPaymentMethodManifest(
//       "https://alicepay.com/webpay", callback);
//   // Actual URL downloaded is https://127.0.0.1:9090/webpay.
//   downloader.DownloadPaymentMethodManifest(
//       "https://bobpay.com/webpay", callback);
class TestDownloader : public PaymentManifestDownloader {
 public:
  explicit TestDownloader(
      scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory);

  TestDownloader(const TestDownloader&) = delete;
  TestDownloader& operator=(const TestDownloader&) = delete;

  ~TestDownloader() override;

  // Modifies the downloader to replace all instances of |prefix| with
  // |test_server_url| when downloading payment method manifests and web app
  // manifests.
  //
  // For example, if AddTestServerURL("https://", "https://127.0.0.1:7070") is
  // called, then all calls to DownloadPaymentMethodManifest(some_url, callback)
  // will replace the "https://" prefix of some_url with
  // "https://127.0.0.1:7070". This is useful when running a single test server
  // that serves files in components/test/data/payments/, which has
  // subdirectories that look like hostnames. So, downloading
  // "https://alicepay.com/webpay" would actually download
  // https://127.0.0.1:7070/alicepay.com/webpay, which is a file located at
  // components/test/data/payments/alicepay.com/webpay.
  //
  // For anoter example, if AddTestServerURL("https://alicepay.com",
  // "https://127.0.0.1:8080") is called, then all calls to
  // DownloadPaymentMethodManifest(some_url, callback) will replace the
  // "https://alicepay.com" prefix of some_url with "https://127.0.0.1:8080".
  // This is useful when running multiple test servers, each one serving file
  // from individual subdirectories for components/test/data/payments/. So,
  // downloading "https://alicepay.com/webpay" would actually download
  // https://127.0.0.1:8080/webpay, which is a file located at
  // components/test/data/payments/alicepay.com/webpay. Multiple test servers
  // are useful for testing where the RFC6454 origins should be considered.
  //
  // Any call to DownloadPaymentMethodManifest(some_url, callback) where
  // some_url does not have a previously added prefix will use the original
  // some_url without modifications.
  //
  // If you call this method multiple times, avoid |prefix| parameters that are
  // prefixes of each other, as that will cause undefined confusion. That is,
  // AddTestServerURL("x");AddTestServerURL("y"); is OK, but
  // AddTestServerURL("x");AddTestServerURL("xy"); is not.
  void AddTestServerURL(const std::string& prefix, const GURL& test_server_url);

  // PaymentManifestDownloader:
  //
  // The reverse operation as AddTestServerURL: converts |url| back to a test
  // server URL so it can be fetched as a normal resource outside of this class.
  GURL FindTestServerURL(const GURL& url) const override;

 private:
  // PaymentManifestDownloader implementation.
  void InitiateDownload(const url::Origin& request_initiator,
                        const GURL& url,
                        Download::Type download_type,
                        int allowed_number_of_redirects,
                        PaymentManifestDownloadCallback callback) override;

  // The mapping from the URL prefix to the URL of the test server to be used.
  // Example 1:
  //
  // {"https://": "https://127.0.0.1:7070"}
  //
  // Example 2:
  //
  // {
  //   "https://alicepay.com": "https://127.0.0.1:8080",
  //   "https://bobpay.com": "https://127.0.0.1:9090"
  // }
  std::map<std::string, GURL> test_server_url_;
};

}  // namespace payments

#endif  // COMPONENTS_PAYMENTS_CORE_TEST_PAYMENT_MANIFEST_DOWNLOADER_H_


text:
layout: default
title: Lunchbox theology
---

{% capture lvl %}{{ page.url | append:'index.html' | split:'/' | size }}{% endcapture %}
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}

Lunchbox theology
=================

Current semester (Spring 2018)
------------------------------

We have a weekly brown-bag lunchtime discussion every Wednesday from
11:30am--1pm MST in the SUB. Topics are drawn from current member interests
and discussions that take place during our weekly [bible study][bible]. Below
is the schedule of meeting locations for Spring 2017 with topics and any
relevant reading material as we settle on them.

| Date        | Location          | Topic/Readings |
| ----------- | ----------------- | -------------- |
| Jan 17 | N/A               | No meeting     |
| Jan 24 | SUB Cherry/Silver | [*Biblical Series I: Introduction to the Idea of God*][peterson1], by Jordan Peterson ([handout][handout0124]) |
| Jan 31 | SUB Cherry/Silver | Continuation of *Introduction to the Idea of God* |
| Feb 7  | SUB Cherry/Silver | Arguments for the existence of God: *A priori* |
| Feb 14 | SUB Cherry/Silver | Arguments for the existence of God: *A posteriori* |
| Feb 21 | SUB Cherry/Silver | [*Biblical Series II: Genesis 1: Chaos and Order*][peterson2], by Jordan Peterson |
| Feb 28 | SUB Cherry/Silver | Continuation of *Genesis 1: Chaos and Order* |
| Mar 7  | SUB Cherry/Silver | No meeting |
| Mar 14 | SUB Cherry/Silver | No meeting |
| Mar 21 | SUB Cherry/Silver | Cain and Abel; Abraham and Isaac; Jordan Pererson has some relevant comments in [*Biblical Series V: Cain and Abel: The Hostile Brothers*][peterson5] |
| Mar 28 | SUB Cherry/Silver | Theories of the atonement |
| Apr 4  | SUB Cherry/Silver | Crucifixion and resurrection ([list of some passages we considered][crucifix]) |
| Apr 11 | SUB Cherry/Silver | The veracity and significance of the death and resurrection of Jesus, including discussion of [*The Death and Resurrection of Christ: A Commentary in Five Parts*][petersonchrist] by Jordan Peterson |
| Apr 18 | SUB Cherry/Silver | Reason for belief ([notes][rfbnotes]) |
| Apr 25 | SUB Cherry/Silver | Greek additions to Esther |
| May 2  | SUB Cherry/Silver | The relationship of a Christian to the Law ([verse list][lawverses]) |

Past semesters
--------------

* [Fall 2017]({{ relative }}lunchbox_theology/2017_fall.html)
* [Spring 2017]({{ relative }}lunchbox_theology/2017_spring.html)
* [Fall 2016]({{ relative }}lunchbox_theology/2016_fall.html)
* [Spring 2016]({{ relative }}lunchbox_theology/2016_spring.html)

[bible]: {{ relative }}bible_study
[peterson1]: https://youtu.be/f-wWBGo6a2w
[handout0124]: {{ relative }}doc/discussion-2018-01-24.html
[peterson2]: https://youtu.be/hdrLQ7DpiWs
[peterson5]: https://youtu.be/44f3mxcsI50
[crucifix]: {{ relative }}doc/crucifixion-and-resurrection.html
[petersonchrist]: https://youtu.be/xPIanlF6IwM
[rfbnotes]: {{ relative }}doc/reason-for-belief.html
[lawverses]: {{ relative }}doc/relation-to-law.html