text:
#pragma once
#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
#include <aws/imagebuilder/ImagebuilderRequest.h>
#include <aws/imagebuilder/model/ContainerType.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/imagebuilder/model/InstanceConfiguration.h>
#include <aws/imagebuilder/model/Platform.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/imagebuilder/model/TargetContainerRepository.h>
#include <aws/imagebuilder/model/ComponentConfiguration.h>
#include <utility>
#include <aws/core/utils/UUID.h>

namespace Aws
{
namespace imagebuilder
{
namespace Model
{

  /**
   */
  class AWS_IMAGEBUILDER_API CreateContainerRecipeRequest : public ImagebuilderRequest
  {
  public:
    CreateContainerRecipeRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "CreateContainerRecipe"; }

    Aws::String SerializePayload() const override;

    /**
     *
The type of container to create.

     */
    inline const ContainerType& GetContainerType() const{ return m_containerType; }

    /**
     *
The type of container to create.

     */
    inline bool ContainerTypeHasBeenSet() const { return m_containerTypeHasBeenSet; }

    /**
     *
The type of container to create.

     */
    inline void SetContainerType(const ContainerType& value) { m_containerTypeHasBeenSet = true; m_containerType = value; }

    /**
     *
The type of container to create.

     */
    inline void SetContainerType(ContainerType&& value) { m_containerTypeHasBeenSet = true; m_containerType = std::move(value); }

    /**
     *
The type of container to create.

     */
    inline CreateContainerRecipeRequest& WithContainerType(const ContainerType& value) { SetContainerType(value); return *this;}

    /**
     *
The type of container to create.

     */
    inline CreateContainerRecipeRequest& WithContainerType(ContainerType&& value) { SetContainerType(std::move(value)); return *this;}

    /**
     *
The name of the container recipe.

     */
    inline const Aws::String& GetName() const{ return m_name; }

    /**
     *
The name of the container recipe.

     */
    inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }

    /**
     *
The name of the container recipe.

     */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /**
     *
The name of the container recipe.

     */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }

    /**
     *
The name of the container recipe.

     */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /**
     *
The name of the container recipe.

     */
    inline CreateContainerRecipeRequest& WithName(const Aws::String& value) { SetName(value); return *this;}

    /**
     *
The name of the container recipe.

     */
    inline CreateContainerRecipeRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}

    /**
     *
The name of the container recipe.

     */
    inline CreateContainerRecipeRequest& WithName(const char* value) { SetName(value); return *this;}

    /**
     *
The description of the container recipe.

     */
    inline const Aws::String& GetDescription() const{ return m_description; }

    /**
     *
The description of the container recipe.

     */
    inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }

    /**
     *
The description of the container recipe.

     */
    inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }

    /**
     *
The description of the container recipe.

     */
    inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }

    /**
     *
The description of the container recipe.

     */
    inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }

    /**
     *
The description of the container recipe.

     */
    inline CreateContainerRecipeRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}

    /**
     *
The description of the container recipe.

     */
    inline CreateContainerRecipeRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}

    /**
     *
The description of the container recipe.

     */
    inline CreateContainerRecipeRequest& WithDescription(const char* value) { SetDescription(value); return *this;}

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline const Aws::String& GetSemanticVersion() const{ return m_semanticVersion; }

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline bool SemanticVersionHasBeenSet() const { return m_semanticVersionHasBeenSet; }

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline void SetSemanticVersion(const Aws::String& value) { m_semanticVersionHasBeenSet = true; m_semanticVersion = value; }

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline void SetSemanticVersion(Aws::String&& value) { m_semanticVersionHasBeenSet = true; m_semanticVersion = std::move(value); }

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline void SetSemanticVersion(const char* value) { m_semanticVersionHasBeenSet = true; m_semanticVersion.assign(value); }

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline CreateContainerRecipeRequest& WithSemanticVersion(const Aws::String& value) { SetSemanticVersion(value); return *this;}

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline CreateContainerRecipeRequest& WithSemanticVersion(Aws::String&& value) { SetSemanticVersion(std::move(value)); return *this;}

    /**
     *
The semantic version of the container recipe. This version follows the
     * semantic version syntax.

The semantic version has four nodes:
     * <major>.<minor>.<patch>/<build>. You can assign values
     * for the first three, and can filter on all of them.

 Assignment:
     * For the first three nodes you can assign any positive integer value, including
     * zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder
     * automatically assigns the build number to the fourth node.

     * Patterns: You can use any numeric pattern that adheres to the assignment
     * requirements for the nodes that you can assign. For example, you might choose a
     * software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

     *
     */
    inline CreateContainerRecipeRequest& WithSemanticVersion(const char* value) { SetSemanticVersion(value); return *this;}

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline const Aws::Vector<ComponentConfiguration>& GetComponents() const{ return m_components; }

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline bool ComponentsHasBeenSet() const { return m_componentsHasBeenSet; }

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline void SetComponents(const Aws::Vector<ComponentConfiguration>& value) { m_componentsHasBeenSet = true; m_components = value; }

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline void SetComponents(Aws::Vector<ComponentConfiguration>&& value) { m_componentsHasBeenSet = true; m_components = std::move(value); }

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline CreateContainerRecipeRequest& WithComponents(const Aws::Vector<ComponentConfiguration>& value) { SetComponents(value); return *this;}

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline CreateContainerRecipeRequest& WithComponents(Aws::Vector<ComponentConfiguration>&& value) { SetComponents(std::move(value)); return *this;}

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline CreateContainerRecipeRequest& AddComponents(const ComponentConfiguration& value) { m_componentsHasBeenSet = true; m_components.push_back(value); return *this; }

    /**
     *
Components for build and test that are included in the container recipe.

     */
    inline CreateContainerRecipeRequest& AddComponents(ComponentConfiguration&& value) { m_componentsHasBeenSet = true; m_components.push_back(std::move(value)); return *this; }

    /**
     *
A group of options that can be used to configure an instance for building and
     * testing container images.

     */
    inline const InstanceConfiguration& GetInstanceConfiguration() const{ return m_instanceConfiguration; }

    /**
     *
A group of options that can be used to configure an instance for building and
     * testing container images.

     */
    inline bool InstanceConfigurationHasBeenSet() const { return m_instanceConfigurationHasBeenSet; }

    /**
     *
A group of options that can be used to configure an instance for building and
     * testing container images.

     */
    inline void SetInstanceConfiguration(const InstanceConfiguration& value) { m_instanceConfigurationHasBeenSet = true; m_instanceConfiguration = value; }

    /**
     *
A group of options that can be used to configure an instance for building and
     * testing container images.

     */
    inline void SetInstanceConfiguration(InstanceConfiguration&& value) { m_instanceConfigurationHasBeenSet = true; m_instanceConfiguration = std::move(value); }

    /**
     *
A group of options that can be used to configure an instance for building and
     * testing container images.

     */
    inline CreateContainerRecipeRequest& WithInstanceConfiguration(const InstanceConfiguration& value) { SetInstanceConfiguration(value); return *this;}

    /**
     *
A group of options that can be used to configure an instance for building and
     * testing container images.

     */
    inline CreateContainerRecipeRequest& WithInstanceConfiguration(InstanceConfiguration&& value) { SetInstanceConfiguration(std::move(value)); return *this;}

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline const Aws::String& GetDockerfileTemplateData() const{ return m_dockerfileTemplateData; }

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline bool DockerfileTemplateDataHasBeenSet() const { return m_dockerfileTemplateDataHasBeenSet; }

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline void SetDockerfileTemplateData(const Aws::String& value) { m_dockerfileTemplateDataHasBeenSet = true; m_dockerfileTemplateData = value; }

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline void SetDockerfileTemplateData(Aws::String&& value) { m_dockerfileTemplateDataHasBeenSet = true; m_dockerfileTemplateData = std::move(value); }

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline void SetDockerfileTemplateData(const char* value) { m_dockerfileTemplateDataHasBeenSet = true; m_dockerfileTemplateData.assign(value); }

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline CreateContainerRecipeRequest& WithDockerfileTemplateData(const Aws::String& value) { SetDockerfileTemplateData(value); return *this;}

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline CreateContainerRecipeRequest& WithDockerfileTemplateData(Aws::String&& value) { SetDockerfileTemplateData(std::move(value)); return *this;}

    /**
     *
The Dockerfile template used to build your image as an inline data blob.

     */
    inline CreateContainerRecipeRequest& WithDockerfileTemplateData(const char* value) { SetDockerfileTemplateData(value); return *this;}

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline const Aws::String& GetDockerfileTemplateUri() const{ return m_dockerfileTemplateUri; }

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline bool DockerfileTemplateUriHasBeenSet() const { return m_dockerfileTemplateUriHasBeenSet; }

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline void SetDockerfileTemplateUri(const Aws::String& value) { m_dockerfileTemplateUriHasBeenSet = true; m_dockerfileTemplateUri = value; }

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline void SetDockerfileTemplateUri(Aws::String&& value) { m_dockerfileTemplateUriHasBeenSet = true; m_dockerfileTemplateUri = std::move(value); }

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline void SetDockerfileTemplateUri(const char* value) { m_dockerfileTemplateUriHasBeenSet = true; m_dockerfileTemplateUri.assign(value); }

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline CreateContainerRecipeRequest& WithDockerfileTemplateUri(const Aws::String& value) { SetDockerfileTemplateUri(value); return *this;}

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline CreateContainerRecipeRequest& WithDockerfileTemplateUri(Aws::String&& value) { SetDockerfileTemplateUri(std::move(value)); return *this;}

    /**
     *
The Amazon S3 URI for the Dockerfile that will be used to build your
     * container image.

     */
    inline CreateContainerRecipeRequest& WithDockerfileTemplateUri(const char* value) { SetDockerfileTemplateUri(value); return *this;}

    /**
     *
Specifies the operating system platform when you use a custom base image.

     */
    inline const Platform& GetPlatformOverride() const{ return m_platformOverride; }

    /**
     *
Specifies the operating system platform when you use a custom base image.

     */
    inline bool PlatformOverrideHasBeenSet() const { return m_platformOverrideHasBeenSet; }

    /**
     *
Specifies the operating system platform when you use a custom base image.

     */
    inline void SetPlatformOverride(const Platform& value) { m_platformOverrideHasBeenSet = true; m_platformOverride = value; }

    /**
     *
Specifies the operating system platform when you use a custom base image.

     */
    inline void SetPlatformOverride(Platform&& value) { m_platformOverrideHasBeenSet = true; m_platformOverride = std::move(value); }

    /**
     *
Specifies the operating system platform when you use a custom base image.

     */
    inline CreateContainerRecipeRequest& WithPlatformOverride(const Platform& value) { SetPlatformOverride(value); return *this;}

    /**
     *
Specifies the operating system platform when you use a custom base image.

     */
    inline CreateContainerRecipeRequest& WithPlatformOverride(Platform&& value) { SetPlatformOverride(std::move(value)); return *this;}

    /**
     *
Specifies the operating system version for the base image.

     */
    inline const Aws::String& GetImageOsVersionOverride() const{ return m_imageOsVersionOverride; }

    /**
     *
Specifies the operating system version for the base image.

     */
    inline bool ImageOsVersionOverrideHasBeenSet() const { return m_imageOsVersionOverrideHasBeenSet; }

    /**
     *
Specifies the operating system version for the base image.

     */
    inline void SetImageOsVersionOverride(const Aws::String& value) { m_imageOsVersionOverrideHasBeenSet = true; m_imageOsVersionOverride = value; }

    /**
     *
Specifies the operating system version for the base image.

     */
    inline void SetImageOsVersionOverride(Aws::String&& value) { m_imageOsVersionOverrideHasBeenSet = true; m_imageOsVersionOverride = std::move(value); }

    /**
     *
Specifies the operating system version for the base image.

     */
    inline void SetImageOsVersionOverride(const char* value) { m_imageOsVersionOverrideHasBeenSet = true; m_imageOsVersionOverride.assign(value); }

    /**
     *
Specifies the operating system version for the base image.

     */
    inline CreateContainerRecipeRequest& WithImageOsVersionOverride(const Aws::String& value) { SetImageOsVersionOverride(value); return *this;}

    /**
     *
Specifies the operating system version for the base image.

     */
    inline CreateContainerRecipeRequest& WithImageOsVersionOverride(Aws::String&& value) { SetImageOsVersionOverride(std::move(value)); return *this;}

    /**
     *
Specifies the operating system version for the base image.

     */
    inline CreateContainerRecipeRequest& WithImageOsVersionOverride(const char* value) { SetImageOsVersionOverride(value); return *this;}

    /**
     *
The base image for the container recipe.

     */
    inline const Aws::String& GetParentImage() const{ return m_parentImage; }

    /**
     *
The base image for the container recipe.

     */
    inline bool ParentImageHasBeenSet() const { return m_parentImageHasBeenSet; }

    /**
     *
The base image for the container recipe.

     */
    inline void SetParentImage(const Aws::String& value) { m_parentImageHasBeenSet = true; m_parentImage = value; }

    /**
     *
The base image for the container recipe.

     */
    inline void SetParentImage(Aws::String&& value) { m_parentImageHasBeenSet = true; m_parentImage = std::move(value); }

    /**
     *
The base image for the container recipe.

     */
    inline void SetParentImage(const char* value) { m_parentImageHasBeenSet = true; m_parentImage.assign(value); }

    /**
     *
The base image for the container recipe.

     */
    inline CreateContainerRecipeRequest& WithParentImage(const Aws::String& value) { SetParentImage(value); return *this;}

    /**
     *
The base image for the container recipe.

     */
    inline CreateContainerRecipeRequest& WithParentImage(Aws::String&& value) { SetParentImage(std::move(value)); return *this;}

    /**
     *
The base image for the container recipe.

     */
    inline CreateContainerRecipeRequest& WithParentImage(const char* value) { SetParentImage(value); return *this;}

    /**
     *
Tags that are attached to the container recipe.

     */
    inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
