text:
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: codepipeline
using AWS.Compat
using AWS.UUIDs

"""
    acknowledge_job(job_id, nonce)
    acknowledge_job(job_id, nonce, params::Dict{String,<:Any})

Returns information about a specified job and whether that job has been received by the job
worker. Used for custom actions only.

# Arguments
- `job_id`: The unique system-generated ID of the job for which you want to confirm receipt.
- `nonce`: A system-generated random number that AWS CodePipeline uses to ensure that the
  job is being worked on by only one job worker. Get this number from the response of the
  PollForJobs request that returned this job.

"""
acknowledge_job(jobId, nonce; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("AcknowledgeJob", Dict{String, Any}("jobId"=>jobId, "nonce"=>nonce); aws_config=aws_config)
acknowledge_job(jobId, nonce, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("AcknowledgeJob", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("jobId"=>jobId, "nonce"=>nonce), params)); aws_config=aws_config)

"""
    acknowledge_third_party_job(client_token, job_id, nonce)
    acknowledge_third_party_job(client_token, job_id, nonce, params::Dict{String,<:Any})

Confirms a job worker has received the specified job. Used for partner actions only.

# Arguments
- `client_token`: The clientToken portion of the clientId and clientToken pair used to
  verify that the calling entity is allowed access to the job and its details.
- `job_id`: The unique system-generated ID of the job.
- `nonce`: A system-generated random number that AWS CodePipeline uses to ensure that the
  job is being worked on by only one job worker. Get this number from the response to a
  GetThirdPartyJobDetails request.

"""
acknowledge_third_party_job(clientToken, jobId, nonce; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("AcknowledgeThirdPartyJob", Dict{String, Any}("clientToken"=>clientToken, "jobId"=>jobId, "nonce"=>nonce); aws_config=aws_config)
acknowledge_third_party_job(clientToken, jobId, nonce, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("AcknowledgeThirdPartyJob", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>clientToken, "jobId"=>jobId, "nonce"=>nonce), params)); aws_config=aws_config)

"""
    create_custom_action_type(category, input_artifact_details, output_artifact_details, provider, version)
    create_custom_action_type(category, input_artifact_details, output_artifact_details, provider, version, params::Dict{String,<:Any})

Creates a new custom action that can be used in all pipelines associated with the AWS
account. Only used for custom actions.

# Arguments
- `category`: The category of the custom action, such as a build action or a test action.
- `input_artifact_details`: The details of the input artifact for the action, such as its
  commit ID.
- `output_artifact_details`: The details of the output artifact of the action, such as its
  commit ID.
- `provider`: The provider of the service used in the custom action, such as AWS CodeDeploy.
- `version`: The version identifier of the custom action.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"configurationProperties"`: The configuration properties for the custom action.  You can
  refer to a name in the configuration properties of the custom action within the URL
  templates by following the format of {Config:name}, as long as the configuration property
  is both required and not secret. For more information, see Create a Custom Action for a
  Pipeline.
- `"settings"`: URLs that provide users information about this custom action.
- `"tags"`: The tags for the custom action.
"""
create_custom_action_type(category, inputArtifactDetails, outputArtifactDetails, provider, version; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("CreateCustomActionType", Dict{String, Any}("category"=>category, "inputArtifactDetails"=>inputArtifactDetails, "outputArtifactDetails"=>outputArtifactDetails, "provider"=>provider, "version"=>version); aws_config=aws_config)
create_custom_action_type(category, inputArtifactDetails, outputArtifactDetails, provider, version, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("CreateCustomActionType", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("category"=>category, "inputArtifactDetails"=>inputArtifactDetails, "outputArtifactDetails"=>outputArtifactDetails, "provider"=>provider, "version"=>version), params)); aws_config=aws_config)

