repo stringclasses 237 values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1 value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237 values | url stringlengths 95 268 | partition stringclasses 1 value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-ruby | management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/snapshots.rb | Azure::NetApp::Mgmt::V2017_08_15_preview.Snapshots.create | def create(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
response = create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
response = create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create",
"(",
"body",
",",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"volume_name",
",",
"snapshot_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_async",
"(",
"body",
",",
"resource_group_name",
",",
"acc... | Create a snapshot
@param body [Snapshot] Snapshot object supplied in the body of the operation.
@param resource_group_name [String] The name of the resource group.
@param account_name [String] The name of the NetApp account
@param pool_name [String] The name of the capacity pool
@param volume_name [String] The name of the volume
@param snapshot_name [String] The name of the mount target
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Snapshot] operation results. | [
"Create",
"a",
"snapshot"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/snapshots.rb#L248-L251 | train | Creates a snapshot of a specified volume. | [
30522,
13366,
3443,
1006,
2303,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4770,
1035,
2171,
1010,
3872,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb | Azure::Storage::Mgmt::V2018_11_01.StorageAccounts.begin_failover | def begin_failover(resource_group_name, account_name, custom_headers:nil)
response = begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_failover(resource_group_name, account_name, custom_headers:nil)
response = begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_failover",
"(",
"resource_group_name",
",",
"account_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_failover_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"n... | Failover request can be triggered for a storage account in case of
availability issues. The failover occurs from the storage account's primary
cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
become primary after failover.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name of the storage account within the
specified resource group. Storage account names must be between 3 and 24
characters in length and use numbers and lower-case letters only.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Failover",
"request",
"can",
"be",
"triggered",
"for",
"a",
"storage",
"account",
"in",
"case",
"of",
"availability",
"issues",
".",
"The",
"failover",
"occurs",
"from",
"the",
"storage",
"account",
"s",
"primary",
"cluster",
"to",
"secondary",
"cluster",
"fo... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb#L1510-L1513 | train | Gets the next chunk of the elastic network account. | [
30522,
13366,
4088,
1035,
8246,
7840,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
8246,
7840,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/repos/deployments.rb | Github.Client::Repos::Deployments.statuses | def statuses(*args)
arguments(args, required: [:user, :repo, :id])
params = arguments.params
params['accept'] ||= PREVIEW_MEDIA
statuses = get_request("repos/#{arguments.user}/#{arguments.repo}/deployments/#{arguments.id}/statuses", params)
return statuses unless block_given?
statuses.each { |status| yield status }
end | ruby | def statuses(*args)
arguments(args, required: [:user, :repo, :id])
params = arguments.params
params['accept'] ||= PREVIEW_MEDIA
statuses = get_request("repos/#{arguments.user}/#{arguments.repo}/deployments/#{arguments.id}/statuses", params)
return statuses unless block_given?
statuses.each { |status| yield status }
end | [
"def",
"statuses",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":id",
"]",
")",
"params",
"=",
"arguments",
".",
"params",
"params",
"[",
"'accept'",
"]",
"||=",
"PREVIEW_MEDIA",
"statuses",
"... | List the statuses of a deployment.
@param [Hash] params
@option params [String] :id
Required string. Id of the deployment being queried.
@example
github = Github.new
github.repos.deployments.statuses 'user-name', 'repo-name', DEPLOYMENT_ID
github.repos.deployments.statuses 'user-name', 'repo-name', DEPLOYMENT_ID { |status| ... }
@api public | [
"List",
"the",
"statuses",
"of",
"a",
"deployment",
"."
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/deployments.rb#L99-L107 | train | Get the statuses of a deployment | [
30522,
13366,
3570,
2229,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
8909,
1033,
1007,
11498,
5244,
1027,
9918,
1012,
11498,
5244,
11498,
5244,
1031,
1005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hanami/hanami | lib/hanami/application_configuration.rb | Hanami.ApplicationConfiguration.cookies | def cookies(options = nil)
if options.nil?
@cookies ||= Config::Cookies.new(self, options)
else
@cookies = Config::Cookies.new(self, options)
end
end | ruby | def cookies(options = nil)
if options.nil?
@cookies ||= Config::Cookies.new(self, options)
else
@cookies = Config::Cookies.new(self, options)
end
end | [
"def",
"cookies",
"(",
"options",
"=",
"nil",
")",
"if",
"options",
".",
"nil?",
"@cookies",
"||=",
"Config",
"::",
"Cookies",
".",
"new",
"(",
"self",
",",
"options",
")",
"else",
"@cookies",
"=",
"Config",
"::",
"Cookies",
".",
"new",
"(",
"self",
... | Configure cookies
Enable cookies (disabled by default).
This is part of a DSL, for this reason when this method is called with
an argument, it will set the corresponding instance variable. When
called without, it will return the already set value, or the default.
@overload cookies(options)
Sets the given value with their options.
@param options [Hash, TrueClass, FalseClass]
@overload cookies
Gets the value.
@return [Hanami::Config::Cookies]
@example Getting the value
require 'hanami'
module Bookshelf
class Application < Hanami::Application
end
end
Bookshelf::Application.configuration.cookies
# => #<Hanami::Config::Cookies:0x0000000329f880 @options={}, @default_options={:httponly=>true, :secure=>false}>
@example Setting the value
require 'hanami'
module Bookshelf
class Application < Hanami::Application
configure do
cookies domain: 'hanamirb.org'
end
end
end
Bookshelf::Application.configuration.cookies
# => #<Hanami::Config::Cookies:0x0000000329f880 @options={:domain=>'hanamirb.org'}, @default_options={:domain=>'hanamirb.org', :httponly=>true, :secure=>false}> | [
"Configure",
"cookies",
"Enable",
"cookies",
"(",
"disabled",
"by",
"default",
")",
"."
] | 8c6e5147e92ef869b25379448572da3698eacfdc | https://github.com/hanami/hanami/blob/8c6e5147e92ef869b25379448572da3698eacfdc/lib/hanami/application_configuration.rb#L382-L388 | train | Sets the cookies for this page | [
30522,
13366,
16324,
1006,
7047,
1027,
9152,
2140,
1007,
2065,
7047,
1012,
9152,
2140,
1029,
1030,
16324,
1064,
1064,
1027,
9530,
8873,
2290,
1024,
1024,
16324,
1012,
2047,
1006,
2969,
1010,
7047,
1007,
2842,
1030,
16324,
1027,
9530,
8873,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chef/ohai | lib/ohai/runner.rb | Ohai.Runner.run_plugin | def run_plugin(plugin)
elapsed = Benchmark.measure do
unless plugin.kind_of?(Ohai::DSL::Plugin)
raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin #{plugin} (must be an Ohai::DSL::Plugin or subclass)"
end
begin
if plugin.version == :version7
run_v7_plugin(plugin)
else
raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin version #{plugin.version} for plugin #{plugin}"
end
rescue Ohai::Exceptions::Error # rubocop: disable Lint/ShadowedException
raise
rescue SystemExit # abort or exit from plug-in should exit Ohai with failure code
raise
rescue Exception, Errno::ENOENT => e
logger.trace("Plugin #{plugin.name} threw exception #{e.inspect} #{e.backtrace.join("\n")}")
end
end
logger.trace("Plugin #{plugin.name} took #{elapsed.total} seconds to run.")
end | ruby | def run_plugin(plugin)
elapsed = Benchmark.measure do
unless plugin.kind_of?(Ohai::DSL::Plugin)
raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin #{plugin} (must be an Ohai::DSL::Plugin or subclass)"
end
begin
if plugin.version == :version7
run_v7_plugin(plugin)
else
raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin version #{plugin.version} for plugin #{plugin}"
end
rescue Ohai::Exceptions::Error # rubocop: disable Lint/ShadowedException
raise
rescue SystemExit # abort or exit from plug-in should exit Ohai with failure code
raise
rescue Exception, Errno::ENOENT => e
logger.trace("Plugin #{plugin.name} threw exception #{e.inspect} #{e.backtrace.join("\n")}")
end
end
logger.trace("Plugin #{plugin.name} took #{elapsed.total} seconds to run.")
end | [
"def",
"run_plugin",
"(",
"plugin",
")",
"elapsed",
"=",
"Benchmark",
".",
"measure",
"do",
"unless",
"plugin",
".",
"kind_of?",
"(",
"Ohai",
"::",
"DSL",
"::",
"Plugin",
")",
"raise",
"Ohai",
"::",
"Exceptions",
"::",
"InvalidPlugin",
",",
"\"Invalid plugin... | safe_run: set to true if this runner will run plugins in
safe-mode. default false.
Runs plugins and any un-run dependencies.
If force is set to true, then this plugin and its dependencies
will be run even if they have been run before. | [
"safe_run",
":",
"set",
"to",
"true",
"if",
"this",
"runner",
"will",
"run",
"plugins",
"in",
"safe",
"-",
"mode",
".",
"default",
"false",
".",
"Runs",
"plugins",
"and",
"any",
"un",
"-",
"run",
"dependencies",
".",
"If",
"force",
"is",
"set",
"to",
... | 8d66449940f04237586b2f928231c6b26e2cc19a | https://github.com/chef/ohai/blob/8d66449940f04237586b2f928231c6b26e2cc19a/lib/ohai/runner.rb#L40-L61 | train | Runs a plugin in the current context. | [
30522,
13366,
2448,
1035,
13354,
2378,
1006,
13354,
2378,
1007,
3449,
9331,
6924,
1027,
6847,
10665,
1012,
5468,
2079,
4983,
13354,
2378,
1012,
2785,
1035,
1997,
1029,
1006,
2821,
4886,
1024,
1024,
16233,
2140,
1024,
1024,
13354,
2378,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.restart_node | def restart_node(node_name, restart_node_description, timeout:60, custom_headers:nil)
response = restart_node_async(node_name, restart_node_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def restart_node(node_name, restart_node_description, timeout:60, custom_headers:nil)
response = restart_node_async(node_name, restart_node_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"restart_node",
"(",
"node_name",
",",
"restart_node_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"restart_node_async",
"(",
"node_name",
",",
"restart_node_description",
",",
"timeout",
":",
"timeout",
"... | Restarts a Service Fabric cluster node.
Restarts a Service Fabric cluster node that is already started.
@param node_name [String] The name of the node.
@param restart_node_description [RestartNodeDescription] The instance of the
node to be restarted and a flag indicating the need to take dump of the
fabric process.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration that the client is willing
to wait for the requested operation to complete. The default value for this
parameter is 60 seconds.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Restarts",
"a",
"Service",
"Fabric",
"cluster",
"node",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L4531-L4534 | train | Restarts a node. | [
30522,
13366,
23818,
1035,
13045,
1006,
13045,
1035,
2171,
1010,
23818,
1035,
13045,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
23818,
1035,
13045,
1035,
2004,
6038,
2278,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/rpc_server.rb | GRPC.Pool.schedule | def schedule(*args, &blk)
return if blk.nil?
@stop_mutex.synchronize do
if @stopped
GRPC.logger.warn('did not schedule job, already stopped')
return
end
GRPC.logger.info('schedule another job')
fail 'No worker threads available' if @ready_workers.empty?
worker_queue = @ready_workers.pop
fail 'worker already has a task waiting' unless worker_queue.empty?
worker_queue << [blk, args]
end
end | ruby | def schedule(*args, &blk)
return if blk.nil?
@stop_mutex.synchronize do
if @stopped
GRPC.logger.warn('did not schedule job, already stopped')
return
end
GRPC.logger.info('schedule another job')
fail 'No worker threads available' if @ready_workers.empty?
worker_queue = @ready_workers.pop
fail 'worker already has a task waiting' unless worker_queue.empty?
worker_queue << [blk, args]
end
end | [
"def",
"schedule",
"(",
"*",
"args",
",",
"&",
"blk",
")",
"return",
"if",
"blk",
".",
"nil?",
"@stop_mutex",
".",
"synchronize",
"do",
"if",
"@stopped",
"GRPC",
".",
"logger",
".",
"warn",
"(",
"'did not schedule job, already stopped'",
")",
"return",
"end"... | Runs the given block on the queue with the provided args.
@param args the args passed blk when it is called
@param blk the block to call | [
"Runs",
"the",
"given",
"block",
"on",
"the",
"queue",
"with",
"the",
"provided",
"args",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/rpc_server.rb#L58-L72 | train | Schedule a job | [
30522,
13366,
6134,
1006,
1008,
12098,
5620,
1010,
1004,
1038,
13687,
1007,
2709,
2065,
1038,
13687,
1012,
9152,
2140,
1029,
1030,
2644,
1035,
20101,
2595,
1012,
26351,
8093,
10698,
4371,
2079,
2065,
1030,
3030,
24665,
15042,
1012,
8833,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb | Azure::Resources::Mgmt::V2016_02_01.Resources.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"api_version",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async"... | Updates a resource.
@param resource_group_name [String] The name of the resource group for the
resource. The name is case insensitive.
@param resource_provider_namespace [String] The namespace of the resource
provider.
@param parent_resource_path [String] The parent resource identity.
@param resource_type [String] The resource type of the resource to update.
@param resource_name [String] The name of the resource to update.
@param api_version [String] The API version to use for the operation.
@param parameters [GenericResource] Parameters for updating the resource.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Updates",
"a",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb#L805-L807 | train | Updates a resource in the specified resource group. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
7692,
1035,
2171,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.get_event_hub_consumer_group_with_http_info | def get_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
end | ruby | def get_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
end | [
"def",
"get_event_hub_consumer_group_with_http_info",
"(",
"resource_group_name",
",",
"resource_name",
",",
"event_hub_endpoint_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"get_event_hub_consumer_group_async",
"(",
"resource_group_name",
",",
"resource_name",
... | Get a consumer group from the Event Hub-compatible device-to-cloud endpoint
for an IoT hub.
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint
for an IoT hub.
@param resource_group_name [String] The name of the resource group that
contains the IoT hub.
@param resource_name [String] The name of the IoT hub.
@param event_hub_endpoint_name [String] The name of the Event Hub-compatible
endpoint in the IoT hub.
@param name [String] The name of the consumer group to retrieve.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Get",
"a",
"consumer",
"group",
"from",
"the",
"Event",
"Hub",
"-",
"compatible",
"device",
"-",
"to",
"-",
"cloud",
"endpoint",
"for",
"an",
"IoT",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L774-L776 | train | Gets the consumer group associated with an event hub endpoint. | [
30522,
13366,
2131,
1035,
2724,
1035,
9594,
1035,
7325,
1035,
2177,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
2724,
1035,
9594,
1035,
2203,
8400,
1035,
2171,
1010,
2171,
30524,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
DataDog/dogstatsd-ruby | lib/datadog/statsd.rb | Datadog.Statsd.set | def set(stat, value, opts=EMPTY_OPTIONS)
opts = {:sample_rate => opts} if opts.is_a? Numeric
send_stats stat, value, SET_TYPE, opts
end | ruby | def set(stat, value, opts=EMPTY_OPTIONS)
opts = {:sample_rate => opts} if opts.is_a? Numeric
send_stats stat, value, SET_TYPE, opts
end | [
"def",
"set",
"(",
"stat",
",",
"value",
",",
"opts",
"=",
"EMPTY_OPTIONS",
")",
"opts",
"=",
"{",
":sample_rate",
"=>",
"opts",
"}",
"if",
"opts",
".",
"is_a?",
"Numeric",
"send_stats",
"stat",
",",
"value",
",",
"SET_TYPE",
",",
"opts",
"end"
] | Sends a value to be tracked as a set to the statsd server.
@param [String] stat stat name.
@param [Numeric] value set value.
@param [Hash] opts the options to create the metric with
@option opts [Numeric] :sample_rate sample rate, 1 for always
@option opts [Array<String>] :tags An array of tags
@example Record a unique visitory by id:
$statsd.set('visitors.uniques', User.id) | [
"Sends",
"a",
"value",
"to",
"be",
"tracked",
"as",
"a",
"set",
"to",
"the",
"statsd",
"server",
"."
] | 0ea2a4d011958ad0d092654cae950e64b6475077 | https://github.com/DataDog/dogstatsd-ruby/blob/0ea2a4d011958ad0d092654cae950e64b6475077/lib/datadog/statsd.rb#L374-L377 | train | Set a stat to a value | [
30522,
13366,
2275,
1006,
28093,
1010,
3643,
1010,
23569,
2015,
1027,
4064,
1035,
7047,
1007,
23569,
2015,
1027,
1063,
1024,
7099,
1035,
3446,
1027,
1028,
23569,
2015,
1065,
2065,
23569,
2015,
1012,
2003,
1035,
1037,
1029,
16371,
25531,
460... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/stack/main/extensions/lambda.rb | Jets::Stack::Main::Dsl.Lambda.function | def function(id, props={})
# Required: code, handler, role, runtime Docs: https://amzn.to/2pdot7S
meth = sanitize_method_name(id)
class_namespace = self.to_s.underscore.gsub('/','-') # IE: Jets::Domain => jets-domain
description = "#{self.to_s} #{meth}" # not bother adding extension
defaults = {
code: {
s3_bucket: "!Ref S3Bucket",
s3_key: code_s3_key
},
role: "!Ref IamRole",
handler: "#{id}.lambda_handler", # default ruby convention
runtime: :ruby,
timeout: Jets.config.function.timeout,
memory_size: Jets.config.function.memory_size,
description: description,
}
function_name = "#{Jets.config.project_namespace}-#{class_namespace}-#{meth}"
function_name = function_name.size > MAX_FUNCTION_NAME_SIZE ? nil : function_name
defaults[:function_name] = function_name if function_name
props = defaults.merge(props)
props[:runtime] = "ruby2.5" if props[:runtime].to_s == "ruby"
props[:handler] = handler(props[:handler])
logical_id = id.to_s.gsub('/','_')
resource(logical_id, "AWS::Lambda::Function", props)
end | ruby | def function(id, props={})
# Required: code, handler, role, runtime Docs: https://amzn.to/2pdot7S
meth = sanitize_method_name(id)
class_namespace = self.to_s.underscore.gsub('/','-') # IE: Jets::Domain => jets-domain
description = "#{self.to_s} #{meth}" # not bother adding extension
defaults = {
code: {
s3_bucket: "!Ref S3Bucket",
s3_key: code_s3_key
},
role: "!Ref IamRole",
handler: "#{id}.lambda_handler", # default ruby convention
runtime: :ruby,
timeout: Jets.config.function.timeout,
memory_size: Jets.config.function.memory_size,
description: description,
}
function_name = "#{Jets.config.project_namespace}-#{class_namespace}-#{meth}"
function_name = function_name.size > MAX_FUNCTION_NAME_SIZE ? nil : function_name
defaults[:function_name] = function_name if function_name
props = defaults.merge(props)
props[:runtime] = "ruby2.5" if props[:runtime].to_s == "ruby"
props[:handler] = handler(props[:handler])
logical_id = id.to_s.gsub('/','_')
resource(logical_id, "AWS::Lambda::Function", props)
end | [
"def",
"function",
"(",
"id",
",",
"props",
"=",
"{",
"}",
")",
"# Required: code, handler, role, runtime Docs: https://amzn.to/2pdot7S",
"meth",
"=",
"sanitize_method_name",
"(",
"id",
")",
"class_namespace",
"=",
"self",
".",
"to_s",
".",
"underscore",
".",
"gsub"... | Example:
function(:hello,
handler: handler("hello.lambda_hander"),
runtime: "python3.6"
)
Defaults to ruby. So:
function(:hello)
is the same as:
function(:hello,
handler: handler("hello.hande"),
runtime: :ruby
) | [
"Example",
":"
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/stack/main/extensions/lambda.rb#L22-L50 | train | Returns the object that represents the specified Lambda function. | [
30522,
13366,
3853,
1006,
8909,
1010,
24387,
1027,
1063,
1065,
1007,
1001,
3223,
1024,
3642,
1010,
28213,
1010,
2535,
1010,
2448,
7292,
9986,
2015,
1024,
16770,
1024,
1013,
1013,
2572,
2480,
2078,
1012,
2000,
1013,
1016,
17299,
4140,
2581,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | railties/lib/rails/engine.rb | Rails.Engine.helpers | def helpers
@helpers ||= begin
helpers = Module.new
all = ActionController::Base.all_helpers_from_path(helpers_paths)
ActionController::Base.modules_for_helpers(all).each do |mod|
helpers.include(mod)
end
helpers
end
end | ruby | def helpers
@helpers ||= begin
helpers = Module.new
all = ActionController::Base.all_helpers_from_path(helpers_paths)
ActionController::Base.modules_for_helpers(all).each do |mod|
helpers.include(mod)
end
helpers
end
end | [
"def",
"helpers",
"@helpers",
"||=",
"begin",
"helpers",
"=",
"Module",
".",
"new",
"all",
"=",
"ActionController",
"::",
"Base",
".",
"all_helpers_from_path",
"(",
"helpers_paths",
")",
"ActionController",
"::",
"Base",
".",
"modules_for_helpers",
"(",
"all",
"... | Returns a module with all the helpers defined for the engine. | [
"Returns",
"a",
"module",
"with",
"all",
"the",
"helpers",
"defined",
"for",
"the",
"engine",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/engine.rb#L490-L499 | train | Returns the list of all helpers that are defined in the helpers_paths | [
30522,
13366,
2393,
2545,
1030,
2393,
2545,
1064,
1064,
1027,
4088,
2393,
2545,
1027,
11336,
1012,
2047,
2035,
1027,
2895,
8663,
13181,
10820,
1024,
1024,
2918,
1012,
2035,
1035,
2393,
2545,
1035,
2013,
1035,
4130,
1006,
2393,
2545,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/uploaders/decidim/attachment_uploader.rb | Decidim.AttachmentUploader.image? | def image?(new_file)
content_type = model.content_type || new_file.content_type
content_type.to_s.start_with? "image"
end | ruby | def image?(new_file)
content_type = model.content_type || new_file.content_type
content_type.to_s.start_with? "image"
end | [
"def",
"image?",
"(",
"new_file",
")",
"content_type",
"=",
"model",
".",
"content_type",
"||",
"new_file",
".",
"content_type",
"content_type",
".",
"to_s",
".",
"start_with?",
"\"image\"",
"end"
] | Checks if the file is an image based on the content type. We need this so
we only create different versions of the file when it's an image.
new_file - The uploaded file.
Returns a Boolean. | [
"Checks",
"if",
"the",
"file",
"is",
"an",
"image",
"based",
"on",
"the",
"content",
"type",
".",
"We",
"need",
"this",
"so",
"we",
"only",
"create",
"different",
"versions",
"of",
"the",
"file",
"when",
"it",
"s",
"an",
"image",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/uploaders/decidim/attachment_uploader.rb#L43-L46 | train | Returns true if the file is an image | [
30522,
13366,
3746,
1029,
1006,
2047,
1035,
5371,
1007,
4180,
1035,
2828,
1027,
2944,
1012,
4180,
1035,
2828,
1064,
1064,
2047,
1035,
5371,
1012,
4180,
1035,
2828,
4180,
1035,
2828,
1012,
2000,
1035,
1055,
1012,
2707,
1035,
2007,
1029,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.replace_self | def replace_self(uri)
# Reset dependent values
instance_variables.each do |var|
if instance_variable_defined?(var) && var != :@validation_deferred
remove_instance_variable(var)
end
end
@scheme = uri.scheme
@user = uri.user
@password = uri.password
@host = uri.host
@port = uri.port
@path = uri.path
@query = uri.query
@fragment = uri.fragment
return self
end | ruby | def replace_self(uri)
# Reset dependent values
instance_variables.each do |var|
if instance_variable_defined?(var) && var != :@validation_deferred
remove_instance_variable(var)
end
end
@scheme = uri.scheme
@user = uri.user
@password = uri.password
@host = uri.host
@port = uri.port
@path = uri.path
@query = uri.query
@fragment = uri.fragment
return self
end | [
"def",
"replace_self",
"(",
"uri",
")",
"# Reset dependent values",
"instance_variables",
".",
"each",
"do",
"|",
"var",
"|",
"if",
"instance_variable_defined?",
"(",
"var",
")",
"&&",
"var",
"!=",
":@validation_deferred",
"remove_instance_variable",
"(",
"var",
")"... | Replaces the internal state of self with the specified URI's state.
Used in destructive operations to avoid massive code repetition.
@param [Addressable::URI] uri The URI to replace <code>self</code> with.
@return [Addressable::URI] <code>self</code>. | [
"Replaces",
"the",
"internal",
"state",
"of",
"self",
"with",
"the",
"specified",
"URI",
"s",
"state",
".",
"Used",
"in",
"destructive",
"operations",
"to",
"avoid",
"massive",
"code",
"repetition",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L2468-L2485 | train | Replace self with another URI | [
30522,
13366,
5672,
1035,
2969,
1006,
24471,
2072,
1007,
1001,
25141,
7790,
5300,
6013,
1035,
10857,
1012,
2169,
2079,
1064,
13075,
1064,
2065,
6013,
1035,
8023,
1035,
4225,
1029,
1006,
13075,
1007,
1004,
1004,
13075,
999,
1027,
1024,
1030,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/http_utils.rb | Sprockets.HTTPUtils.find_best_mime_type_match | def find_best_mime_type_match(q_value_header, available)
find_best_q_match(q_value_header, available) do |a, b|
match_mime_type?(a, b)
end
end | ruby | def find_best_mime_type_match(q_value_header, available)
find_best_q_match(q_value_header, available) do |a, b|
match_mime_type?(a, b)
end
end | [
"def",
"find_best_mime_type_match",
"(",
"q_value_header",
",",
"available",
")",
"find_best_q_match",
"(",
"q_value_header",
",",
"available",
")",
"do",
"|",
"a",
",",
"b",
"|",
"match_mime_type?",
"(",
"a",
",",
"b",
")",
"end",
"end"
] | Internal: Find the best qvalue match from an Array of available mime type
options.
Adapted from Rack::Utils#q_values.
Returns the matched mime type String from available Array or nil. | [
"Internal",
":",
"Find",
"the",
"best",
"qvalue",
"match",
"from",
"an",
"Array",
"of",
"available",
"mime",
"type",
"options",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/http_utils.rb#L127-L131 | train | Find the best mime type match for the given q_value_header | [
30522,
13366,
2424,
1035,
2190,
1035,
2771,
4168,
1035,
2828,
1035,
2674,
1006,
1053,
1035,
3643,
1035,
20346,
1010,
2800,
1007,
2424,
1035,
2190,
1035,
1053,
1035,
2674,
1006,
1053,
1035,
3643,
1035,
20346,
1010,
2800,
1007,
2079,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb | Azure::Logic::Mgmt::V2016_06_01.Agreements.delete_with_http_info | def delete_with_http_info(resource_group_name, integration_account_name, agreement_name, custom_headers:nil)
delete_async(resource_group_name, integration_account_name, agreement_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, integration_account_name, agreement_name, custom_headers:nil)
delete_async(resource_group_name, integration_account_name, agreement_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"agreement_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"agreement_name",
",",
"custom_heade... | Deletes an integration account agreement.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param agreement_name [String] The integration account agreement name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Deletes",
"an",
"integration",
"account",
"agreement",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb#L367-L369 | train | Deletes an integration account agreement. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
3820,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/windows/service.rb | Puppet::Util::Windows.Service.stop | def stop(service_name, timeout: DEFAULT_TIMEOUT)
Puppet.debug _("Stopping the %{service_name} service. Timeout set to: %{timeout} seconds") % { service_name: service_name, timeout: timeout }
valid_initial_states = SERVICE_STATES.keys - [SERVICE_STOPPED]
transition_service_state(service_name, valid_initial_states, SERVICE_STOPPED, timeout) do |service|
send_service_control_signal(service, SERVICE_CONTROL_STOP)
end
Puppet.debug _("Successfully stopped the %{service_name} service") % { service_name: service_name }
end | ruby | def stop(service_name, timeout: DEFAULT_TIMEOUT)
Puppet.debug _("Stopping the %{service_name} service. Timeout set to: %{timeout} seconds") % { service_name: service_name, timeout: timeout }
valid_initial_states = SERVICE_STATES.keys - [SERVICE_STOPPED]
transition_service_state(service_name, valid_initial_states, SERVICE_STOPPED, timeout) do |service|
send_service_control_signal(service, SERVICE_CONTROL_STOP)
end
Puppet.debug _("Successfully stopped the %{service_name} service") % { service_name: service_name }
end | [
"def",
"stop",
"(",
"service_name",
",",
"timeout",
":",
"DEFAULT_TIMEOUT",
")",
"Puppet",
".",
"debug",
"_",
"(",
"\"Stopping the %{service_name} service. Timeout set to: %{timeout} seconds\"",
")",
"%",
"{",
"service_name",
":",
"service_name",
",",
"timeout",
":",
... | Stop a windows service
@param [String] service_name name of the service to stop
@param optional [Integer] timeout the minumum number of seconds to wait before timing out | [
"Stop",
"a",
"windows",
"service"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/service.rb#L323-L333 | train | Stops the service | [
30522,
13366,
2644,
1006,
2326,
1035,
2171,
1010,
2051,
5833,
1024,
12398,
1035,
2051,
5833,
1007,
13997,
1012,
2139,
8569,
2290,
1035,
1006,
1000,
7458,
1996,
1003,
1063,
2326,
1035,
2171,
1065,
2326,
1012,
2051,
5833,
2275,
30524,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
googleapis/google-cloud-ruby | google-cloud-dns/lib/google-cloud-dns.rb | Google.Cloud.dns | def dns scope: nil, retries: nil, timeout: nil
Google::Cloud.dns @project, @keyfile, scope: scope,
retries: (retries || @retries),
timeout: (timeout || @timeout)
end | ruby | def dns scope: nil, retries: nil, timeout: nil
Google::Cloud.dns @project, @keyfile, scope: scope,
retries: (retries || @retries),
timeout: (timeout || @timeout)
end | [
"def",
"dns",
"scope",
":",
"nil",
",",
"retries",
":",
"nil",
",",
"timeout",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"dns",
"@project",
",",
"@keyfile",
",",
"scope",
":",
"scope",
",",
"retries",
":",
"(",
"retries",
"||",
"@retries",
")",
",",
... | Creates a new object for connecting to the DNS service.
Each call creates a new connection.
For more information on connecting to Google Cloud see the
{file:AUTHENTICATION.md Authentication Guide}.
@param [String, Array<String>] scope The OAuth 2.0 scopes controlling the
set of resources and operations that the connection can access. See
[Using OAuth 2.0 to Access Google
APIs](https://developers.google.com/identity/protocols/OAuth2).
The default scope is:
* `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
@param [Integer] retries Number of times to retry requests on server
error. The default value is `3`. Optional.
@param [Integer] timeout Default timeout to use in requests. Optional.
@return [Google::Cloud::Dns::Project]
@example
require "google/cloud"
gcloud = Google::Cloud.new
dns = gcloud.dns
zone = dns.zone "example-com"
zone.records.each do |record|
puts record.name
end
@example The default scope can be overridden with the `scope` option:
require "google/cloud"
gcloud = Google::Cloud.new
dns_readonly = "https://www.googleapis.com/auth/ndev.clouddns.readonly"
dns = gcloud.dns scope: dns_readonly | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"DNS",
"service",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-dns/lib/google-cloud-dns.rb#L66-L70 | train | Create a DNS object | [
30522,
13366,
1040,
3619,
9531,
1024,
9152,
2140,
1010,
2128,
21011,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
9152,
2140,
8224,
1024,
1024,
6112,
1012,
1040,
3619,
1030,
2622,
1010,
1030,
3145,
8873,
2571,
1010,
9531,
1024,
9531,
1010,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_custom_prebuilt_entity | def add_custom_prebuilt_entity(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:nil)
response = add_custom_prebuilt_entity_async(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def add_custom_prebuilt_entity(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:nil)
response = add_custom_prebuilt_entity_async(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"add_custom_prebuilt_entity",
"(",
"app_id",
",",
"version_id",
",",
"prebuilt_domain_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_custom_prebuilt_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"prebuilt_domain_model_crea... | Adds a prebuilt entity model to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param prebuilt_domain_model_create_object [PrebuiltDomainModelCreateObject]
A model object containing the name of the prebuilt entity and the name of the
domain to which this model belongs.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Uuid] operation results. | [
"Adds",
"a",
"prebuilt",
"entity",
"model",
"to",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L4560-L4563 | train | Adds a prebuilt entity to a version of the application. | [
30522,
13366,
5587,
1035,
7661,
1035,
3653,
8569,
4014,
2102,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
3653,
8569,
4014,
2102,
1035,
5884,
1035,
2944,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/v1_tender.rb | SquareConnect.V1Tender.valid? | def valid?
type_validator = EnumAttributeValidator.new('String', ["CREDIT_CARD", "CASH", "THIRD_PARTY_CARD", "NO_SALE", "SQUARE_WALLET", "SQUARE_GIFT_CARD", "UNKNOWN", "OTHER"])
return false unless type_validator.valid?(@type)
card_brand_validator = EnumAttributeValidator.new('String', ["OTHER_BRAND", "VISA", "MASTER_CARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD"])
return false unless card_brand_validator.valid?(@card_brand)
entry_method_validator = EnumAttributeValidator.new('String', ["MANUAL", "SCANNED", "SQUARE_CASH", "SQUARE_WALLET", "SWIPED", "WEB_FORM", "OTHER"])
return false unless entry_method_validator.valid?(@entry_method)
return true
end | ruby | def valid?
type_validator = EnumAttributeValidator.new('String', ["CREDIT_CARD", "CASH", "THIRD_PARTY_CARD", "NO_SALE", "SQUARE_WALLET", "SQUARE_GIFT_CARD", "UNKNOWN", "OTHER"])
return false unless type_validator.valid?(@type)
card_brand_validator = EnumAttributeValidator.new('String', ["OTHER_BRAND", "VISA", "MASTER_CARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD"])
return false unless card_brand_validator.valid?(@card_brand)
entry_method_validator = EnumAttributeValidator.new('String', ["MANUAL", "SCANNED", "SQUARE_CASH", "SQUARE_WALLET", "SWIPED", "WEB_FORM", "OTHER"])
return false unless entry_method_validator.valid?(@entry_method)
return true
end | [
"def",
"valid?",
"type_validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"CREDIT_CARD\"",
",",
"\"CASH\"",
",",
"\"THIRD_PARTY_CARD\"",
",",
"\"NO_SALE\"",
",",
"\"SQUARE_WALLET\"",
",",
"\"SQUARE_GIFT_CARD\"",
",",
"\"UNKNOWN\"",
","... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_tender.rb#L212-L220 | train | Returns true if the object is valid for the given object. | [
30522,
13366,
9398,
1029,
2828,
1035,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
4923,
30524,
2353,
1035,
2283,
1035,
4003,
1000,
1010,
1000,
2053,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb | Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.failover_async | def failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
# Send request
promise = begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
end
# Waiting for response.
@client.get_long_running_operation_result(response, deserialize_method)
end
promise
end | ruby | def failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
# Send request
promise = begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
end
# Waiting for response.
@client.get_long_running_operation_result(response, deserialize_method)
end
promise
end | [
"def",
"failover_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_failover_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"di... | @param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param disaster_recovery_configuration_name [String] The name of the disaster
recovery configuration to failover.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http
response. | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"that",
"contains",
"the",
"resource",
".",
"You",
"can",
"obtain",
"this",
"value",
"from",
"the",
"Azure",
"Resource",
"Manager",
"API",
"or",
"the",
"por... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L356-L370 | train | Gets the current version of the managed server. | [
30522,
13366,
8246,
7840,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7071,
1035,
7233,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb | Azure::ApiManagement::Mgmt::V2017_03_01.TenantConfiguration.save | def save(resource_group_name, service_name, parameters, custom_headers:nil)
response = save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def save(resource_group_name, service_name, parameters, custom_headers:nil)
response = save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"save",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"save_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")... | This operation creates a commit with the current configuration snapshot to
the specified branch in the repository. This is a long running operation and
could take several minutes to complete.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param parameters [SaveConfigurationParameter] Save Configuration parameters.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [OperationResultContract] operation results. | [
"This",
"operation",
"creates",
"a",
"commit",
"with",
"the",
"current",
"configuration",
"snapshot",
"to",
"the",
"specified",
"branch",
"in",
"the",
"repository",
".",
"This",
"is",
"a",
"long",
"running",
"operation",
"and",
"could",
"take",
"several",
"min... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb#L85-L88 | train | Saves the specified image to a service. | [
30522,
13366,
3828,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3828,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/plugins/plugin_info_collector.rb | Fastlane.PluginInfoCollector.detect_email | def detect_email
git_email = Helper.backticks('git config --get user.email', print: FastlaneCore::Globals.verbose?).strip
return git_email.empty? ? nil : git_email
end | ruby | def detect_email
git_email = Helper.backticks('git config --get user.email', print: FastlaneCore::Globals.verbose?).strip
return git_email.empty? ? nil : git_email
end | [
"def",
"detect_email",
"git_email",
"=",
"Helper",
".",
"backticks",
"(",
"'git config --get user.email'",
",",
"print",
":",
"FastlaneCore",
"::",
"Globals",
".",
"verbose?",
")",
".",
"strip",
"return",
"git_email",
".",
"empty?",
"?",
"nil",
":",
"git_email",... | Email | [
"Email"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_info_collector.rb#L123-L126 | train | Detects the email of the user | [
30522,
13366,
11487,
1035,
10373,
21025,
2102,
1035,
10373,
1027,
2393,
2121,
1012,
2067,
26348,
2015,
1006,
1005,
21025,
2102,
9530,
8873,
2290,
1011,
1011,
2131,
5310,
1012,
10373,
1005,
1010,
6140,
1024,
3435,
20644,
17345,
1024,
1024,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/lib/decidim/form_builder.rb | Decidim.FormBuilder.hashtaggable_text_field | def hashtaggable_text_field(type, name, locale, options = {})
content_tag(:div, class: "hashtags__container") do
if options[:value]
send(type, name_with_locale(name, locale), options.merge(label: options[:label], value: options[:value][locale]))
else
send(type, name_with_locale(name, locale), options.merge(label: options[:label]))
end
end
end | ruby | def hashtaggable_text_field(type, name, locale, options = {})
content_tag(:div, class: "hashtags__container") do
if options[:value]
send(type, name_with_locale(name, locale), options.merge(label: options[:label], value: options[:value][locale]))
else
send(type, name_with_locale(name, locale), options.merge(label: options[:label]))
end
end
end | [
"def",
"hashtaggable_text_field",
"(",
"type",
",",
"name",
",",
"locale",
",",
"options",
"=",
"{",
"}",
")",
"content_tag",
"(",
":div",
",",
"class",
":",
"\"hashtags__container\"",
")",
"do",
"if",
"options",
"[",
":value",
"]",
"send",
"(",
"type",
... | Public: Generates a field for hashtaggable type.
type - The form field's type, like `text_area` or `text_input`
name - The name of the field
handlers - The social handlers to be created
options - The set of options to send to the field
Renders form fields for each locale. | [
"Public",
":",
"Generates",
"a",
"field",
"for",
"hashtaggable",
"type",
".",
"type",
"-",
"The",
"form",
"field",
"s",
"type",
"like",
"text_area",
"or",
"text_input",
"name",
"-",
"The",
"name",
"of",
"the",
"field",
"handlers",
"-",
"The",
"social",
"... | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L96-L104 | train | Returns a text field with a label and a value. | [
30522,
13366,
23325,
15900,
3654,
3468,
1035,
3793,
1035,
2492,
1006,
2828,
1010,
2171,
1010,
2334,
2063,
1010,
7047,
1027,
1063,
1065,
1007,
4180,
1035,
6415,
1006,
1024,
4487,
2615,
1010,
2465,
1024,
1000,
23325,
15900,
2015,
1035,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/resource_helper.rb | Decidim.ResourceHelper.linked_classes_for | def linked_classes_for(klass)
return [] unless klass.respond_to?(:linked_classes_for)
klass.linked_classes_for(current_component).map do |k|
[k.underscore, t(k.demodulize.underscore, scope: "decidim.filters.linked_classes")]
end
end | ruby | def linked_classes_for(klass)
return [] unless klass.respond_to?(:linked_classes_for)
klass.linked_classes_for(current_component).map do |k|
[k.underscore, t(k.demodulize.underscore, scope: "decidim.filters.linked_classes")]
end
end | [
"def",
"linked_classes_for",
"(",
"klass",
")",
"return",
"[",
"]",
"unless",
"klass",
".",
"respond_to?",
"(",
":linked_classes_for",
")",
"klass",
".",
"linked_classes_for",
"(",
"current_component",
")",
".",
"map",
"do",
"|",
"k",
"|",
"[",
"k",
".",
"... | Gets the classes linked to the given class for the `current_component`, and formats
them in a nice way so that they can be used in a form. Resulting format looks like
this, considering the given class is related to `Decidim::Meetings::Meeting`:
[["decidim/meetings/meeting", "Meetings"]]
This method is intended to be used as a check to render the filter or not. Use the
`linked_classes_filter_values_for(klass)` method to get the form filter collection
values.
klass - The class that will have its linked resources formatted.
Returns an Array of Arrays of Strings.
Returns an empty Array if no links are found. | [
"Gets",
"the",
"classes",
"linked",
"to",
"the",
"given",
"class",
"for",
"the",
"current_component",
"and",
"formats",
"them",
"in",
"a",
"nice",
"way",
"so",
"that",
"they",
"can",
"be",
"used",
"in",
"a",
"form",
".",
"Resulting",
"format",
"looks",
"... | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/resource_helper.rb#L44-L50 | train | Returns an array of the classes that are linked to the given class. | [
30522,
13366,
5799,
1035,
4280,
1035,
2005,
1006,
1047,
27102,
1007,
2709,
1031,
1033,
4983,
1047,
27102,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
5799,
1035,
4280,
1035,
2005,
1007,
1047,
27102,
1012,
5799,
1035,
4280,
1035,
2005,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2017-11-01/generated/azure_mgmt_network/express_route_circuit_authorizations.rb | Azure::Network::Mgmt::V2017_11_01.ExpressRouteCircuitAuthorizations.begin_create_or_update | def begin_create_or_update(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create_or_update(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"authorization_name",
",",
"authorization_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"circuit_n... | Creates or updates an authorization in the specified express route circuit.
@param resource_group_name [String] The name of the resource group.
@param circuit_name [String] The name of the express route circuit.
@param authorization_name [String] The name of the authorization.
@param authorization_parameters [ExpressRouteCircuitAuthorization] Parameters
supplied to the create or update express route circuit authorization
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ExpressRouteCircuitAuthorization] operation results. | [
"Creates",
"or",
"updates",
"an",
"authorization",
"in",
"the",
"specified",
"express",
"route",
"circuit",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-11-01/generated/azure_mgmt_network/express_route_circuit_authorizations.rb#L401-L404 | train | Creates or updates an express route circuit authorization. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4984,
1035,
2171,
1010,
20104,
1035,
30524,
1035,
2171,
1010,
4984,
1035,
2171,
1010,
20104,
1035,
2171,
1010,
20104,
1035,
11709,
1010,
7661... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.add_data_lake_store_account | def add_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:nil)
response = add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def add_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:nil)
response = add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"add_data_lake_store_account",
"(",
"resource_group_name",
",",
"account_name",
",",
"data_lake_store_account_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_data_lake_store_account_async",
"(",
"resource_group_name",
",",
"acc... | Updates the specified Data Lake Analytics account to include the additional
Data Lake Store account.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics account.
@param account_name [String] The name of the Data Lake Analytics account to
which to add the Data Lake Store account.
@param data_lake_store_account_name [String] The name of the Data Lake Store
account to add.
@param parameters [AddDataLakeStoreParameters] The details of the Data Lake
Store account.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Updates",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"account",
"to",
"include",
"the",
"additional",
"Data",
"Lake",
"Store",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L1010-L1013 | train | Adds the specified Data Lake Store account to the specified Data Lake Store account. | [
30522,
13366,
5587,
1035,
2951,
1035,
2697,
1035,
3573,
1035,
4070,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
2951,
1035,
2697,
1035,
3573,
1035,
4070,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_commerce/lib/2015-06-01-preview/generated/azure_mgmt_commerce/usage_aggregates.rb | Azure::Commerce::Mgmt::V2015_06_01_preview.UsageAggregates.list | def list(reported_start_time, reported_end_time, show_details:nil, aggregation_granularity:nil, continuation_token:nil, custom_headers:nil)
first_page = list_as_lazy(reported_start_time, reported_end_time, show_details:show_details, aggregation_granularity:aggregation_granularity, continuation_token:continuation_token, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list(reported_start_time, reported_end_time, show_details:nil, aggregation_granularity:nil, continuation_token:nil, custom_headers:nil)
first_page = list_as_lazy(reported_start_time, reported_end_time, show_details:show_details, aggregation_granularity:aggregation_granularity, continuation_token:continuation_token, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list",
"(",
"reported_start_time",
",",
"reported_end_time",
",",
"show_details",
":",
"nil",
",",
"aggregation_granularity",
":",
"nil",
",",
"continuation_token",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_as_lazy",
"(",... | Query aggregated Azure subscription consumption data for a date range.
@param reported_start_time [DateTime] The start of the time range to retrieve
data for.
@param reported_end_time [DateTime] The end of the time range to retrieve
data for.
@param show_details [Boolean] `True` returns usage data in instance-level
detail, `false` causes server-side aggregation with fewer details. For
example, if you have 3 website instances, by default you will get 3 line
items for website consumption. If you specify showDetails = false, the data
will be aggregated as a single line item for website consumption within the
time period (for the given subscriptionId, meterId, usageStartTime and
usageEndTime).
@param aggregation_granularity [AggregationGranularity] `Daily` (default)
returns the data in daily granularity, `Hourly` returns the data in hourly
granularity. Possible values include: 'Daily', 'Hourly'
@param continuation_token [String] Used when a continuation token string is
provided in the response body of the previous call, enabling paging through a
large result set. If not present, the data is retrieved from the beginning of
the day/hour (based on the granularity) passed in.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array<UsageAggregation>] operation results. | [
"Query",
"aggregated",
"Azure",
"subscription",
"consumption",
"data",
"for",
"a",
"date",
"range",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_commerce/lib/2015-06-01-preview/generated/azure_mgmt_commerce/usage_aggregates.rb#L50-L53 | train | Gets all the available advisor terms. | [
30522,
13366,
2862,
1006,
2988,
1035,
2707,
1035,
2051,
1010,
2988,
1035,
2203,
1035,
2051,
1010,
2265,
1035,
4751,
1024,
9152,
2140,
1010,
28041,
1035,
12604,
7934,
3012,
1024,
9152,
2140,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_flow_log_status_with_http_info | def begin_get_flow_log_status_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_get_flow_log_status_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_get_flow_log_status_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_get_flow_log_status_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
... | Queries status of flow log and traffic analytics (optional) on a specified
resource.
@param resource_group_name [String] The name of the network watcher resource
group.
@param network_watcher_name [String] The name of the network watcher
resource.
@param parameters [FlowLogStatusParameters] Parameters that define a resource
to query flow log and traffic analytics (optional) status.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Queries",
"status",
"of",
"flow",
"log",
"and",
"traffic",
"analytics",
"(",
"optional",
")",
"on",
"a",
"specified",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L2020-L2022 | train | Gets the flow log status of the specified resource group. | [
30522,
13366,
4088,
1035,
2131,
1035,
4834,
1035,
8833,
1035,
3570,
1035,
2007,
1035,
8299,
1035,
18558,
30524,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
2131,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rubocop-hq/rubocop | lib/rubocop/cli.rb | RuboCop.CLI.run_line_length_cop_auto_gen_config | def run_line_length_cop_auto_gen_config(paths)
puts Rainbow(PHASE_1).yellow
@options[:only] = ['Metrics/LineLength']
execute_runner(paths)
@options.delete(:only)
@config_store = ConfigStore.new
# Save the todo configuration of the LineLength cop.
IO.read(ConfigLoader::AUTO_GENERATED_FILE)
.lines
.drop_while { |line| line.start_with?('#') }
.join
end | ruby | def run_line_length_cop_auto_gen_config(paths)
puts Rainbow(PHASE_1).yellow
@options[:only] = ['Metrics/LineLength']
execute_runner(paths)
@options.delete(:only)
@config_store = ConfigStore.new
# Save the todo configuration of the LineLength cop.
IO.read(ConfigLoader::AUTO_GENERATED_FILE)
.lines
.drop_while { |line| line.start_with?('#') }
.join
end | [
"def",
"run_line_length_cop_auto_gen_config",
"(",
"paths",
")",
"puts",
"Rainbow",
"(",
"PHASE_1",
")",
".",
"yellow",
"@options",
"[",
":only",
"]",
"=",
"[",
"'Metrics/LineLength'",
"]",
"execute_runner",
"(",
"paths",
")",
"@options",
".",
"delete",
"(",
"... | Do an initial run with only Metrics/LineLength so that cops that depend
on Metrics/LineLength:Max get the correct value for that parameter. | [
"Do",
"an",
"initial",
"run",
"with",
"only",
"Metrics",
"/",
"LineLength",
"so",
"that",
"cops",
"that",
"depend",
"on",
"Metrics",
"/",
"LineLength",
":",
"Max",
"get",
"the",
"correct",
"value",
"for",
"that",
"parameter",
"."
] | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/cli.rb#L116-L127 | train | Run the line length cop auto - gen config | [
30522,
13366,
2448,
1035,
2240,
1035,
3091,
1035,
8872,
1035,
8285,
1035,
8991,
1035,
9530,
8873,
2290,
1006,
10425,
1007,
8509,
10098,
1006,
4403,
1035,
1015,
1007,
1012,
3756,
1030,
7047,
1031,
1024,
2069,
1033,
1027,
1031,
1005,
12046,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.report_cluster_health | def report_cluster_health(health_information, immediate:false, timeout:60, custom_headers:nil)
response = report_cluster_health_async(health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def report_cluster_health(health_information, immediate:false, timeout:60, custom_headers:nil)
response = report_cluster_health_async(health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"report_cluster_health",
"(",
"health_information",
",",
"immediate",
":",
"false",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"report_cluster_health_async",
"(",
"health_information",
",",
"immediate",
":",
"immediate... | Sends a health report on the Service Fabric cluster.
Sends a health report on a Service Fabric cluster. The report must contain
the information about the source of the health report and property on which
it is reported.
The report is sent to a Service Fabric gateway node, which forwards to the
health store.
The report may be accepted by the gateway, but rejected by the health store
after extra validation.
For example, the health store may reject the report because of an invalid
parameter, like a stale sequence number.
To see whether the report was applied in the health store, run
GetClusterHealth and check that the report appears in the HealthEvents
section.
@param health_information [HealthInformation] Describes the health
information for the health report. This information needs to be present in
all of the health reports sent to the health manager.
@param immediate [Boolean] A flag which indicates whether the report should
be sent immediately.
A health report is sent to a Service Fabric gateway Application, which
forwards to the health store.
If Immediate is set to true, the report is sent immediately from HTTP Gateway
to the health store, regardless of the fabric client settings that the HTTP
Gateway Application is using.
This is useful for critical reports that should be sent as soon as possible.
Depending on timing and other conditions, sending the report may still fail,
for example if the HTTP Gateway is closed or the message doesn't reach the
Gateway.
If Immediate is set to false, the report is sent based on the health client
settings from the HTTP Gateway. Therefore, it will be batched according to
the HealthReportSendInterval configuration.
This is the recommended setting because it allows the health client to
optimize health reporting messages to health store as well as health report
processing.
By default, reports are not sent immediately.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration that the client is willing
to wait for the requested operation to complete. The default value for this
parameter is 60 seconds.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Sends",
"a",
"health",
"report",
"on",
"the",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L1377-L1380 | train | Report cluster health. | [
30522,
13366,
3189,
1035,
9324,
1035,
2740,
1006,
2740,
1035,
2592,
1010,
6234,
1024,
6270,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3189,
1035,
9324,
1035,
2740,
1035,
2004,
6038,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | spaceship/lib/spaceship/client.rb | Spaceship.Client.fetch_olympus_session | def fetch_olympus_session
response = request(:get, "https://appstoreconnect.apple.com/olympus/v1/session")
body = response.body
if body
body = JSON.parse(body) if body.kind_of?(String)
user_map = body["user"]
if user_map
self.user_email = user_map["emailAddress"]
end
provider = body["provider"]
if provider
self.provider = Spaceship::Provider.new(provider_hash: provider)
return true
end
end
return false
end | ruby | def fetch_olympus_session
response = request(:get, "https://appstoreconnect.apple.com/olympus/v1/session")
body = response.body
if body
body = JSON.parse(body) if body.kind_of?(String)
user_map = body["user"]
if user_map
self.user_email = user_map["emailAddress"]
end
provider = body["provider"]
if provider
self.provider = Spaceship::Provider.new(provider_hash: provider)
return true
end
end
return false
end | [
"def",
"fetch_olympus_session",
"response",
"=",
"request",
"(",
":get",
",",
"\"https://appstoreconnect.apple.com/olympus/v1/session\"",
")",
"body",
"=",
"response",
".",
"body",
"if",
"body",
"body",
"=",
"JSON",
".",
"parse",
"(",
"body",
")",
"if",
"body",
... | Get the `itctx` from the new (22nd May 2017) API endpoint "olympus"
Update (29th March 2019) olympus migrates to new appstoreconnect API | [
"Get",
"the",
"itctx",
"from",
"the",
"new",
"(",
"22nd",
"May",
"2017",
")",
"API",
"endpoint",
"olympus",
"Update",
"(",
"29th",
"March",
"2019",
")",
"olympus",
"migrates",
"to",
"new",
"appstoreconnect",
"API"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L517-L535 | train | Fetch the Olympus session ID | [
30522,
13366,
18584,
1035,
26742,
1035,
5219,
3433,
1027,
5227,
1006,
1024,
2131,
1010,
1000,
16770,
1024,
1013,
1013,
18726,
19277,
8663,
2638,
6593,
1012,
6207,
1012,
4012,
1013,
26742,
1013,
1058,
2487,
1013,
5219,
1000,
1007,
2303,
1027... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.ReplicationNetworkMappings.begin_update | def begin_update(fabric_name, network_name, network_mapping_name, input, custom_headers:nil)
response = begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_update(fabric_name, network_name, network_mapping_name, input, custom_headers:nil)
response = begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_update",
"(",
"fabric_name",
",",
"network_name",
",",
"network_mapping_name",
",",
"input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_update_async",
"(",
"fabric_name",
",",
"network_name",
",",
"network_mapping_name",
",",
"inpu... | Updates network mapping.
The operation to update an ASR network mapping.
@param fabric_name [String] Primary fabric name.
@param network_name [String] Primary network name.
@param network_mapping_name [String] Network mapping name.
@param input [UpdateNetworkMappingInput] Update network mapping input.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [NetworkMapping] operation results. | [
"Updates",
"network",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb#L680-L683 | train | Updates a network mapping. | [
30522,
13366,
4088,
1035,
10651,
1006,
8313,
1035,
2171,
1010,
2897,
1035,
2171,
1010,
2897,
1035,
12375,
1035,
2171,
1010,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
10651,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb | Azure::StreamAnalytics::Mgmt::V2016_03_01.Outputs.create_or_replace | def create_or_replace(output, resource_group_name, job_name, output_name, if_match:nil, if_none_match:nil, custom_headers:nil)
response = create_or_replace_async(output, resource_group_name, job_name, output_name, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_replace(output, resource_group_name, job_name, output_name, if_match:nil, if_none_match:nil, custom_headers:nil)
response = create_or_replace_async(output, resource_group_name, job_name, output_name, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_replace",
"(",
"output",
",",
"resource_group_name",
",",
"job_name",
",",
"output_name",
",",
"if_match",
":",
"nil",
",",
"if_none_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_replace_async",
"(",
"o... | Creates an output or replaces an already existing output under an existing
streaming job.
@param output [Output] The definition of the output that will be used to
create a new output or replace the existing one under the streaming job.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param job_name [String] The name of the streaming job.
@param output_name [String] The name of the output.
@param if_match [String] The ETag of the output. Omit this value to always
overwrite the current output. Specify the last-seen ETag value to prevent
accidentally overwritting concurrent changes.
@param if_none_match [String] Set to '*' to allow a new output to be created,
but to prevent updating an existing output. Other values will result in a 412
Pre-condition Failed response.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Output] operation results. | [
"Creates",
"an",
"output",
"or",
"replaces",
"an",
"already",
"existing",
"output",
"under",
"an",
"existing",
"streaming",
"job",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb#L46-L49 | train | Creates or replaces an existing output. | [
30522,
13366,
3443,
1035,
2030,
1035,
5672,
1006,
6434,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
6434,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
2065,
1035,
3904,
1035,
2674,
1024,
9152,
2140,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/log_analytics.rb | Azure::Compute::Mgmt::V2018_04_01.LogAnalytics.export_request_rate_by_interval_async | def export_request_rate_by_interval_async(parameters, location, custom_headers:nil)
# Send request
promise = begin_export_request_rate_by_interval_async(parameters, location, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::LogAnalyticsOperationResult.mapper()
parsed_response = @client.deserialize(result_mapper, parsed_response)
end
# Waiting for response.
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
end
promise
end | ruby | def export_request_rate_by_interval_async(parameters, location, custom_headers:nil)
# Send request
promise = begin_export_request_rate_by_interval_async(parameters, location, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::LogAnalyticsOperationResult.mapper()
parsed_response = @client.deserialize(result_mapper, parsed_response)
end
# Waiting for response.
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
end
promise
end | [
"def",
"export_request_rate_by_interval_async",
"(",
"parameters",
",",
"location",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_export_request_rate_by_interval_async",
"(",
"parameters",
",",
"location",
",",
"custom_headers",
":custom_h... | @param parameters [RequestRateByIntervalInput] Parameters supplied to the
LogAnalytics getRequestRateByInterval Api.
@param location [String] The location upon which virtual-machine-sizes is
queried.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http
response. | [
"@param",
"parameters",
"[",
"RequestRateByIntervalInput",
"]",
"Parameters",
"supplied",
"to",
"the",
"LogAnalytics",
"getRequestRateByInterval",
"Api",
".",
"@param",
"location",
"[",
"String",
"]",
"The",
"location",
"upon",
"which",
"virtual",
"-",
"machine",
"-... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/log_analytics.rb#L53-L69 | train | Export request rate by interval. | [
30522,
13366,
9167,
1035,
5227,
1035,
3446,
1035,
2011,
1035,
13483,
1035,
2004,
6038,
2278,
1006,
11709,
1010,
3295,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
9167,
1035,
5227,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/images.rb | Azure::Compute::Mgmt::V2018_04_01.Images.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, image_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, image_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, image_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, image_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"image_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"image_name",
",",
"parameters",
",",
"custom_headers",... | Create or update an image.
@param resource_group_name [String] The name of the resource group.
@param image_name [String] The name of the image.
@param parameters [Image] Parameters supplied to the Create Image operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Create",
"or",
"update",
"an",
"image",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/images.rb#L452-L454 | train | Creates or updates an image. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3746,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
stripe/stripe-ruby | lib/stripe/list_object.rb | Stripe.ListObject.previous_page | def previous_page(params = {}, opts = {})
first_id = data.first.id
params = filters.merge(ending_before: first_id).merge(params)
list(params, opts)
end | ruby | def previous_page(params = {}, opts = {})
first_id = data.first.id
params = filters.merge(ending_before: first_id).merge(params)
list(params, opts)
end | [
"def",
"previous_page",
"(",
"params",
"=",
"{",
"}",
",",
"opts",
"=",
"{",
"}",
")",
"first_id",
"=",
"data",
".",
"first",
".",
"id",
"params",
"=",
"filters",
".",
"merge",
"(",
"ending_before",
":",
"first_id",
")",
".",
"merge",
"(",
"params",
... | Fetches the previous page in the resource list (if there is one).
This method will try to respect the limit of the current page. If none
was given, the default limit will be fetched again. | [
"Fetches",
"the",
"previous",
"page",
"in",
"the",
"resource",
"list",
"(",
"if",
"there",
"is",
"one",
")",
"."
] | 322a8c60be8a9b9ac8aad8857864680a32176935 | https://github.com/stripe/stripe-ruby/blob/322a8c60be8a9b9ac8aad8857864680a32176935/lib/stripe/list_object.rb#L92-L98 | train | Returns the first page of the list | [
30522,
13366,
3025,
1035,
3931,
1006,
11498,
5244,
1027,
1063,
1065,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2034,
1035,
8909,
1027,
2951,
1012,
2034,
1012,
8909,
11498,
5244,
1027,
17736,
1012,
13590,
1006,
4566,
1035,
2077,
1024,
2034,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
heroku/legacy-cli | lib/heroku/command/addons.rb | Heroku::Command.Addons.attach | def attach
unless addon_name = args.shift
error("Usage: heroku addons:attach ADDON_NAME\nMust specify add-on resource to attach.")
end
addon = resolve_addon!(addon_name)
requires_preauth
attachment_name = options[:as]
msg = attachment_name ?
"Attaching #{addon['name']} as #{attachment_name} to #{app}" :
"Attaching #{addon['name']} to #{app}"
display("#{msg}... ", false)
response = api.request(
:body => json_encode({
"app" => {"name" => app},
"addon" => {"name" => addon['name']},
"confirm" => options[:confirm],
"name" => attachment_name
}),
:expects => [201, 422],
:headers => { "Accept" => "application/vnd.heroku+json; version=3" },
:method => :post,
:path => "/addon-attachments"
)
case response.status
when 201
display("done")
action("Setting #{response.body["name"]} vars and restarting #{app}") do
@status = api.get_release(app, 'current').body['name']
end
when 422 # add-on resource not found or cannot be attached
display("failed")
output_with_bang(response.body["message"])
output_with_bang("List available resources with `heroku addons`.")
output_with_bang("Provision a new add-on resource with `heroku addons:create ADDON_PLAN`.")
end
end | ruby | def attach
unless addon_name = args.shift
error("Usage: heroku addons:attach ADDON_NAME\nMust specify add-on resource to attach.")
end
addon = resolve_addon!(addon_name)
requires_preauth
attachment_name = options[:as]
msg = attachment_name ?
"Attaching #{addon['name']} as #{attachment_name} to #{app}" :
"Attaching #{addon['name']} to #{app}"
display("#{msg}... ", false)
response = api.request(
:body => json_encode({
"app" => {"name" => app},
"addon" => {"name" => addon['name']},
"confirm" => options[:confirm],
"name" => attachment_name
}),
:expects => [201, 422],
:headers => { "Accept" => "application/vnd.heroku+json; version=3" },
:method => :post,
:path => "/addon-attachments"
)
case response.status
when 201
display("done")
action("Setting #{response.body["name"]} vars and restarting #{app}") do
@status = api.get_release(app, 'current').body['name']
end
when 422 # add-on resource not found or cannot be attached
display("failed")
output_with_bang(response.body["message"])
output_with_bang("List available resources with `heroku addons`.")
output_with_bang("Provision a new add-on resource with `heroku addons:create ADDON_PLAN`.")
end
end | [
"def",
"attach",
"unless",
"addon_name",
"=",
"args",
".",
"shift",
"error",
"(",
"\"Usage: heroku addons:attach ADDON_NAME\\nMust specify add-on resource to attach.\"",
")",
"end",
"addon",
"=",
"resolve_addon!",
"(",
"addon_name",
")",
"requires_preauth",
"attachment_name",... | addons:attach ADDON_NAME
attach add-on resource to an app
--as ATTACHMENT_NAME # (optional) name for add-on attachment
--confirm APP_NAME # overwrite existing add-on attachment with same name | [
"addons",
":",
"attach",
"ADDON_NAME"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/addons.rb#L159-L200 | train | Attaches an add - on to an app | [
30522,
13366,
22476,
4983,
5587,
2239,
1035,
2171,
1027,
12098,
5620,
1012,
5670,
7561,
1006,
1000,
8192,
1024,
5394,
5283,
5587,
5644,
1024,
22476,
5587,
2239,
1035,
2171,
1032,
13221,
19966,
20648,
5587,
1011,
2006,
7692,
2000,
22476,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | match/lib/match/nuke.rb | Match.Nuke.certificate_type | def certificate_type(type)
{
distribution: Spaceship.certificate.production,
development: Spaceship.certificate.development,
enterprise: Spaceship.certificate.in_house
}[type] ||= raise "Unknown type '#{type}'"
end | ruby | def certificate_type(type)
{
distribution: Spaceship.certificate.production,
development: Spaceship.certificate.development,
enterprise: Spaceship.certificate.in_house
}[type] ||= raise "Unknown type '#{type}'"
end | [
"def",
"certificate_type",
"(",
"type",
")",
"{",
"distribution",
":",
"Spaceship",
".",
"certificate",
".",
"production",
",",
"development",
":",
"Spaceship",
".",
"certificate",
".",
"development",
",",
"enterprise",
":",
"Spaceship",
".",
"certificate",
".",... | The kind of certificate we're interested in | [
"The",
"kind",
"of",
"certificate",
"we",
"re",
"interested",
"in"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/match/lib/match/nuke.rb#L242-L248 | train | Returns the type of certificate | [
30522,
13366,
8196,
1035,
2828,
1006,
2828,
1007,
1063,
4353,
1024,
25516,
1012,
8196,
1012,
2537,
1010,
2458,
1024,
25516,
1012,
8196,
1012,
2458,
1010,
6960,
1024,
25516,
1012,
8196,
1012,
1999,
1035,
2160,
1065,
1031,
2828,
1033,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb | Azure::Automation::Mgmt::V2015_10_31.JobOperations.stop_with_http_info | def stop_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers:nil)
stop_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
end | ruby | def stop_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers:nil)
stop_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
end | [
"def",
"stop_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"stop_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":custom_header... | Stop the job identified by jobId.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param job_id The job id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Stop",
"the",
"job",
"identified",
"by",
"jobId",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb#L350-L352 | train | Stops the job. | [
30522,
13366,
2644,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2644,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb | Azure::CDN::Mgmt::V2017_04_02.Endpoints.validate_custom_domain_with_http_info | def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
end | ruby | def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
end | [
"def",
"validate_custom_domain_with_http_info",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",
",",
"custom_domain_properties",
",",
"custom_headers",
":",
"nil",
")",
"validate_custom_domain_async",
"(",
"resource_group_name",
",",
"profile_name",
","... | Validates the custom domain mapping to ensure it maps to the correct CDN
endpoint in DNS.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param profile_name [String] Name of the CDN profile which is unique within
the resource group.
@param endpoint_name [String] Name of the endpoint under the profile which is
unique globally.
@param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
be validated.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Validates",
"the",
"custom",
"domain",
"mapping",
"to",
"ensure",
"it",
"maps",
"to",
"the",
"correct",
"CDN",
"endpoint",
"in",
"DNS",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb#L641-L643 | train | Validates the specified custom domain. | [
30522,
13366,
9398,
3686,
1035,
7661,
1035,
5884,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
5884,
1035,
5144,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_for_resource_as_lazy | def list_for_resource_as_lazy(resource_id, query_options:nil, custom_headers:nil)
response = list_for_resource_async(resource_id, query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_for_resource_next_async(next_page_link, custom_headers:custom_headers)
end
page
end
end | ruby | def list_for_resource_as_lazy(resource_id, query_options:nil, custom_headers:nil)
response = list_for_resource_async(resource_id, query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_for_resource_next_async(next_page_link, custom_headers:custom_headers)
end
page
end
end | [
"def",
"list_for_resource_as_lazy",
"(",
"resource_id",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_for_resource_async",
"(",
"resource_id",
",",
"query_options",
":query_options",
",",
"custom_headers",
":custom_head... | Gets all remediations for a resource.
@param resource_id [String] Resource ID.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RemediationListResult] which provide lazy access to pages of the
response. | [
"Gets",
"all",
"remediations",
"for",
"a",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L3218-L3227 | train | Gets the list of all the available CDNs for the resource. | [
30522,
13366,
2862,
1035,
2005,
1035,
7692,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
8909,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2005,
1035,
7692,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb | Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.failover | def failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
response = failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
nil
end | ruby | def failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
response = failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"failover",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"failover_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_n... | Fails over from the current primary server to this server.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param disaster_recovery_configuration_name [String] The name of the disaster
recovery configuration to failover.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Fails",
"over",
"from",
"the",
"current",
"primary",
"server",
"to",
"this",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L338-L341 | train | Gets the current cluster failover policy. | [
30522,
13366,
8246,
7840,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7071,
1035,
7233,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
8246,
7840,
1035,
2004,
6038,
2278,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | deliver/lib/deliver/runner.rb | Deliver.Runner.upload_binary | def upload_binary
UI.message("Uploading binary to App Store Connect")
if options[:ipa]
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
app_id: options[:app].apple_id,
ipa_path: options[:ipa],
package_path: "/tmp",
platform: options[:platform]
)
elsif options[:pkg]
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
app_id: options[:app].apple_id,
pkg_path: options[:pkg],
package_path: "/tmp",
platform: options[:platform]
)
end
transporter = transporter_for_selected_team
result = transporter.upload(options[:app].apple_id, package_path)
UI.user_error!("Could not upload binary to App Store Connect. Check out the error above", show_github_issues: true) unless result
end | ruby | def upload_binary
UI.message("Uploading binary to App Store Connect")
if options[:ipa]
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
app_id: options[:app].apple_id,
ipa_path: options[:ipa],
package_path: "/tmp",
platform: options[:platform]
)
elsif options[:pkg]
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
app_id: options[:app].apple_id,
pkg_path: options[:pkg],
package_path: "/tmp",
platform: options[:platform]
)
end
transporter = transporter_for_selected_team
result = transporter.upload(options[:app].apple_id, package_path)
UI.user_error!("Could not upload binary to App Store Connect. Check out the error above", show_github_issues: true) unless result
end | [
"def",
"upload_binary",
"UI",
".",
"message",
"(",
"\"Uploading binary to App Store Connect\"",
")",
"if",
"options",
"[",
":ipa",
"]",
"package_path",
"=",
"FastlaneCore",
"::",
"IpaUploadPackageBuilder",
".",
"new",
".",
"generate",
"(",
"app_id",
":",
"options",
... | Upload the binary to App Store Connect | [
"Upload",
"the",
"binary",
"to",
"App",
"Store",
"Connect"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/runner.rb#L141-L162 | train | Upload a binary to the App Store Connect | [
30522,
13366,
2039,
11066,
1035,
12441,
21318,
1012,
4471,
1006,
1000,
2039,
18570,
12441,
2000,
10439,
3573,
7532,
1000,
1007,
2065,
7047,
1031,
1024,
24531,
1033,
7427,
1035,
4130,
1027,
3435,
20644,
17345,
1024,
1024,
24531,
6279,
11066,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb | Azure::Labservices::Mgmt::V2018_10_15.GlobalUsers.list_labs | def list_labs(user_name, custom_headers:nil)
response = list_labs_async(user_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_labs(user_name, custom_headers:nil)
response = list_labs_async(user_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_labs",
"(",
"user_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_labs_async",
"(",
"user_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | List labs for the user.
@param user_name [String] The name of the user.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ListLabsResponse] operation results. | [
"List",
"labs",
"for",
"the",
"user",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb#L550-L553 | train | Gets all the labs for a user. | [
30522,
13366,
2862,
1035,
13625,
1006,
5310,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
13625,
1035,
2004,
6038,
2278,
1006,
5310,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationJobs.resume | def resume(job_name, resume_job_params, custom_headers:nil)
response = resume_async(job_name, resume_job_params, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def resume(job_name, resume_job_params, custom_headers:nil)
response = resume_async(job_name, resume_job_params, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"resume",
"(",
"job_name",
",",
"resume_job_params",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"resume_async",
"(",
"job_name",
",",
"resume_job_params",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | Resumes the specified job.
The operation to resume an Azure Site Recovery job
@param job_name [String] Job identifier.
@param resume_job_params [ResumeJobParams] Resume rob comments.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Job] operation results. | [
"Resumes",
"the",
"specified",
"job",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb#L311-L314 | train | Resumes a specified advise job. | [
30522,
13366,
13746,
1006,
3105,
1035,
2171,
1010,
13746,
1035,
3105,
1035,
11498,
5244,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
13746,
1035,
2004,
6038,
2278,
1006,
3105,
1035,
2171,
1010,
13746,
1035,
3105,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_fabric/lib/2018-02-01/generated/azure_mgmt_service_fabric/cluster_versions.rb | Azure::ServiceFabric::Mgmt::V2018_02_01.ClusterVersions.get_by_environment | def get_by_environment(location, environment, cluster_version, custom_headers:nil)
response = get_by_environment_async(location, environment, cluster_version, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_by_environment(location, environment, cluster_version, custom_headers:nil)
response = get_by_environment_async(location, environment, cluster_version, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_by_environment",
"(",
"location",
",",
"environment",
",",
"cluster_version",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_by_environment_async",
"(",
"location",
",",
"environment",
",",
"cluster_version",
",",
"custom_headers",
":custom_... | Gets information about a Service Fabric cluster code version available for
the specified environment.
Gets information about an available Service Fabric cluster code version by
environment.
@param location [String] The location for the cluster code versions. This is
different from cluster location.
@param environment [Enum] The operating system of the cluster. The default
means all. Possible values include: 'Windows', 'Linux'
@param cluster_version [String] The cluster code version.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ClusterCodeVersionsListResult] operation results. | [
"Gets",
"information",
"about",
"a",
"Service",
"Fabric",
"cluster",
"code",
"version",
"available",
"for",
"the",
"specified",
"environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2018-02-01/generated/azure_mgmt_service_fabric/cluster_versions.rb#L145-L148 | train | Gets the cluster specification for the specified environment. | [
30522,
13366,
2131,
1035,
2011,
1035,
4044,
1006,
3295,
1010,
4044,
1010,
9324,
1035,
2544,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2011,
1035,
4044,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
4044,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/uri.rb | Mongo.URI.inverse_bool | def inverse_bool(name, value)
b = convert_bool(name, value)
if b.nil?
nil
else
!b
end
end | ruby | def inverse_bool(name, value)
b = convert_bool(name, value)
if b.nil?
nil
else
!b
end
end | [
"def",
"inverse_bool",
"(",
"name",
",",
"value",
")",
"b",
"=",
"convert_bool",
"(",
"name",
",",
"value",
")",
"if",
"b",
".",
"nil?",
"nil",
"else",
"!",
"b",
"end",
"end"
] | Parses a boolean value and returns its inverse.
@param value [ String ] The URI option value.
@return [ true | false | nil ] The inverse of the boolean value parsed out, otherwise nil
(and a warning will be logged). | [
"Parses",
"a",
"boolean",
"value",
"and",
"returns",
"its",
"inverse",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/uri.rb#L872-L880 | train | inverse boolean | [
30522,
13366,
19262,
1035,
22017,
2140,
1006,
2171,
1010,
3643,
1007,
1038,
1027,
10463,
1035,
22017,
2140,
1006,
2171,
1010,
3643,
1007,
2065,
1038,
1012,
9152,
2140,
1029,
9152,
2140,
2842,
999,
1038,
2203,
2203,
102,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.begin_delete | def begin_delete(resource_group_name, snapshot_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, snapshot_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil... | Deletes a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L783-L786 | train | Deletes a snapshot. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb | Aws::EC2.Instance.reset_source_dest_check | def reset_source_dest_check(options = {})
options = options.merge(
instance_id: @id,
attribute: "sourceDestCheck"
)
resp = @client.reset_instance_attribute(options)
resp.data
end | ruby | def reset_source_dest_check(options = {})
options = options.merge(
instance_id: @id,
attribute: "sourceDestCheck"
)
resp = @client.reset_instance_attribute(options)
resp.data
end | [
"def",
"reset_source_dest_check",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"instance_id",
":",
"@id",
",",
"attribute",
":",
"\"sourceDestCheck\"",
")",
"resp",
"=",
"@client",
".",
"reset_instance_attribute",
"(",
"opt... | @example Request syntax with placeholder values
instance.reset_source_dest_check({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have the required permissions, the error response is
`DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L1116-L1123 | train | Reset the source dest check | [
30522,
13366,
25141,
1035,
3120,
30524,
2361,
1027,
1030,
7396,
1012,
25141,
1035,
6013,
1035,
17961,
1006,
7047,
1007,
24501,
2361,
1012,
2951,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_diagnostic_categories_as_lazy | def list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:nil)
response = list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers)
end
page
end
end | ruby | def list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:nil)
response = list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers)
end
page
end
end | [
"def",
"list_site_diagnostic_categories_as_lazy",
"(",
"resource_group_name",
",",
"site_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_site_diagnostic_categories_async",
"(",
"resource_group_name",
",",
"site_name",
",",
"custom_headers",
":custom_head... | Get Diagnostics Categories
Get Diagnostics Categories
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [DiagnosticCategoryCollection] which provide lazy access to pages of
the response. | [
"Get",
"Diagnostics",
"Categories"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L3620-L3629 | train | Gets the diagnostic categories for a site. | [
30522,
13366,
2862,
1035,
2609,
1035,
16474,
1035,
7236,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2609,
1035,
16474,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb | Azure::ApiManagement::Mgmt::V2018_01_01.QuotaByPeriodKeys.get_with_http_info | def get_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil)
get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil)
get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"quota_counter_key",
",",
"quota_period_key",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"quota_counter_key",
",",
"quota_p... | Gets the value of the quota counter associated with the counter-key in the
policy for the specific period in service instance.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param quota_counter_key [String] Quota counter key identifier.This is the
result of expression defined in counter-key attribute of the quota-by-key
policy.For Example, if you specify counter-key="boo" in the policy, then it’s
accessible by "boo" counter key. But if it’s defined as
counter-key="@("b"+"a")" then it will be accessible by "ba" key
@param quota_period_key [String] Quota period key identifier.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Gets",
"the",
"value",
"of",
"the",
"quota",
"counter",
"associated",
"with",
"the",
"counter",
"-",
"key",
"in",
"the",
"policy",
"for",
"the",
"specific",
"period",
"in",
"service",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb#L63-L65 | train | Gets the specified service quota specification. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
20563,
1035,
4675,
1035,
3145,
1010,
20563,
1035,
2558,
1035,
3145,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.begin_delete | def begin_delete(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:nil)
response = begin_delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:nil)
response = begin_delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"removal_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_nam... | Remove protection container mapping.
The operation to delete or remove a protection container mapping.
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param mapping_name [String] Protection container mapping name.
@param removal_input [RemoveProtectionContainerMappingInput] Removal input.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Remove",
"protection",
"container",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb#L848-L851 | train | Deletes a protection container mapping. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
12375,
1035,
2171,
1010,
8208,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/scss-lint | lib/scss_lint/linter/indentation.rb | SCSSLint.Linter::Indentation.check_root_ruleset_indent | def check_root_ruleset_indent(node, actual_indent)
# Whether node is a ruleset not nested within any other ruleset.
if @indent == 0 && node.is_a?(Sass::Tree::RuleNode)
unless actual_indent % @indent_width == 0
add_lint(node.line, lint_message("a multiple of #{@indent_width}", actual_indent))
return true
end
end
false
end | ruby | def check_root_ruleset_indent(node, actual_indent)
# Whether node is a ruleset not nested within any other ruleset.
if @indent == 0 && node.is_a?(Sass::Tree::RuleNode)
unless actual_indent % @indent_width == 0
add_lint(node.line, lint_message("a multiple of #{@indent_width}", actual_indent))
return true
end
end
false
end | [
"def",
"check_root_ruleset_indent",
"(",
"node",
",",
"actual_indent",
")",
"# Whether node is a ruleset not nested within any other ruleset.",
"if",
"@indent",
"==",
"0",
"&&",
"node",
".",
"is_a?",
"(",
"Sass",
"::",
"Tree",
"::",
"RuleNode",
")",
"unless",
"actual_... | Allow rulesets to be indented any amount when the indent is zero, as long
as it's a multiple of the indent width | [
"Allow",
"rulesets",
"to",
"be",
"indented",
"any",
"amount",
"when",
"the",
"indent",
"is",
"zero",
"as",
"long",
"as",
"it",
"s",
"a",
"multiple",
"of",
"the",
"indent",
"width"
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/indentation.rb#L166-L176 | train | Check that the given node is a ruleset that is not nested within any other ruleset. | [
30522,
13366,
4638,
1035,
7117,
1035,
3513,
3388,
1035,
27427,
4765,
1006,
13045,
1010,
5025,
1035,
27427,
4765,
1007,
1001,
3251,
13045,
2003,
1037,
3513,
3388,
2025,
9089,
2098,
2306,
2151,
2060,
3513,
3388,
1012,
2065,
1030,
27427,
4765,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/issues/labels.rb | Github.Client::Issues::Labels.remove | def remove(*args)
arguments(args, required: [:user, :repo, :number])
params = arguments.params
user = arguments.user
repo = arguments.repo
number = arguments.number
if (label_name = params.delete('label_name'))
delete_request("/repos/#{user}/#{repo}/issues/#{number}/labels/#{label_name}", params)
else
delete_request("/repos/#{user}/#{repo}/issues/#{number}/labels", params)
end
end | ruby | def remove(*args)
arguments(args, required: [:user, :repo, :number])
params = arguments.params
user = arguments.user
repo = arguments.repo
number = arguments.number
if (label_name = params.delete('label_name'))
delete_request("/repos/#{user}/#{repo}/issues/#{number}/labels/#{label_name}", params)
else
delete_request("/repos/#{user}/#{repo}/issues/#{number}/labels", params)
end
end | [
"def",
"remove",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":number",
"]",
")",
"params",
"=",
"arguments",
".",
"params",
"user",
"=",
"arguments",
".",
"user",
"repo",
"=",
"arguments",
... | Remove a label from an issue
@example
github = Github.new
github.issues.labels.remove 'user-name', 'repo-name', 'issue-number',
label_name: 'label-name'
Remove all labels from an issue
@example
github = Github.new
github.issues.labels.remove 'user-name', 'repo-name', 'issue-number'
@api public | [
"Remove",
"a",
"label",
"from",
"an",
"issue"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/issues/labels.rb#L157-L169 | train | Remove an issue from the repository | [
30522,
13366,
6366,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
2193,
1033,
1007,
11498,
5244,
1027,
9918,
1012,
11498,
5244,
5310,
1027,
9918,
1012,
5310,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_partition_load_information_with_http_info | def get_partition_load_information_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_partition_load_information_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_partition_load_information_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_partition_load_information_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_partition_load_information_with_http_info",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_partition_load_information_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_hea... | Gets the load information of the specified Service Fabric partition.
Returns information about the load of a specified partition.
The response includes a list of load reports for a Service Fabric partition.
Each report includes the load metric name, value, and last reported time in
UTC.
@param partition_id The identity of the partition.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration that the client is willing
to wait for the requested operation to complete. The default value for this
parameter is 60 seconds.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Gets",
"the",
"load",
"information",
"of",
"the",
"specified",
"Service",
"Fabric",
"partition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L12996-L12998 | train | Gets the load information of the specified partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
7170,
1035,
2592,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
13571,
1035,
7170,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/network/http/connection.rb | Puppet::Network::HTTP.Connection.get | def get(path, headers = {}, options = {})
do_request(Net::HTTP::Get.new(path, headers), options)
end | ruby | def get(path, headers = {}, options = {})
do_request(Net::HTTP::Get.new(path, headers), options)
end | [
"def",
"get",
"(",
"path",
",",
"headers",
"=",
"{",
"}",
",",
"options",
"=",
"{",
"}",
")",
"do_request",
"(",
"Net",
"::",
"HTTP",
"::",
"Get",
".",
"new",
"(",
"path",
",",
"headers",
")",
",",
"options",
")",
"end"
] | Creates a new HTTP client connection to `host`:`port`.
@param host [String] the host to which this client will connect to
@param port [Integer] the port to which this client will connect to
@param options [Hash] options influencing the properties of the created
connection,
@option options [Boolean] :use_ssl true to connect with SSL, false
otherwise, defaults to true
@option options [#setup_connection] :verify An object that will configure
any verification to do on the connection
@option options [Integer] :redirect_limit the number of allowed
redirections, defaults to 10 passing any other option in the options
hash results in a Puppet::Error exception
@note the HTTP connection itself happens lazily only when {#request}, or
one of the {#get}, {#post}, {#delete}, {#head} or {#put} is called
@note The correct way to obtain a connection is to use one of the factory
methods on {Puppet::Network::HttpPool}
@api private
@!macro [new] common_options
@param options [Hash] options influencing the request made. Any
options not recognized by this class will be ignored - no error will
be thrown.
@option options [Hash{Symbol => String}] :basic_auth The basic auth
:username and :password to use for the request, :metric_id Ignored
by this class - used by Puppet Server only. The metric id by which
to track metrics on requests.
@param path [String]
@param headers [Hash{String => String}]
@!macro common_options
@api public | [
"Creates",
"a",
"new",
"HTTP",
"client",
"connection",
"to",
"host",
":",
"port",
".",
"@param",
"host",
"[",
"String",
"]",
"the",
"host",
"to",
"which",
"this",
"client",
"will",
"connect",
"to",
"@param",
"port",
"[",
"Integer",
"]",
"the",
"port",
... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/http/connection.rb#L89-L91 | train | Get a single resource | [
30522,
13366,
2131,
1006,
4130,
1010,
20346,
2015,
1027,
1063,
1065,
1010,
7047,
1027,
1063,
1065,
1007,
2079,
1035,
5227,
1006,
5658,
1024,
1024,
8299,
1024,
1024,
2131,
1012,
2047,
1006,
4130,
1010,
20346,
2015,
1007,
1010,
7047,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb | Azure::Dns::Mgmt::V2017_09_01.RecordSets.list_by_dns_zone_with_http_info | def list_by_dns_zone_with_http_info(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil)
list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value!
end | ruby | def list_by_dns_zone_with_http_info(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil)
list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value!
end | [
"def",
"list_by_dns_zone_with_http_info",
"(",
"resource_group_name",
",",
"zone_name",
",",
"top",
":",
"nil",
",",
"recordsetnamesuffix",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by_dns_zone_async",
"(",
"resource_group_name",
",",
"zone_name",
",",... | Lists all record sets in a DNS zone.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param zone_name [String] The name of the DNS zone (without a terminating
dot).
@param top [Integer] The maximum number of record sets to return. If not
specified, returns up to 100 record sets.
@param recordsetnamesuffix [String] The suffix label of the record set name
that has to be used to filter the record set enumerations. If this parameter
is specified, Enumeration will return only records that end with
.<recordSetNameSuffix>
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Lists",
"all",
"record",
"sets",
"in",
"a",
"DNS",
"zone",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb#L750-L752 | train | Gets the list of records in a DNS zone. | [
30522,
13366,
2862,
1035,
2011,
1035,
1040,
3619,
1035,
4224,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4224,
1035,
2171,
1010,
2327,
1024,
9152,
2140,
1010,
2636,
3388,
18442,
6342,
26989,
2595,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rubocop-hq/rubocop | lib/rubocop/options.rb | RuboCop.Options.long_opt_symbol | def long_opt_symbol(args)
long_opt = args.find { |arg| arg.start_with?('--') }
long_opt[2..-1].sub('[no-]', '').sub(/ .*/, '')
.tr('-', '_').gsub(/[\[\]]/, '').to_sym
end | ruby | def long_opt_symbol(args)
long_opt = args.find { |arg| arg.start_with?('--') }
long_opt[2..-1].sub('[no-]', '').sub(/ .*/, '')
.tr('-', '_').gsub(/[\[\]]/, '').to_sym
end | [
"def",
"long_opt_symbol",
"(",
"args",
")",
"long_opt",
"=",
"args",
".",
"find",
"{",
"|",
"arg",
"|",
"arg",
".",
"start_with?",
"(",
"'--'",
")",
"}",
"long_opt",
"[",
"2",
"..",
"-",
"1",
"]",
".",
"sub",
"(",
"'[no-]'",
",",
"''",
")",
".",
... | Finds the option in `args` starting with -- and converts it to a symbol,
e.g. [..., '--auto-correct', ...] to :auto_correct. | [
"Finds",
"the",
"option",
"in",
"args",
"starting",
"with",
"--",
"and",
"converts",
"it",
"to",
"a",
"symbol",
"e",
".",
"g",
".",
"[",
"...",
"--",
"auto",
"-",
"correct",
"...",
"]",
"to",
":",
"auto_correct",
"."
] | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/options.rb#L207-L211 | train | Returns the symbol for the long option | [
30522,
13366,
2146,
1035,
23569,
1035,
6454,
1006,
12098,
5620,
1007,
2146,
1035,
23569,
1027,
12098,
5620,
1012,
2424,
1063,
1064,
12098,
2290,
1064,
12098,
2290,
1012,
2707,
1035,
2007,
1029,
1006,
1005,
1011,
1011,
1005,
1007,
1065,
2146... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/projects.rb | Github.Client::Projects.edit | def edit(*args)
arguments(args, required: [:id])
params = arguments.params
params["accept"] ||= PREVIEW_MEDIA
patch_request("/projects/#{arguments.id}", params)
end | ruby | def edit(*args)
arguments(args, required: [:id])
params = arguments.params
params["accept"] ||= PREVIEW_MEDIA
patch_request("/projects/#{arguments.id}", params)
end | [
"def",
"edit",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":id",
"]",
")",
"params",
"=",
"arguments",
".",
"params",
"params",
"[",
"\"accept\"",
"]",
"||=",
"PREVIEW_MEDIA",
"patch_request",
"(",
"\"/projects/#{arguments.id... | Edit a project
@param [Hash] params
@option params [String] :name
Optional string
@option params [String] :body
Optional string
@option params [String] :state
Optional string
@example
github = Github.new
github.projects.edit 1002604,
name: "Outcomes Tracker",
body: "The board to track work for the Outcomes application."
@api public | [
"Edit",
"a",
"project"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/projects.rb#L57-L64 | train | Edit a project s organisation | [
30522,
13366,
10086,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
8909,
1033,
1007,
11498,
5244,
1027,
9918,
1012,
11498,
5244,
11498,
5244,
1031,
1000,
5138,
1000,
1033,
1064,
1064,
1027,
19236,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.create_vpc_peering_connection | def create_vpc_peering_connection(options = {})
resp = @client.create_vpc_peering_connection(options)
VpcPeeringConnection.new(
id: resp.data.vpc_peering_connection.vpc_peering_connection_id,
data: resp.data.vpc_peering_connection,
client: @client
)
end | ruby | def create_vpc_peering_connection(options = {})
resp = @client.create_vpc_peering_connection(options)
VpcPeeringConnection.new(
id: resp.data.vpc_peering_connection.vpc_peering_connection_id,
data: resp.data.vpc_peering_connection,
client: @client
)
end | [
"def",
"create_vpc_peering_connection",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_vpc_peering_connection",
"(",
"options",
")",
"VpcPeeringConnection",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"vpc_peering_connection",
... | @example Request syntax with placeholder values
vpcpeeringconnection = ec2.create_vpc_peering_connection({
dry_run: false,
peer_owner_id: "String",
peer_vpc_id: "String",
vpc_id: "String",
peer_region: "String",
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have the required permissions, the error response is
`DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@option options [String] :peer_owner_id
The AWS account ID of the owner of the accepter VPC.
Default: Your AWS account ID
@option options [String] :peer_vpc_id
The ID of the VPC with which you are creating the VPC peering
connection. You must specify this parameter in the request.
@option options [String] :vpc_id
The ID of the requester VPC. You must specify this parameter in the
request.
@option options [String] :peer_region
The region code for the accepter VPC, if the accepter VPC is located
in a region other than the region in which you make the request.
Default: The region in which you make the request.
@return [VpcPeeringConnection] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L1044-L1051 | train | Creates a new vpc peering connection | [
30522,
13366,
3443,
1035,
21210,
2278,
1035,
16740,
1035,
4434,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
21210,
2278,
1035,
16740,
1035,
4434,
1006,
7047,
1007,
21210,
21906,
20550,
8663,
2638,
75... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/resolve.rb | Sprockets.Resolve.resolve_asset_uri | def resolve_asset_uri(uri)
filename, _ = URIUtils.parse_asset_uri(uri)
return uri, Set.new( [URIUtils.build_file_digest_uri(filename)] )
end | ruby | def resolve_asset_uri(uri)
filename, _ = URIUtils.parse_asset_uri(uri)
return uri, Set.new( [URIUtils.build_file_digest_uri(filename)] )
end | [
"def",
"resolve_asset_uri",
"(",
"uri",
")",
"filename",
",",
"_",
"=",
"URIUtils",
".",
"parse_asset_uri",
"(",
"uri",
")",
"return",
"uri",
",",
"Set",
".",
"new",
"(",
"[",
"URIUtils",
".",
"build_file_digest_uri",
"(",
"filename",
")",
"]",
")",
"end... | Internal: Finds an asset given a URI
uri - String. Contains file:// scheme, absolute path to
file.
e.g. "file:///Users/schneems/sprockets/test/fixtures/default/gallery.js?type=application/javascript"
Returns Array. Contains a String uri and Set of dependencies | [
"Internal",
":",
"Finds",
"an",
"asset",
"given",
"a",
"URI"
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/resolve.rb#L77-L80 | train | Resolve an asset URI | [
30522,
13366,
10663,
1035,
11412,
1035,
24471,
2072,
1006,
24471,
2072,
1007,
5371,
18442,
1010,
1035,
1027,
24471,
17922,
3775,
4877,
1012,
11968,
3366,
1035,
11412,
1035,
24471,
2072,
1006,
24471,
2072,
1007,
2709,
24471,
2072,
1010,
2275,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb | Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.begin_create_with_http_info | def begin_create_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
end | ruby | def begin_create_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"parameters",
",",
"auto_start",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_async",
"(",
"resource_group_name",
",",
"accou... | Create StreamingEndpoint
Creates a StreamingEndpoint.
@param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param streaming_endpoint_name [String] The name of the StreamingEndpoint.
@param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
creation.
@param auto_start [Boolean] The flag indicates if the resource should be
automatically started on creation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Create",
"StreamingEndpoint"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb#L562-L564 | train | Creates a streaming endpoint. | [
30522,
13366,
4088,
1035,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
1035,
2171,
1010,
11709,
1010,
8285,
1035,
2707,
1024,
9152,
2140,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/runner.rb | Fastlane.Runner.trigger_action_by_name | def trigger_action_by_name(method_sym, custom_dir, from_action, *arguments)
# First, check if there is a predefined method in the actions folder
class_ref = class_reference_from_action_name(method_sym)
unless class_ref
class_ref = class_reference_from_action_alias(method_sym)
# notify action that it has been used by alias
if class_ref.respond_to?(:alias_used)
orig_action = method_sym.to_s
arguments = [{}] if arguments.empty?
class_ref.alias_used(orig_action, arguments.first)
end
end
# It's important to *not* have this code inside the rescue block
# otherwise all NameErrors will be caught and the error message is
# confusing
begin
return self.try_switch_to_lane(method_sym, arguments)
rescue LaneNotAvailableError
# We don't actually handle this here yet
# We just try to use a user configured lane first
# and only if there is none, we're gonna check for the
# built-in actions
end
if class_ref
if class_ref.respond_to?(:run)
# Action is available, now execute it
return self.execute_action(method_sym, class_ref, arguments, custom_dir: custom_dir, from_action: from_action)
else
UI.user_error!("Action '#{method_sym}' of class '#{class_name}' was found, but has no `run` method.")
end
end
# No lane, no action, let's at least show the correct error message
if Fastlane.plugin_manager.plugin_is_added_as_dependency?(PluginManager.plugin_prefix + method_sym.to_s)
# That's a plugin, but for some reason we can't find it
UI.user_error!("Plugin '#{method_sym}' was not properly loaded, make sure to follow the plugin docs for troubleshooting: #{PluginManager::TROUBLESHOOTING_URL}")
elsif Fastlane::Actions.formerly_bundled_actions.include?(method_sym.to_s)
# This was a formerly bundled action which is now a plugin.
UI.verbose(caller.join("\n"))
UI.user_error!("The action '#{method_sym}' is no longer bundled with fastlane. You can install it using `fastlane add_plugin #{method_sym}`")
else
# So there is no plugin under that name, so just show the error message generated by the lane switch
UI.verbose(caller.join("\n"))
UI.user_error!("Could not find action, lane or variable '#{method_sym}'. Check out the documentation for more details: https://docs.fastlane.tools/actions")
end
end | ruby | def trigger_action_by_name(method_sym, custom_dir, from_action, *arguments)
# First, check if there is a predefined method in the actions folder
class_ref = class_reference_from_action_name(method_sym)
unless class_ref
class_ref = class_reference_from_action_alias(method_sym)
# notify action that it has been used by alias
if class_ref.respond_to?(:alias_used)
orig_action = method_sym.to_s
arguments = [{}] if arguments.empty?
class_ref.alias_used(orig_action, arguments.first)
end
end
# It's important to *not* have this code inside the rescue block
# otherwise all NameErrors will be caught and the error message is
# confusing
begin
return self.try_switch_to_lane(method_sym, arguments)
rescue LaneNotAvailableError
# We don't actually handle this here yet
# We just try to use a user configured lane first
# and only if there is none, we're gonna check for the
# built-in actions
end
if class_ref
if class_ref.respond_to?(:run)
# Action is available, now execute it
return self.execute_action(method_sym, class_ref, arguments, custom_dir: custom_dir, from_action: from_action)
else
UI.user_error!("Action '#{method_sym}' of class '#{class_name}' was found, but has no `run` method.")
end
end
# No lane, no action, let's at least show the correct error message
if Fastlane.plugin_manager.plugin_is_added_as_dependency?(PluginManager.plugin_prefix + method_sym.to_s)
# That's a plugin, but for some reason we can't find it
UI.user_error!("Plugin '#{method_sym}' was not properly loaded, make sure to follow the plugin docs for troubleshooting: #{PluginManager::TROUBLESHOOTING_URL}")
elsif Fastlane::Actions.formerly_bundled_actions.include?(method_sym.to_s)
# This was a formerly bundled action which is now a plugin.
UI.verbose(caller.join("\n"))
UI.user_error!("The action '#{method_sym}' is no longer bundled with fastlane. You can install it using `fastlane add_plugin #{method_sym}`")
else
# So there is no plugin under that name, so just show the error message generated by the lane switch
UI.verbose(caller.join("\n"))
UI.user_error!("Could not find action, lane or variable '#{method_sym}'. Check out the documentation for more details: https://docs.fastlane.tools/actions")
end
end | [
"def",
"trigger_action_by_name",
"(",
"method_sym",
",",
"custom_dir",
",",
"from_action",
",",
"*",
"arguments",
")",
"# First, check if there is a predefined method in the actions folder",
"class_ref",
"=",
"class_reference_from_action_name",
"(",
"method_sym",
")",
"unless",... | This is being called from `method_missing` from the Fastfile
It's also used when an action is called from another action
@param from_action Indicates if this action is being trigged by another action.
If so, it won't show up in summary. | [
"This",
"is",
"being",
"called",
"from",
"method_missing",
"from",
"the",
"Fastfile",
"It",
"s",
"also",
"used",
"when",
"an",
"action",
"is",
"called",
"from",
"another",
"action"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/runner.rb#L129-L176 | train | This method is called by the action_manager to trigger an action by name | [
30522,
30524,
2013,
1035,
2895,
1010,
1008,
9918,
1007,
1001,
2034,
1010,
4638,
2065,
2045,
2003,
1037,
3653,
3207,
23460,
2094,
4118,
1999,
1996,
4506,
19622,
2465,
1035,
25416,
1027,
2465,
1035,
4431,
1035,
2013,
1035,
2895,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_circuit_peerings.rb | Azure::Network::Mgmt::V2018_07_01.ExpressRouteCircuitPeerings.create_or_update | def create_or_update(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"peering_name",
",",
"peering_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"peering_... | Creates or updates a peering in the specified express route circuits.
@param resource_group_name [String] The name of the resource group.
@param circuit_name [String] The name of the express route circuit.
@param peering_name [String] The name of the peering.
@param peering_parameters [ExpressRouteCircuitPeering] Parameters supplied to
the create or update express route circuit peering operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ExpressRouteCircuitPeering] operation results. | [
"Creates",
"or",
"updates",
"a",
"peering",
"in",
"the",
"specified",
"express",
"route",
"circuits",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_circuit_peerings.rb#L173-L176 | train | Creates or updates a express route express route express route express route express route express route express route express route express route express route express route express route route | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4984,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
16740,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
twitter/secure_headers | lib/secure_headers/headers/content_security_policy.rb | SecureHeaders.ContentSecurityPolicy.populate_nonces | def populate_nonces(directive, source_list)
case directive
when SCRIPT_SRC
append_nonce(source_list, @script_nonce)
when STYLE_SRC
append_nonce(source_list, @style_nonce)
else
source_list
end
end | ruby | def populate_nonces(directive, source_list)
case directive
when SCRIPT_SRC
append_nonce(source_list, @script_nonce)
when STYLE_SRC
append_nonce(source_list, @style_nonce)
else
source_list
end
end | [
"def",
"populate_nonces",
"(",
"directive",
",",
"source_list",
")",
"case",
"directive",
"when",
"SCRIPT_SRC",
"append_nonce",
"(",
"source_list",
",",
"@script_nonce",
")",
"when",
"STYLE_SRC",
"append_nonce",
"(",
"source_list",
",",
"@style_nonce",
")",
"else",
... | Private: append a nonce to the script/style directories if script_nonce
or style_nonce are provided. | [
"Private",
":",
"append",
"a",
"nonce",
"to",
"the",
"script",
"/",
"style",
"directories",
"if",
"script_nonce",
"or",
"style_nonce",
"are",
"provided",
"."
] | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/headers/content_security_policy.rb#L164-L173 | train | Populate nonces for a directive | [
30522,
13366,
3769,
9869,
1035,
2512,
9623,
1006,
16449,
1010,
3120,
1035,
2862,
1007,
2553,
16449,
2043,
5896,
1035,
5034,
2278,
10439,
10497,
1035,
2512,
3401,
1006,
3120,
1035,
2862,
1010,
1030,
5896,
1035,
2512,
3401,
1007,
2043,
2806,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
refinery/refinerycms | core/app/helpers/refinery/tag_helper.rb | Refinery.TagHelper.action_icon_label | def action_icon_label(action, url, title, options={}, label = true)
options[:title] = title
options[:class].presence ? options[:class] << " #{action}_icon " : options[:class] = "#{action}_icon"
options[:class] << ' icon_label' if label
case action
when :preview
options[:target] = '_blank'
when :delete
options[:method] = :delete
when :reorder_done
options[:class] << ' hidden'
end
link_to(label && title || '', url, options)
end | ruby | def action_icon_label(action, url, title, options={}, label = true)
options[:title] = title
options[:class].presence ? options[:class] << " #{action}_icon " : options[:class] = "#{action}_icon"
options[:class] << ' icon_label' if label
case action
when :preview
options[:target] = '_blank'
when :delete
options[:method] = :delete
when :reorder_done
options[:class] << ' hidden'
end
link_to(label && title || '', url, options)
end | [
"def",
"action_icon_label",
"(",
"action",
",",
"url",
",",
"title",
",",
"options",
"=",
"{",
"}",
",",
"label",
"=",
"true",
")",
"options",
"[",
":title",
"]",
"=",
"title",
"options",
"[",
":class",
"]",
".",
"presence",
"?",
"options",
"[",
":cl... | See icons.scss for defined icons/classes | [
"See",
"icons",
".",
"scss",
"for",
"defined",
"icons",
"/",
"classes"
] | 67f117f937c5264ec0aeabe8e7eac1d562c5bc7b | https://github.com/refinery/refinerycms/blob/67f117f937c5264ec0aeabe8e7eac1d562c5bc7b/core/app/helpers/refinery/tag_helper.rb#L31-L46 | train | Returns the icon label for the action | [
30522,
13366,
2895,
1035,
12696,
1035,
3830,
1006,
2895,
1010,
24471,
2140,
1010,
2516,
1010,
7047,
1027,
1063,
1065,
1010,
3830,
1027,
2995,
1007,
7047,
1031,
1024,
2516,
1033,
1027,
2516,
7047,
1031,
1024,
2465,
1033,
1012,
3739,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.delete | def delete(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:nil)
response = delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:custom_headers).value!
nil
end | ruby | def delete(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:nil)
response = delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"removal_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
... | Remove protection container mapping.
The operation to delete or remove a protection container mapping.
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param mapping_name [String] Protection container mapping name.
@param removal_input [RemoveProtectionContainerMappingInput] Removal input.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Remove",
"protection",
"container",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb#L382-L385 | train | Deletes a protection container mapping. | [
30522,
13366,
3972,
12870,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
12375,
1035,
2171,
1010,
8208,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_lifecycle.rb | Aws::S3.BucketLifecycle.put | def put(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.put_bucket_lifecycle(options)
resp.data
end | ruby | def put(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.put_bucket_lifecycle(options)
resp.data
end | [
"def",
"put",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
")",
"resp",
"=",
"@client",
".",
"put_bucket_lifecycle",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
bucket_lifecycle.put({
content_md5: "ContentMD5",
lifecycle_configuration: {
rules: [ # required
{
expiration: {
date: Time.now,
days: 1,
expired_object_delete_marker: false,
},
id: "ID",
prefix: "Prefix", # required
status: "Enabled", # required, accepts Enabled, Disabled
transition: {
date: Time.now,
days: 1,
storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
},
noncurrent_version_transition: {
noncurrent_days: 1,
storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
},
noncurrent_version_expiration: {
noncurrent_days: 1,
},
abort_incomplete_multipart_upload: {
days_after_initiation: 1,
},
},
],
},
})
@param [Hash] options ({})
@option options [String] :content_md5
@option options [Types::LifecycleConfiguration] :lifecycle_configuration
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_lifecycle.rb#L220-L224 | train | Put the data in the bucket | [
30522,
13366,
2404,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2404,
1035,
13610,
1035,
2166,
23490,
1006,
7047,
1007,
24501,
236... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/message.rb | Mail.Message.[]= | def []=(name, value)
if name.to_s == 'body'
self.body = value
elsif name.to_s =~ /content[-_]type/i
header[name] = value
elsif name.to_s == 'charset'
self.charset = value
else
header[name] = value
end
end | ruby | def []=(name, value)
if name.to_s == 'body'
self.body = value
elsif name.to_s =~ /content[-_]type/i
header[name] = value
elsif name.to_s == 'charset'
self.charset = value
else
header[name] = value
end
end | [
"def",
"[]=",
"(",
"name",
",",
"value",
")",
"if",
"name",
".",
"to_s",
"==",
"'body'",
"self",
".",
"body",
"=",
"value",
"elsif",
"name",
".",
"to_s",
"=~",
"/",
"/i",
"header",
"[",
"name",
"]",
"=",
"value",
"elsif",
"name",
".",
"to_s",
"==... | Allows you to add an arbitrary header
Example:
mail['foo'] = '1234'
mail['foo'].to_s #=> '1234' | [
"Allows",
"you",
"to",
"add",
"an",
"arbitrary",
"header"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/message.rb#L1316-L1326 | train | Set the value of a header. | [
30522,
13366,
1031,
1033,
1027,
1006,
2171,
1010,
3643,
1007,
2065,
2171,
1012,
2000,
1035,
1055,
1027,
1027,
1005,
2303,
1005,
2969,
1012,
2303,
1027,
3643,
3449,
5332,
2546,
2171,
1012,
2000,
1035,
1055,
1027,
1066,
1013,
4180,
1031,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/comments.rb | Axlsx.Comments.to_xml_string | def to_xml_string(str="")
str << '<?xml version="1.0" encoding="UTF-8"?>'
str << ('<comments xmlns="' << XML_NS << '"><authors>')
authors.each do |author|
str << ('<author>' << author.to_s << '</author>')
end
str << '</authors><commentList>'
each do |comment|
comment.to_xml_string str
end
str << '</commentList></comments>'
end | ruby | def to_xml_string(str="")
str << '<?xml version="1.0" encoding="UTF-8"?>'
str << ('<comments xmlns="' << XML_NS << '"><authors>')
authors.each do |author|
str << ('<author>' << author.to_s << '</author>')
end
str << '</authors><commentList>'
each do |comment|
comment.to_xml_string str
end
str << '</commentList></comments>'
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"\"\"",
")",
"str",
"<<",
"'<?xml version=\"1.0\" encoding=\"UTF-8\"?>'",
"str",
"<<",
"(",
"'<comments xmlns=\"'",
"<<",
"XML_NS",
"<<",
"'\"><authors>'",
")",
"authors",
".",
"each",
"do",
"|",
"author",
"|",
"str",
"<<... | serialize the object
@param [String] str
@return [String] | [
"serialize",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/comments.rb#L66-L78 | train | Convert the object to XML string. | [
30522,
13366,
30524,
2358,
2099,
1026,
1026,
1006,
1005,
1026,
7928,
20950,
3619,
1027,
1000,
1005,
1026,
1026,
20950,
1035,
24978,
1026,
1026,
1005,
1000,
1028,
1026,
6048,
1028,
1005,
1007,
6048,
1012,
2169,
2079,
1064,
3166,
1064,
2358,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb | Azure::SQL::Mgmt::V2017_03_01_preview.JobTargetExecutions.list_by_step_next | def list_by_step_next(next_page_link, custom_headers:nil)
response = list_by_step_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_step_next(next_page_link, custom_headers:nil)
response = list_by_step_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_step_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_step_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
... | Lists the target executions of a job step execution.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [JobExecutionListResult] operation results. | [
"Lists",
"the",
"target",
"executions",
"of",
"a",
"job",
"step",
"execution",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb#L539-L542 | train | Gets the list of the elastic advisors. | [
30522,
13366,
2862,
1035,
2011,
1035,
3357,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
3357,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
refinery/refinerycms | pages/app/controllers/refinery/pages_controller.rb | Refinery.PagesController.home | def home
if page.link_url.present? && page.link_url != "/"
redirect_to page.link_url, status: 301 and return
end
render_with_templates?
end | ruby | def home
if page.link_url.present? && page.link_url != "/"
redirect_to page.link_url, status: 301 and return
end
render_with_templates?
end | [
"def",
"home",
"if",
"page",
".",
"link_url",
".",
"present?",
"&&",
"page",
".",
"link_url",
"!=",
"\"/\"",
"redirect_to",
"page",
".",
"link_url",
",",
"status",
":",
"301",
"and",
"return",
"end",
"render_with_templates?",
"end"
] | This action is usually accessed with the root path, normally '/' | [
"This",
"action",
"is",
"usually",
"accessed",
"with",
"the",
"root",
"path",
"normally",
"/"
] | 67f117f937c5264ec0aeabe8e7eac1d562c5bc7b | https://github.com/refinery/refinerycms/blob/67f117f937c5264ec0aeabe8e7eac1d562c5bc7b/pages/app/controllers/refinery/pages_controller.rb#L12-L17 | train | home
| [
30522,
13366,
2188,
2065,
3931,
1012,
4957,
1035,
24471,
2140,
1012,
2556,
1029,
1004,
1004,
3931,
1012,
4957,
1035,
24471,
2140,
999,
1027,
1000,
1013,
1000,
2417,
7442,
6593,
1035,
2000,
3931,
1012,
4957,
1035,
24471,
2140,
1010,
3570,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mojombo/chronic | lib/chronic/handlers.rb | Chronic.Handlers.handle_rmn_sy | def handle_rmn_sy(tokens, options)
month = tokens[0].get_tag(RepeaterMonthName).index
year = tokens[1].get_tag(ScalarYear).type
if month == 12
next_month_year = year + 1
next_month_month = 1
else
next_month_year = year
next_month_month = month + 1
end
begin
end_time = Chronic.time_class.local(next_month_year, next_month_month)
Span.new(Chronic.time_class.local(year, month), end_time)
rescue ArgumentError
nil
end
end | ruby | def handle_rmn_sy(tokens, options)
month = tokens[0].get_tag(RepeaterMonthName).index
year = tokens[1].get_tag(ScalarYear).type
if month == 12
next_month_year = year + 1
next_month_month = 1
else
next_month_year = year
next_month_month = month + 1
end
begin
end_time = Chronic.time_class.local(next_month_year, next_month_month)
Span.new(Chronic.time_class.local(year, month), end_time)
rescue ArgumentError
nil
end
end | [
"def",
"handle_rmn_sy",
"(",
"tokens",
",",
"options",
")",
"month",
"=",
"tokens",
"[",
"0",
"]",
".",
"get_tag",
"(",
"RepeaterMonthName",
")",
".",
"index",
"year",
"=",
"tokens",
"[",
"1",
"]",
".",
"get_tag",
"(",
"ScalarYear",
")",
".",
"type",
... | Handle repeater-month-name/scalar-year | [
"Handle",
"repeater",
"-",
"month",
"-",
"name",
"/",
"scalar",
"-",
"year"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L127-L145 | train | Handle the RPN - Sy tokens | [
30522,
13366,
5047,
1035,
28549,
2078,
1035,
25353,
1006,
19204,
2015,
1010,
7047,
1007,
3204,
1027,
19204,
2015,
1031,
1014,
1033,
1012,
2131,
1035,
6415,
1006,
9377,
2121,
9629,
7295,
14074,
1007,
1012,
5950,
2095,
1027,
19204,
2015,
1031... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.JobCancellations.trigger | def trigger(vault_name, resource_group_name, job_name, custom_headers:nil)
response = trigger_async(vault_name, resource_group_name, job_name, custom_headers:custom_headers).value!
nil
end | ruby | def trigger(vault_name, resource_group_name, job_name, custom_headers:nil)
response = trigger_async(vault_name, resource_group_name, job_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"trigger",
"(",
"vault_name",
",",
"resource_group_name",
",",
"job_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"trigger_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"job_name",
",",
"custom_headers",
":custom_headers",
")",... | Cancels the job. This is an asynchronous operation. To know the status of the
cancellation, call the GetCancelOperationResult API.
@param vault_name [String] The name of the Recovery Services vault.
@param resource_group_name [String] The name of the resource group associated
with the Recovery Services vault.
@param job_name [String] Name of the job to cancel.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Cancels",
"the",
"job",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"know",
"the",
"status",
"of",
"the",
"cancellation",
"call",
"the",
"GetCancelOperationResult",
"API",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb#L40-L43 | train | Trigger a specified job. | [
30522,
13366,
9495,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9495,
1035,
2004,
6038,
2278,
1006,
11632,
1035,
2171,
1010,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/lib/decidim/metric_operation.rb | Decidim.MetricOperation.register | def register(metric_operation, metric_name)
metric_operation = metric_operation.to_s
metric_name = metric_name.to_s
metric_exists = self.for(metric_operation, metric_name).present?
if metric_exists
raise(
MetricOperationAlreadyRegistered,
"There's a metric already registered with the name `:#{metric_name}`, must be unique"
)
end
metric_manifest = MetricOperationManifest.new(metric_operation: metric_operation, metric_name: metric_name)
yield(metric_manifest)
metric_manifest.validate!
metrics_manifests << metric_manifest
end | ruby | def register(metric_operation, metric_name)
metric_operation = metric_operation.to_s
metric_name = metric_name.to_s
metric_exists = self.for(metric_operation, metric_name).present?
if metric_exists
raise(
MetricOperationAlreadyRegistered,
"There's a metric already registered with the name `:#{metric_name}`, must be unique"
)
end
metric_manifest = MetricOperationManifest.new(metric_operation: metric_operation, metric_name: metric_name)
yield(metric_manifest)
metric_manifest.validate!
metrics_manifests << metric_manifest
end | [
"def",
"register",
"(",
"metric_operation",
",",
"metric_name",
")",
"metric_operation",
"=",
"metric_operation",
".",
"to_s",
"metric_name",
"=",
"metric_name",
".",
"to_s",
"metric_exists",
"=",
"self",
".",
"for",
"(",
"metric_operation",
",",
"metric_name",
")... | Public: Registers a operation for metrics
metric_operation - a symbol representing the name of the operation involved
metric_name - a symbol representing the name of the metric involved
Returns nothing. Raises an error if there's already a metric
registered with that metric name. | [
"Public",
":",
"Registers",
"a",
"operation",
"for",
"metrics"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/metric_operation.rb#L12-L31 | train | Register a metric operation with the given name. | [
30522,
13366,
4236,
1006,
12046,
1035,
3169,
1010,
12046,
1035,
2171,
1007,
12046,
1035,
3169,
1027,
12046,
1035,
3169,
1012,
2000,
1035,
1055,
12046,
1035,
2171,
1027,
12046,
1035,
2171,
1012,
2000,
1035,
1055,
12046,
1035,
6526,
1027,
296... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb | Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.stop_async | def stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
end
# Waiting for response.
@client.get_long_running_operation_result(response, deserialize_method)
end
promise
end | ruby | def stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
end
# Waiting for response.
@client.get_long_running_operation_result(response, deserialize_method)
end
promise
end | [
"def",
"stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_na... | @param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param streaming_endpoint_name [String] The name of the StreamingEndpoint.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http
response. | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"within",
"the",
"Azure",
"subscription",
".",
"@param",
"account_name",
"[",
"String",
"]",
"The",
"Media",
"Services",
"account",
"name",
".",
"@param",
"st... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb#L457-L471 | train | Stops a streaming endpoint. | [
30522,
13366,
2644,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aasm/aasm | lib/aasm/state_machine.rb | AASM.StateMachine.initialize_copy | def initialize_copy(orig)
super
@states = orig.states.collect { |state| state.clone }
@events = {}
orig.events.each_pair { |name, event| @events[name] = event.clone }
@global_callbacks = @global_callbacks.dup
end | ruby | def initialize_copy(orig)
super
@states = orig.states.collect { |state| state.clone }
@events = {}
orig.events.each_pair { |name, event| @events[name] = event.clone }
@global_callbacks = @global_callbacks.dup
end | [
"def",
"initialize_copy",
"(",
"orig",
")",
"super",
"@states",
"=",
"orig",
".",
"states",
".",
"collect",
"{",
"|",
"state",
"|",
"state",
".",
"clone",
"}",
"@events",
"=",
"{",
"}",
"orig",
".",
"events",
".",
"each_pair",
"{",
"|",
"name",
",",
... | called internally by Ruby 1.9 after clone() | [
"called",
"internally",
"by",
"Ruby",
"1",
".",
"9",
"after",
"clone",
"()"
] | 6a1000b489c6b2e205a7b142478a4b4e207c3dbd | https://github.com/aasm/aasm/blob/6a1000b489c6b2e205a7b142478a4b4e207c3dbd/lib/aasm/state_machine.rb#L17-L23 | train | Initialize a new StateMachine instance. | [
30522,
13366,
3988,
4697,
1035,
6100,
1006,
2030,
8004,
1007,
3565,
1030,
2163,
1027,
2030,
8004,
1012,
2163,
1012,
8145,
1063,
1064,
2110,
1064,
2110,
1012,
17598,
1065,
1030,
2824,
1027,
1063,
1065,
2030,
8004,
1012,
2824,
1012,
2169,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
daddyz/phonelib | lib/phonelib/data_importer_helper.rb | Phonelib.DataImporterHelper.parse_raw_file | def parse_raw_file(file)
data = {}
File.readlines(file).each do |line|
line = str_clean line, false
next if line.empty? || line[0] == '#'
prefix, line_data = line.split('|')
data[prefix] = line_data && line_data.strip.split('&')
end
data
end | ruby | def parse_raw_file(file)
data = {}
File.readlines(file).each do |line|
line = str_clean line, false
next if line.empty? || line[0] == '#'
prefix, line_data = line.split('|')
data[prefix] = line_data && line_data.strip.split('&')
end
data
end | [
"def",
"parse_raw_file",
"(",
"file",
")",
"data",
"=",
"{",
"}",
"File",
".",
"readlines",
"(",
"file",
")",
".",
"each",
"do",
"|",
"line",
"|",
"line",
"=",
"str_clean",
"line",
",",
"false",
"next",
"if",
"line",
".",
"empty?",
"||",
"line",
"[... | method parses raw data file | [
"method",
"parses",
"raw",
"data",
"file"
] | aa0023eab7c896b71275bf342bc7f49735cbdbbf | https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/data_importer_helper.rb#L98-L107 | train | Parse raw file | [
30522,
13366,
11968,
3366,
1035,
6315,
1035,
5371,
1006,
5371,
1007,
2951,
1027,
1063,
1065,
5371,
1012,
3191,
12735,
1006,
5371,
1007,
1012,
2169,
2079,
1064,
2240,
1064,
2240,
1027,
2358,
2099,
1035,
4550,
2240,
1010,
6270,
2279,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/sessions.rb | Azure::Logic::Mgmt::V2016_06_01.Sessions.create_or_update | def create_or_update(resource_group_name, integration_account_name, session_name, session, custom_headers:nil)
response = create_or_update_async(resource_group_name, integration_account_name, session_name, session, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, integration_account_name, session_name, session, custom_headers:nil)
response = create_or_update_async(resource_group_name, integration_account_name, session_name, session, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"session_name",
",",
"session",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"integration_account_name",
","... | Creates or updates an integration account session.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param session_name [String] The integration account session name.
@param session [IntegrationAccountSession] The integration account session.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [IntegrationAccountSession] operation results. | [
"Creates",
"or",
"updates",
"an",
"integration",
"account",
"session",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/sessions.rb#L233-L236 | train | Creates or updates an integration account session. | [
30522,
13366,
3443,
30524,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
5219,
1035,
2171,
1010,
5219,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
commander-rb/commander | lib/commander/user_interaction.rb | Commander.UI.say_error | def say_error(*args)
args.each do |arg|
say HighLine.default_instance.color(arg, :red)
end
end | ruby | def say_error(*args)
args.each do |arg|
say HighLine.default_instance.color(arg, :red)
end
end | [
"def",
"say_error",
"(",
"*",
"args",
")",
"args",
".",
"each",
"do",
"|",
"arg",
"|",
"say",
"HighLine",
".",
"default_instance",
".",
"color",
"(",
"arg",
",",
":red",
")",
"end",
"end"
] | 'Say' something using the ERROR color (red).
=== Examples
say_error 'Everything is not fine'
say_error 'It is not ok', 'This is not ok too' | [
"Say",
"something",
"using",
"the",
"ERROR",
"color",
"(",
"red",
")",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L95-L99 | train | Prints an error message for the given arguments. | [
30522,
13366,
2360,
1035,
7561,
1006,
1008,
12098,
5620,
1007,
12098,
5620,
1012,
2169,
2079,
1064,
12098,
2290,
1064,
2360,
2152,
4179,
1012,
12398,
1035,
6013,
1012,
3609,
1006,
12098,
2290,
1010,
1024,
2417,
1007,
2203,
2203,
102,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb | Azure::Network::Mgmt::V2018_07_01.LoadBalancerBackendAddressPools.get_with_http_info | def get_with_http_info(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers:nil)
get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers:nil)
get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"backend_address_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"backend_address_pool_name",
",",
"custom_h... | Gets load balancer backend address pool.
@param resource_group_name [String] The name of the resource group.
@param load_balancer_name [String] The name of the load balancer.
@param backend_address_pool_name [String] The name of the backend address
pool.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Gets",
"load",
"balancer",
"backend",
"address",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb#L145-L147 | train | Gets the specified load balancer backend address pool. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7170,
1035,
5703,
2099,
1035,
2171,
1010,
2067,
10497,
1035,
4769,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.list_at_resource_level_with_http_info | def list_at_resource_level_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
list_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_at_resource_level_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
list_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_at_resource_level_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_at_resource_leve... | Gets all the management locks of a resource or any level below resource.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param resource_provider_namespace [String] Resource identity.
@param parent_resource_path [String] Resource identity.
@param resource_type [String] Resource identity.
@param resource_name [String] Resource identity.
@param filter [String] The filter to apply on the operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Gets",
"all",
"the",
"management",
"locks",
"of",
"a",
"resource",
"or",
"any",
"level",
"below",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L962-L964 | train | Gets the list of the resources at resource level. | [
30522,
13366,
2862,
1035,
2012,
1035,
7692,
1035,
2504,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/virtual_network_peerings.rb | Azure::Network::Mgmt::V2018_12_01.VirtualNetworkPeerings.begin_delete | def begin_delete(resource_group_name, virtual_network_name, virtual_network_peering_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, virtual_network_name, virtual_network_peering_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, virtual_network_name, virtual_network_peering_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, virtual_network_name, virtual_network_peering_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"virtual_network_name",
",",
"virtual_network_peering_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"virtual_network_name",
",",
"virtual_network... | Deletes the specified virtual network peering.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_name [String] The name of the virtual network.
@param virtual_network_peering_name [String] The name of the virtual network
peering.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"virtual",
"network",
"peering",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/virtual_network_peerings.rb#L316-L319 | train | Deletes a virtual network peering. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
16740,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_worker_pool_instance_metrics | def list_worker_pool_instance_metrics(resource_group_name, name, worker_pool_name, instance, details:nil, filter:nil, custom_headers:nil)
first_page = list_worker_pool_instance_metrics_as_lazy(resource_group_name, name, worker_pool_name, instance, details:details, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_worker_pool_instance_metrics(resource_group_name, name, worker_pool_name, instance, details:nil, filter:nil, custom_headers:nil)
first_page = list_worker_pool_instance_metrics_as_lazy(resource_group_name, name, worker_pool_name, instance, details:details, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_worker_pool_instance_metrics",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"instance",
",",
"details",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_worker_pool_instanc... | Get metrics for a specific instance of a worker pool of an App Service
Environment.
Get metrics for a specific instance of a worker pool of an App Service
Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_pool_name [String] Name of the worker pool.
@param instance [String] Name of the instance in the worker pool.
@param details [Boolean] Specify <code>true</code> to include instance
details. The default is <code>false</code>.
@param filter [String] Return only usages/metrics specified in the filter.
Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array<ResourceMetric>] operation results. | [
"Get",
"metrics",
"for",
"a",
"specific",
"instance",
"of",
"a",
"worker",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3568-L3571 | train | Gets metrics for a worker pool instance. | [
30522,
13366,
2862,
1035,
7309,
1035,
4770,
1035,
6013,
1035,
12046,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
6013,
1010,
4751,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_processor.rb | GitHubChangelogGenerator.Generator.get_filtered_pull_requests | def get_filtered_pull_requests(pull_requests)
pull_requests = filter_array_by_labels(pull_requests)
pull_requests = filter_merged_pull_requests(pull_requests)
puts "Filtered pull requests: #{pull_requests.count}" if options[:verbose]
pull_requests
end | ruby | def get_filtered_pull_requests(pull_requests)
pull_requests = filter_array_by_labels(pull_requests)
pull_requests = filter_merged_pull_requests(pull_requests)
puts "Filtered pull requests: #{pull_requests.count}" if options[:verbose]
pull_requests
end | [
"def",
"get_filtered_pull_requests",
"(",
"pull_requests",
")",
"pull_requests",
"=",
"filter_array_by_labels",
"(",
"pull_requests",
")",
"pull_requests",
"=",
"filter_merged_pull_requests",
"(",
"pull_requests",
")",
"puts",
"\"Filtered pull requests: #{pull_requests.count}\"",... | This method fetches missing params for PR and filter them by specified options
It include add all PR's with labels from options[:include_labels] array
And exclude all from :exclude_labels array.
@return [Array] filtered PR's | [
"This",
"method",
"fetches",
"missing",
"params",
"for",
"PR",
"and",
"filter",
"them",
"by",
"specified",
"options",
"It",
"include",
"add",
"all",
"PR",
"s",
"with",
"labels",
"from",
"options",
"[",
":",
"include_labels",
"]",
"array",
"And",
"exclude",
... | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_processor.rb#L204-L209 | train | Get the pull requests that are filtered by labels | [
30522,
13366,
2131,
1035,
21839,
1035,
4139,
1035,
11186,
1006,
4139,
1035,
11186,
1007,
4139,
1035,
11186,
1027,
11307,
1035,
9140,
1035,
2011,
1035,
10873,
1006,
4139,
1035,
11186,
1007,
4139,
1035,
11186,
1027,
11307,
1035,
5314,
1035,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb | Azure::SQL::Mgmt::V2017_10_01_preview.ManagedInstanceTdeCertificates.begin_create_with_http_info | def begin_create_with_http_info(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
begin_create_async(resource_group_name, managed_instance_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_with_http_info(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
begin_create_async(resource_group_name, managed_instance_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_with_http_info",
"(",
"resource_group_name",
",",
"managed_instance_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_async",
"(",
"resource_group_name",
",",
"managed_instance_name",
",",
"parameters",
",",
"custom_headers... | Creates a TDE certificate for a given server.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param managed_instance_name [String] The name of the managed instance.
@param parameters [TdeCertificate] The requested TDE certificate to be
created or updated.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information. | [
"Creates",
"a",
"TDE",
"certificate",
"for",
"a",
"given",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb#L105-L107 | train | Creates a managed instance. | [
30522,
13366,
4088,
1035,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3266,
1035,
6013,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3443,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
coinbase/geoengineer | lib/geoengineer/resources/aws/api_gateway/helpers.rb | GeoEngineer::ApiGatewayHelpers.ClassMethods._fetch_integration | def _fetch_integration(provider, rr, res, meth)
return _client(provider).get_integration({
rest_api_id: rr[:_terraform_id],
resource_id: res[:_terraform_id],
http_method: meth
}).to_h
rescue Aws::APIGateway::Errors::NotFoundException
return nil
end | ruby | def _fetch_integration(provider, rr, res, meth)
return _client(provider).get_integration({
rest_api_id: rr[:_terraform_id],
resource_id: res[:_terraform_id],
http_method: meth
}).to_h
rescue Aws::APIGateway::Errors::NotFoundException
return nil
end | [
"def",
"_fetch_integration",
"(",
"provider",
",",
"rr",
",",
"res",
",",
"meth",
")",
"return",
"_client",
"(",
"provider",
")",
".",
"get_integration",
"(",
"{",
"rest_api_id",
":",
"rr",
"[",
":_terraform_id",
"]",
",",
"resource_id",
":",
"res",
"[",
... | Integration | [
"Integration"
] | d26f8850a492ddb3d27e78b25d1313cf593df5a9 | https://github.com/coinbase/geoengineer/blob/d26f8850a492ddb3d27e78b25d1313cf593df5a9/lib/geoengineer/resources/aws/api_gateway/helpers.rb#L89-L97 | train | Fetch an integration from the API | [
30522,
13366,
1035,
18584,
1035,
8346,
1006,
10802,
1010,
25269,
1010,
24501,
1010,
2777,
2232,
1007,
2709,
1035,
7396,
1006,
10802,
1007,
1012,
2131,
1035,
8346,
1006,
1063,
2717,
1035,
17928,
1035,
8909,
1024,
25269,
1031,
1024,
1035,
144... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sunspot/sunspot | sunspot/lib/sunspot/field.rb | Sunspot.Field.to_indexed | def to_indexed(value)
if value.is_a? Array
if multiple?
value.map { |val| to_indexed(val) }
else
raise ArgumentError, "#{name} is not a multiple-value field, so it cannot index values #{value.inspect}"
end
else
@type.to_indexed(value)
end
end | ruby | def to_indexed(value)
if value.is_a? Array
if multiple?
value.map { |val| to_indexed(val) }
else
raise ArgumentError, "#{name} is not a multiple-value field, so it cannot index values #{value.inspect}"
end
else
@type.to_indexed(value)
end
end | [
"def",
"to_indexed",
"(",
"value",
")",
"if",
"value",
".",
"is_a?",
"Array",
"if",
"multiple?",
"value",
".",
"map",
"{",
"|",
"val",
"|",
"to_indexed",
"(",
"val",
")",
"}",
"else",
"raise",
"ArgumentError",
",",
"\"#{name} is not a multiple-value field, so ... | Name with which this field is indexed internally. Based on public name and type or the +:as+ option.
Convert a value to its representation for Solr indexing. This delegates
to the #to_indexed method on the field's type.
==== Parameters
value<Object>:: Value to convert to Solr representation
==== Returns
String:: Solr representation of the object
==== Raises
ArgumentError::
the value is an array, but this field does not allow multiple values | [
"Name",
"with",
"which",
"this",
"field",
"is",
"indexed",
"internally",
".",
"Based",
"on",
"public",
"name",
"and",
"type",
"or",
"the",
"+",
":",
"as",
"+",
"option",
"."
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/field.rb#L36-L46 | train | Convert the field to indexed. | [
30522,
13366,
2000,
1035,
25331,
1006,
3643,
1007,
2065,
3643,
1012,
2003,
1035,
1037,
1029,
9140,
2065,
3674,
1029,
3643,
1012,
4949,
1063,
1064,
11748,
1064,
2000,
1035,
25331,
1006,
11748,
1007,
1065,
2842,
5333,
6685,
2121,
29165,
1010,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/windows/service.rb | Puppet::Util::Windows.Service.resume | def resume(service_name, timeout: DEFAULT_TIMEOUT)
Puppet.debug _("Resuming the %{service_name} service. Timeout set to: %{timeout} seconds") % { service_name: service_name, timeout: timeout }
valid_initial_states = [
SERVICE_PAUSE_PENDING,
SERVICE_PAUSED,
SERVICE_CONTINUE_PENDING
]
transition_service_state(service_name, valid_initial_states, SERVICE_RUNNING, timeout) do |service|
# The SERVICE_CONTROL_CONTINUE signal can only be sent when
# the service is in the SERVICE_PAUSED state
wait_on_pending_state(service, SERVICE_PAUSE_PENDING, timeout)
send_service_control_signal(service, SERVICE_CONTROL_CONTINUE)
end
Puppet.debug _("Successfully resumed the %{service_name} service") % { service_name: service_name }
end | ruby | def resume(service_name, timeout: DEFAULT_TIMEOUT)
Puppet.debug _("Resuming the %{service_name} service. Timeout set to: %{timeout} seconds") % { service_name: service_name, timeout: timeout }
valid_initial_states = [
SERVICE_PAUSE_PENDING,
SERVICE_PAUSED,
SERVICE_CONTINUE_PENDING
]
transition_service_state(service_name, valid_initial_states, SERVICE_RUNNING, timeout) do |service|
# The SERVICE_CONTROL_CONTINUE signal can only be sent when
# the service is in the SERVICE_PAUSED state
wait_on_pending_state(service, SERVICE_PAUSE_PENDING, timeout)
send_service_control_signal(service, SERVICE_CONTROL_CONTINUE)
end
Puppet.debug _("Successfully resumed the %{service_name} service") % { service_name: service_name }
end | [
"def",
"resume",
"(",
"service_name",
",",
"timeout",
":",
"DEFAULT_TIMEOUT",
")",
"Puppet",
".",
"debug",
"_",
"(",
"\"Resuming the %{service_name} service. Timeout set to: %{timeout} seconds\"",
")",
"%",
"{",
"service_name",
":",
"service_name",
",",
"timeout",
":",
... | Resume a paused windows service
@param [String] service_name name of the service to resume
@param optional [Integer] :timeout the minumum number of seconds to wait before timing out | [
"Resume",
"a",
"paused",
"windows",
"service"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/service.rb#L340-L358 | train | Resumes the service | [
30522,
13366,
13746,
1006,
2326,
1035,
2171,
1010,
2051,
5833,
1024,
12398,
1035,
2051,
5833,
1007,
13997,
1012,
2139,
8569,
2290,
1035,
1006,
1000,
24501,
24270,
1996,
1003,
1063,
2326,
1035,
2171,
1065,
2326,
1012,
2051,
5833,
2275,
2000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
opal/opal | lib/opal/compiler.rb | Opal.Compiler.process | def process(sexp, level = :expr)
return fragment('', scope) if sexp.nil?
if handler = handlers[sexp.type]
return handler.new(sexp, level, self).compile_to_fragments
else
error "Unsupported sexp: #{sexp.type}"
end
end | ruby | def process(sexp, level = :expr)
return fragment('', scope) if sexp.nil?
if handler = handlers[sexp.type]
return handler.new(sexp, level, self).compile_to_fragments
else
error "Unsupported sexp: #{sexp.type}"
end
end | [
"def",
"process",
"(",
"sexp",
",",
"level",
"=",
":expr",
")",
"return",
"fragment",
"(",
"''",
",",
"scope",
")",
"if",
"sexp",
".",
"nil?",
"if",
"handler",
"=",
"handlers",
"[",
"sexp",
".",
"type",
"]",
"return",
"handler",
".",
"new",
"(",
"s... | Process the given sexp by creating a node instance, based on its type,
and compiling it to fragments. | [
"Process",
"the",
"given",
"sexp",
"by",
"creating",
"a",
"node",
"instance",
"based",
"on",
"its",
"type",
"and",
"compiling",
"it",
"to",
"fragments",
"."
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/lib/opal/compiler.rb#L354-L362 | train | Process a single sexp | [
30522,
13366,
2832,
1006,
3348,
2361,
1010,
2504,
1027,
1024,
4654,
18098,
1007,
2709,
15778,
1006,
1005,
1005,
1010,
9531,
1007,
2065,
3348,
2361,
1012,
9152,
2140,
1029,
2065,
28213,
1027,
28213,
2015,
1031,
3348,
2361,
1012,
2828,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncGroups.list_hub_schemas | def list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
first_page = list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
first_page = list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_hub_schemas",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"sync_group_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_hub_schemas_as_lazy",
"(",
"resource_group_name",
",",
"server_name",
",",
"database... | Gets a collection of hub database schemas.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the database on which the sync
group is hosted.
@param sync_group_name [String] The name of the sync group.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array<SyncFullSchemaProperties>] operation results. | [
"Gets",
"a",
"collection",
"of",
"hub",
"database",
"schemas",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb#L181-L184 | train | Gets all the hub schemas in a database. | [
30522,
13366,
2862,
1035,
9594,
1035,
8040,
28433,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/services/hyrax/admin_set_service.rb | Hyrax.AdminSetService.count_files | def count_files(admin_sets)
file_counts = Hash.new(0)
admin_sets.each do |admin_set|
query = "{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}"
file_results = ActiveFedora::SolrService.instance.conn.get(
ActiveFedora::SolrService.select_path,
params: { fq: [query, "has_model_ssim:FileSet"],
rows: 0 }
)
file_counts[admin_set.id] = file_results['response']['numFound']
end
file_counts
end | ruby | def count_files(admin_sets)
file_counts = Hash.new(0)
admin_sets.each do |admin_set|
query = "{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}"
file_results = ActiveFedora::SolrService.instance.conn.get(
ActiveFedora::SolrService.select_path,
params: { fq: [query, "has_model_ssim:FileSet"],
rows: 0 }
)
file_counts[admin_set.id] = file_results['response']['numFound']
end
file_counts
end | [
"def",
"count_files",
"(",
"admin_sets",
")",
"file_counts",
"=",
"Hash",
".",
"new",
"(",
"0",
")",
"admin_sets",
".",
"each",
"do",
"|",
"admin_set",
"|",
"query",
"=",
"\"{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}\"",
"file_results",
"=",
"... | Count number of files from admin set works
@param [Array] AdminSets to count files in
@return [Hash] admin set id keys and file count values | [
"Count",
"number",
"of",
"files",
"from",
"admin",
"set",
"works"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/admin_set_service.rb#L56-L68 | train | Count the number of files in a given admin set | [
30522,
13366,
4175,
1035,
6764,
1006,
4748,
10020,
1035,
4520,
1007,
5371,
1035,
9294,
1027,
23325,
1012,
2047,
1006,
1014,
1007,
4748,
10020,
1035,
4520,
1012,
2169,
2079,
1064,
4748,
10020,
1035,
2275,
1064,
23032,
1027,
1000,
1063,
999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.enable_node | def enable_node(node_name, timeout:60, custom_headers:nil)
response = enable_node_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def enable_node(node_name, timeout:60, custom_headers:nil)
response = enable_node_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"enable_node",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"enable_node_async",
"(",
"node_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"ni... | Activate a Service Fabric cluster node which is currently deactivated.
Activates a Service Fabric cluster node which is currently deactivated. Once
activated, the node will again become a viable target for placing new
replicas, and any deactivated replicas remaining on the node will be
reactivated.
@param node_name [String] The name of the node.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration that the client is willing
to wait for the requested operation to complete. The default value for this
parameter is 60 seconds.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Activate",
"a",
"Service",
"Fabric",
"cluster",
"node",
"which",
"is",
"currently",
"deactivated",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L4303-L4306 | train | Enables a node. | [
30522,
13366,
9585,
1035,
13045,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9585,
1035,
13045,
1035,
2004,
6038,
2278,
1006,
13045,
1035,
2171,
1010,
2051,
5833,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sensu/sensu | lib/sensu/daemon.rb | Sensu.Daemon.print_settings! | def print_settings!(settings)
redacted_settings = redact_sensitive(settings.to_hash)
@logger.warn("outputting compiled configuration and exiting")
puts Sensu::JSON.dump(redacted_settings, :pretty => true)
exit(settings.errors.empty? ? 0 : 2)
end | ruby | def print_settings!(settings)
redacted_settings = redact_sensitive(settings.to_hash)
@logger.warn("outputting compiled configuration and exiting")
puts Sensu::JSON.dump(redacted_settings, :pretty => true)
exit(settings.errors.empty? ? 0 : 2)
end | [
"def",
"print_settings!",
"(",
"settings",
")",
"redacted_settings",
"=",
"redact_sensitive",
"(",
"settings",
".",
"to_hash",
")",
"@logger",
".",
"warn",
"(",
"\"outputting compiled configuration and exiting\"",
")",
"puts",
"Sensu",
"::",
"JSON",
".",
"dump",
"("... | Print the Sensu settings (JSON) to STDOUT and immediately exit
the process with the appropriate exit status code. This method
is used while troubleshooting configuration issues, triggered by
a CLI argument, e.g. `--print_config`. Sensu settings with
sensitive values (e.g. passwords) are first redacted.
@param settings [Object] | [
"Print",
"the",
"Sensu",
"settings",
"(",
"JSON",
")",
"to",
"STDOUT",
"and",
"immediately",
"exit",
"the",
"process",
"with",
"the",
"appropriate",
"exit",
"status",
"code",
".",
"This",
"method",
"is",
"used",
"while",
"troubleshooting",
"configuration",
"is... | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/daemon.rb#L144-L149 | train | Prints the settings | [
30522,
13366,
6140,
1035,
10906,
999,
1006,
10906,
1007,
2417,
18908,
2098,
1035,
10906,
1027,
2417,
18908,
1035,
7591,
1006,
10906,
1012,
2000,
1035,
23325,
1007,
1030,
8833,
4590,
1012,
11582,
1006,
1000,
6434,
3436,
9227,
9563,
1998,
223... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/file_task.rb | Rake.FileTask.out_of_date? | def out_of_date?(stamp)
all_prerequisite_tasks.any? { |prereq|
prereq_task = application[prereq, @scope]
if prereq_task.instance_of?(Rake::FileTask)
prereq_task.timestamp > stamp || @application.options.build_all
else
prereq_task.timestamp > stamp
end
}
end | ruby | def out_of_date?(stamp)
all_prerequisite_tasks.any? { |prereq|
prereq_task = application[prereq, @scope]
if prereq_task.instance_of?(Rake::FileTask)
prereq_task.timestamp > stamp || @application.options.build_all
else
prereq_task.timestamp > stamp
end
}
end | [
"def",
"out_of_date?",
"(",
"stamp",
")",
"all_prerequisite_tasks",
".",
"any?",
"{",
"|",
"prereq",
"|",
"prereq_task",
"=",
"application",
"[",
"prereq",
",",
"@scope",
"]",
"if",
"prereq_task",
".",
"instance_of?",
"(",
"Rake",
"::",
"FileTask",
")",
"pre... | Are there any prerequisites with a later time than the given time stamp? | [
"Are",
"there",
"any",
"prerequisites",
"with",
"a",
"later",
"time",
"than",
"the",
"given",
"time",
"stamp?"
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/file_task.rb#L32-L41 | train | Returns true if the task is out of date | [
30522,
13366,
2041,
1035,
1997,
1035,
3058,
1029,
1006,
11359,
1007,
2035,
1035,
3653,
2890,
24871,
1035,
8518,
1012,
2151,
1029,
1063,
1064,
3653,
2890,
4160,
1064,
3653,
2890,
4160,
1035,
4708,
1027,
4646,
1031,
3653,
2890,
4160,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_service/lib/2017-07-01/generated/azure_mgmt_container_service/container_services.rb | Azure::ContainerService::Mgmt::V2017_07_01.ContainerServices.delete | def delete(resource_group_name, container_service_name, custom_headers:nil)
response = delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, container_service_name, custom_headers:nil)
response = delete_async(resource_group_name, container_service_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"container_service_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"container_service_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Deletes the specified container service.
Deletes the specified container service in the specified subscription and
resource group. The operation does not delete other resources created as part
of creating a container service, including storage accounts, VMs, and
availability sets. All the other resources created with the container service
are part of the same resource group and can be deleted individually.
@param resource_group_name [String] The name of the resource group.
@param container_service_name [String] The name of the container service in
the specified subscription and resource group.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"container",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2017-07-01/generated/azure_mgmt_container_service/container_services.rb#L296-L299 | train | Deletes the specified container service. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11661,
1035,
2326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mojombo/chronic | lib/chronic/handlers.rb | Chronic.Handlers.handle_sd_sm | def handle_sd_sm(tokens, options)
new_tokens = [tokens[1], tokens[0]]
time_tokens = tokens.last(tokens.size - 2)
handle_sm_sd(new_tokens + time_tokens, options)
end | ruby | def handle_sd_sm(tokens, options)
new_tokens = [tokens[1], tokens[0]]
time_tokens = tokens.last(tokens.size - 2)
handle_sm_sd(new_tokens + time_tokens, options)
end | [
"def",
"handle_sd_sm",
"(",
"tokens",
",",
"options",
")",
"new_tokens",
"=",
"[",
"tokens",
"[",
"1",
"]",
",",
"tokens",
"[",
"0",
"]",
"]",
"time_tokens",
"=",
"tokens",
".",
"last",
"(",
"tokens",
".",
"size",
"-",
"2",
")",
"handle_sm_sd",
"(",
... | Handle scalar-day/scalar-month | [
"Handle",
"scalar",
"-",
"day",
"/",
"scalar",
"-",
"month"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L269-L273 | train | Handle the SM_S_SM token | [
30522,
13366,
5047,
1035,
17371,
1035,
15488,
1006,
19204,
2015,
1010,
7047,
1007,
2047,
1035,
19204,
2015,
1027,
1031,
19204,
2015,
1031,
1015,
1033,
1010,
19204,
2015,
1031,
1014,
1033,
1033,
2051,
1035,
19204,
2015,
1027,
19204,
2015,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.RunbookOperations.delete | def delete(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
response = delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
response = delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"custom_heade... | Delete the runbook by name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param runbook_name [String] The runbook name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Delete",
"the",
"runbook",
"by",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb#L478-L481 | train | Deletes a runbook. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
2448,
8654,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/order_fulfillment_recipient.rb | SquareConnect.OrderFulfillmentRecipient.display_name= | def display_name=(display_name)
if !display_name.nil? && display_name.to_s.length > 255
fail ArgumentError, "invalid value for 'display_name', the character length must be smaller than or equal to 255."
end
@display_name = display_name
end | ruby | def display_name=(display_name)
if !display_name.nil? && display_name.to_s.length > 255
fail ArgumentError, "invalid value for 'display_name', the character length must be smaller than or equal to 255."
end
@display_name = display_name
end | [
"def",
"display_name",
"=",
"(",
"display_name",
")",
"if",
"!",
"display_name",
".",
"nil?",
"&&",
"display_name",
".",
"to_s",
".",
"length",
">",
"255",
"fail",
"ArgumentError",
",",
"\"invalid value for 'display_name', the character length must be smaller than or equa... | Custom attribute writer method with validation
@param [Object] display_name Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/order_fulfillment_recipient.rb#L104-L111 | train | Set the display name of the page. | [
30522,
13366,
4653,
1035,
2171,
1027,
1006,
4653,
1035,
2171,
1007,
2065,
999,
4653,
1035,
2171,
1012,
9152,
2140,
1029,
1004,
1004,
4653,
1035,
2171,
1012,
2000,
1035,
1055,
1012,
3091,
1028,
20637,
8246,
6685,
2121,
29165,
1010,
1000,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.