Tags that are attached to the container recipe.

     */
    inline CreateContainerRecipeRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
The working directory for use during build and test workflows.

     */
    inline const Aws::String& GetWorkingDirectory() const{ return m_workingDirectory; }

    /**
     *
The working directory for use during build and test workflows.

     */
    inline bool WorkingDirectoryHasBeenSet() const { return m_workingDirectoryHasBeenSet; }

    /**
     *
The working directory for use during build and test workflows.

     */
    inline void SetWorkingDirectory(const Aws::String& value) { m_workingDirectoryHasBeenSet = true; m_workingDirectory = value; }

    /**
     *
The working directory for use during build and test workflows.

     */
    inline void SetWorkingDirectory(Aws::String&& value) { m_workingDirectoryHasBeenSet = true; m_workingDirectory = std::move(value); }

    /**
     *
The working directory for use during build and test workflows.

     */
    inline void SetWorkingDirectory(const char* value) { m_workingDirectoryHasBeenSet = true; m_workingDirectory.assign(value); }

    /**
     *
The working directory for use during build and test workflows.

     */
    inline CreateContainerRecipeRequest& WithWorkingDirectory(const Aws::String& value) { SetWorkingDirectory(value); return *this;}

    /**
     *
The working directory for use during build and test workflows.

     */
    inline CreateContainerRecipeRequest& WithWorkingDirectory(Aws::String&& value) { SetWorkingDirectory(std::move(value)); return *this;}

    /**
     *
The working directory for use during build and test workflows.

     */
    inline CreateContainerRecipeRequest& WithWorkingDirectory(const char* value) { SetWorkingDirectory(value); return *this;}

    /**
     *
The destination repository for the container image.

     */
    inline const TargetContainerRepository& GetTargetRepository() const{ return m_targetRepository; }

    /**
     *
The destination repository for the container image.

     */
    inline bool TargetRepositoryHasBeenSet() const { return m_targetRepositoryHasBeenSet; }

    /**
     *
The destination repository for the container image.

     */
    inline void SetTargetRepository(const TargetContainerRepository& value) { m_targetRepositoryHasBeenSet = true; m_targetRepository = value; }

    /**
     *
The destination repository for the container image.

     */
    inline void SetTargetRepository(TargetContainerRepository&& value) { m_targetRepositoryHasBeenSet = true; m_targetRepository = std::move(value); }

    /**
     *
The destination repository for the container image.

     */
    inline CreateContainerRecipeRequest& WithTargetRepository(const TargetContainerRepository& value) { SetTargetRepository(value); return *this;}

    /**
     *
The destination repository for the container image.

     */
    inline CreateContainerRecipeRequest& WithTargetRepository(TargetContainerRepository&& value) { SetTargetRepository(std::move(value)); return *this;}

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline CreateContainerRecipeRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline CreateContainerRecipeRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}

    /**
     *
Identifies which KMS key is used to encrypt the container image.

     */
    inline CreateContainerRecipeRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}

    /**
     *
The client token used to make this request idempotent.

     */
    inline const Aws::String& GetClientToken() const{ return m_clientToken; }

    /**
     *
The client token used to make this request idempotent.

     */
    inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }

    /**
     *
The client token used to make this request idempotent.

     */
    inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }

    /**
     *
The client token used to make this request idempotent.

     */
    inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }

    /**
     *
The client token used to make this request idempotent.

     */
    inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }

    /**
     *
The client token used to make this request idempotent.

     */
    inline CreateContainerRecipeRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}

    /**
     *
The client token used to make this request idempotent.

     */
    inline CreateContainerRecipeRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}

    /**
     *
The client token used to make this request idempotent.

     */
    inline CreateContainerRecipeRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}

  private:

    ContainerType m_containerType;
    bool m_containerTypeHasBeenSet;

    Aws::String m_name;
    bool m_nameHasBeenSet;

    Aws::String m_description;
    bool m_descriptionHasBeenSet;

    Aws::String m_semanticVersion;
    bool m_semanticVersionHasBeenSet;

    Aws::Vector<ComponentConfiguration> m_components;
    bool m_componentsHasBeenSet;

    InstanceConfiguration m_instanceConfiguration;
    bool m_instanceConfigurationHasBeenSet;

    Aws::String m_dockerfileTemplateData;
    bool m_dockerfileTemplateDataHasBeenSet;

    Aws::String m_dockerfileTemplateUri;
    bool m_dockerfileTemplateUriHasBeenSet;

    Platform m_platformOverride;
    bool m_platformOverrideHasBeenSet;

    Aws::String m_imageOsVersionOverride;
    bool m_imageOsVersionOverrideHasBeenSet;

    Aws::String m_parentImage;
    bool m_parentImageHasBeenSet;

    Aws::Map<Aws::String, Aws::String> m_tags;
    bool m_tagsHasBeenSet;

    Aws::String m_workingDirectory;
    bool m_workingDirectoryHasBeenSet;

    TargetContainerRepository m_targetRepository;
    bool m_targetRepositoryHasBeenSet;

    Aws::String m_kmsKeyId;
    bool m_kmsKeyIdHasBeenSet;

    Aws::String m_clientToken;
    bool m_clientTokenHasBeenSet;
  };

} // namespace Model
} // namespace imagebuilder
} // namespace Aws


text:
using System;
using System.Threading.Tasks;
using Windows.UI.Xaml.Navigation;
using QMunicate.Core.Command;
using QMunicate.Core.DependencyInjection;
using QMunicate.Core.Navigation;
using QMunicate.Core.Observable;
using Quickblox.Sdk;

namespace QMunicate.ViewModels
{
    /// <summary>
    /// Interface for ViewModels for UserControls that are a part of a page
    /// </summary>
    public interface IUserControlViewModel
    {
        /// <summary>
        /// Initializes a ViewModel.
        /// Is analogous to OnNavigated.
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        Task Initialize(object parameter);
    }

    public class ViewModel : ObservableObject, INavigationAware
    {
        private Boolean isLoading;

        public ViewModel()
        {
            this.NavigationService = ServiceLocator.Locator.Get<INavigationService>();
            this.QuickbloxClient = ServiceLocator.Locator.Get<IQuickbloxClient>();

            this.GoBackCommand = new RelayCommand(this.GoBackCommandExecute, this.CanGobackCommandExecute);
        }