"""
    create_pipeline(pipeline)
    create_pipeline(pipeline, params::Dict{String,<:Any})

Creates a pipeline.  In the pipeline structure, you must include either artifactStore or
artifactStores in your pipeline, but you cannot use both. If you create a cross-region
action in your pipeline, you must use artifactStores.

# Arguments
- `pipeline`: Represents the structure of actions and stages to be performed in the
  pipeline.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"tags"`: The tags for the pipeline.
"""
create_pipeline(pipeline; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("CreatePipeline", Dict{String, Any}("pipeline"=>pipeline); aws_config=aws_config)
create_pipeline(pipeline, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("CreatePipeline", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipeline"=>pipeline), params)); aws_config=aws_config)

"""
    delete_custom_action_type(category, provider, version)
    delete_custom_action_type(category, provider, version, params::Dict{String,<:Any})

Marks a custom action as deleted. PollForJobs for the custom action fails after the action
is marked for deletion. Used for custom actions only.  To re-create a custom action after
it has been deleted you must use a string in the version field that has never been used
before. This string can be an incremented version number, for example. To restore a deleted
custom action, use a JSON file that is identical to the deleted action, including the
original string in the version field.

# Arguments
- `category`: The category of the custom action that you want to delete, such as source or
  deploy.
- `provider`: The provider of the service used in the custom action, such as AWS CodeDeploy.
- `version`: The version of the custom action to delete.

"""
delete_custom_action_type(category, provider, version; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeleteCustomActionType", Dict{String, Any}("category"=>category, "provider"=>provider, "version"=>version); aws_config=aws_config)
delete_custom_action_type(category, provider, version, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeleteCustomActionType", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("category"=>category, "provider"=>provider, "version"=>version), params)); aws_config=aws_config)

"""
    delete_pipeline(name)
    delete_pipeline(name, params::Dict{String,<:Any})

Deletes the specified pipeline.

# Arguments
- `name`: The name of the pipeline to be deleted.

"""
delete_pipeline(name; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeletePipeline", Dict{String, Any}("name"=>name); aws_config=aws_config)
delete_pipeline(name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeletePipeline", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name), params)); aws_config=aws_config)

"""
    delete_webhook(name)
    delete_webhook(name, params::Dict{String,<:Any})

Deletes a previously created webhook by name. Deleting the webhook stops AWS CodePipeline
from starting a pipeline every time an external event occurs. The API returns successfully
when trying to delete a webhook that is already deleted. If a deleted webhook is re-created
by calling PutWebhook with the same name, it will have a different URL.

# Arguments
- `name`: The name of the webhook you want to delete.

"""
delete_webhook(name; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeleteWebhook", Dict{String, Any}("name"=>name); aws_config=aws_config)
delete_webhook(name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeleteWebhook", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name), params)); aws_config=aws_config)

"""
    deregister_webhook_with_third_party()
    deregister_webhook_with_third_party(params::Dict{String,<:Any})

Removes the connection between the webhook that was created by CodePipeline and the
external tool with events to be detected. Currently supported only for webhooks that target
an action type of GitHub.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"webhookName"`: The name of the webhook you want to deregister.
"""
deregister_webhook_with_third_party(; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeregisterWebhookWithThirdParty"; aws_config=aws_config)
deregister_webhook_with_third_party(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DeregisterWebhookWithThirdParty", params; aws_config=aws_config)

"""
    disable_stage_transition(pipeline_name, reason, stage_name, transition_type)
    disable_stage_transition(pipeline_name, reason, stage_name, transition_type, params::Dict{String,<:Any})

Prevents artifacts in a pipeline from transitioning to the next stage in the pipeline.

# Arguments
- `pipeline_name`: The name of the pipeline in which you want to disable the flow of
  artifacts from one stage to another.
- `reason`: The reason given to the user that a stage is disabled, such as waiting for
  manual approval or manual tests. This message is displayed in the pipeline console UI.
- `stage_name`: The name of the stage where you want to disable the inbound or outbound
  transition of artifacts.
- `transition_type`: Specifies whether artifacts are prevented from transitioning into the
  stage and being processed by the actions in that stage (inbound), or prevented from
  transitioning from the stage after they have been processed by the actions in that stage
  (outbound).

"""
disable_stage_transition(pipelineName, reason, stageName, transitionType; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DisableStageTransition", Dict{String, Any}("pipelineName"=>pipelineName, "reason"=>reason, "stageName"=>stageName, "transitionType"=>transitionType); aws_config=aws_config)
disable_stage_transition(pipelineName, reason, stageName, transitionType, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("DisableStageTransition", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineName"=>pipelineName, "reason"=>reason, "stageName"=>stageName, "transitionType"=>transitionType), params)); aws_config=aws_config)

"""
    enable_stage_transition(pipeline_name, stage_name, transition_type)
    enable_stage_transition(pipeline_name, stage_name, transition_type, params::Dict{String,<:Any})

Enables artifacts in a pipeline to transition to a stage in a pipeline.

# Arguments
- `pipeline_name`: The name of the pipeline in which you want to enable the flow of
  artifacts from one stage to another.
- `stage_name`: The name of the stage where you want to enable the transition of artifacts,
  either into the stage (inbound) or from that stage to the next stage (outbound).
- `transition_type`: Specifies whether artifacts are allowed to enter the stage and be
  processed by the actions in that stage (inbound) or whether already processed artifacts are
  allowed to transition to the next stage (outbound).

"""
enable_stage_transition(pipelineName, stageName, transitionType; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("EnableStageTransition", Dict{String, Any}("pipelineName"=>pipelineName, "stageName"=>stageName, "transitionType"=>transitionType); aws_config=aws_config)
enable_stage_transition(pipelineName, stageName, transitionType, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("EnableStageTransition", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineName"=>pipelineName, "stageName"=>stageName, "transitionType"=>transitionType), params)); aws_config=aws_config)

"""
    get_action_type(category, owner, provider, version)
    get_action_type(category, owner, provider, version, params::Dict{String,<:Any})

Returns information about an action type created for an external provider, where the action
is to be used by customers of the external provider. The action can be created with any
supported integration model.

# Arguments
- `category`: Defines what kind of action can be taken in the stage. The following are the
  valid values:    Source     Build     Test     Deploy     Approval     Invoke
- `owner`: The creator of an action type that was created with any supported integration
  model. There are two valid values: AWS and ThirdParty.
- `provider`: The provider of the action type being called. The provider name is specified
  when the action type is created.
- `version`: A string that describes the action type version.

"""
get_action_type(category, owner, provider, version; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetActionType", Dict{String, Any}("category"=>category, "owner"=>owner, "provider"=>provider, "version"=>version); aws_config=aws_config)
get_action_type(category, owner, provider, version, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetActionType", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("category"=>category, "owner"=>owner, "provider"=>provider, "version"=>version), params)); aws_config=aws_config)

"""
    get_job_details(job_id)
    get_job_details(job_id, params::Dict{String,<:Any})

Returns information about a job. Used for custom actions only.  When this API is called,
AWS CodePipeline returns temporary credentials for the S3 bucket used to store artifacts
for the pipeline, if the action requires access to that S3 bucket for input or output
artifacts. This API also returns any secret values defined for the action.

# Arguments
- `job_id`: The unique system-generated ID for the job.

"""
get_job_details(jobId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetJobDetails", Dict{String, Any}("jobId"=>jobId); aws_config=aws_config)
get_job_details(jobId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetJobDetails", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("jobId"=>jobId), params)); aws_config=aws_config)

"""
    get_pipeline(name)
    get_pipeline(name, params::Dict{String,<:Any})

Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return
the entire structure of a pipeline in JSON format, which can then be modified and used to
update the pipeline structure with UpdatePipeline.

# Arguments
- `name`: The name of the pipeline for which you want to get information. Pipeline names
  must be unique under an AWS user account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"version"`: The version number of the pipeline. If you do not specify a version,
  defaults to the current version.
"""
get_pipeline(name; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetPipeline", Dict{String, Any}("name"=>name); aws_config=aws_config)
get_pipeline(name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetPipeline", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name), params)); aws_config=aws_config)

"""
    get_pipeline_execution(pipeline_execution_id, pipeline_name)
    get_pipeline_execution(pipeline_execution_id, pipeline_name, params::Dict{String,<:Any})

Returns information about an execution of a pipeline, including details about artifacts,
the pipeline execution ID, and the name, version, and status of the pipeline.

# Arguments
- `pipeline_execution_id`: The ID of the pipeline execution about which you want to get
  execution details.
- `pipeline_name`: The name of the pipeline about which you want to get execution details.

"""
get_pipeline_execution(pipelineExecutionId, pipelineName; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetPipelineExecution", Dict{String, Any}("pipelineExecutionId"=>pipelineExecutionId, "pipelineName"=>pipelineName); aws_config=aws_config)
get_pipeline_execution(pipelineExecutionId, pipelineName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetPipelineExecution", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineExecutionId"=>pipelineExecutionId, "pipelineName"=>pipelineName), params)); aws_config=aws_config)

"""
    get_pipeline_state(name)
    get_pipeline_state(name, params::Dict{String,<:Any})

Returns information about the state of a pipeline, including the stages and actions.
Values returned in the revisionId and revisionUrl fields indicate the source revision
information, such as the commit ID, for the current state.

# Arguments
- `name`: The name of the pipeline about which you want to get information.

"""
get_pipeline_state(name; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetPipelineState", Dict{String, Any}("name"=>name); aws_config=aws_config)
get_pipeline_state(name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetPipelineState", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name), params)); aws_config=aws_config)

"""
    get_third_party_job_details(client_token, job_id)
    get_third_party_job_details(client_token, job_id, params::Dict{String,<:Any})

Requests the details of a job for a third party action. Used for partner actions only.
When this API is called, AWS CodePipeline returns temporary credentials for the S3 bucket
used to store artifacts for the pipeline, if the action requires access to that S3 bucket
for input or output artifacts. This API also returns any secret values defined for the
action.

# Arguments
- `client_token`: The clientToken portion of the clientId and clientToken pair used to
  verify that the calling entity is allowed access to the job and its details.
- `job_id`: The unique system-generated ID used for identifying the job.

"""
get_third_party_job_details(clientToken, jobId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetThirdPartyJobDetails", Dict{String, Any}("clientToken"=>clientToken, "jobId"=>jobId); aws_config=aws_config)
get_third_party_job_details(clientToken, jobId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("GetThirdPartyJobDetails", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>clientToken, "jobId"=>jobId), params)); aws_config=aws_config)

"""
    list_action_executions(pipeline_name)
    list_action_executions(pipeline_name, params::Dict{String,<:Any})

Lists the action executions that have occurred in a pipeline.

# Arguments
- `pipeline_name`:  The name of the pipeline for which you want to list action execution
  history.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"filter"`: Input information used to filter action execution history.
- `"maxResults"`: The maximum number of results to return in a single call. To retrieve the
  remaining results, make another call with the returned nextToken value. Action execution
  history is retained for up to 12 months, based on action execution start times. Default
  value is 100.   Detailed execution history is available for executions run on or after
  February 21, 2019.
- `"nextToken"`: The token that was returned from the previous ListActionExecutions call,
  which can be used to return the next set of action executions in the list.
"""
list_action_executions(pipelineName; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListActionExecutions", Dict{String, Any}("pipelineName"=>pipelineName); aws_config=aws_config)
list_action_executions(pipelineName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListActionExecutions", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineName"=>pipelineName), params)); aws_config=aws_config)

"""
    list_action_types()
    list_action_types(params::Dict{String,<:Any})

Gets a summary of all AWS CodePipeline action types associated with your account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"actionOwnerFilter"`: Filters the list of action types to those created by a specified
  entity.
- `"nextToken"`: An identifier that was returned from the previous list action types call,
  which can be used to return the next set of action types in the list.
- `"regionFilter"`: The Region to filter on for the list of action types.
"""
list_action_types(; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListActionTypes"; aws_config=aws_config)
list_action_types(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListActionTypes", params; aws_config=aws_config)

"""
    list_pipeline_executions(pipeline_name)
    list_pipeline_executions(pipeline_name, params::Dict{String,<:Any})

Gets a summary of the most recent executions for a pipeline.

# Arguments
- `pipeline_name`: The name of the pipeline for which you want to get execution summary
  information.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return in a single call. To retrieve the
  remaining results, make another call with the returned nextToken value. Pipeline history is
  limited to the most recent 12 months, based on pipeline execution start times. Default
  value is 100.
- `"nextToken"`: The token that was returned from the previous ListPipelineExecutions call,
  which can be used to return the next set of pipeline executions in the list.
"""
list_pipeline_executions(pipelineName; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListPipelineExecutions", Dict{String, Any}("pipelineName"=>pipelineName); aws_config=aws_config)
list_pipeline_executions(pipelineName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListPipelineExecutions", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineName"=>pipelineName), params)); aws_config=aws_config)

"""
    list_pipelines()
    list_pipelines(params::Dict{String,<:Any})

Gets a summary of all of the pipelines associated with your account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of pipelines to return in a single call. To retrieve
  the remaining pipelines, make another call with the returned nextToken value. The minimum
  value you can specify is 1. The maximum accepted value is 1000.
- `"nextToken"`: An identifier that was returned from the previous list pipelines call. It
  can be used to return the next set of pipelines in the list.
"""
list_pipelines(; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListPipelines"; aws_config=aws_config)
list_pipelines(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListPipelines", params; aws_config=aws_config)

"""
    list_tags_for_resource(resource_arn)
    list_tags_for_resource(resource_arn, params::Dict{String,<:Any})

Gets the set of key-value pairs (metadata) that are used to manage the resource.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource to get tags for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return in a single call.
- `"nextToken"`: The token that was returned from the previous API call, which would be
  used to return the next page of the list. The ListTagsforResource call lists all available
  tags in one call and does not use pagination.
"""
list_tags_for_resource(resourceArn; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListTagsForResource", Dict{String, Any}("resourceArn"=>resourceArn); aws_config=aws_config)
list_tags_for_resource(resourceArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListTagsForResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn), params)); aws_config=aws_config)

"""
    list_webhooks()
    list_webhooks(params::Dict{String,<:Any})

Gets a listing of all the webhooks in this AWS Region for this account. The output lists
all webhooks and includes the webhook URL and ARN and the configuration for each webhook.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The maximum number of results to return in a single call. To retrieve the
  remaining results, make another call with the returned nextToken value.
- `"NextToken"`: The token that was returned from the previous ListWebhooks call, which can
  be used to return the next set of webhooks in the list.
"""
list_webhooks(; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListWebhooks"; aws_config=aws_config)
list_webhooks(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("ListWebhooks", params; aws_config=aws_config)

"""
    poll_for_jobs(action_type_id)
    poll_for_jobs(action_type_id, params::Dict{String,<:Any})

Returns information about any jobs for AWS CodePipeline to act on. PollForJobs is valid
only for action types with \"Custom\" in the owner field. If the action type contains
\"AWS\" or \"ThirdParty\" in the owner field, the PollForJobs action returns an error.
When this API is called, AWS CodePipeline returns temporary credentials for the S3 bucket
used to store artifacts for the pipeline, if the action requires access to that S3 bucket
for input or output artifacts. This API also returns any secret values defined for the
action.

# Arguments
- `action_type_id`: Represents information about an action type.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxBatchSize"`: The maximum number of jobs to return in a poll for jobs call.
- `"queryParam"`: A map of property names and values. For an action type with no queryable
  properties, this value must be null or an empty map. For an action type with a queryable
  property, you must supply that property as a key in the map. Only jobs whose action
  configuration matches the mapped value are returned.
"""
poll_for_jobs(actionTypeId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PollForJobs", Dict{String, Any}("actionTypeId"=>actionTypeId); aws_config=aws_config)
poll_for_jobs(actionTypeId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PollForJobs", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("actionTypeId"=>actionTypeId), params)); aws_config=aws_config)

"""
    poll_for_third_party_jobs(action_type_id)
    poll_for_third_party_jobs(action_type_id, params::Dict{String,<:Any})

Determines whether there are any third party jobs for a job worker to act on. Used for
partner actions only.  When this API is called, AWS CodePipeline returns temporary
credentials for the S3 bucket used to store artifacts for the pipeline, if the action
requires access to that S3 bucket for input or output artifacts.

# Arguments
- `action_type_id`: Represents information about an action type.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxBatchSize"`: The maximum number of jobs to return in a poll for jobs call.
"""
poll_for_third_party_jobs(actionTypeId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PollForThirdPartyJobs", Dict{String, Any}("actionTypeId"=>actionTypeId); aws_config=aws_config)
poll_for_third_party_jobs(actionTypeId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PollForThirdPartyJobs", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("actionTypeId"=>actionTypeId), params)); aws_config=aws_config)

"""
    put_action_revision(action_name, action_revision, pipeline_name, stage_name)
    put_action_revision(action_name, action_revision, pipeline_name, stage_name, params::Dict{String,<:Any})

Provides information to AWS CodePipeline about new revisions to a source.

# Arguments
- `action_name`: The name of the action that processes the revision.
- `action_revision`: Represents information about the version (or revision) of an action.
- `pipeline_name`: The name of the pipeline that starts processing the revision to the
  source.
- `stage_name`: The name of the stage that contains the action that acts on the revision.

"""
put_action_revision(actionName, actionRevision, pipelineName, stageName; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutActionRevision", Dict{String, Any}("actionName"=>actionName, "actionRevision"=>actionRevision, "pipelineName"=>pipelineName, "stageName"=>stageName); aws_config=aws_config)
put_action_revision(actionName, actionRevision, pipelineName, stageName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutActionRevision", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("actionName"=>actionName, "actionRevision"=>actionRevision, "pipelineName"=>pipelineName, "stageName"=>stageName), params)); aws_config=aws_config)

"""
    put_approval_result(action_name, pipeline_name, result, stage_name, token)
    put_approval_result(action_name, pipeline_name, result, stage_name, token, params::Dict{String,<:Any})

Provides the response to a manual approval request to AWS CodePipeline. Valid responses
include Approved and Rejected.

# Arguments
- `action_name`: The name of the action for which approval is requested.
- `pipeline_name`: The name of the pipeline that contains the action.
- `result`: Represents information about the result of the approval request.
- `stage_name`: The name of the stage that contains the action.
- `token`: The system-generated token used to identify a unique approval request. The token
  for each open approval request can be obtained using the GetPipelineState action. It is
  used to validate that the approval request corresponding to this token is still valid.

"""
put_approval_result(actionName, pipelineName, result, stageName, token; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutApprovalResult", Dict{String, Any}("actionName"=>actionName, "pipelineName"=>pipelineName, "result"=>result, "stageName"=>stageName, "token"=>token); aws_config=aws_config)
put_approval_result(actionName, pipelineName, result, stageName, token, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutApprovalResult", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("actionName"=>actionName, "pipelineName"=>pipelineName, "result"=>result, "stageName"=>stageName, "token"=>token), params)); aws_config=aws_config)

"""
    put_job_failure_result(failure_details, job_id)
    put_job_failure_result(failure_details, job_id, params::Dict{String,<:Any})

Represents the failure of a job as returned to the pipeline by a job worker. Used for
custom actions only.

# Arguments
- `failure_details`: The details about the failure of a job.
- `job_id`: The unique system-generated ID of the job that failed. This is the same ID
  returned from PollForJobs.

"""
put_job_failure_result(failureDetails, jobId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutJobFailureResult", Dict{String, Any}("failureDetails"=>failureDetails, "jobId"=>jobId); aws_config=aws_config)
put_job_failure_result(failureDetails, jobId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutJobFailureResult", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("failureDetails"=>failureDetails, "jobId"=>jobId), params)); aws_config=aws_config)

"""
    put_job_success_result(job_id)
    put_job_success_result(job_id, params::Dict{String,<:Any})

Represents the success of a job as returned to the pipeline by a job worker. Used for
custom actions only.

# Arguments
- `job_id`: The unique system-generated ID of the job that succeeded. This is the same ID
  returned from PollForJobs.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"continuationToken"`: A token generated by a job worker, such as an AWS CodeDeploy
  deployment ID, that a successful job provides to identify a custom action in progress.
  Future jobs use this token to identify the running instance of the action. It can be reused
  to return more information about the progress of the custom action. When the action is
  complete, no continuation token should be supplied.
- `"currentRevision"`: The ID of the current revision of the artifact successfully worked
  on by the job.
- `"executionDetails"`: The execution details of the successful job, such as the actions
  taken by the job worker.
- `"outputVariables"`: Key-value pairs produced as output by a job worker that can be made
  available to a downstream action configuration. outputVariables can be included only when
  there is no continuation token on the request.
"""
put_job_success_result(jobId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutJobSuccessResult", Dict{String, Any}("jobId"=>jobId); aws_config=aws_config)
put_job_success_result(jobId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutJobSuccessResult", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("jobId"=>jobId), params)); aws_config=aws_config)

"""
    put_third_party_job_failure_result(client_token, failure_details, job_id)
    put_third_party_job_failure_result(client_token, failure_details, job_id, params::Dict{String,<:Any})

Represents the failure of a third party job as returned to the pipeline by a job worker.
Used for partner actions only.

# Arguments
- `client_token`: The clientToken portion of the clientId and clientToken pair used to
  verify that the calling entity is allowed access to the job and its details.
- `failure_details`: Represents information about failure details.
- `job_id`: The ID of the job that failed. This is the same ID returned from
  PollForThirdPartyJobs.

"""
put_third_party_job_failure_result(clientToken, failureDetails, jobId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutThirdPartyJobFailureResult", Dict{String, Any}("clientToken"=>clientToken, "failureDetails"=>failureDetails, "jobId"=>jobId); aws_config=aws_config)
put_third_party_job_failure_result(clientToken, failureDetails, jobId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutThirdPartyJobFailureResult", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>clientToken, "failureDetails"=>failureDetails, "jobId"=>jobId), params)); aws_config=aws_config)

"""
    put_third_party_job_success_result(client_token, job_id)
    put_third_party_job_success_result(client_token, job_id, params::Dict{String,<:Any})

Represents the success of a third party job as returned to the pipeline by a job worker.
Used for partner actions only.

# Arguments
- `client_token`: The clientToken portion of the clientId and clientToken pair used to
  verify that the calling entity is allowed access to the job and its details.
- `job_id`: The ID of the job that successfully completed. This is the same ID returned
  from PollForThirdPartyJobs.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"continuationToken"`: A token generated by a job worker, such as an AWS CodeDeploy
  deployment ID, that a successful job provides to identify a partner action in progress.
  Future jobs use this token to identify the running instance of the action. It can be reused
  to return more information about the progress of the partner action. When the action is
  complete, no continuation token should be supplied.
- `"currentRevision"`: Represents information about a current revision.
- `"executionDetails"`: The details of the actions taken and results produced on an
  artifact as it passes through stages in the pipeline.
"""
put_third_party_job_success_result(clientToken, jobId; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutThirdPartyJobSuccessResult", Dict{String, Any}("clientToken"=>clientToken, "jobId"=>jobId); aws_config=aws_config)
put_third_party_job_success_result(clientToken, jobId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutThirdPartyJobSuccessResult", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>clientToken, "jobId"=>jobId), params)); aws_config=aws_config)

"""
    put_webhook(webhook)
    put_webhook(webhook, params::Dict{String,<:Any})

Defines a webhook and returns a unique webhook URL generated by CodePipeline. This URL can
be supplied to third party source hosting providers to call every time there's a code
change. When CodePipeline receives a POST request on this URL, the pipeline defined in the
webhook is started as long as the POST request satisfied the authentication and filtering
requirements supplied when defining the webhook. RegisterWebhookWithThirdParty and
DeregisterWebhookWithThirdParty APIs can be used to automatically configure supported third
parties to call the generated webhook URL.

# Arguments
- `webhook`: The detail provided in an input file to create the webhook, such as the
  webhook name, the pipeline name, and the action name. Give the webhook a unique name that
  helps you identify it. You might name the webhook after the pipeline and action it targets
  so that you can easily recognize what it's used for later.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"tags"`: The tags for the webhook.
"""
put_webhook(webhook; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutWebhook", Dict{String, Any}("webhook"=>webhook); aws_config=aws_config)
put_webhook(webhook, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("PutWebhook", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("webhook"=>webhook), params)); aws_config=aws_config)

"""
    register_webhook_with_third_party()
    register_webhook_with_third_party(params::Dict{String,<:Any})

Configures a connection between the webhook that was created and the external tool with
events to be detected.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"webhookName"`: The name of an existing webhook created with PutWebhook to register with
  a supported third party.
"""
register_webhook_with_third_party(; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("RegisterWebhookWithThirdParty"; aws_config=aws_config)
register_webhook_with_third_party(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("RegisterWebhookWithThirdParty", params; aws_config=aws_config)

"""
    retry_stage_execution(pipeline_execution_id, pipeline_name, retry_mode, stage_name)
    retry_stage_execution(pipeline_execution_id, pipeline_name, retry_mode, stage_name, params::Dict{String,<:Any})

Resumes the pipeline execution by retrying the last failed actions in a stage. You can
retry a stage immediately if any of the actions in the stage fail. When you retry, all
actions that are still in progress continue working, and failed actions are triggered again.

# Arguments
- `pipeline_execution_id`: The ID of the pipeline execution in the failed stage to be
  retried. Use the GetPipelineState action to retrieve the current pipelineExecutionId of the
  failed stage
- `pipeline_name`: The name of the pipeline that contains the failed stage.
- `retry_mode`: The scope of the retry attempt. Currently, the only supported value is
  FAILED_ACTIONS.
- `stage_name`: The name of the failed stage to be retried.

"""
retry_stage_execution(pipelineExecutionId, pipelineName, retryMode, stageName; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("RetryStageExecution", Dict{String, Any}("pipelineExecutionId"=>pipelineExecutionId, "pipelineName"=>pipelineName, "retryMode"=>retryMode, "stageName"=>stageName); aws_config=aws_config)
retry_stage_execution(pipelineExecutionId, pipelineName, retryMode, stageName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("RetryStageExecution", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineExecutionId"=>pipelineExecutionId, "pipelineName"=>pipelineName, "retryMode"=>retryMode, "stageName"=>stageName), params)); aws_config=aws_config)

"""
    start_pipeline_execution(name)
    start_pipeline_execution(name, params::Dict{String,<:Any})

Starts the specified pipeline. Specifically, it begins processing the latest commit to the
source location specified as part of the pipeline.

# Arguments
- `name`: The name of the pipeline to start.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: The system-generated unique ID used to identify a unique
  execution request.
"""
start_pipeline_execution(name; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("StartPipelineExecution", Dict{String, Any}("name"=>name, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
start_pipeline_execution(name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("StartPipelineExecution", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    stop_pipeline_execution(pipeline_execution_id, pipeline_name)
    stop_pipeline_execution(pipeline_execution_id, pipeline_name, params::Dict{String,<:Any})

Stops the specified pipeline execution. You choose to either stop the pipeline execution by
completing in-progress actions without starting subsequent actions, or by abandoning
in-progress actions. While completing or abandoning in-progress actions, the pipeline
execution is in a Stopping state. After all in-progress actions are completed or abandoned,
the pipeline execution is in a Stopped state.

# Arguments
- `pipeline_execution_id`: The ID of the pipeline execution to be stopped in the current
  stage. Use the GetPipelineState action to retrieve the current pipelineExecutionId.
- `pipeline_name`: The name of the pipeline to stop.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"abandon"`: Use this option to stop the pipeline execution by abandoning, rather than
  finishing, in-progress actions.  This option can lead to failed or out-of-sequence tasks.
- `"reason"`: Use this option to enter comments, such as the reason the pipeline was
  stopped.
"""
stop_pipeline_execution(pipelineExecutionId, pipelineName; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("StopPipelineExecution", Dict{String, Any}("pipelineExecutionId"=>pipelineExecutionId, "pipelineName"=>pipelineName); aws_config=aws_config)
stop_pipeline_execution(pipelineExecutionId, pipelineName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("StopPipelineExecution", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipelineExecutionId"=>pipelineExecutionId, "pipelineName"=>pipelineName), params)); aws_config=aws_config)

"""
    tag_resource(resource_arn, tags)
    tag_resource(resource_arn, tags, params::Dict{String,<:Any})

Adds to or modifies the tags of the given resource. Tags are metadata that can be used to
manage a resource.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource you want to add tags to.
- `tags`: The tags you want to modify or add to the resource.

"""
tag_resource(resourceArn, tags; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("TagResource", Dict{String, Any}("resourceArn"=>resourceArn, "tags"=>tags); aws_config=aws_config)
tag_resource(resourceArn, tags, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("TagResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn, "tags"=>tags), params)); aws_config=aws_config)

"""
    untag_resource(resource_arn, tag_keys)
    untag_resource(resource_arn, tag_keys, params::Dict{String,<:Any})

Removes tags from an AWS resource.

# Arguments
- `resource_arn`:  The Amazon Resource Name (ARN) of the resource to remove tags from.
- `tag_keys`: The list of keys for the tags to be removed from the resource.

"""
untag_resource(resourceArn, tagKeys; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("UntagResource", Dict{String, Any}("resourceArn"=>resourceArn, "tagKeys"=>tagKeys); aws_config=aws_config)
untag_resource(resourceArn, tagKeys, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("UntagResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn, "tagKeys"=>tagKeys), params)); aws_config=aws_config)

"""
    update_action_type(action_type)
    update_action_type(action_type, params::Dict{String,<:Any})

Updates an action type that was created with any supported integration model, where the
action type is to be used by customers of the action type provider. Use a JSON file with
the action definition and UpdateActionType to provide the full structure.

# Arguments
- `action_type`: The action type definition for the action type to be updated.

"""
update_action_type(actionType; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("UpdateActionType", Dict{String, Any}("actionType"=>actionType); aws_config=aws_config)
update_action_type(actionType, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("UpdateActionType", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("actionType"=>actionType), params)); aws_config=aws_config)

"""
    update_pipeline(pipeline)
    update_pipeline(pipeline, params::Dict{String,<:Any})

Updates a specified pipeline with edits or changes to its structure. Use a JSON file with
the pipeline structure and UpdatePipeline to provide the full structure of the pipeline.
Updating the pipeline increases the version number of the pipeline by 1.

# Arguments
- `pipeline`: The name of the pipeline to be updated.

"""
update_pipeline(pipeline; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("UpdatePipeline", Dict{String, Any}("pipeline"=>pipeline); aws_config=aws_config)
update_pipeline(pipeline, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = codepipeline("UpdatePipeline", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("pipeline"=>pipeline), params)); aws_config=aws_config)


text:
fcalls = 0
function f(dx,x)
  global fcalls += 1
  for i in 2:length(x)-1
    dx[i] = x[i-1] - 2x[i] + x[i+1]
  end
  dx[1] = -2x[1] + x[2]
  dx[end] = x[end-1] - 2x[end]
  nothing
end

using SparsityDetection, SparseArrays
input = rand(10)
output = similar(input)
sparsity_pattern = sparsity!(f,output,input)

@test nnz(sparse(sparsity_pattern)) == 28

ext: jl


text:
const L12_NAMES = ["price", "size", "num-orders"]
const L3_NAMES = ["price", "size", "order_id"]
const LEVELS = [1,2,3]

function book(id::String, level::Int64)
  @assert level in LEVELS

  if level == 3
    return _book3(id)
  else
    return _book12(id, level)
  end
end

function _book(id::String, level::Int64)
  res = HTTP.get(ENDPOINT * "products/$id/book?level=$(level)")
  rawData = JSON.parse(String(res.body))
end

function _book12(id::String, level::Int64)
  rawData = _book(id, level)

  askData = rawData["asks"]
  bidData = rawData["bids"]

  askFrame = vcat(DataFrame.(Dict.(zip.([L12_NAMES .* "_ask"], askData)))...)
  bidFrame = vcat(DataFrame.(Dict.(zip.([L12_NAMES .* "_bid"], bidData)))...)

  res = hcat(askFrame, bidFrame)
  res[!, :sequence] .= rawData["sequence"]
  res[!, :level] .= 1:nrow(res)
  res = _format_book(res)
  res
end

function _book3(id::String)
  rawData = _book(id, 3)

  askData = rawData["asks"]
  bidData = rawData["bids"]

  askFrame = vcat(DataFrame.(Dict.(zip.([L3_NAMES .* "_ask"], askData)))...)
  bidFrame = vcat(DataFrame.(Dict.(zip.([L3_NAMES .* "_bid"], bidData)))...)

  askFrame[!, :level] .= 1:nrow(askFrame)
  bidFrame[!, :level] .= 1:nrow(bidFrame)

  full = outerjoin(askFrame, bidFrame, on=:level)
  full[!, :sequence] .= rawData["sequence"]
  full = _format_book(full)
  full
end

function _format_book(df::DataFrame)

  for col in ("price_ask", "size_ask", "price_bid", "size_bid")
    df[!, col] = coalesce.(df[!, col], "NaN")
    df[!, col] = parse.(Float64, df[!, col])
  end
  df
end


text:
"""
`duplicates_drop`

Syntax:
    `duplicates_drop`
    `duplicates_drop <varlist>`

Drops all but the first occurrence of each row if no <varlist> is specified, or tuple of unique values denoted by <varlist>
Examples:
```julia
d"duplicates_drop :Species"
```

Differences to Stata:

"""
macro duplicates_drop(t::Symbol,
    by::Union{Vector{Symbol}, Nothing},
    sort::Union{Vector{Symbol}, Nothing},
    arguments::Union{Vector{Symbol},Union{Expr, Nothing}},
    filter::Union{Expr, Nothing},
    use::Union{String, Nothing},
    options::Union{Dict{String,Any}, Nothing})
    error("""\n
        The syntax is:
            duplicates_drop <varlist>
    """)
end

macro duplicates_drop(t::Symbol,
    by::Nothing,
    sort::Union{Vector{Symbol}, Nothing},
    arguments::Union{Vector{Symbol},Nothing},
    filter::Nothing,
    use::Nothing,
    options::Union{Dict{String,Any}, Nothing})
    return esc(
        quote
            Douglass.@duplicates_drop!($t, $by, $sort, $arguments, $filter, $use, $options)
        end
    )
end

# version with <varlist>
macro duplicates_drop!(t::Symbol,
    by::Nothing,
    sort::Union{Vector{Symbol}, Nothing},
    arguments::Vector{Symbol},
    filter::Nothing,
    use::Nothing,
    options::Union{Dict{String,Any}, Nothing})
    esc(
        quote
            # sort, if we need to, (first by-variables, then sort-variables)
            if !isnothing($(sort)) && !isempty($(sort))
                sort!($t, $sort)
            end
            # assert that variables are present
            Douglass.@assert_vars_present($t, $arguments)
            # make unique
            unique!($t, $arguments)
        end
    )
end
# version without <varlist>
macro duplicates_drop!(t::Symbol,
    by::Nothing,
    sort::Union{Vector{Symbol}, Nothing},
    arguments::Nothing,
    filter::Nothing,
    use::Nothing,
    options::Union{Dict{String,Any}, Nothing})
    esc(
        quote
            # sort, if we need to, (first by-variables, then sort-variables)
            if !isnothing($(sort)) && !isempty($(sort))
                sort!($t, $sort)
            end
            # make unique
            unique!($t)
        end
    )
end

macro duplicates_assert(t::Symbol,
    variables::Vector{Symbol})

    esc(
        quote
            allunique(Tables.namedtupleiterator($t[!,$variables])) ||
                error("$variables do not uniquely identify observations in DataFrame.")
        end
    )
end


text:
using JuMP, EAGO

                     m = Model()

                     EAGO.register_eago_operators!(m)

                     @variable(m, -1 <= x[i=1:2] <= 1)

                     @variable(m, -29.23432407510253 <= q <= 25.005662503891426)

                     add_NL_constraint(m, :(log(1 + exp(-0.9584800931585375 + 0.8291526833328144*log(1 + exp(0.45833851557375827 + -0.07893784992449904*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.05269389376863742*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.9157122134504139*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.14234137821989812*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + -0.47308336785041494*log(1 + exp(0.8182392255084516 + 0.5838043616725095*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.4648893036822681*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.819336300807536*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.1444146117738878*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + 0.6108443940953072*log(1 + exp(-0.7015763069538381 + -0.6574215519391942*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.13767395548269734*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.21605537563661414*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.3991258949611094*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + -0.4993930565410927*log(1 + exp(-0.21931284624450997 + 0.9567749529797225*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.8630566689068395*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.8170122079846647*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.11471605851894884*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))))) + log(1 + exp(0.475745519197857 + -0.20728788527253217*log(1 + exp(0.45833851557375827 + -0.07893784992449904*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.05269389376863742*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.9157122134504139*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.14234137821989812*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + 0.5536591664216424*log(1 + exp(0.8182392255084516 + 0.5838043616725095*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.4648893036822681*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.819336300807536*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.1444146117738878*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + 0.5772469178059145*log(1 + exp(-0.7015763069538381 + -0.6574215519391942*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.13767395548269734*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.21605537563661414*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.3991258949611094*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + 0.14258534816037427*log(1 + exp(-0.21931284624450997 + 0.9567749529797225*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.8630566689068395*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.8170122079846647*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.11471605851894884*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))))) + log(1 + exp(-0.19885854025662475 + 0.9363781836864602*log(1 + exp(0.45833851557375827 + -0.07893784992449904*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.05269389376863742*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.9157122134504139*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.14234137821989812*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + -0.2868856241387201*log(1 + exp(0.8182392255084516 + 0.5838043616725095*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.4648893036822681*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.819336300807536*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.1444146117738878*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + 0.6989952318088708*log(1 + exp(-0.7015763069538381 + -0.6574215519391942*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.13767395548269734*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.21605537563661414*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.3991258949611094*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + 0.2430276118759056*log(1 + exp(-0.21931284624450997 + 0.9567749529797225*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.8630566689068395*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.8170122079846647*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.11471605851894884*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))))) + log(1 + exp(-0.4748268724301301 + -0.943475605090133*log(1 + exp(0.45833851557375827 + -0.07893784992449904*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.05269389376863742*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.9157122134504139*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.14234137821989812*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + -0.504486324487766*log(1 + exp(0.8182392255084516 + 0.5838043616725095*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.4648893036822681*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.819336300807536*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.1444146117738878*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + -0.8621266685661562*log(1 + exp(-0.7015763069538381 + -0.6574215519391942*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.13767395548269734*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.21605537563661414*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.3991258949611094*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))) + -0.8772206856506037*log(1 + exp(-0.21931284624450997 + 0.9567749529797225*log(1 + exp(-0.22994750449881307 + -0.3590609593879259*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.10337862983418544*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.321850031280575*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.612120130564894*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.8630566689068395*log(1 + exp(0.19384674006188307 + -0.9239566552941776*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + -0.4571782009479768*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + -0.7401514915717242*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.3444562251116623*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + 0.8170122079846647*log(1 + exp(0.4065836733363821 + 0.7200826994240335*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.11568748742914314*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.5958961905666036*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + -0.0402986153245215*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))) + -0.11471605851894884*log(1 + exp(-0.18406387526761447 + 0.28290146144347617*log(1 + exp(-0.9795230057859095 + -0.9823842606294351*$(x[1]) + 0.3621989809961321*$(x[2]))) + 0.5991916639069861*log(1 + exp(0.2857383741568795 + 0.17154081707188507*$(x[1]) + -0.2093148258397095*$(x[2]))) + 0.7799932719867426*log(1 + exp(-0.5451083144913764 + -0.518481685587207*$(x[1]) + 0.024249687825614874*$(x[2]))) + 0.858692422726886*log(1 + exp(-0.02703791931361943 + -0.7859299073841055*$(x[1]) + 0.7832525238663837*$(x[2]))))))))) - $q <= 0.0))

                     @objective(m, Min, q)

                     return m

max_stars_repo_name: PSORLab/RSActivationFunctions

max_issues_repo_name: PSORLab/RSActivationFunctions

max_forks_repo_name: PSORLab/RSActivationFunctions


text:
@testset "container_id" begin
    @testset "docker regex" begin
        container_id = "26c927d78b3a0ac080354a74649d61cec26c3064426f6173b242356e75a324e3"
        cgroup = """
            13:name=systemd:/docker-ce/docker/$container_id
            12:pids:/docker-ce/docker/$container_id
            11:hugetlb:/docker-ce/docker/$container_id
            10:net_prio:/docker-ce/docker/$container_id
            9:perf_event:/docker-ce/docker/$container_id
            8:net_cls:/docker-ce/docker/$container_id
            7:freezer:/docker-ce/docker/$container_id
            6:devices:/docker-ce/docker/$container_id
            5:memory:/docker-ce/docker/$container_id
            4:blkio:/docker-ce/docker/$container_id
            3:cpuacct:/docker-ce/docker/$container_id
            2:cpu:/docker-ce/docker/$container_id
            1:cpuset:/docker-ce/docker/$container_id
            """

        m = match(AWSClusterManagers.CGROUP_REGEX, cgroup)
        @test m !== nothing
        @test m["container_id"] == container_id
    end

    @testset "batch regex" begin
        job_id = "69d95a04d3134530bee5a65def33a303"
        container_id = "e799b9182976f8298065419945d32a4398f1280e616199448729f5b72b8e81ef"
        cgroup = """
            9:perf_event:/ecs/$job_id/$container_id
            8:memory:/ecs/$job_id/$container_id
            7:hugetlb:/ecs/$job_id/$container_id
            6:freezer:/ecs/$job_id/$container_id
            5:devices:/ecs/$job_id/$container_id
            4:cpuset:/ecs/$job_id/$container_id
            3:cpuacct:/ecs/$job_id/$container_id
            2:cpu:/ecs/$job_id/$container_id
            1:blkio:/ecs/$job_id/$container_id
            """

        m = match(AWSClusterManagers.CGROUP_REGEX, cgroup)
        @test m !== nothing
        @test m["container_id"] == container_id
    end

    @testset "GitHub Actions regex" begin
        container_id = "cf0888f8246174f11a08a07911abd5993da1e2f7b0e28103cc5799fe486debee"
        cgroup = """
            12:hugetlb:/actions_job/$container_id
            11:blkio:/actions_job/$container_id
            10:rdma:/
            9:perf_event:/actions_job/$container_id
            8:freezer:/actions_job/$container_id
            7:devices:/actions_job/$container_id
            6:net_cls,net_prio:/actions_job/$container_id
            5:memory:/actions_job/$container_id
            4:pids:/actions_job/$container_id
            3:cpu,cpuacct:/actions_job/$container_id
            2:cpuset:/actions_job/$container_id
            1:name=systemd:/actions_job/$container_id
            0::/system.slice/containerd.service
            """

        m = match(AWSClusterManagers.CGROUP_REGEX, cgroup)
        @test m !== nothing
        @test m["container_id"] == container_id
    end
end


text:
module Utils

using ClimateMARGO.Models

export
    year, init_zero_controls,
    GtCO2_to_ppm, tCO2_to_ppm,
    ppm_to_GtCO2, ppm_to_tCO2

include("instantiate_models.jl")
include("unit_conversions.jl")

end


text:
#####################################
#### Lots of things to change
# dvecA and and dvecΩ should become their closed values expressions
#Implement the commutation matrix
# Change dvec(Gamma_1) etc to expression that can be evaluated
#change every reshape for vecc, defined in the aux file

using ReverseDiff

include(string(pwd(),"/src/gensys.jl"))
include(string(pwd(),"/misc/aux_matrix.jl"))

function dF1_tau(Gamma_0, Gamma_1, A,l,Gamma_3)
    # l is the number of observables
    # n is the number of shocks
    m = size(Gamma_0,1)
    n = size(Gamma_3,2)
    nn = Int(n*(n+1)/2)
    dvecA = [I(m^2) zeros(m^2,m*l+nn)]
    (kron(-A', Gamma_1) - kron(I(m), Gamma_0) + kron(I(m),Gamma_1*A))* dvecA
end

function dF1_theta(dGamma_0,dGamma_1,dGamma_2,A)
    m = size(A,1)
    #dv_size = size(dGamma_0,1)*size(dGamma_0,2)
    #dGamma_0 = vecc(dGamma_0)
    #dGamma_1 = vecc(dGamma_1,dv_size,1)
    #dGamma_2 = vecc(dGamma_2)
    kron(A',I(m))* dGamma_0 - kron(A'*A',I(m))* dGamma_1 - dGamma_2
end

#this is a vech
function dF2_tau(Gamma_0, Gamma_1, Gamma_2, A, Omega,l)
    m = size(Gamma_0,1)
    b_aux = (Gamma_0 - Gamma_1*A)*Omega
    Dm = duplication_matrix(m)
    Kmm = commutation_matrix(m,m)
    n = size(Omega,2)
    nn = Int(n*(n+1)/2)

    dvecA = [I(m^2) zeros(m^2,m*l+nn)]
    dvecOmega = [zeros(nn,m^2+m*l) I(nn)]
    res = -(kron(b_aux,Gamma_1) + kron(Gamma_1, b_aux)*Kmm)*dvecA + kron(Gamma_0 - Gamma_1*A,Gamma_0 - Gamma_1*A)*Dm*dvecOmega
    return(pinv(Dm)*res)
end

function dF2_theta(Gamma_0, Gamma_1, Gamma_3, dGamma_0, dGamma_1, dGamma_3, Omega, A)
    m = size(Gamma_0,1)
    b_aux = Gamma_0 - Gamma_1*A
    Dm = duplication_matrix(m)
    Kmm = commutation_matrix(m,m)

    dv_size = size(dGamma_0,1)*size(dGamma_0,2)
    #dGamma_0 = vecc(dGamma_0)
    #dGamma_1 = vecc(dGamma_1)
    #dGamma_2 = vecc(dGamma_2)

    b1 = kron(b_aux*Omega, I(m)) + kron(I(m), b_aux*Omega)*Kmm
    b2 = kron(b_aux*Omega*A',I(m)) + kron(I(m),b_aux*Omega)*Kmm
    b3 = kron(Gamma_3,I(m)) + kron(I(m),Gamma_3)*Kmm
    res = b1*dGamma_0 - b2*dGamma_1 - b3*dGamma_3
    res = pinv(Dm)*res
end

function dtheta(Gamma_0,Gamma_1,Gamma_2,Gamma_3, dGamma_0, dGamma_1, dGamma_2, dGamma_3, A, Omega,l)
    Df_theta = [dF1_theta(dGamma_0,dGamma_1,dGamma_2,A);dF2_theta(Gamma_0, Gamma_1, Gamma_3, dGamma_0, dGamma_1, dGamma_3, Omega, A)]
    Df_tau = [dF1_tau(Gamma_0, Gamma_1, A,l,Gamma_3); dF2_tau(Gamma_0, Gamma_1, Gamma_2, A, Omega,l)]
    return pinv(Df_tau)*Df_theta
end

## These are the gensys matrices

#order to par
#1 alfa
#2 beta
#3 epsilon
#4 theta
#5 sig
#6 sigma: this is the std dev of the innovation
#7 phi
#8 phi_pi
#9 phi_y
#10 rho_v

GAMMA_0_foo(par) = [par[2]  0    0  0;
           1    par[5]  0  0;
           0    0    0  0;
           0    0    0  1]

function GAMMA_1_foo(par)
    THETA = (1-par[1])/(1-par[1]+par[1]*par[3])
    lamb = (1-par[4])*(1-par[2]*par[4])/par[4]*THETA
    kappa = lamb*(par[5]+(par[7]+par[1])/(1-par[1]))
     res = [ 1       -kappa  0   0;
            0        par[5]    1   0;
           -par[8]  -par[9]  1  -1;
            0        0      0   par[10]]
end

PSI_foo(par) = [0; 0; 0; par[6]]

PI_foo(par) = [par[2]  0;
      1    par[5];
      0    0;
      0    0]

## These are the matrices for the same model written as iskrev (2008)

#order to par
#1 alfa
#2 beta
#3 epsilon
#4 theta
#5 sig
#6 sigma: this is the std dev of the innovation
#7 phi
#8 phi_pi
#9 phi_y
#10 rho_v

function Gamma_0(par)
    THETA = (1-par[1])/(1-par[1]+par[1]*par[3])
    lamb = (1-par[4])*(1-par[2]*par[4])/par[4]*THETA
    kappa = lamb*(par[5]+(par[7]+par[1])/(1-par[1]))
    res = [par[1] -kappa 0 0;
            0       1   1/par[5] 0;
            -par[8] -par[9] -1  -1;
            0           0    0   1
            ]
    return res
end

Gamma_1(par) = [par[2] 0 0 0;
                1/par[5] 1 0 0;
                0        0 0 0;
                0        0 0 0]

Gamma_2(par) =[0 0 0 0;
               0 0 0 0;
               0 0 0 0;
               0 0 0 par[10]]

Gamma_3(par) = [0 0 0 0;
               0 0 0 0;
               0 0 0 0;
               0 0 0 par[6]]

## Diff for the model
# Now it will be a #estrut par x ## reduce form par
# In which the reduced form depends of 3 matrices, in the following order
# A, that governs the auto regressive part of the reduce form: first 16 cols
# C that govens the observation matrix in the Kalman Filter (usually should be all zeros): 4 columns
# Omega, that is BB' in which B governs the shock transmission: remaining 10 columns (it is a vech!)

function diff_mod(par,l)
    Gamma0 = Gamma_0(par)
    Gamma1 = Gamma_1(par)
    Gamma2 = Gamma_2(par)
    Gamma3 = Gamma_3(par)

    G0 = GAMMA_0_foo(par)
    G1 = GAMMA_1_foo(par)
    Psi = PSI_foo(par)
    Pi = PI_foo(par)

    dGamma0 = ReverseDiff.jacobian(Gamma_0,par)
    dGamma1 = ReverseDiff.jacobian(Gamma_1,par)
    dGamma2 = ReverseDiff.jacobian(Gamma_2,par)
    dGamma3 = ReverseDiff.jacobian(Gamma_3,par)

    gen_sol = gensys(G0,G1,Psi,Pi, verbose = false)
    A = gen_sol.Theta1
    Omega = gen_sol.Theta2*gen_sol.Theta2'
    diff = dtheta(Gamma0,Gamma1,Gamma2,Gamma3, dGamma0, dGamma1, dGamma2, dGamma3, A, Omega,l)
    return diff
end

max_stars_repo_name: danmrc/DSGE-HMC

max_issues_repo_name: danmrc/DSGE-HMC

max_forks_repo_name: danmrc/DSGE-HMC


text:
abstract type Params end

struct PCSAFTParams <: Params
    segment::Dict
    sigma::Dict
    epsilon::Dict
    epsilon_assoc::Dict
    bond_vol::Dict
    n_sites::Dict
end

struct sPCSAFTParams <: Params
    segment::Dict
    sigma::Dict
    epsilon::Dict
    epsilon_assoc::Dict
    bond_vol::Dict
    n_sites::Dict
    k::Dict
end

struct SAFTVRMieParams <: Params
    segment::Dict
    sigma::Dict
    epsilon::Dict
    lambdaA::Dict
    lambdaR::Dict
    epsilon_assoc::Dict
    bond_vol::Dict
    n_sites::Dict
end

struct ogSAFTParams <: Params
    segment::Dict
    sigma::Dict
    epsilon::Dict
    epsilon_assoc::Dict
    bond_vol::Dict
    n_sites::Dict
end