        public Boolean IsLoading
        {
            get { return this.isLoading; }
            set
            {
                if(Set(ref this.isLoading, value))
                    OnIsLoadingChanged();
            }
        }

        public RelayCommand GoBackCommand { get; set; }

        public INavigationService NavigationService { get; protected set; }

        public IQuickbloxClient QuickbloxClient { get; protected set; }

        private void GoBackCommandExecute()
        {
            this.NavigationService.GoBack();
        }

        private bool CanGobackCommandExecute()
        {
            return this.NavigationService.CanGoBack;
        }

        protected virtual void OnIsLoadingChanged() { }

        public virtual void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        public virtual void OnNavigatedFrom(NavigationEventArgs e)
        {
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
//
//  GDataDocTransferFormat.h
//

#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_DOCS_SERVICE

#import "GDataObject.h"

// an import or export format, as in
//   <docs:exportFormat source='document' target='text/plain' />

@interface GDataDocTransferFormat : GDataObject
- (NSString *)source;
- (void)setSource:(NSString *)str;

- (NSString *)target;
- (void)setTarget:(NSString *)str;
@end

@interface GDataDocImportFormat : GDataDocTransferFormat <GDataExtension>
@end

@interface GDataDocExportFormat : GDataDocTransferFormat <GDataExtension>
@end

#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_DOCS_SERVICE


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
RMIServer (Java 2 Platform SE 5.0)
</TITLE>
<meta name="collection" content="api">

<META NAME="keywords" CONTENT="javax.management.remote.rmi.RMIServer interface">
<META NAME="keywords" CONTENT="getVersion()">
<META NAME="keywords" CONTENT="newClient()">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Standard Ed. 5.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

javax.management.remote.rmi

Interface RMIServer

All Superinterfaces:
Remote

All Known Implementing Classes:
RMIIIOPServerImpl, RMIJRMPServerImpl, RMIServerImpl, RMIServerImpl_Stub

public interface RMIServer
extends Remote

RMI object used to establish connections to an RMI connector.
 There is one Remote object implementing this interface for each RMI
 connector.

User code does not usually refer to this interface.  It is
 specified as part of the public API so that different
 implementations of that API will interoperate.

Since:

1.5

Method Summary

 String
getVersion()

          The version of the RMI Connector Protocol understood by this
 connector server.

 RMIConnection
newClient(Object credentials)

          Makes a new connection through this RMI connector.

Method Detail

getVersion

String getVersion()
                  throws RemoteException

The version of the RMI Connector Protocol understood by this
 connector server.  This is a string with the following format:

 protocol-version implementation-name

The protocol-version is a series of
 two or more non-negative integers separated by periods
 (.).  An implementation of the version described
 by this documentation must use the string 1.0
 here.

After the protocol version there must be a space, followed
 by the implementation name.  The format of the implementation
 name is unspecified.  It is recommended that it include an
 implementation version number.  An implementation can use an
 empty string as its implementation name, for example for
 security reasons.

Returns:
a string with the format described here.

Throws:

RemoteException - if there is a communication
 exception during the remote method call.

newClient

RMIConnection newClient(Object credentials)
                        throws IOException

Makes a new connection through this RMI connector.  Each
 remote client calls this method to obtain a new RMI object
 representing its connection.

Parameters:
credentials - this object specifies the user-defined credentials
 to be passed in to the server in order to authenticate the user before
 creating the RMIConnection.  Can be null.

Returns:
the newly-created connection object.

Throws:

IOException - if the new client object cannot be
 created or exported, or if there is a communication exception
 during the remote method call.

SecurityException - if the given credentials do not
 allow the server to authenticate the caller successfully.

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Standard Ed. 5.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


text:
package org.drip.sample.credit;

/*
 * Generic imports
 */

import java.util.*;

import org.drip.analytics.date.*;
import org.drip.analytics.support.CaseInsensitiveTreeMap;
import org.drip.product.definition.*;
import org.drip.service.env.EnvManager;
import org.drip.service.env.StandardCDXManager;

/*
 * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 */

/*!
 * Copyright (C) 2017 Lakshmi Krishnamurthy
 * Copyright (C) 2016 Lakshmi Krishnamurthy
 * Copyright (C) 2015 Lakshmi Krishnamurthy
 * Copyright (C) 2014 Lakshmi Krishnamurthy
 * Copyright (C) 2013 Lakshmi Krishnamurthy
 * Copyright (C) 2012 Lakshmi Krishnamurthy
 *
 *  This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
 *  	libraries targeting analysts and developers
 *  	https://lakshmidrip.github.io/DRIP/
 *
 *  DRIP is composed of four main libraries:
 *
 *  - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
 *  - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
 *  - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
 *  - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
 *
 *  - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
 *  	Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
 *  	Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
 *  	Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
 *  	Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
 *
 *  - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy
 *  	Incorporator, Holdings Constraint, and Transaction Costs.
 *
 *  - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
 *
 *  - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *   	you may not use this file except in compliance with the License.
 *
 *  You may obtain a copy of the License at
 *  	http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  	distributed under the License is distributed on an "AS IS" BASIS,
 *  	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 *  See the License for the specific language governing permissions and
 *  	limitations under the License.
 */

/**
 * BuiltInCDSPortfolioDefinitions displays the Built-in CDS Portfolios. It shows the following:
 *
 * 	- Construct the CDX.NA.IG 5Y Series 17 index by name and series.
 * 	- Construct the on-the-run CDX.NA.IG 5Y Series index.
 * 	- List all the built-in CDX's - their names and descriptions.
 *  - Construct the on-the run CDX.EM 5Y corresponding to T - 1Y.
 *  - Construct the on-the run ITRAXX.ENERGY 5Y corresponding to T - 7Y.
 *  - Retrieve the full set of date/index series set for ITRAXX.ENERGY.
 *
 * @author Lakshmi Krishnamurthy
 */

public class BuiltInCDSPortfolioDefinitions {

	/*
	 * Sample demonstrating the creation/usage of the CDX API
	 *
	 *  	USE WITH CARE: This sample ignores errors and does not handle exceptions.
	 */

	private static final void BasketCDSAPISample()
	{
		JulianDate dtToday = DateUtil.CreateFromYMD (
			2013,
			DateUtil.MAY,
			10
		);

		/*
		 * Construct the CDX.NA.IG 5Y Series 17 index by name and series
		 */

		/* BasketProduct bpCDX = CreditAnalytics.MakeCDX (
			"CDX.NA.IG",
			17,
			"5Y"
		); */

		/*
		 * Construct the on-the-run CDX.NA.IG 5Y Series index
		 */

		/* BasketProduct bpCDXOTR = CreditAnalytics.MakeCDX (
			"CDX.NA.IG",
			dtToday,
			"5Y"
		); */

		/*
		 * List of all the built-in CDX names
		 */

		Set<String> setstrCDXNames = StandardCDXManager.GetCDXNames();

		/*
		 * Descriptions of all the built-in CDX names
		 */

		CaseInsensitiveTreeMap<String> mapCDXDescr = StandardCDXManager.GetCDXDescriptions();

		/*
		 * Construct the on-the run CDX.EM 5Y corresponding to T - 1Y
		 */

		BasketProduct bpPresetOTR = StandardCDXManager.GetOnTheRun (
			"CDX.EM",
			dtToday.subtractTenor ("1Y"),
			"5Y"
		);

		/*
		 * Construct the on-the run ITRAXX.ENERGY 5Y corresponding to T - 7Y
		 */

		BasketProduct bpPreLoadedOTR = StandardCDXManager.GetOnTheRun (
			"ITRAXX.ENERGY",
			dtToday.subtractTenor ("7Y"),
			"5Y"
		);

		/*
		 * Retrieve the full set of date/index series set for ITRAXX.ENERGY
		 */

		Map<JulianDate, Integer> mapCDXSeries = StandardCDXManager.GetCDXSeriesMap ("ITRAXX.ENERGY");

		// System.out.println (bpCDX.name() + ": " + bpCDX.effective() + "=>" + bpCDX.maturity());

		// System.out.println (bpCDXOTR.name() + ": " + bpCDXOTR.effective() + "=>" + bpCDXOTR.maturity());

		int i = 0;

		for (String strCDX : setstrCDXNames)
			System.out.println ("CDX[" + i++ + "]: " + strCDX);

		for (Map.Entry<String, String> meCDXDescr : mapCDXDescr.entrySet())
			System.out.println ("[" + meCDXDescr.getKey() + "]: " + meCDXDescr.getValue());

		System.out.println (bpPresetOTR.name() + ": " + bpPresetOTR.effective() + "=>" + bpPresetOTR.maturity());

		System.out.println (bpPreLoadedOTR.name() + ": " + bpPreLoadedOTR.effective() + "=>" + bpPreLoadedOTR.maturity());

		for (Map.Entry<JulianDate, Integer> me : mapCDXSeries.entrySet())
			System.out.println ("ITRAXX.ENERGY[" + me.getValue() + "]: " + me.getKey());
	}

	public static final void main (
		final String astrArgs[])
		throws Exception
	{
		// String strConfig = "c:\\Lakshmi\\BondAnal\\Config.xml";

		String strConfig = "";

		EnvManager.InitEnv (strConfig);

		BasketCDSAPISample();
	}
}


text:
@import Foundation;
@import CocoaLumberjack;
@import Crashlytics;

NS_ASSUME_NONNULL_BEGIN

@interface OBACrashlyticsLogger : DDAbstractLogger

+ (instancetype)sharedInstance;

@end

NS_ASSUME_NONNULL_END


text:
package ctpolicy

import (
	"testing"

	"github.com/google/certificate-transparency-go/x509"

	"github.com/kylelemons/godebug/pretty"
)

func wantedAppleGroups(count int) LogPolicyData {
	gi := LogPolicyData{
		BaseName: {
			Name: BaseName,
			LogURLs: map[string]bool{
				"https://ct.googleapis.com/aviator/":        true,
				"https://ct.googleapis.com/icarus/":         true,
				"https://ct.googleapis.com/rocketeer/":      true,
				"https://ct.googleapis.com/racketeer/":      true,
				"https://ct.googleapis.com/logs/argon2020/": true,
				"https://log.bob.io":                        true,
			},
			MinInclusions: count,
			IsBase:        true,
			LogWeights: map[string]float32{
				"https://ct.googleapis.com/aviator/":        1.0,
				"https://ct.googleapis.com/icarus/":         1.0,
				"https://ct.googleapis.com/rocketeer/":      1.0,
				"https://ct.googleapis.com/racketeer/":      1.0,
				"https://ct.googleapis.com/logs/argon2020/": 1.0,
				"https://log.bob.io":                        1.0,
			},
		},
	}
	return gi
}

func TestCheckApplePolicy(t *testing.T) {
	tests := []struct {
		name string
		cert *x509.Certificate
		want LogPolicyData
	}{
		{
			name: "Short",
			cert: getTestCertPEMShort(),
			want: wantedAppleGroups(2),
		},
		{
			name: "2-year",
			cert: getTestCertPEM2Years(),
			want: wantedAppleGroups(3),
		},
		{
			name: "3-year",
			cert: getTestCertPEM3Years(),
			want: wantedAppleGroups(4),
		},
		{
			name: "Long",
			cert: getTestCertPEMLongOriginal(),
			want: wantedAppleGroups(5),
		},
	}

	var policy AppleCTPolicy
	sampleLogList := sampleLogList(t)

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			groups, err := policy.LogsByGroup(test.cert, sampleLogList)
			if err != nil {
				t.Errorf("LogsByGroup returned an error: %v", err)
			}
			if diff := pretty.Compare(test.want, groups); diff != "" {
				t.Errorf("LogsByGroup: (-want +got)\n%s", diff)
			}
		})
	}
}


text:
function createModel(nGPU)
   require 'cudnn'

   local features = nn.Sequential()

   local ct = 0
   function _bottleneck(internal_scale, use_relu, asymetric, dilated, input, output, downsample)
      local internal = output / internal_scale
      local input_stride = downsample and 2 or 1

      local sum = nn.ConcatTable()

      local main = nn.Sequential()
      local other = nn.Sequential()
      sum:add(main):add(other)

      main:add(cudnn.SpatialConvolution(input, internal, input_stride, input_stride, input_stride, input_stride, 0, 0):noBias())
      main:add(nn.SpatialBatchNormalization(internal, 1e-3))
      if use_relu then main:add(nn.PReLU(internal)) end
      if not asymetric and not dilated then
         main:add(cudnn.SpatialConvolution(internal, internal, 3, 3, 1, 1, 1, 1))
      elseif asymetric then
         local pad = (asymetric-1) / 2
         main:add(cudnn.SpatialConvolution(internal, internal, asymetric, 1, 1, 1, pad, 0):noBias())
         main:add(cudnn.SpatialConvolution(internal, internal, 1, asymetric, 1, 1, 0, pad))
      elseif dilated then
         main:add(nn.SpatialDilatedConvolution(internal, internal, 3, 3, 1, 1, dilated, dilated, dilated, dilated))
      else
         assert(false, 'You shouldn\'t be here')
      end
      main:add(nn.SpatialBatchNormalization(internal, 1e-3))
      if use_relu then main:add(nn.PReLU(internal)) end
      main:add(cudnn.SpatialConvolution(internal, output, 1, 1, 1, 1, 0, 0):noBias())
      main:add(nn.SpatialBatchNormalization(output, 1e-3))
      main:add(nn.SpatialDropout((ct < 5) and 0.01 or 0.1))
      ct = ct + 1

      other:add(nn.Identity())
      if downsample then
         other:add(nn.SpatialMaxPooling(2, 2, 2, 2))
      end
      if input ~= output then
         other:add(nn.Padding(1, output-input, 3))
      end

      return nn.Sequential():add(sum):add(nn.CAddTable()):add(nn.PReLU(output))
   end

   local _ = require 'moses'
   local bottleneck = _.bindn(_bottleneck, 4, true, false, false) -- basic bottleneck
   local ibottleneck = _.bindn(_bottleneck, 1, true, false, false) -- basic bottleneck

   local initial_block = nn.ConcatTable(2)
   initial_block:add(cudnn.SpatialConvolution(3, 13, 3, 3, 2, 2, 1, 1))
   initial_block:add(cudnn.SpatialMaxPooling(2, 2, 2, 2))

   features:add(initial_block) -- 112x112
   features:add(nn.JoinTable(2)) -- can't use Concat, because SpatialConvolution needs contiguous gradOutput
   features:add(nn.SpatialBatchNormalization(16, 1e-3))
   features:add(nn.PReLU(16))

   -- 1st block
   features:add(ibottleneck(16, 64, true)) -- 56x56
   features:add(bottleneck(64, 128))
   features:add(bottleneck(128, 128))

   -- 2nd block
   features:add(bottleneck(128, 256, true)) -- 28x28
   features:add(bottleneck(256, 256))
   features:add(bottleneck(256, 256))

   -- 3rd block
   features:add(bottleneck(256, 512, true)) -- 14x14
   features:add(bottleneck(512, 512))
   features:add(bottleneck(512, 512))

   -- 4th block
   features:add(bottleneck(512, 1024, true)) -- 7x7
   features:add(bottleneck(1024, 1024))
   features:add(bottleneck(1024, 1024))

   -- global average pooling 1x1
   features:add(cudnn.SpatialAveragePooling(7, 7, 1, 1, 0, 0))
   features:cuda()

   features = makeDataParallel(features, nGPU) -- defined in util.lua

   --classifier
   local classifier = nn.Sequential()
   classifier:add(nn.View(1024))
   classifier:add(nn.Linear(1024, nClasses))
   classifier:add(nn.LogSoftMax())
   classifier:cuda()

   -- test code:
   --local a = torch.FloatTensor(1,3,224,224):cuda() -- input image test
   --local b = model:forward(a) -- test network
   --print(b:size())

   local model = nn.Sequential():add(features):add(classifier)

   return model
end


text:
require 'whois/record/parser/base_icann_compliant'

module Whois
  class Record
    class Parser

      # Parser for the whois.schlund.info server.
      #
      # @see Whois::Record::Parser::Example
      #   The Example parser for the list of all available methods.
      #
      class WhoisSchlundInfo < BaseIcannCompliant
        self.scanner = Scanners::BaseIcannCompliant, {
            pattern_available: /^Domain [\w\.]+ is not registered here\.\n/
        }
      end

    end
  end
end


text:
define([
    'jquery',
    'snowMenuTree',
    'snowMenuEditorInit'
], function($) {
    return function(options, element) {
        var buttonContainer = $(element),
            treeContainer   = $('#snowmenu_tree_container'),
            tree            = treeContainer.jstree(true);

        buttonContainer.children('button').click(function(e) {
            e.preventDefault();
            var selected = tree.get_selected();

            if (selected.length === 0) {
                selected = '#';
            }

            if ($(this).data('type')) {
                var data = {
                        data: {
                            type: $(this).data('type')
                        }
                    },
                    nodeId = tree.create_node(selected, data);

                tree.deselect_node(selected);
                tree.select_node(nodeId);
            }
            else if ($(this).data('remove') && selected !== '#') {
                tree.delete_node(selected);
            }
        });
    }
});


text:
var wp_config;
var ENV = process.env.NODE_ENV;

if(ENV=='production'){
    console.log('生产环境--------------------------------------------------');
    wp_config = require('./webpack.config.pub');
}else{
    console.log('开发环境--------------------------------------------------');
    wp_config = require('./webpack.config.dev');
}

module.exports = wp_config;


text:
Rails.application.routes.draw do
  if Rails.env.test? || Rails.env.development?
    mount AccessLint::Rails::Engine, at: "access_lint"
  end
  root to: "home#index"
end


text:
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
    <title>RawPHP - RawRequest Library</title>
    <parser>
        <target>docs/reference/rawrequest/v0.x-dev/parser</target>
        <markers>
            <item>TODO</item>
        </markers>
        <extensions>
            <extension>php</extension>
        </extensions>
        <visibility></visibility>
    </parser>
    <logging>
        <level>warn</level>
        <paths>
            <default>{APP_ROOT}/data/log/{DATE}.log</default>
            <errors>{APP_ROOT}/data/log/{DATE}.errors.log</errors>
        </paths>
    </logging>
    <transformer>
        <target>docs/reference/rawrequest/v0.x-dev</target>
    </transformer>
    <transformations>
        <template name="responsive-twig" />
    </transformations>
    <files>
        <directory>lib/</directory>
    </files>
</phpdoc>


text:
(function (root, factory) {
  'use strict';

  if (typeof define === 'function' && define.amd) {
    define(factory);
  } else {
    root.Carpet = factory();
  }
}(this, function () {
  'use strict';

  var Carpet;

  Carpet = function Carpet() {
    var carpetModules;
    var carpetComponents;
    var arraySlice;

    carpetModules = {};
    carpetComponents = {};
    arraySlice = Array.prototype.slice;

    return {
      /**
       * Defines console output on or off
       *
       * @type {Boolean}
       * @memberOf Carpet
       */
      loggingEnabled : false,

      /**
       * Will log something in console only if Carpet.loggingEnabled is true
       *
       * @example
       *
       *  Carpet.log('I want to log text');                                 // => Carpet:log (23/11/2012 16:18:42) ["I want to log text"]
       *  Carpet.log('I want to log text', { and: 'a javascript object' }); // => Carpet:log (23/11/2012 16:19:01) ["I want to log text", > Object]
       *
       * @memberOf Carpet
       * @method log
       *
       * @param     {Any[]}  Any number of arguments of any type, all would be logged
       */
      log : function (/* arg1, arg2, ..., argn */) {
        this.debug.apply(this, ['log'].concat(arraySlice.call(arguments)));
      },

      /**
       * Will warn something in console only if Carpet.loggingEnabled is true
       *
       * @example
       *
       *  Carpet.warn('I want to log a warning');                                 // => Carpet:warn (23/11/2012 16:18:42) ["I want to log a warning"]
       *  Carpet.warn('I want to log a warning', { and: 'a javascript object' }); // => Carpet:warn (23/11/2012 16:19:01) ["I want to log a warning", > Object]
       *
       * @memberOf Carpet
       * @method warn
       *
       * @param     {Any[]}  Any number of arguments of any type, all would be warned
       */
      warn : function (/* arg1, arg2, ..., argn */) {
        this.debug.apply(this, ['warn'].concat(arraySlice.call(arguments)));
      },

      /**
       * Will log something in console only if Carpet.loggingEnabled is true
       *
       * @example
       *
       *  Carpet.error('I want to log an error');                                 // => Carpet:error (23/11/2012 16:18:42) ["I want to log an error"]
       *  Carpet.error('I want to log an error', { and: 'a javascript object' }); // => Carpet:error (23/11/2012 16:19:01) ["I want to log an error", > Object]
       *
       * @memberOf Carpet
       * @method error
       *
       * @param     {Any[]}  Any number of arguments of any type, all would be logged
       */
      error : function (/* arg1, arg2, ..., argn */) {
        this.debug.apply(this, ['error'].concat(arraySlice.call(arguments)));
      },

      /**
       * Will log something in console only if Carpet.loggingEnabled is true
       *
       * @example
       *
       *  Carpet.info('I want to log an info');                                 // => Carpet:info (23/11/2012 16:18:42) ["I want to log an info"]
       *  Carpet.info('I want to log an info', { and: 'a javascript object' }); // => Carpet:info (23/11/2012 16:19:01) ["I want to log an info", > Object]
       *
       * @memberOf Carpet
       * @method info
       *
       * @param     {Any[]}  Any number of arguments of any type, all would be logged
       */
      info : function (/* arg1, arg2, ..., argn */) {
        this.debug.apply(this, ['info'].concat(arraySlice.call(arguments)));
      },

      /**
       * Will clear all data that's already logged in console.
       *
       * @example
       *
       *  Carpet.clearConsole()
       *  // Console was cleared
       *
       * @memberOf Carpet
       * @method clearConsole
       */
      clearConsole : function () {
        this.debug.apply(this, ['clear']);
      },

      /**
       * Will debug something in console only if Carpet.loggingEnabled is true
       *
       * @example
       *
       *  Carpet.debug('log',   'I want to log text');          // => Carpet:log (23/11/2012 16:18:42) ["I want to log text"]
       *  Carpet.debug('warn',  'I want to log a warning');     // => Carpet:warn (23/11/2012 16:18:42) ["I want to log a warning"]
       *  Carpet.debug('error', 'I want to log an error');      // => Carpet:error (23/11/2012 16:18:42) ["I want to log an error"]
       *
       * @memberOf Carpet
       * @method debug
       *
       * @param     {String}  debugType   Type of debug info, can be 'log', 'warn' or 'error'
       * @param     {Any[]}               Any number of arguments of any type, all would be logged
       */
      debug : function (debugType /*, arg1, arg2, ..., argn */) {
        var args;
        if (this.loggingEnabled) {
          if (window.console && window.console[debugType] && window.console[debugType].apply) {
            args = arraySlice.call(arguments, 1);
            window.console[debugType].apply(window.console, ['Carpet:{0}'.replace('{0}', debugType), args]);
          }
        }
      },

      /**
       * Will create a new module and add returned methods to the modules namespace
       *
       * @example
       *
       *  // Single instance (the same for all modules, with shared settings etc)
       *  Carpet.module('sampleModule', function (exports, settings, DOMContext) {
       *
       *    var config = {
       *      privateVar: 123
       *    };
       *
       *    var privateFunction = function () {
       *      console.log('This is a private function. Do whatever you want.');
       *      console.log('We have access to public ', settings, ' and public methods ', exports, ' and context :)');
       *    };
       *
       *    exports.sampleMethod = function () {
       *      console.log('This is a sample method');
       *      console.log('We are working on ', DOMContext, ' element');
       *      privateFunction();
       *    };
       *
       *    exports.init = function () {
       *      console.log('this is automatically called after module is loaded');
       *      this.sampleMethod();
       *    };
       *
       *  });
       *
       *
       * @memberOf Carpet
       * @method module
       *
       * @param  {String}   moduleName Name of the module
       * @param  {Function} callback   Actual module body
       */
      module : function (moduleName, initCallback) {
        if (carpetModules[moduleName]) {
          this.warn('Module: {0} already exists. Name collision'.replace('{0}', moduleName));
          return;
        }

        carpetModules[moduleName] = {
          moduleBody : initCallback,
          name       : moduleName,
          settings   : {},
          methods    : {},
          component  : this.getComponent.bind(this)
        };

        this.info('Module: {0} has been loaded to memory'.replace('{0}', moduleName));
      },

      /**
       * Will create a custom component that can be used in 'module' or globally
       *
       * @example
       *
       * Carpet.registerComponent('componentName', function () {
       *
       *   Carpet.log(this); // => { name: 'componentName', componentBody: function...}
       *
       *   return {
       *     componentMethod : function () {
       *       return 1;
       *     },
       *     componentProperty : [1, 5, 7],
       *     anythingYouWant : {}
       *   };
       * });
       *
       *
       * @memberOf Carpet
       * @method registerComponent
       *
       * @param  {String}   componentName  Name of the component
       * @param  {Function} initCallback   Component body
       */
      registerComponent : function (componentName, initCallback) {
        if (carpetComponents[componentName]) {
          this.warn('Component: {0} already exists. Name collision'.replace('{0}', componentName));
        }

        carpetComponents[componentName] = {
          name          : componentName,
          componentBody : initCallback,
          initialized   : false
        };

        this.info('Component: {0} has been loaded to memory'.replace('{0}', componentName));
      },

      /**
       * Returns module by given module name
       *
       * @example
       * ...
       * Carpet.module('oneAnotherModule', function () {});
       * ...
       *
       * Carpet.getModule('oneAnotherModule'); // => { name: 'oneAnotherModule', methods: [...]}
       *
       * @memberOf Carpet
       * @method getModule
       *
       * @param  {String} moduleName Name of the module you want to get
       * @return {Object}            Module object
       */
      getModule : function (moduleName) {
        if (carpetModules[moduleName]) {
          return carpetModules[moduleName];
        }
        else {
          this.warn('Module: {0} has not been found in memory'.replace('{0}', moduleName));
        }
      },

      /**
       * Returns registered component by its name
       *
       * @example
       * ...
       * Carpet.registerComponent('uber', function () { return 1; });
       * ...
       *
       * Carpet.getComponent('uber'); // => 1
       *
       * @memberOf Carpet
       * @method getComponent
       *
       * @param  {String} componentName Name of the component you want to get
       * @return {Any}                  Any type that component represents
       */
      getComponent : function (componentName) {
        var component;

        component = carpetComponents[componentName];

        if (component) {
          if (!component.initialized) {
            component.initialized = true;
            component.instance = component.componentBody.call(component);
          }
          return component.instance;
        }
        else {
          this.warn('Component: {0} has not been found in memory'.replace('{0}', componentName));
        }
      },

      /**
       * Loads the modules if found in DOM ([data-module="myModule"])
       * It will automatically fire the `init` method if found inside the module
       *
       * @example
       *
       *

       *
       *
       *
       * @memberOf Carpet
       * @method init
       *
       */
      init : function () {

        var DOMModules = document.querySelectorAll('[data-module]');
        var Carpet = this;

        var moduleIterator;
        var domModule;
        var moduleSettings;
        var currentModule;

        moduleIterator = function (moduleName) {
          currentModule = carpetModules[moduleName];

          if (currentModule) {

            currentModule.settings = moduleSettings;
            currentModule.moduleBody.call(currentModule, currentModule.methods, currentModule.settings, domModule);

            if (typeof currentModule.methods.init === 'function') {
              Carpet.info('Module: {0} has been autoinited'.replace('{0}', currentModule.name));
              currentModule.methods.init();
            }
          }
          else {
            Carpet.warn('Module: {0} has not been found'.replace('{0}', moduleName));
          }
        };

        for (var moduleIndex = 0; moduleIndex < DOMModules.length; moduleIndex++) {
          var modules;

          domModule = DOMModules[moduleIndex];
          modules = domModule.getAttribute('data-module').split(' ');

          /*jshint -W054 */
          moduleSettings = new Function ('return ' + domModule.getAttribute('data-settings'))() || {};
          /*jshint +W054 */

          modules.forEach(moduleIterator);

        }
      }
    };

  };

  return new Carpet();
}));


text:
export PKGEVALEXTRA="/home/idunning/PackageEvaluator.jl/extra"
cd $PKGEVALEXTRA

# Set special .julia folder just for this run
export PKGTEST_DIR="/home/idunning/pkgtest"
export JULIA_PKGDIR="$PKGTEST_DIR/.julia"

# Make sure we know where Julia stable is (for cron job)
export ORIGPATH="$PATH"
export PATH="$PATH:/home/idunning/julia"

# Make sure test directory is totally empty
rm -rf $PKGTEST_DIR
mkdir $PKGTEST_DIR

# Initialize and install PackageEvaluator in JULIA_PKGDIR
julia -e 'Pkg.init(); Pkg.clone("https://github.com/IainNZ/PackageEvaluator.jl.git")'

# Run the tester on all packages (-1) and export JSON (J)
# Log STDOUT and STDERR to a file, e.g. genresults_2014-02-25-22.log
cd stable
julia ../genresults.jl -1 J 2>&1 | tee pkgeval_$(date '+%Y-%m-%d-%H').log

# Post .jsons to status.julialang.org
julia ../postresults.jl

echo "############# DONE WITH 0.2"

# Now we need to switch to nightly
# Script needs Python 2 and requests installed
cd $PKGTEST_DIR
git clone https://github.com/JuliaLang/julia.git
cd julia
export LASTGOODCOMMIT="$(python2 $PKGEVALEXTRA/get_last_good_commit.py)"
git checkout $LASTGOODCOMMIT
make
export PATH="$ORIGPATH:/home/idunning/pkgtest/julia"
echo $PATH
cd $PKGEVALEXTRA

# Initialize and install PackageEvaluator in JULIA_PKGDIR (v0.3 now)
julia -e 'Pkg.init(); Pkg.clone("https://github.com/IainNZ/PackageEvaluator.jl.git")'

# Run the tester on all packages (-1) and export JSON (J)
# Log STDOUT and STDERR to a file, e.g. genresultsnightly_2014-02-25-22.log
cd nightly
julia ../genresults.jl -1 J 2>&1 | tee pkgeval_$(date '+%Y-%m-%d-%H').log

# Post .jsons to status.julialang.org
julia ../postresults.jl


text:
import datetime
import dateutil
import pandas as pd
import numpy as np
import os

# Helpful debugger line copied from here: https://gist.github.com/obfusk/208597ccc64bf9b436ed
# import code; code.interact(local=dict(globals(), **locals()))

def map_column(table, f):
    labels = sorted(table[f].unique())
    mappings = dict()
    for i in range(len(labels)):
        mappings[labels[i]] = i
    table = table.replace({f: mappings})
    return table

def events_by_device_id(events, device_id):
    return events.loc[ events['device_id'] == str(device_id) ]

def timestamps_by_device_id(events, device_id):
    return map(dateutil.parser.parse, events_by_device_id(events, 6783790059735370898)['timestamp'].values)

def group_timestamps_to_array(events, device_id):
    timestamps_by_device_id(events, device_id)
    hours = map(lambda x: x.hour, timestamps_by_device_id(events, device_id))
    result_array = np.zeros(24)
    for hour in hours:
        result_array[hour] += 1
    return result_array

print("importing training data...")

# import code; code.interact(local=dict(globals(), **locals()))
print('opening events...')
events = pd.read_csv("data/events.csv", dtype={'device_id': np.str})
events['counts'] = events.groupby(['device_id'])['event_id'].transform('count')
events['mean_longitude'] = events.groupby(['device_id'])['longitude'].transform('mean')
events['mean_latitude'] = events.groupby(['device_id'])['latitude'].transform('mean')
events['hours'] = events['timestamp'].apply(lambda x: "hour" + x[11:13])
events['ones'] = 1
pivoted = events.pivot(columns='hours', values='ones')
hour_column_names = list(pivoted.columns.values)
pivoted['device_id'] = events['device_id']
pivoted.fillna(0, inplace=True)
for column in hour_column_names:
    events[column] = pivoted.groupby(['device_id'])[column].transform('sum')
events_small = events[['device_id', 'counts', 'mean_longitude', 'mean_latitude'] + hour_column_names].drop_duplicates('device_id')

print('opening app labels...')
app_labels = pd.read_csv("data/app_labels.csv", dtype={'app_id': np.str})
app_labels['label_id'] = app_labels['label_id'].apply(lambda x: "cat:" + str(x))

print('opening app events...')
app_events = pd.read_csv("data/app_events.csv", dtype={'app_id': np.str})
app_events = app_events[app_events.is_active == 1]
app_events = pd.merge(app_events, app_labels, how='left', on='app_id', left_index=True)
app_events['ones'] = 1
print('beginning app events pivoting...')
app_events_pivoted = app_events.pivot_table(index='event_id', columns='label_id', values='ones')
category_columns = list(app_events_pivoted.columns.values)
app_events_pivoted['event_id'] = app_events_pivoted.index
print('beginning app events merging...')
events_to_device_id = events[['device_id', 'event_id']]
foobar = pd.merge(app_events_pivoted, events_to_device_id, how='left', on='event_id')
print('beginning summing over categories...')
for col in category_columns:
    foobar[col] = foobar.groupby(['device_id'])[col].transform('sum')
foobar.fillna(-1, inplace=True)
foobar.drop('event_id', axis=1, inplace=True)

print('importing phone device models...')
pbd = pd.read_csv("data/phone_brand_device_model.csv", dtype={'device_id': np.str})
pbd.drop_duplicates('device_id', inplace=True)
pbd = map_column(pbd, 'phone_brand')
pbd = map_column(pbd, 'device_model')

print('setting up test table')
train = pd.read_csv("data/gender_age_train.csv", dtype={'device_id': np.str})
train = map_column(train, 'group')
train = train.drop(['gender'], axis=1)
train = train.drop(['age'], axis=1)
train = pd.merge(train, pbd, how='left', on='device_id', left_index=True)
train = pd.merge(train, events_small, how='left', on='device_id', left_index=True)
train = pd.merge(train, foobar, how='left', on='device_id', left_index=True)
train.fillna(-1, inplace=True)
train.drop_duplicates(subset=['device_id'], inplace=True)

print("importing test data...")

test = pd.read_csv("data/gender_age_test.csv", dtype={'device_id': np.str})
test = pd.merge(test, pbd, how='left', on='device_id', left_index=True)
test = pd.merge(test, events_small, how='left', on='device_id', left_index=True)
test = pd.merge(test, foobar, how='left', on='device_id', left_index=True)
test.fillna(-1, inplace=True)
test.drop_duplicates(subset=['device_id'], inplace=True)

f = open('data/train_features.csv', 'w')
train.to_csv(path_or_buf=f)
f.close()

f = open('data/test_features.csv', 'w')
test.to_csv(path_or_buf=f)
f.close()

# import code; code.interact(local=dict(globals(), **locals()))


text:
using System;

namespace PCSComUtils.MasterSetup.DS
{

	[Serializable]
	public class MST_DepartmentVO
	{
		private int mDepartmentID;
		private string mCode;
		private string mName;

		public int DepartmentID
		{
			set { mDepartmentID = value; }
			get { return mDepartmentID; }
		}
		public string Code
		{
			set { mCode = value; }
			get { return mCode; }
		}
		public string Name
		{
			set { mName = value; }
			get { return mName; }
		}
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Senparc.Weixin.MP.Entities
{
    public class ResponseMessageText : ResponseMessageBase, IResponseMessageBase
    {
        new public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.Text; }
        }
        public string Content { get; set; }
    }
}


text:
class SavedSearchesController < ApplicationController
  include Bpluser::SavedSearches
end


text:
// .NAME vtkOpenGLHardwareSupport - OpenGL rendering window
// .SECTION Description
// vtkOpenGLHardwareSupport is an implementation of methods used
// to query OpenGL and the hardware of what kind of graphics support
// is available. When VTK supports more than one Graphics API an
// abstract super class vtkHardwareSupport should be implemented
// for this class to derive from.

#ifndef __vtkOpenGLHardwareSupport_h
#define __vtkOpenGLHardwareSupport_h

#include "vtkRenderingOpenGLExport.h" // For export macro
#include "vtkObject.h"

class vtkOpenGLExtensionManager;

class VTKRENDERINGOPENGL_EXPORT vtkOpenGLHardwareSupport : public vtkObject //: public vtkHardwareSupport
{
public:
  vtkTypeMacro(vtkOpenGLHardwareSupport,vtkObject);
  void PrintSelf(ostream& os, vtkIndent indent);

  static vtkOpenGLHardwareSupport *New();

  // Description:
  // Return the number of fixed-function texture units.
  int GetNumberOfFixedTextureUnits();

  // Description:
  // Return the total number of texture image units accessible by a shader
  // program.
  int GetNumberOfTextureUnits();

  // Description:
  // Test if MultiTexturing is supported.
  bool GetSupportsMultiTexturing();

  // Description:
  // Set/Get a reference to a vtkRenderWindow which is Required
  // for most methods of this class to work.
  vtkGetObjectMacro(ExtensionManager, vtkOpenGLExtensionManager);
  void SetExtensionManager(vtkOpenGLExtensionManager* extensionManager);

protected:
  vtkOpenGLHardwareSupport();
  ~vtkOpenGLHardwareSupport();

private:
  vtkOpenGLHardwareSupport(const vtkOpenGLHardwareSupport&);  // Not implemented.
  void operator=(const vtkOpenGLHardwareSupport&);  // Not implemented.

  bool ExtensionManagerSet();

  vtkOpenGLExtensionManager* ExtensionManager;
};

#endif


text:
.. webapi-error::
   :title: Group Already Exists
   :instance: reviewboard.webapi.errors.GROUP_ALREADY_EXISTS

   An attempt was made to create a review group, but that group already
   exists.


text:
require 'spec_helper'
describe Recurs::Rules do
  it "should respond to class/module variables" do
    Recurs::Rules.repeat_procs
    Recurs::Rules.schemes
  end

    it "should build Daily" do
      Recurs::Rules.repeat_procs['Daily'].call(true, :count => 10).should == "RRULE:FREQ=DAILY;COUNT=10"
    end
#=begin
    it 'Every Weekday ( Mon - Fri )' do
      Recurs::Rules.repeat_procs['Every Weekday ( Mon - Fri )'].call(true, :count => 10).should == "RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;COUNT=10"
    end

    it 'Every Mon, Wed, Fri' do
      Recurs::Rules.repeat_procs['Every Mon, Wed, Fri'].call(true, :count => 10).should == "RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=10"
    end

    it 'Every Tues, Thurs' do
      Recurs::Rules.repeat_procs['Every Tues, Thurs'].call(true, :count => 10).should == "RRULE:FREQ=WEEKLY;BYDAY=TU,TH;COUNT=10"
    end

    it 'Every Weekend' do
      Recurs::Rules.repeat_procs['Every Weekend'].call(true, :count => 10).should == "RRULE:FREQ=WEEKLY;BYDAY=SU,SA;COUNT=10"
    end

    it 'Weekly' do
      Recurs::Rules.repeat_procs['Weekly'].call(true, :count => 10).should == "RRULE:FREQ=WEEKLY;COUNT=10"
    end

    it 'Monthly' do
      Recurs::Rules.repeat_procs['Monthly'].call(true, :count => 10).should == "RRULE:FREQ=MONTHLY;COUNT=10"
    end

    it 'Yearly' do
      Recurs::Rules.repeat_procs['Yearly'].call(true, :count => 10).should == "RRULE:FREQ=YEARLY;COUNT=10"
    end
#=end
end


text:
Portfolio

There's always the satisfaction that you have done something for somebody that goes beyond the commercial aspects of the show.

        and here is what I have done

Kiitos. Thank you.

    	    <button ng-click="card=false" class="flex-close"></button>

{{card.title}}

            {{card.url_label}}

            {{link.url_label}}

                 <{{tag}}>

Employer: {{card.employer}}

{{card.year}}

        <flex-slider slide="image in card.images" animation="fade" animation-loop="false" prev-text="" next-text="">

        </flex-slider>


text:
from pprint import pprint
import requests
from django.conf import settings
from PyDictionary import PyDictionary
import wikipedia
import sendgrid

sid = settings.EXOTEL_SID
token = settings.EXOTEL_TOKEN
api = settings.SENDGRID_API_TOKEN

def send_message(sid, token, sms_from, sms_to, sms_body):
    return requests.post('https://twilix.exotel.in/v1/Accounts/{sid}/Sms/send.json'.format(sid=sid),
        auth=(sid, token),
        data={
            'From': sms_from,
            'To': sms_to,
            'Body': sms_body
        })

if __name__ == '__main__':

    r = send_message(sid, token,
        sms_from='8050248326',  # sms_from='8808891988',
        sms_to='8050248326', # sms_to='9052161119',
        sms_body='Some message is sent')
    print r.status_code
    pprint(r.json())

def process_wiki(word):
    return wikipedia.summary(word)

def process_dictionary(word):
    meaning = "You searched for the word {}.  "
    dictionary = PyDictionary(word)
    our_meaning = dictionary.getMeanings()
    meaning = meaning.format(our_meaning.keys()[0])
    l = zip(our_meaning.values()[0].keys(),our_meaning.values()[0].values()[0])
    for idx in l:
        meaning += idx[0] + ":" + idx[1] + ", "
    return meaning[:-1]

def custom_send_email(msg):
    msg = msg.split(' ')
    from_email = msg[0]
    to_email = msg[1]
    body = " ".join(msg[2:])
    sg = sendgrid.SendGridClient(api)
    message = sendgrid.Mail(to=to_email, subject="Urgent Emails", text=body, from_email=from_email)
    status, msg = sg.send(message)
    print "status", status
    print "msg" ,msg
    if status==200:
        return "Email has been sent!"
    else:
        return "Email sending is delayed we are on it!"

    return " "

def connect_customer(sid, token, customer_no, exotel_no, callerid, url, timelimit=None, timeout=None, calltype="trans",
                     callback_url=None):
    return requests.post('https://twilix.exotel.in/v1/Accounts/{sid}/Calls/connect.json'.format(sid=sid),
        auth=(sid, token),
        data={
            'From': customer_no,
            'To': exotel_no,
            'CallerId': callerid,
            'Url': url,
            'TimeLimit': timelimit,
            'TimeOut': timeout,
            'CallType': calltype,
            'StatusCallback': callback_url
        })

if __name__ == '__main__':
    r = connect_customer(
        sid, token,
        customer_no="<Your-Customer's-Number>",
        exotel_no="<Your-Exotel-Landline-or-Mobile>",
        callerid="<Your-Exotel-virtual-number>",
        url="http://my.exotel.in/exoml/start/<flow_id>",
        timelimit="<time-in-seconds>",  # This is optional
        timeout="<time-in-seconds>",  # This is also optional
        calltype="trans",  # Can be "trans" for transactional and "promo" for promotional content
        callback_url="<http//: your company URL>"  # This is also also optional
        )
    print r.status_code
    pprint(r.json())

def get_help():
    message = "8050248326 email from_email to_email body \n" \
              "8050248326 dictionary term_to_search \n" \
              "8050248326 wiki thing_to_search_in_wiki \n" \
              "8050248326 song requested_song \n"
    print message
    return message


text:
import numpy as np
import time

# Options:
k = 3           # Number of versions
log = True      # Log data to mognodb

################################################################
# Increase overall count:
n = self.get_theta().get("n",1) + 1
self.set_theta({"n":n})

d = self.get_theta(action={'choice':self.action['choice']})
s = d.get("s",1) + self.reward
n = d.get("n",2) + 1
self.set_theta({"s":s, "n":n}, action={'choice':self.action['choice']})

# Logging current action, time, and context JSON
# Optional
if log:
    self.log_data({
        'type' : "setreward",
        'action' : self.action["choice"],
        'time' : int(time.time()),
        'context' : self.context
      })


text:
 # The Zamarra module contains a set of utlities for working with Zthes XML
 # documents
 # _____________________________________________________________________________
 #
 # Created by brightSPARK Labs
 # www.brightsparklabs.com
 ##

require 'rexml/document'
require File.expand_path('../model/term', __FILE__)
require File.expand_path('../model/zthes_document', __FILE__)

include Zamarra

module Zamarra

    ##
     # Reads Zthes data and creates models for it
     ##
    class Reader

        # ----------------------------------------------------------------------
        # PUBLIC METHODS
        # ----------------------------------------------------------------------

        ##
         # Reads a Zthes XML file
         #
         # @param xml [String]
         #          path to the XML file to read
         #
         # @return [ZthesDocument] the document created
         ##
        def self.read_zthes_xml(xml)
            xml = File.read(xml)
            document = REXML::Document.new(xml)

            terms = {}
            narrower_terms = []

            document.elements.each('Zthes/term') do |t|

                type = t.elements['termType'].text

                if type == "ND"
                    synonym = t.elements['termName'].text
                    relation = t.elements.to_a('relation').first
                    term_id = relation.elements['termId'].text
                    term = terms[term_id]
                    if term.nil?
                        puts "ERROR: Synonym '#{synonym}' references unknown term_id  #{term_id}"
                    else
                        term.add_synonym synonym
                    end
                end

                # only process 'Preferred Terms'
                next unless type == "PT"

                # create object
                term_id = t.elements['termId'].text
                term_name = t.elements['termName'].text
                term = Model::Term.new term_id, term_name

                # store all children ids
                t.elements.each('relation') do |relation|
                    if relation.elements['relationType'].text == "NT"
                        child_id = relation.elements['termId'].text
                        term.add_child_id child_id
                        narrower_terms << child_id
                    end
                end

                # map id to object
                terms[term_id] = term
            end

            terms.each do |term_id, term|
                term.children_ids.each { |child_id| term.add_child terms[child_id] }
            end

            top_level_terms = terms.reject { |term_id, term| narrower_terms.include? term_id }
            zthes_document = Model::ZthesDocument.new top_level_terms, terms
        end
    end
end


text:
<!DOCTYPE HTML>

		<meta charset="UTF-8">
		<title>OPA for Sticky Service</title>

		<base href="../../../../../../../../../">

		<link href="resources/sap/ui/thirdparty/qunit-2.css" media="screen" rel="stylesheet">


text:
package io.emitter;

import java.util.HashMap;
import java.util.Map;

import com.cedarsoftware.util.io.*;

/**
 * Represents an key generation request.
 */
public class KeyGenRequest
{

	public String key;
	public String channel;
	public String type;
	public int ttl;

	/**
	 * Constructs a new instance of a request.
	 */
	private KeyGenRequest(){

	}

	/**
	 * Constructs a new instance of a request.
	 */
	public KeyGenRequest(String key, String channel, String type, int ttl) {
		 this.key = key;
		 this.channel = channel;
		 this.type = type;
		 this.ttl = ttl;
	}

	/**
	 * Converts the request to JSON format.
	 * @return JSON-formatted string.
	 */
	public String toJson(){
		Map args = new HashMap();
		args.put(JsonWriter.TYPE, false);
		return JsonWriter.objectToJson(this, args);
	}

}


text:
import json

from tempest.common.rest_client import RestClient

class ExtensionsClientJSON(RestClient):

    def __init__(self, config, username, password, auth_url, tenant_name=None):
        super(ExtensionsClientJSON, self).__init__(config, username, password,
                                                   auth_url, tenant_name)
        self.service = self.config.volume.catalog_type

    def list_extensions(self):
        url = 'extensions'
        resp, body = self.get(url)
        body = json.loads(body)
        return resp, body['extensions']


text:
package instrument;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import model.SymbCondition;
import model.Z3Solver;

public class InstrumentedMethod
{
	private String			_conditionsFieldName	= "_conditions";
	private String			_symbParamFieldName		= "_parameters";
	private List<Object[]>	_inputs;
	private Class<?>		_instrumentedClass;

	public InstrumentedMethod(Class<?> clas)
	{
		this._instrumentedClass = clas;
	}

	public List<Object[]> generateInputs(String methodName, Class<?>... parameterTypes) throws Exception
	{
		this._inputs = new ArrayList<>();
		Object clazz = _instrumentedClass.newInstance();
		Method methodCall = clazz.getClass().getMethod(methodName, parameterTypes);

		// Inicializo los parametros del método a ejecutar con cero.
		Object[] values = new Object[parameterTypes.length];
		for (int i = 0; i < values.length; i++)
		{
			values[i] = 0;
		}
		try
		{
			methodCall.invoke(clazz, values);
		} catch (Exception e)
		{
			// TODO: !!!!!
		}
		addValuesToReturnList(values);

		Field conditionsField = clazz.getClass().getDeclaredField(_conditionsFieldName);
		@SuppressWarnings("unchecked")
		Collection<SymbCondition> conditionsSymb = (Collection<SymbCondition>) conditionsField.get(clazz);
		// System.out.println("Condiciones: " + conditionsSymb);

		Field symbParamField = clazz.getClass().getDeclaredField(_symbParamFieldName);
		@SuppressWarnings("unchecked")
		List<String> symbParams = (ArrayList<String>) symbParamField.get(clazz);

		while (!conditionsSymb.isEmpty())
		{
			// int sizeConditions = conditionsSymb.size();
			negarYMarcarUltimaCondicion(conditionsSymb);
			// if (sizeConditions > conditionsSymb.size())
			// {
			// deleteUsedConditions(conditionsSymb);
			// negarYMarcarUltimaCondicion(conditionsSymb);
			// }
			Z3Solver z3 = new Z3Solver();
			// System.out.println("Condiciones a satisfacer: " +
			// conditionsSymb);
			Map<String, Integer> mapValues = z3.getSatisfiableValues(conditionsSymb);

			// si z3 encontro valores, corro con esos valores
			if (!mapValues.isEmpty())
			{
				// System.out.println("mapValues: " + mapValues.toString());
				Object[] intParams = new Object[symbParams.size()];
				int i = 0;
				for (String param : symbParams)
				{
					// TODO: a tener en cuenta!
					// Si no interesan todos los parámetros para esta ejecución,
					// a los que no importa les asigno cualquier número
					if (mapValues.get(param) == null)
					{
						intParams[i] = 0;
						break;
					}
					intParams[i] = mapValues.get(param);
					i++;
				}
				addValuesToReturnList(intParams);
				// TODO: podría guardar el resultado y usar esto para el generar
				// tests, así no
				// ejecuto de nuevo el método al generar los casos de test!
				methodCall.invoke(clazz, intParams);
			}
			deleteUsedConditions(conditionsSymb);
			// System.out.println("conditions processed: " + conditionsSymb);
		}

		// conditionsSymb = null;

		return _inputs;
	}

	/**
	 * Elimino en orden inverso las condiciones marcadas como ya negadas
	 *
	 * @param conditionsSymb
	 */
	private void deleteUsedConditions(Collection<SymbCondition> conditionsSymb)
	{
		List<SymbCondition> copyConditions = new ArrayList<>(conditionsSymb);
		int sizeList = copyConditions.size() - 1;
		for (int i = sizeList; i >= 0; i--)
		{
			SymbCondition actualSymbCondition = copyConditions.get(i);
			if (!actualSymbCondition.isNegado())
				return;

			conditionsSymb.remove(actualSymbCondition);
		}
	}

	private void negarYMarcarUltimaCondicion(Collection<SymbCondition> conditionsSymb)
	{
		SymbCondition condition = null;
		Iterator<SymbCondition> allCond = conditionsSymb.iterator();
		while (allCond.hasNext())
		{
			condition = allCond.next();
		}
		conditionsSymb.remove(condition);
		condition = condition.makeNegado();
		condition.setNegado(true);
		conditionsSymb.add(condition);
	}

	private void addValuesToReturnList(Object... params)
	{
		this._inputs.add(params);
	}

}


text:
package com.oureda.thunder.pobooks.activity.person;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.oureda.thunder.pobooks.CustomView.MyViewPager;
import com.oureda.thunder.pobooks.R;
import com.oureda.thunder.pobooks.base.BaseActivity;
import com.oureda.thunder.pobooks.base.ColorChange;
import com.oureda.thunder.pobooks.fragment.mark.FragmentMarkLabel;
import com.oureda.thunder.pobooks.fragment.mark.FragmentMarkFeel;
import com.oureda.thunder.pobooks.utils.ToastUtil;

import java.util.ArrayList;
import java.util.List;

public class ReadNoteActivity extends BaseActivity {
    private List<Fragment> fragmentList;
    private FragmentManager fragmentManager;
    private FragmentMarkLabel fragmentMarkLabel;
    private FragmentMarkFeel fragmentMarkFeel;
    private List<TextView> textViewList;
    private TextView feel;
    private TextView label;
    private MyViewPager viewPager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_read_note);
        initToolbar(R.id.toolbar_read_note_person,"读书笔记",R.drawable.ic_menu);
        feel= (TextView) findViewById(R.id.feel_read_note_person);
        label = (TextView) findViewById(R.id.marks__read_note_person);
        init();
        viewPager = (MyViewPager) findViewById(R.id.viewPage_read_note_person);
        viewPager.initAll(2,R.id.underline_read_note_person,fragmentList,fragmentManager,getWindow().getDecorView());
        viewPager.setAdapter(viewPager.myAdapter);
        viewPager.setOnPageChangeListener(viewPager.listener);
        viewPager.setCurrentItem(0);
        viewPager.setColorChange(new ColorChange() {
            @Override
            public void OnColorChange() {
                for(int i = 0;i<textViewList.size();++i){
                    if (i==viewPager.getCurrentItem()){
                        textViewList.get(i).setTextColor(getResources().getColor(R.color.colorAccent));
                    }else{
                        textViewList.get(i).setTextColor(getResources().getColor(R.color.colorWhite));
                    }
                }
            }
        });

    }
    private void init(){
        textViewList=new ArrayList<>();
        fragmentList=new ArrayList<>();
        textViewList.add(label);
        label.setTextColor(getResources().getColor(R.color.colorAccent));
        label.setOnClickListener(new MyClickListen(0));
        feel.setOnClickListener(new MyClickListen(1));
        feel.setTextColor(getResources().getColor(R.color.colorWhite));
        textViewList.add(feel);
        fragmentMarkLabel =new FragmentMarkLabel();
        fragmentMarkFeel=new FragmentMarkFeel();
        fragmentList.add(fragmentMarkLabel);
        fragmentList.add(fragmentMarkFeel);
        fragmentManager=getSupportFragmentManager();

    }
    private class MyClickListen implements View.OnClickListener{
        int position;

        public MyClickListen(int position) {
            this.position = position;
        }

        @Override
        public void onClick(View v) {
            viewPager.setCurrentItem(position);
            ToastUtil.showToast(viewPager.getCurrentItem()+"");
        }
    }
}


text:
<?php

namespace Com\DaufinBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CaisseType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('typeCaisse','choice',array('label'=>'Code Agence','attr'=>array('class'=>'form-control parsley-validated'),
                                 'choices' => array('espece'=>'Espéce',
                                                    'banque'=>'Banque')))
            ->add('libelleCaisse',null,array('label'=>'Code Agence','attr'=>array('class'=>'form-control parsley-validated')))
        //    ->add('dateDebut',null,array('label'=>'Code Agence','attr'=>array('class'=>'form-control parsley-validated')))
            ->add('soldeCaisse',null,array('label'=>'Code Agence','attr'=>array('class'=>'form-control parsley-validated')))
            ->add('categorieCaisse','choice', array(
						    'choices' => array(
						        	'Service'   => 'Service',
						        	'Depense' => 'Dépense',
						    ),
						    'multiple' => false,
        					'required' => true,
        			        'label'=>'Mode',
	        			    'placeholder' => '--SELECTIONNER--'
						   ))
         //   ->add('agence')
        ;
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Com\DaufinBundle\Entity\Caisse'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'com_daufinbundle_caisse';
    }
}


text:
APITimelineItem::APITimelineItem() : acAPITimelineItem(std::numeric_limits<quint64>::max(), std::numeric_limits<quint64>::min(), -1), m_pTraceTableItem(NULL)
{
}
APITimelineItem::APITimelineItem(quint64 startTime, quint64 endTime, int apiIndex) : acAPITimelineItem(startTime, endTime, apiIndex), m_pTraceTableItem(NULL)
{
}

void APITimelineItem::tooltipItems(acTimelineItemToolTip& tooltip) const
{
    // Add the base class tooltip items:
    acAPITimelineItem::tooltipItems(tooltip);

    if (m_pTraceTableItem != NULL)
    {
        QString strDeviceTime = m_pTraceTableItem->GetColumnData(TraceTableModel::TRACE_DEVICE_TIME_COLUMN).toString();

        if (!strDeviceTime.isEmpty())
        {
            quint64 deviceTime = (quint64)(strDeviceTime.toFloat() * 1000000);
            strDeviceTime = getDurationString(deviceTime);
            tooltip.add(tr("Device Time"), strDeviceTime);
        }
    }
}

DispatchAPITimelineItem::DispatchAPITimelineItem(acAPITimelineItem* deviceItem, acAPITimelineItem* item) : APITimelineItem(item->startTime(), item->endTime(), item->apiIndex()), m_deviceItem(deviceItem)
{
    m_strText = item->text();
    m_backgroundColor = item->backgroundColor();
    m_foregroundColor = item->foregroundColor();
}

DispatchAPITimelineItem::DispatchAPITimelineItem(const QString& text) : APITimelineItem(), m_deviceItem(nullptr)
{
    m_strText = text;
}

HostAPITimelineItem::HostAPITimelineItem(quint64 startTime, quint64 endTime, int apiIndex) : APITimelineItem(startTime, endTime, apiIndex), m_pHostItem(NULL)
{
}

PerfMarkerTimelineItem::PerfMarkerTimelineItem(quint64 startTime, quint64 endTime) : acTimelineItem(startTime, endTime), m_pTraceTableItem(NULL)
{

}

CommandListTimelineItem::CommandListTimelineItem(quint64 startTime, quint64 endTime, const QString& commandListPtr):
    acTimelineItem(startTime, endTime), m_commandListPtr(commandListPtr)
{

}

void CommandListTimelineItem::tooltipItems(acTimelineItemToolTip& tooltip) const
{
    tooltip.add(text(), m_commandListPtr);

    quint64 timelineStartTime = 0;
    if (m_pParentBranch != NULL)
    {
        acTimeline* timeline = m_pParentBranch->parentTimeline();

        if (timeline != NULL)
        {
            timelineStartTime = timeline->startTime();
        }
    }

    // Convert the start and end times to milliseconds
    double fnumStart = (m_nStartTime - timelineStartTime) / 1e6;
    double fnumEnd = (m_nEndTime - timelineStartTime) / 1e6; // convert to milliseconds

    quint64 duration = m_nEndTime - m_nStartTime;
    QString durationStr = NanosecToTimeString(duration, true, false);

    QString tooltipLine = QString(GPU_STR_APITimeline_TimeTooltipLine).arg(fnumStart, 0, 'f', 3).arg(fnumEnd, 0, 'f', 3).arg(durationStr);
    tooltip.add("", tooltipLine);
}


text:
mapchete.formats.default.geobuf module
======================================

.. automodule:: mapchete.formats.default.geobuf
   :members:
   :undoc-members:
   :show-inheritance: