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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.route_from | def route_from(uri)
uri = URI.parse(uri).normalize
normalized_self = self.normalize
if normalized_self.relative?
raise ArgumentError, "Expected absolute URI, got: #{self.to_s}"
end
if uri.relative?
raise ArgumentError, "Expected absolute URI, got: #{uri.to_s}"
end
... | ruby | def route_from(uri)
uri = URI.parse(uri).normalize
normalized_self = self.normalize
if normalized_self.relative?
raise ArgumentError, "Expected absolute URI, got: #{self.to_s}"
end
if uri.relative?
raise ArgumentError, "Expected absolute URI, got: #{uri.to_s}"
end
... | [
"def",
"route_from",
"(",
"uri",
")",
"uri",
"=",
"URI",
".",
"parse",
"(",
"uri",
")",
".",
"normalize",
"normalized_self",
"=",
"self",
".",
"normalize",
"if",
"normalized_self",
".",
"relative?",
"raise",
"ArgumentError",
",",
"\"Expected absolute URI, got: #... | Returns the shortest normalized relative form of this URI that uses the
supplied URI as a base for resolution. Returns an absolute URI if
necessary. This is effectively the opposite of <code>route_to</code>.
@param [String, Addressable::URI, #to_str] uri The URI to route from.
@return [Addressable::URI]
The no... | [
"Returns",
"the",
"shortest",
"normalized",
"relative",
"form",
"of",
"this",
"URI",
"that",
"uses",
"the",
"supplied",
"URI",
"as",
"a",
"base",
"for",
"resolution",
".",
"Returns",
"an",
"absolute",
"URI",
"if",
"necessary",
".",
"This",
"is",
"effectively... | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L2059-L2113 | train | Returns a URI that is a route from the given URI. | [
30522,
13366,
2799,
1035,
2013,
1006,
24471,
2072,
1007,
24471,
2072,
1027,
24471,
2072,
1012,
11968,
3366,
1006,
24471,
2072,
1007,
1012,
3671,
4697,
3671,
3550,
1035,
2969,
1027,
2969,
1012,
3671,
4697,
2065,
3671,
3550,
1035,
2969,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
minimagick/minimagick | lib/mini_magick/image.rb | MiniMagick.Image.identify | def identify
MiniMagick::Tool::Identify.new do |builder|
yield builder if block_given?
builder << path
end
end | ruby | def identify
MiniMagick::Tool::Identify.new do |builder|
yield builder if block_given?
builder << path
end
end | [
"def",
"identify",
"MiniMagick",
"::",
"Tool",
"::",
"Identify",
".",
"new",
"do",
"|",
"builder",
"|",
"yield",
"builder",
"if",
"block_given?",
"builder",
"<<",
"path",
"end",
"end"
] | Runs `identify` on itself. Accepts an optional block for adding more
options to `identify`.
@example
image = MiniMagick::Image.open("image.jpg")
image.identify do |b|
b.verbose
end # runs `identify -verbose image.jpg`
@return [String] Output from `identify`
@yield [MiniMagick::Tool::Identify] | [
"Runs",
"identify",
"on",
"itself",
".",
"Accepts",
"an",
"optional",
"block",
"for",
"adding",
"more",
"options",
"to",
"identify",
"."
] | d484786f35e91f107836d3c86aca61d50a35820b | https://github.com/minimagick/minimagick/blob/d484786f35e91f107836d3c86aca61d50a35820b/lib/mini_magick/image.rb#L547-L552 | train | Identify the file. | [
30522,
13366,
6709,
7163,
2863,
12863,
2243,
1024,
1024,
6994,
1024,
1024,
6709,
1012,
2047,
2079,
1064,
12508,
1064,
10750,
12508,
2065,
3796,
1035,
2445,
1029,
12508,
1026,
1026,
4130,
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,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_certificates_with_http_info | def get_deleted_certificates_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_certificates_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | ruby | def get_deleted_certificates_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_certificates_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | [
"def",
"get_deleted_certificates_with_http_info",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_deleted_certificates_async",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_h... | Lists the deleted certificates in the specified vault currently available for
recovery.
The GetDeletedCertificates operation retrieves the certificates in the
current vault which are in a deleted state and ready for recovery or purging.
This operation includes deletion-specific information. This operation
require... | [
"Lists",
"the",
"deleted",
"certificates",
"in",
"the",
"specified",
"vault",
"currently",
"available",
"for",
"recovery",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L6556-L6558 | train | Gets the deleted certificates. | [
30522,
13366,
2131,
1035,
17159,
1035,
17987,
1035,
2007,
1035,
30524,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
4098,
6072,
11314,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
36... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.restart | def restart(job_name, custom_headers:nil)
response = restart_async(job_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def restart(job_name, custom_headers:nil)
response = restart_async(job_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"restart",
"(",
"job_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"restart_async",
"(",
"job_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | Restarts the specified job.
The operation to restart an Azure Site Recovery job.
@param job_name [String] Job identifier.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Job] operation results. | [
"Restarts",
"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#L268-L271 | train | Restarts a managed cluster. | [
30522,
13366,
23818,
1006,
3105,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
23818,
1035,
2004,
6038,
2278,
1006,
3105,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
adimichele/hubspot-ruby | lib/hubspot/engagement.rb | Hubspot.Engagement.update! | def update!(params)
data = {
engagement: params[:engagement] || engagement,
associations: params[:associations] || associations,
attachments: params[:attachments] || attachments,
metadata: params[:metadata] || metadata
}
Hubspot::Connection.put_json(ENGAG... | ruby | def update!(params)
data = {
engagement: params[:engagement] || engagement,
associations: params[:associations] || associations,
attachments: params[:attachments] || attachments,
metadata: params[:metadata] || metadata
}
Hubspot::Connection.put_json(ENGAG... | [
"def",
"update!",
"(",
"params",
")",
"data",
"=",
"{",
"engagement",
":",
"params",
"[",
":engagement",
"]",
"||",
"engagement",
",",
"associations",
":",
"params",
"[",
":associations",
"]",
"||",
"associations",
",",
"attachments",
":",
"params",
"[",
"... | Updates the properties of an engagement
{http://developers.hubspot.com/docs/methods/engagements/update_engagement}
@param params [Hash] hash of properties to update
@return [Hubspot::Engagement] self | [
"Updates",
"the",
"properties",
"of",
"an",
"engagement",
"{",
"http",
":",
"//",
"developers",
".",
"hubspot",
".",
"com",
"/",
"docs",
"/",
"methods",
"/",
"engagements",
"/",
"update_engagement",
"}"
] | 8eb0a64dd0c14c79e631e81bfdc169583e775a46 | https://github.com/adimichele/hubspot-ruby/blob/8eb0a64dd0c14c79e631e81bfdc169583e775a46/lib/hubspot/engagement.rb#L108-L118 | train | Update an existing engagement | [
30522,
13366,
10651,
999,
1006,
11498,
5244,
1007,
2951,
1027,
1063,
8147,
1024,
11498,
5244,
1031,
1024,
8147,
1033,
1064,
1064,
8147,
1010,
8924,
1024,
11498,
5244,
1031,
1024,
8924,
1033,
1064,
1064,
8924,
1010,
14449,
2015,
1024,
11498,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
troessner/reek | samples/smelly_source/inline.rb | Inline.C.generate | def generate(src, options={})
options = {:expand_types=>options} unless Hash === options
expand_types = options[:expand_types]
singleton = options[:singleton]
result = self.strip_comments(src)
signature = parse_signature(src, !expand_types)
function_name = signature['name']
m... | ruby | def generate(src, options={})
options = {:expand_types=>options} unless Hash === options
expand_types = options[:expand_types]
singleton = options[:singleton]
result = self.strip_comments(src)
signature = parse_signature(src, !expand_types)
function_name = signature['name']
m... | [
"def",
"generate",
"(",
"src",
",",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"{",
":expand_types",
"=>",
"options",
"}",
"unless",
"Hash",
"===",
"options",
"expand_types",
"=",
"options",
"[",
":expand_types",
"]",
"singleton",
"=",
"options",
"[",
... | def parse_signature | [
"def",
"parse_signature"
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/samples/smelly_source/inline.rb#L203-L263 | train | Generate a new method from a string | [
30522,
13366,
9699,
1006,
5034,
2278,
1010,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
1063,
1024,
7818,
1035,
4127,
1027,
1028,
7047,
1065,
4983,
23325,
1027,
1027,
1027,
7047,
7818,
1035,
4127,
1027,
7047,
1031,
1024,
7818,
1035,
4127,
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 | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_certificate_contacts | def get_certificate_contacts(vault_base_url, custom_headers:nil)
response = get_certificate_contacts_async(vault_base_url, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_certificate_contacts(vault_base_url, custom_headers:nil)
response = get_certificate_contacts_async(vault_base_url, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_certificate_contacts",
"(",
"vault_base_url",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_certificate_contacts_async",
"(",
"vault_base_url",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
... | Lists the certificate contacts for a specified key vault.
The GetCertificateContacts operation returns the set of certificate contact
resources in the specified key vault. This operation requires the
certificates/managecontacts permission.
@param vault_base_url [String] The vault name, for example
https://myvaul... | [
"Lists",
"the",
"certificate",
"contacts",
"for",
"a",
"specified",
"key",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L4353-L4356 | train | Gets the certificate contacts for the specified vault. | [
30522,
13366,
2131,
1035,
8196,
1035,
10402,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
8196,
1035,
10402,
1035,
2004,
6038,
2278,
1006,
11632,
1035,
2918,
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_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.BackupSchedules.list_by_backup_policy_with_http_info | def list_by_backup_policy_with_http_info(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers:nil)
list_by_backup_policy_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def list_by_backup_policy_with_http_info(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers:nil)
list_by_backup_policy_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"list_by_backup_policy_with_http_info",
"(",
"device_name",
",",
"backup_policy_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"list_by_backup_policy_async",
"(",
"device_name",
",",
"backup_policy_name",
",",
"resourc... | Gets all the backup schedules in a backup policy.
@param device_name [String] The device name
@param backup_policy_name [String] The backup policy name.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash o... | [
"Gets",
"all",
"the",
"backup",
"schedules",
"in",
"a",
"backup",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb#L53-L55 | train | Gets the list of backup policies. | [
30522,
13366,
2862,
1035,
2011,
1035,
10200,
1035,
3343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
10200,
1035,
3343,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
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 | data/azure_cognitiveservices_entitysearch/lib/1.0/generated/azure_cognitiveservices_entitysearch/entities_operations.rb | Azure::CognitiveServices::EntitySearch::V1_0.EntitiesOperations.search | def search(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:'en-us', response_filter:nil, response_format:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
response = search_async(query, accept_language:accept_language, pragma:pragm... | ruby | def search(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:'en-us', response_filter:nil, response_format:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
response = search_async(query, accept_language:accept_language, pragma:pragm... | [
"def",
"search",
"(",
"query",
",",
"accept_language",
":",
"nil",
",",
"pragma",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"country_code",
":",
"nil",
",",
... | The Entity Search API lets you send a search query to Bing and get back
search results that include entities and places. Place results include
restaurants, hotel, or other local businesses. For places, the query can
specify the name of the local business or it can ask for a list (for example,
restaurants near me). ... | [
"The",
"Entity",
"Search",
"API",
"lets",
"you",
"send",
"a",
"search",
"query",
"to",
"Bing",
"and",
"get",
"back",
"search",
"results",
"that",
"include",
"entities",
"and",
"places",
".",
"Place",
"results",
"include",
"restaurants",
"hotel",
"or",
"other... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_entitysearch/lib/1.0/generated/azure_cognitiveservices_entitysearch/entities_operations.rb#L189-L192 | train | Search for a given search term. | [
30522,
13366,
3945,
1006,
23032,
1010,
5138,
1035,
2653,
1024,
9152,
2140,
1010,
10975,
8490,
2863,
1024,
9152,
2140,
1010,
5310,
1035,
4005,
1024,
9152,
2140,
1010,
7396,
1035,
8909,
1024,
9152,
2140,
1010,
7396,
1035,
12997,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_notification_hubs/lib/2017-04-01/generated/azure_mgmt_notification_hubs/namespaces.rb | Azure::NotificationHubs::Mgmt::V2017_04_01.Namespaces.check_availability | def check_availability(parameters, custom_headers:nil)
response = check_availability_async(parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def check_availability(parameters, custom_headers:nil)
response = check_availability_async(parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"check_availability",
"(",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"check_availability_async",
"(",
"parameters",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
... | Checks the availability of the given service namespace across all Azure
subscriptions. This is useful because the domain name is created based on the
service namespace name.
@param parameters [CheckAvailabilityParameters] The namespace name.
@param custom_headers [Hash{String => String}] A hash of custom headers t... | [
"Checks",
"the",
"availability",
"of",
"the",
"given",
"service",
"namespace",
"across",
"all",
"Azure",
"subscriptions",
".",
"This",
"is",
"useful",
"because",
"the",
"domain",
"name",
"is",
"created",
"based",
"on",
"the",
"service",
"namespace",
"name",
".... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_notification_hubs/lib/2017-04-01/generated/azure_mgmt_notification_hubs/namespaces.rb#L35-L38 | train | Check availability of a given container. | [
30522,
13366,
4638,
1035,
11343,
1006,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4638,
1035,
11343,
1035,
2004,
6038,
2278,
1006,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb | Azure::CognitiveServices::Face::V1_0.Face.detect_with_url_with_http_info | def detect_with_url_with_http_info(url, return_face_id:true, return_face_landmarks:false, return_face_attributes:nil, recognition_model:nil, return_recognition_model:false, custom_headers:nil)
detect_with_url_async(url, return_face_id:return_face_id, return_face_landmarks:return_face_landmarks, return_face_attrib... | ruby | def detect_with_url_with_http_info(url, return_face_id:true, return_face_landmarks:false, return_face_attributes:nil, recognition_model:nil, return_recognition_model:false, custom_headers:nil)
detect_with_url_async(url, return_face_id:return_face_id, return_face_landmarks:return_face_landmarks, return_face_attrib... | [
"def",
"detect_with_url_with_http_info",
"(",
"url",
",",
"return_face_id",
":",
"true",
",",
"return_face_landmarks",
":",
"false",
",",
"return_face_attributes",
":",
"nil",
",",
"recognition_model",
":",
"nil",
",",
"return_recognition_model",
":",
"false",
",",
... | Detect human faces in an image, return face rectangles, and optionally with
faceIds, landmarks, and attributes.<br />
* Optional parameters including faceId, landmarks, and attributes. Attributes
include age, gender, headPose, smile, facialHair, glasses, emotion, hair,
makeup, occlusion, accessories, blur, exposure... | [
"Detect",
"human",
"faces",
"in",
"an",
"image",
"return",
"face",
"rectangles",
"and",
"optionally",
"with",
"faceIds",
"landmarks",
"and",
"attributes",
".",
"<br",
"/",
">",
"*",
"Optional",
"parameters",
"including",
"faceId",
"landmarks",
"and",
"attributes... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb#L956-L958 | train | Detects a given face in a given CDN. | [
30522,
13366,
11487,
1035,
2007,
1035,
24471,
2140,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
24471,
2140,
1010,
2709,
1035,
2227,
1035,
8909,
1024,
2995,
1010,
2709,
1035,
2227,
1035,
16209,
1024,
6270,
1010,
2709,
1035,
2227,
1035,
12332... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | ActiveRecord.ConnectionHandling.postgresql_connection | def postgresql_connection(config)
conn_params = config.symbolize_keys
conn_params.delete_if { |_, v| v.nil? }
# Map ActiveRecords param names to PGs.
conn_params[:user] = conn_params.delete(:username) if conn_params[:username]
conn_params[:dbname] = conn_params.delete(:database) if conn_... | ruby | def postgresql_connection(config)
conn_params = config.symbolize_keys
conn_params.delete_if { |_, v| v.nil? }
# Map ActiveRecords param names to PGs.
conn_params[:user] = conn_params.delete(:username) if conn_params[:username]
conn_params[:dbname] = conn_params.delete(:database) if conn_... | [
"def",
"postgresql_connection",
"(",
"config",
")",
"conn_params",
"=",
"config",
".",
"symbolize_keys",
"conn_params",
".",
"delete_if",
"{",
"|",
"_",
",",
"v",
"|",
"v",
".",
"nil?",
"}",
"# Map ActiveRecords param names to PGs.",
"conn_params",
"[",
":user",
... | :nodoc:
Establishes a connection to the database that's used by all Active Record objects | [
":",
"nodoc",
":",
"Establishes",
"a",
"connection",
"to",
"the",
"database",
"that",
"s",
"used",
"by",
"all",
"Active",
"Record",
"objects"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L33-L54 | train | Create a connection to PostgreSQL | [
30522,
13366,
2695,
17603,
2015,
4160,
2140,
1035,
4434,
1006,
9530,
8873,
2290,
1007,
9530,
2078,
1035,
11498,
5244,
1027,
9530,
8873,
2290,
1012,
6454,
4697,
1035,
6309,
9530,
2078,
1035,
11498,
5244,
1012,
3972,
12870,
1035,
2065,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.resolve_service_with_http_info | def resolve_service_with_http_info(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil)
resolve_service_async(service_id, partition_key_type:partition_key_type, partition_key_value:partition_key_value, previous_rsp_version:previous_rsp_version, tim... | ruby | def resolve_service_with_http_info(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil)
resolve_service_async(service_id, partition_key_type:partition_key_type, partition_key_value:partition_key_value, previous_rsp_version:previous_rsp_version, tim... | [
"def",
"resolve_service_with_http_info",
"(",
"service_id",
",",
"partition_key_type",
":",
"nil",
",",
"partition_key_value",
":",
"nil",
",",
"previous_rsp_version",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"resolve_service_as... | Resolve a Service Fabric partition.
Resolve a Service Fabric service partition to get the endpoints of the
service replicas.
@param service_id [String] The identity of the service. This is typically the
full name of the service without the 'fabric:' URI scheme.
Starting from version 6.0, hierarchical names are d... | [
"Resolve",
"a",
"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#L11713-L11715 | train | Resolve a service to a specific specification. | [
30522,
13366,
10663,
1035,
2326,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
13571,
1035,
3145,
1035,
2828,
1024,
9152,
2140,
1010,
13571,
1035,
3145,
1035,
3643,
1024,
9152,
2140,
1010,
3025,
1035,
12667,
2361,
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_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.get_job_with_http_info | def get_job_with_http_info(resource_group_name, resource_name, job_id, custom_headers:nil)
get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
end | ruby | def get_job_with_http_info(resource_group_name, resource_name, job_id, custom_headers:nil)
get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
end | [
"def",
"get_job_with_http_info",
"(",
"resource_group_name",
",",
"resource_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"get_job_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"job_id",
",",
"custom_headers",
":custom_headers",
")",
"... | Get the details of a job from an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get the details of a job from an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
@param resource_group_... | [
"Get",
"the",
"details",
"of",
"a",
"job",
"from",
"an",
"IoT",
"hub",
".",
"For",
"more",
"information",
"see",
":",
"https",
":",
"//",
"docs",
".",
"microsoft",
".",
"com",
"/",
"azure",
"/",
"iot",
"-",
"hub",
"/",
"iot",
"-",
"hub",
"-",
"de... | 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#L1208-L1210 | train | Gets the information about the specified job. | [
30522,
13366,
2131,
1035,
3105,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
3105,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_consumption/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_summaries.rb | Azure::Consumption::Mgmt::V2018_01_31.ReservationsSummaries.list_by_reservation_order_and_reservation_as_lazy | def list_by_reservation_order_and_reservation_as_lazy(reservation_order_id, reservation_id, grain, filter:nil, custom_headers:nil)
response = list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, grain, filter:filter, custom_headers:custom_headers).value!
unless response.nil?... | ruby | def list_by_reservation_order_and_reservation_as_lazy(reservation_order_id, reservation_id, grain, filter:nil, custom_headers:nil)
response = list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, grain, filter:filter, custom_headers:custom_headers).value!
unless response.nil?... | [
"def",
"list_by_reservation_order_and_reservation_as_lazy",
"(",
"reservation_order_id",
",",
"reservation_id",
",",
"grain",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_reservation_order_and_reservation_async",
"(",
"reserva... | Lists the reservations summaries for daily or monthly grain.
@param reservation_order_id [String] Order Id of the reservation
@param reservation_id [String] Id of the reservation
@param grain [Datagrain] Can be daily or monthly. Possible values include:
'DailyGrain', 'MonthlyGrain'
@param filter [String] Required... | [
"Lists",
"the",
"reservations",
"summaries",
"for",
"daily",
"or",
"monthly",
"grain",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_summaries.rb#L453-L462 | train | Gets the list of all the image images in a reservation. | [
30522,
13366,
2862,
1035,
2011,
1035,
11079,
1035,
2344,
1035,
1998,
1035,
11079,
1035,
2004,
1035,
13971,
1006,
11079,
1035,
2344,
1035,
8909,
1010,
11079,
1035,
8909,
1010,
8982,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
201... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2016-11-01/generated/azure_mgmt_datalake_analytics/accounts.rb | Azure::DataLakeAnalytics::Mgmt::V2016_11_01.Accounts.list_by_resource_group_with_http_info | def list_by_resource_group_with_http_info(resource_group_name, filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil)
list_by_resource_group_async(resource_group_name, filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers).val... | ruby | def list_by_resource_group_with_http_info(resource_group_name, filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil)
list_by_resource_group_async(resource_group_name, filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers).val... | [
"def",
"list_by_resource_group_with_http_info",
"(",
"resource_group_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"count",
":",
"nil",
",",
"custom_headers",
... | Gets the first page of Data Lake Analytics accounts, if any, within a
specific resource group. This includes a link to the next page, if any.
@param resource_group_name [String] The name of the Azure resource group.
@param filter [String] OData filter. Optional.
@param top [Integer] The number of items to return. ... | [
"Gets",
"the",
"first",
"page",
"of",
"Data",
"Lake",
"Analytics",
"accounts",
"if",
"any",
"within",
"a",
"specific",
"resource",
"group",
".",
"This",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/accounts.rb#L208-L210 | train | Gets a list of all the segmentation products under a resource group. | [
30522,
13366,
2862,
1035,
2011,
1035,
7692,
1035,
2177,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
30524,
1035,
2011,
1035,
7692,
1035,
2177,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11307,
1024,
11307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/rights.rb | Puppet::Network.Rights.newright | def newright(name, line=nil, file=nil)
add_right( Right.new(name, line, file) )
end | ruby | def newright(name, line=nil, file=nil)
add_right( Right.new(name, line, file) )
end | [
"def",
"newright",
"(",
"name",
",",
"line",
"=",
"nil",
",",
"file",
"=",
"nil",
")",
"add_right",
"(",
"Right",
".",
"new",
"(",
"name",
",",
"line",
",",
"file",
")",
")",
"end"
] | Define a new right to which access can be provided. | [
"Define",
"a",
"new",
"right",
"to",
"which",
"access",
"can",
"be",
"provided",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/rights.rb#L82-L84 | train | Add a new right to the right | [
30522,
13366,
2047,
15950,
1006,
2171,
1010,
2240,
1027,
9152,
2140,
1010,
5371,
1027,
9152,
2140,
1007,
5587,
1035,
2157,
1006,
2157,
1012,
2047,
1006,
2171,
1010,
2240,
1010,
5371,
1007,
1007,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb | Azure::Policy::Mgmt::V2017_06_01_preview.PolicySetDefinitions.list_built_in_next | def list_built_in_next(next_page_link, custom_headers:nil)
response = list_built_in_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_built_in_next(next_page_link, custom_headers:nil)
response = list_built_in_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_built_in_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_built_in_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",... | Gets all the built in policy set definitions.
@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 [PolicySetDefinitionListResult] operation results. | [
"Gets",
"all",
"the",
"built",
"in",
"policy",
"set",
"definitions",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb#L1041-L1044 | train | Gets the list of all the available image types. | [
30522,
13366,
2862,
1035,
2328,
1035,
1999,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2328,
1035,
1999,
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... |
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_sub_name_info_list | def get_sub_name_info_list(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
response = get_sub_name_info_list_async(name_id, recursive:recursive, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def get_sub_name_info_list(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
response = get_sub_name_info_list_async(name_id, recursive:recursive, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"get_sub_name_info_list",
"(",
"name_id",
",",
"recursive",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_sub_name_info_list_async",
"(",
"name_id",
",",
"recu... | Enumerates all the Service Fabric names under a given name.
Enumerates all the Service Fabric names under a given name. If the subnames
do not fit in a page, one page of results is returned as well as a
continuation token which can be used to get the next page. Querying a name
that doesn't exist will fail.
@para... | [
"Enumerates",
"all",
"the",
"Service",
"Fabric",
"names",
"under",
"a",
"given",
"name",
"."
] | 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#L26442-L26445 | train | Gets the name info list for a given name. | [
30522,
13366,
2131,
1035,
4942,
1035,
2171,
1035,
18558,
1035,
2862,
1006,
2171,
1035,
8909,
1010,
28667,
9236,
3512,
1024,
6270,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
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... |
sumoheavy/jira-ruby | lib/jira/request_client.rb | JIRA.RequestClient.request | def request(*args)
response = make_request(*args)
# binding.pry unless response.kind_of?(Net::HTTPSuccess)
raise HTTPError, response unless response.is_a?(Net::HTTPSuccess)
response
end | ruby | def request(*args)
response = make_request(*args)
# binding.pry unless response.kind_of?(Net::HTTPSuccess)
raise HTTPError, response unless response.is_a?(Net::HTTPSuccess)
response
end | [
"def",
"request",
"(",
"*",
"args",
")",
"response",
"=",
"make_request",
"(",
"args",
")",
"# binding.pry unless response.kind_of?(Net::HTTPSuccess)",
"raise",
"HTTPError",
",",
"response",
"unless",
"response",
".",
"is_a?",
"(",
"Net",
"::",
"HTTPSuccess",
")",
... | Returns the response if the request was successful (HTTP::2xx) and
raises a JIRA::HTTPError if it was not successful, with the response
attached. | [
"Returns",
"the",
"response",
"if",
"the",
"request",
"was",
"successful",
"(",
"HTTP",
"::",
"2xx",
")",
"and",
"raises",
"a",
"JIRA",
"::",
"HTTPError",
"if",
"it",
"was",
"not",
"successful",
"with",
"the",
"response",
"attached",
"."
] | 25e896f227ab81c528e9678708cb546d2f62f018 | https://github.com/sumoheavy/jira-ruby/blob/25e896f227ab81c528e9678708cb546d2f62f018/lib/jira/request_client.rb#L12-L17 | train | Make a request to the server | [
30522,
13366,
5227,
1006,
1008,
12098,
5620,
1007,
3433,
1027,
2191,
1035,
5227,
1006,
1008,
12098,
5620,
1007,
1001,
8031,
1012,
29198,
4983,
3433,
1012,
2785,
1035,
1997,
1029,
1006,
5658,
1024,
1024,
16770,
14194,
9623,
2015,
1007,
5333,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
guard/guard | lib/guard/dsl.rb | Guard.Dsl.logger | def logger(options)
if options[:level]
options[:level] = options[:level].to_sym
unless [:debug, :info, :warn, :error].include? options[:level]
UI.warning(format(WARN_INVALID_LOG_LEVEL, options[:level]))
options.delete :level
end
end
if options[:only] && op... | ruby | def logger(options)
if options[:level]
options[:level] = options[:level].to_sym
unless [:debug, :info, :warn, :error].include? options[:level]
UI.warning(format(WARN_INVALID_LOG_LEVEL, options[:level]))
options.delete :level
end
end
if options[:only] && op... | [
"def",
"logger",
"(",
"options",
")",
"if",
"options",
"[",
":level",
"]",
"options",
"[",
":level",
"]",
"=",
"options",
"[",
":level",
"]",
".",
"to_sym",
"unless",
"[",
":debug",
",",
":info",
",",
":warn",
",",
":error",
"]",
".",
"include?",
"op... | Configures the Guard logger.
* Log level must be either `:debug`, `:info`, `:warn` or `:error`.
* Template supports the following placeholders: `:time`, `:severity`,
`:progname`, `:pid`, `:unit_of_work_id` and `:message`.
* Time format directives are the same as `Time#strftime` or
`:milliseconds`.
* The `:on... | [
"Configures",
"the",
"Guard",
"logger",
"."
] | e2508cd83badf0d537dbaba35d307adc35d92e4f | https://github.com/guard/guard/blob/e2508cd83badf0d537dbaba35d307adc35d92e4f/lib/guard/dsl.rb#L324-L353 | train | Returns a new Logger object. | [
30522,
13366,
8833,
4590,
1006,
7047,
1007,
2065,
7047,
1031,
1024,
2504,
1033,
7047,
1031,
1024,
2504,
1033,
1027,
7047,
1031,
1024,
2504,
1033,
1012,
2000,
1035,
25353,
2213,
4983,
1031,
1024,
2139,
8569,
2290,
1010,
1024,
18558,
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... |
refinery/refinerycms | core/app/helpers/refinery/translation_helper.rb | Refinery.TranslationHelper.t | def t(key, options = {})
if (val = super) =~ /class.+?translation_missing/
val = val.to_s.gsub(/<span[^>]*>/, 'i18n: ').gsub('</span>', '').gsub(', ', '.')
end
val
end | ruby | def t(key, options = {})
if (val = super) =~ /class.+?translation_missing/
val = val.to_s.gsub(/<span[^>]*>/, 'i18n: ').gsub('</span>', '').gsub(', ', '.')
end
val
end | [
"def",
"t",
"(",
"key",
",",
"options",
"=",
"{",
"}",
")",
"if",
"(",
"val",
"=",
"super",
")",
"=~",
"/",
"/",
"val",
"=",
"val",
".",
"to_s",
".",
"gsub",
"(",
"/",
"/",
",",
"'i18n: '",
")",
".",
"gsub",
"(",
"'</span>'",
",",
"''",
")"... | Overrides Rails' core I18n.t() function to produce a more helpful error message.
The default one wreaks havoc with CSS and makes it hard to understand the problem. | [
"Overrides",
"Rails",
"core",
"I18n",
".",
"t",
"()",
"function",
"to",
"produce",
"a",
"more",
"helpful",
"error",
"message",
".",
"The",
"default",
"one",
"wreaks",
"havoc",
"with",
"CSS",
"and",
"makes",
"it",
"hard",
"to",
"understand",
"the",
"problem... | 67f117f937c5264ec0aeabe8e7eac1d562c5bc7b | https://github.com/refinery/refinerycms/blob/67f117f937c5264ec0aeabe8e7eac1d562c5bc7b/core/app/helpers/refinery/translation_helper.rb#L6-L12 | train | Returns the translation for the given key. | [
30522,
13366,
1056,
1006,
3145,
1010,
7047,
1027,
1063,
1065,
1007,
2065,
1006,
11748,
1027,
3565,
1007,
1027,
1066,
1013,
2465,
1012,
1009,
1029,
5449,
1035,
4394,
1013,
11748,
1027,
11748,
1012,
2000,
1035,
1055,
1012,
28177,
12083,
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... |
jekyll/jekyll | lib/jekyll/cleaner.rb | Jekyll.Cleaner.keep_dirs | def keep_dirs
site.keep_files.map { |file| parent_dirs(site.in_dest_dir(file)) }.flatten.to_set
end | ruby | def keep_dirs
site.keep_files.map { |file| parent_dirs(site.in_dest_dir(file)) }.flatten.to_set
end | [
"def",
"keep_dirs",
"site",
".",
"keep_files",
".",
"map",
"{",
"|",
"file",
"|",
"parent_dirs",
"(",
"site",
".",
"in_dest_dir",
"(",
"file",
")",
")",
"}",
".",
"flatten",
".",
"to_set",
"end"
] | Private: The list of directories that need to be kept because they are
parent directories of files specified in keep_files
Returns a Set with the directory paths | [
"Private",
":",
"The",
"list",
"of",
"directories",
"that",
"need",
"to",
"be",
"kept",
"because",
"they",
"are",
"parent",
"directories",
"of",
"files",
"specified",
"in",
"keep_files"
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/cleaner.rb#L96-L98 | train | Returns a set of directories that are not in the destination directory. | [
30522,
13366,
2562,
1035,
16101,
2015,
2609,
1012,
2562,
1035,
6764,
1012,
4949,
1063,
1064,
5371,
1064,
6687,
1035,
16101,
2015,
1006,
2609,
1012,
1999,
1035,
4078,
2102,
1035,
16101,
1006,
5371,
1007,
1007,
1065,
1012,
4257,
6528,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
etewiah/property_web_builder | app/controllers/pwb/search_controller.rb | Pwb.SearchController.buy | def buy
@page = Pwb::Page.find_by_slug "buy"
@page_title = @current_agency.company_name
# @content_to_show = []
if @page.present?
@page_title = @page.page_title + ' - ' + @current_agency.company_name
# TODO: - allow addition of custom content
# @page.ordered_visible_page_... | ruby | def buy
@page = Pwb::Page.find_by_slug "buy"
@page_title = @current_agency.company_name
# @content_to_show = []
if @page.present?
@page_title = @page.page_title + ' - ' + @current_agency.company_name
# TODO: - allow addition of custom content
# @page.ordered_visible_page_... | [
"def",
"buy",
"@page",
"=",
"Pwb",
"::",
"Page",
".",
"find_by_slug",
"\"buy\"",
"@page_title",
"=",
"@current_agency",
".",
"company_name",
"# @content_to_show = []",
"if",
"@page",
".",
"present?",
"@page_title",
"=",
"@page",
".",
"page_title",
"+",
"' - '",
... | ordering of results happens client-side with paloma search.js | [
"ordering",
"of",
"results",
"happens",
"client",
"-",
"side",
"with",
"paloma",
"search",
".",
"js"
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/controllers/pwb/search_controller.rb#L33-L75 | train | This method is used to buy a page | [
30522,
13366,
4965,
1030,
3931,
1027,
1052,
2860,
2497,
1024,
1024,
3931,
1012,
2424,
1035,
2011,
1035,
23667,
1000,
4965,
1000,
1030,
3931,
1035,
2516,
1027,
1030,
2783,
1035,
4034,
1012,
2194,
1035,
2171,
1001,
1030,
4180,
1035,
2000,
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 | 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_provisioned_fabric_config_version_info_list_with_http_info | def get_provisioned_fabric_config_version_info_list_with_http_info(config_version:nil, timeout:60, custom_headers:nil)
get_provisioned_fabric_config_version_info_list_async(config_version:config_version, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_provisioned_fabric_config_version_info_list_with_http_info(config_version:nil, timeout:60, custom_headers:nil)
get_provisioned_fabric_config_version_info_list_async(config_version:config_version, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_provisioned_fabric_config_version_info_list_with_http_info",
"(",
"config_version",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_provisioned_fabric_config_version_info_list_async",
"(",
"config_version",
":config_version",
",",... | Gets a list of fabric config versions that are provisioned in a Service
Fabric cluster.
Gets a list of information about fabric config versions that are provisioned
in the cluster. The parameter ConfigVersion can be used to optionally filter
the output to only that particular version.
@param config_version [Stri... | [
"Gets",
"a",
"list",
"of",
"fabric",
"config",
"versions",
"that",
"are",
"provisioned",
"in",
"a",
"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#L1698-L1700 | train | Gets the list of provisioned fabric configurations. | [
30522,
13366,
2131,
1035,
9347,
2098,
1035,
8313,
1035,
9530,
8873,
2290,
1035,
2544,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
9530,
8873,
2290,
1035,
2544,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
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... |
deivid-rodriguez/byebug | lib/byebug/commands/list.rb | Byebug.ListCommand.auto_range | def auto_range(direction)
prev_line = processor.prev_line
if direction == "=" || prev_line.nil?
source_file_formatter.range_around(frame.line)
else
source_file_formatter.range_from(move(prev_line, size, direction))
end
end | ruby | def auto_range(direction)
prev_line = processor.prev_line
if direction == "=" || prev_line.nil?
source_file_formatter.range_around(frame.line)
else
source_file_formatter.range_from(move(prev_line, size, direction))
end
end | [
"def",
"auto_range",
"(",
"direction",
")",
"prev_line",
"=",
"processor",
".",
"prev_line",
"if",
"direction",
"==",
"\"=\"",
"||",
"prev_line",
".",
"nil?",
"source_file_formatter",
".",
"range_around",
"(",
"frame",
".",
"line",
")",
"else",
"source_file_form... | Set line range to be printed by list
@return first line number to list
@return last line number to list | [
"Set",
"line",
"range",
"to",
"be",
"printed",
"by",
"list"
] | bf41a63858a648baa7fb621600d6451786d1572a | https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/commands/list.rb#L79-L87 | train | Range the source file to the next line. | [
30522,
13366,
8285,
1035,
2846,
1006,
3257,
1007,
3653,
2615,
1035,
2240,
1027,
13151,
1012,
3653,
2615,
1035,
2240,
2065,
3257,
1027,
1027,
1000,
1027,
1000,
1064,
1064,
3653,
2615,
1035,
2240,
1012,
9152,
2140,
1029,
3120,
1035,
5371,
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... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.query= | def query=(new_query)
if new_query && !new_query.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_query.class} into String."
end
@query = new_query ? new_query.to_str : nil
# Reset dependent values
remove_instance_variable(:@normalized_query) if defined?(@normalized_quer... | ruby | def query=(new_query)
if new_query && !new_query.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_query.class} into String."
end
@query = new_query ? new_query.to_str : nil
# Reset dependent values
remove_instance_variable(:@normalized_query) if defined?(@normalized_quer... | [
"def",
"query",
"=",
"(",
"new_query",
")",
"if",
"new_query",
"&&",
"!",
"new_query",
".",
"respond_to?",
"(",
":to_str",
")",
"raise",
"TypeError",
",",
"\"Can't convert #{new_query.class} into String.\"",
"end",
"@query",
"=",
"new_query",
"?",
"new_query",
"."... | Sets the query component for this URI.
@param [String, #to_str] new_query The new query component. | [
"Sets",
"the",
"query",
"component",
"for",
"this",
"URI",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1613-L1622 | train | Set the query for this query. | [
30522,
13366,
23032,
1027,
1006,
2047,
1035,
23032,
1007,
2065,
2047,
1035,
23032,
1004,
1004,
999,
2047,
1035,
23032,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
2358,
2099,
1007,
5333,
2828,
2121,
29165,
1010,
1000,
2064,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb | Azure::ApiManagement::Mgmt::V2016_07_07.ProductApis.remove_with_http_info | def remove_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
end | ruby | def remove_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
end | [
"def",
"remove_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom_headers",
":",
"nil",
")",
"remove_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom... | Deletes the specified API from the specified product.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param api_id... | [
"Deletes",
"the",
"specified",
"API",
"from",
"the",
"specified",
"product",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb#L315-L317 | train | Remove a product from the list of products. | [
30522,
13366,
6366,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
17928,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
6366,
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... |
ruby/rake | lib/rake/scope.rb | Rake.Scope.trim | def trim(n)
result = self
while n > 0 && !result.empty?
result = result.tail
n -= 1
end
result
end | ruby | def trim(n)
result = self
while n > 0 && !result.empty?
result = result.tail
n -= 1
end
result
end | [
"def",
"trim",
"(",
"n",
")",
"result",
"=",
"self",
"while",
"n",
">",
"0",
"&&",
"!",
"result",
".",
"empty?",
"result",
"=",
"result",
".",
"tail",
"n",
"-=",
"1",
"end",
"result",
"end"
] | Trim +n+ innermost scope levels from the scope. In no case will
this trim beyond the toplevel scope. | [
"Trim",
"+",
"n",
"+",
"innermost",
"scope",
"levels",
"from",
"the",
"scope",
".",
"In",
"no",
"case",
"will",
"this",
"trim",
"beyond",
"the",
"toplevel",
"scope",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/scope.rb#L17-L24 | train | Trim the array of elements from the array. | [
30522,
13366,
12241,
1006,
1050,
1007,
2765,
1027,
2969,
2096,
1050,
1028,
1014,
1004,
1004,
999,
2765,
1012,
4064,
1029,
2765,
1027,
2765,
1012,
5725,
1050,
1011,
1027,
1015,
2203,
2765,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/api/v1_items_api.rb | SquareConnect.V1ItemsApi.list_discounts | def list_discounts(location_id, opts = {})
data, _status_code, _headers = list_discounts_with_http_info(location_id, opts)
return data
end | ruby | def list_discounts(location_id, opts = {})
data, _status_code, _headers = list_discounts_with_http_info(location_id, opts)
return data
end | [
"def",
"list_discounts",
"(",
"location_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"list_discounts_with_http_info",
"(",
"location_id",
",",
"opts",
")",
"return",
"data",
"end"
] | ListDiscounts
Lists all of a location's discounts.
@param location_id The ID of the location to list categories for.
@param [Hash] opts the optional parameters
@return [Array<V1Discount>] | [
"ListDiscounts",
"Lists",
"all",
"of",
"a",
"location",
"s",
"discounts",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1294-L1297 | train | Returns a list of all the discretized discounts for a location | [
30522,
13366,
2862,
1035,
19575,
2015,
1006,
3295,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
2862,
1035,
19575,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
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/2018-10-01/generated/azure_mgmt_network/packet_captures.rb | Azure::Network::Mgmt::V2018_10_01.PacketCaptures.begin_stop_with_http_info | def begin_stop_with_http_info(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil)
begin_stop_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value!
end | ruby | def begin_stop_with_http_info(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil)
begin_stop_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_stop_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_stop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
",",
"cu... | Stops a specified packet capture session.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param packet_capture_name [String] The name of the packet capture session.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Stops",
"a",
"specified",
"packet",
"capture",
"session",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb#L612-L614 | train | Stops the specified packet capture. | [
30522,
13366,
4088,
1035,
2644,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
14771,
1035,
5425,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
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.invoke_container_api_with_http_info | def invoke_container_api_with_http_info(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_i... | ruby | def invoke_container_api_with_http_info(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_i... | [
"def",
"invoke_container_api_with_http_info",
"(",
"node_name",
",",
"application_id",
",",
"service_manifest_name",
",",
"code_package_name",
",",
"code_package_instance_id",
",",
"container_api_request_body",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
... | Invoke container API on a container deployed on a Service Fabric node.
Invoke container API on a container deployed on a Service Fabric node for the
given code package.
@param node_name [String] The name of the node.
@param application_id [String] The identity of the application. This is
typically the full name ... | [
"Invoke",
"container",
"API",
"on",
"a",
"container",
"deployed",
"on",
"a",
"Service",
"Fabric",
"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#L17591-L17593 | train | Invoke the container API. | [
30522,
13366,
1999,
6767,
3489,
1035,
11661,
1035,
17928,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
2326,
1035,
19676,
1035,
2171,
1010,
3642,
1035,
7427,
1035,
2171,
1010,
3642,
1035,
7427,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.list_pattern_any_entity_roles_with_http_info | def list_pattern_any_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil)
list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
end | ruby | def list_pattern_any_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil)
list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
end | [
"def",
"list_pattern_any_entity_roles_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"list_pattern_any_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":custom_he... | Get all roles for a Pattern.any entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity Id
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::Azu... | [
"Get",
"all",
"roles",
"for",
"a",
"Pattern",
".",
"any",
"entity",
"in",
"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#L7281-L7283 | train | Gets the roles of the specified entity in a version of the application. | [
30522,
13366,
2862,
1035,
5418,
1035,
2151,
1035,
9178,
1035,
4395,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/connectors.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Connectors.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, hub_name, connector_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, hub_name, connector_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, hub_name, connector_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, hub_name, connector_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"hub_name",
",",
"connector_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"connector_name",... | Creates a connector or updates an existing connector in the hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param connector_name [String] The name of the connector.
@param parameters [ConnectorResourceFormat] Parameters supplied to the
Create... | [
"Creates",
"a",
"connector",
"or",
"updates",
"an",
"existing",
"connector",
"in",
"the",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/connectors.rb#L334-L336 | train | Creates or updates a connector in the hub. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
19400,
1035,
2171,
1010,
11709,
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 | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_custom_prebuilt_entity_with_http_info | def add_custom_prebuilt_entity_with_http_info(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:nil)
add_custom_prebuilt_entity_async(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:custom_headers).value!
end | ruby | def add_custom_prebuilt_entity_with_http_info(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:nil)
add_custom_prebuilt_entity_async(app_id, version_id, prebuilt_domain_model_create_object, custom_headers:custom_headers).value!
end | [
"def",
"add_custom_prebuilt_entity_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"prebuilt_domain_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"add_custom_prebuilt_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"prebuilt_domain_model_create_obj... | 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... | [
"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#L4578-L4580 | train | Adds a prebuilt entity to a version of the application. | [
30522,
13366,
5587,
1035,
7661,
1035,
3653,
8569,
4014,
2102,
1035,
9178,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
3653,
8569,
4014,
2102,
1035,
5884,
1035,
2944,
1035,
3443,
1035,
4874,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/tag.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Tag.get_with_http_info | def get_with_http_info(resource_group_name, service_name, tag_id, custom_headers:nil)
get_async(resource_group_name, service_name, tag_id, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, service_name, tag_id, custom_headers:nil)
get_async(resource_group_name, service_name, tag_id, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"tag_id",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"tag_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Gets the details of the tag specified by its identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param tag_id [String] Tag identifier. Must be unique in the current API
Management service instance.
@param custom_head... | [
"Gets",
"the",
"details",
"of",
"the",
"tag",
"specified",
"by",
"its",
"identifier",
"."
] | 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/tag.rb#L271-L273 | train | Gets the specified tag s segmentation. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
6415,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
zendesk/ruby-kafka | lib/kafka/producer.rb | Kafka.Producer.produce | def produce(value, key: nil, headers: {}, topic:, partition: nil, partition_key: nil, create_time: Time.now)
message = PendingMessage.new(
value: value && value.to_s,
key: key && key.to_s,
headers: headers,
topic: topic.to_s,
partition: partition && Integer(partition),
... | ruby | def produce(value, key: nil, headers: {}, topic:, partition: nil, partition_key: nil, create_time: Time.now)
message = PendingMessage.new(
value: value && value.to_s,
key: key && key.to_s,
headers: headers,
topic: topic.to_s,
partition: partition && Integer(partition),
... | [
"def",
"produce",
"(",
"value",
",",
"key",
":",
"nil",
",",
"headers",
":",
"{",
"}",
",",
"topic",
":",
",",
"partition",
":",
"nil",
",",
"partition_key",
":",
"nil",
",",
"create_time",
":",
"Time",
".",
"now",
")",
"message",
"=",
"PendingMessag... | Produces a message to the specified topic. Note that messages are buffered in
the producer until {#deliver_messages} is called.
## Partitioning
There are several options for specifying the partition that the message should
be written to.
The simplest option is to not specify a message key, partition key, or
pa... | [
"Produces",
"a",
"message",
"to",
"the",
"specified",
"topic",
".",
"Note",
"that",
"messages",
"are",
"buffered",
"in",
"the",
"producer",
"until",
"{",
"#deliver_messages",
"}",
"is",
"called",
"."
] | 2a73471b6a607a52dc85c79301ba522acb4566b5 | https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/producer.rb#L190-L231 | train | Creates a new PendingMessage object. | [
30522,
13366,
3965,
1006,
3643,
1010,
3145,
1024,
9152,
2140,
1010,
20346,
2015,
1024,
1063,
1065,
1010,
8476,
1024,
1010,
13571,
1024,
9152,
2140,
1010,
13571,
1035,
3145,
1024,
9152,
2140,
1010,
3443,
1035,
2051,
1024,
2051,
1012,
2085,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb | Azure::ResourcesManagement::Mgmt::V2018_03_01_preview.ManagementGroups.update_with_http_info | def update_with_http_info(group_id, patch_group_request, cache_control:'no-cache', custom_headers:nil)
update_async(group_id, patch_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(group_id, patch_group_request, cache_control:'no-cache', custom_headers:nil)
update_async(group_id, patch_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"group_id",
",",
"patch_group_request",
",",
"cache_control",
":",
"'no-cache'",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"group_id",
",",
"patch_group_request",
",",
"cache_control",
":cache_control",
",",
"cus... | Update a management group.
@param group_id [String] Management Group ID.
@param patch_group_request [PatchManagementGroupRequest] Management group
patch parameters.
@param cache_control [String] Indicates that the request shouldn't utilize
any caches.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Update",
"a",
"management",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L334-L336 | train | Updates a group s segmentation group. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2177,
1035,
8909,
1010,
8983,
1035,
2177,
1035,
5227,
1010,
17053,
1035,
2491,
1024,
1005,
2053,
1011,
17053,
1005,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb | Azure::Network::Mgmt::V2019_02_01.P2sVpnServerConfigurations.begin_delete | def begin_delete(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"virtual_wan_name",
",",
"p2svpn_server_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"virtual_wan_name",
",",
"p2svpn_server_confi... | Deletes a P2SVpnServerConfiguration.
@param resource_group_name [String] The resource group name of the
P2SVpnServerConfiguration.
@param virtual_wan_name [String] The name of the VirtualWan.
@param p2svpn_server_configuration_name [String] The name of the
P2SVpnServerConfiguration.
@param custom_headers [Hash{S... | [
"Deletes",
"a",
"P2SVpnServerConfiguration",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb#L459-L462 | train | Deletes a virtual wan server configuration. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
14071,
1035,
2171,
1010,
1052,
2475,
2015,
2615,
2361,
2078,
1035,
8241,
1035,
9563,
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... |
commander-rb/commander | lib/commander/runner.rb | Commander.Runner.args_without_command_name | def args_without_command_name
removed = []
parts = command_name_from_args.split rescue []
@args.dup.delete_if do |arg|
removed << arg if parts.include?(arg) && !removed.include?(arg)
end
end | ruby | def args_without_command_name
removed = []
parts = command_name_from_args.split rescue []
@args.dup.delete_if do |arg|
removed << arg if parts.include?(arg) && !removed.include?(arg)
end
end | [
"def",
"args_without_command_name",
"removed",
"=",
"[",
"]",
"parts",
"=",
"command_name_from_args",
".",
"split",
"rescue",
"[",
"]",
"@args",
".",
"dup",
".",
"delete_if",
"do",
"|",
"arg",
"|",
"removed",
"<<",
"arg",
"if",
"parts",
".",
"include?",
"(... | Return arguments without the command name. | [
"Return",
"arguments",
"without",
"the",
"command",
"name",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/runner.rb#L263-L269 | train | Remove command name from args | [
30522,
13366,
12098,
5620,
1035,
2302,
1035,
3094,
1035,
2171,
3718,
1027,
1031,
1033,
3033,
1027,
3094,
1035,
2171,
1035,
2013,
1035,
12098,
5620,
1012,
3975,
5343,
1031,
1033,
1030,
12098,
5620,
1012,
4241,
2361,
1012,
3972,
12870,
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 | data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V1_0.ComputerVisionClient.recognize_text_async | def recognize_text_async(url, detect_handwriting:false, custom_headers:nil)
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
fail ArgumentError, 'url is nil' if url.nil?
image_url = ImageUrl.new
unless url.nil?
image_url.url = url
end
request_headers = {}
... | ruby | def recognize_text_async(url, detect_handwriting:false, custom_headers:nil)
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
fail ArgumentError, 'url is nil' if url.nil?
image_url = ImageUrl.new
unless url.nil?
image_url.url = url
end
request_headers = {}
... | [
"def",
"recognize_text_async",
"(",
"url",
",",
"detect_handwriting",
":",
"false",
",",
"custom_headers",
":",
"nil",
")",
"fail",
"ArgumentError",
",",
"'azure_region is nil'",
"if",
"azure_region",
".",
"nil?",
"fail",
"ArgumentError",
",",
"'url is nil'",
"if",
... | Recognize Text operation. When you use the Recognize Text interface, the
response contains a field called 'Operation-Location'. The
'Operation-Location' field contains the URL that you must use for your Get
Handwritten Text Operation Result operation.
@param url [String] Publicly reachable URL of an image
@param ... | [
"Recognize",
"Text",
"operation",
".",
"When",
"you",
"use",
"the",
"Recognize",
"Text",
"interface",
"the",
"response",
"contains",
"a",
"field",
"called",
"Operation",
"-",
"Location",
".",
"The",
"Operation",
"-",
"Location",
"field",
"contains",
"the",
"UR... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1127-L1177 | train | Recognizes text from a given image URL. | [
30522,
13366,
6807,
1035,
3793,
1035,
2004,
6038,
2278,
1006,
24471,
2140,
1010,
11487,
1035,
24149,
1024,
6270,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
8246,
6685,
2121,
29165,
1010,
1005,
24296,
1035,
2555,
2003,
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_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Registries.regenerate_credential | def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"regenerate_credential",
"(",
"resource_group_name",
",",
"registry_name",
",",
"regenerate_credential_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"regenerate_credential_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"regener... | Regenerates one of the login credentials for the specified container
registry.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param regenerate_credential_parameters [RegenerateCredential... | [
"Regenerates",
"one",
"of",
"the",
"login",
"credentials",
"for",
"the",
"specified",
"container",
"registry",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb#L648-L651 | train | Regenerate credential for a container registry. | [
30522,
13366,
19723,
24454,
3686,
1035,
13675,
14728,
19909,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
19723,
24454,
3686,
1035,
13675,
14728,
19909,
1035,
11709,
1010,
7661,
1035,
20346,
30524,
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... |
jnunemaker/httparty | lib/httparty.rb | HTTParty.ClassMethods.mkcol | def mkcol(path, options = {}, &block)
perform_request Net::HTTP::Mkcol, path, options, &block
end | ruby | def mkcol(path, options = {}, &block)
perform_request Net::HTTP::Mkcol, path, options, &block
end | [
"def",
"mkcol",
"(",
"path",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"perform_request",
"Net",
"::",
"HTTP",
"::",
"Mkcol",
",",
"path",
",",
"options",
",",
"block",
"end"
] | Perform a MKCOL request to a path | [
"Perform",
"a",
"MKCOL",
"request",
"to",
"a",
"path"
] | b4099defba01231d2faaaa2660476f867e096bfb | https://github.com/jnunemaker/httparty/blob/b4099defba01231d2faaaa2660476f867e096bfb/lib/httparty.rb#L563-L565 | train | Perform a mkcol request to a path | [
30522,
13366,
12395,
25778,
1006,
4130,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
4685,
1035,
5227,
5658,
1024,
1024,
8299,
1024,
1024,
12395,
25778,
1010,
4130,
1010,
7047,
1010,
1004,
3796,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_luisruntime/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb | Azure::CognitiveServices::LuisRuntime::V3_0_preview.PredictionOperations.get_version_prediction_with_http_info | def get_version_prediction_with_http_info(app_id, version_id, prediction_request, verbose:nil, show_all_intents:nil, log:nil, custom_headers:nil)
get_version_prediction_async(app_id, version_id, prediction_request, verbose:verbose, show_all_intents:show_all_intents, log:log, custom_headers:custom_headers).value!
... | ruby | def get_version_prediction_with_http_info(app_id, version_id, prediction_request, verbose:nil, show_all_intents:nil, log:nil, custom_headers:nil)
get_version_prediction_async(app_id, version_id, prediction_request, verbose:verbose, show_all_intents:show_all_intents, log:log, custom_headers:custom_headers).value!
... | [
"def",
"get_version_prediction_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"prediction_request",
",",
"verbose",
":",
"nil",
",",
"show_all_intents",
":",
"nil",
",",
"log",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_version_prediction_asyn... | Gets the predictions for an application version.
@param app_id The application ID.
@param version_id [String] The application version ID.
@param prediction_request [PredictionRequest] The prediction request
parameters.
@param verbose [Boolean] Indicates whether to get extra metadata for the
entities predictions ... | [
"Gets",
"the",
"predictions",
"for",
"an",
"application",
"version",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisruntime/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb#L63-L65 | train | Gets the prediction for a version of the application. | [
30522,
13366,
2131,
1035,
2544,
1035,
17547,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
17547,
1035,
5227,
1010,
12034,
9232,
1024,
9152,
2140,
1010,
2265,
1035,
2035,
1035,
7848,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb | Axlsx.AutoFilter.to_xml_string | def to_xml_string(str='')
return unless range
str << "<autoFilter ref='#{range}'>"
columns.each { |filter_column| filter_column.to_xml_string(str) }
str << "</autoFilter>"
end | ruby | def to_xml_string(str='')
return unless range
str << "<autoFilter ref='#{range}'>"
columns.each { |filter_column| filter_column.to_xml_string(str) }
str << "</autoFilter>"
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"return",
"unless",
"range",
"str",
"<<",
"\"<autoFilter ref='#{range}'>\"",
"columns",
".",
"each",
"{",
"|",
"filter_column",
"|",
"filter_column",
".",
"to_xml_string",
"(",
"str",
")",
"}",
"str",
"<<",
... | serialize the object
@return [String] | [
"serialize",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb#L69-L74 | train | Convert the filter to XML string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2709,
4983,
2846,
2358,
2099,
1026,
1026,
1000,
1026,
8285,
8873,
21928,
25416,
1027,
1005,
1001,
1063,
2846,
1065,
1005,
1028,
1000,
7753,
1012,
2169,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Katello/katello | app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb | Katello.Api::Rhsm::CandlepinDynflowProxyController.upload_package_profile | def upload_package_profile
User.as_anonymous_admin do
async_task(::Actions::Katello::Host::UploadPackageProfile, @host, request.raw_post)
end
render :json => Resources::Candlepin::Consumer.get(@host.subscription_facet.uuid)
end | ruby | def upload_package_profile
User.as_anonymous_admin do
async_task(::Actions::Katello::Host::UploadPackageProfile, @host, request.raw_post)
end
render :json => Resources::Candlepin::Consumer.get(@host.subscription_facet.uuid)
end | [
"def",
"upload_package_profile",
"User",
".",
"as_anonymous_admin",
"do",
"async_task",
"(",
"::",
"Actions",
"::",
"Katello",
"::",
"Host",
"::",
"UploadPackageProfile",
",",
"@host",
",",
"request",
".",
"raw_post",
")",
"end",
"render",
":json",
"=>",
"Resour... | api :PUT, "/consumers/:id/packages", N_("Update installed packages")
api :PUT, "/consumers/:id/profile", N_("Update installed packages")
param :id, String, :desc => N_("UUID of the consumer"), :required => true | [
"api",
":",
"PUT",
"/",
"consumers",
"/",
":",
"id",
"/",
"packages",
"N_",
"(",
"Update",
"installed",
"packages",
")",
"api",
":",
"PUT",
"/",
"consumers",
"/",
":",
"id",
"/",
"profile",
"N_",
"(",
"Update",
"installed",
"packages",
")",
"param",
... | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb#L16-L21 | train | Upload a package profile to the specified subscription facet. | [
30522,
13366,
2039,
11066,
1035,
7427,
1035,
6337,
5310,
1012,
2004,
1035,
10812,
1035,
4748,
10020,
2079,
2004,
6038,
2278,
1035,
4708,
1006,
1024,
1024,
4506,
1024,
1024,
5736,
7174,
1024,
1024,
3677,
1024,
1024,
2039,
11066,
23947,
4270,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/services/decidim/resource_search.rb | Decidim.ResourceSearch.search_scope_id | def search_scope_id
clean_scope_ids = if scope_id.is_a?(Hash)
scope_id.values
else
[scope_id].flatten
end
conditions = []
conditions << "decidim_scope_id IS NULL" if clean_scope_ids.delete("global")
... | ruby | def search_scope_id
clean_scope_ids = if scope_id.is_a?(Hash)
scope_id.values
else
[scope_id].flatten
end
conditions = []
conditions << "decidim_scope_id IS NULL" if clean_scope_ids.delete("global")
... | [
"def",
"search_scope_id",
"clean_scope_ids",
"=",
"if",
"scope_id",
".",
"is_a?",
"(",
"Hash",
")",
"scope_id",
".",
"values",
"else",
"[",
"scope_id",
"]",
".",
"flatten",
"end",
"conditions",
"=",
"[",
"]",
"conditions",
"<<",
"\"decidim_scope_id IS NULL\"",
... | Handles the scope_id filter. When we want to show only those that do not
have a scope_id set, we cannot pass an empty String or nil because Searchlight
will automatically filter out these params, so the method will not be used.
Instead, we need to pass a fake ID and then convert it inside. In this case,
in order to... | [
"Handles",
"the",
"scope_id",
"filter",
".",
"When",
"we",
"want",
"to",
"show",
"only",
"those",
"that",
"do",
"not",
"have",
"a",
"scope_id",
"set",
"we",
"cannot",
"pass",
"an",
"empty",
"String",
"or",
"nil",
"because",
"Searchlight",
"will",
"automati... | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/resource_search.rb#L40-L52 | train | Returns an array of the query results for the given scope_id. | [
30522,
13366,
3945,
1035,
9531,
1035,
8909,
4550,
1035,
9531,
1035,
8909,
2015,
1027,
2065,
9531,
1035,
8909,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
9531,
1035,
8909,
1012,
5300,
2842,
1031,
9531,
1035,
8909,
1033,
1012,
4257,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/session.rb | Sunspot.Session.more_like_this | def more_like_this(object, *types, &block)
mlt = new_more_like_this(object, *types, &block)
mlt.execute
end | ruby | def more_like_this(object, *types, &block)
mlt = new_more_like_this(object, *types, &block)
mlt.execute
end | [
"def",
"more_like_this",
"(",
"object",
",",
"*",
"types",
",",
"&",
"block",
")",
"mlt",
"=",
"new_more_like_this",
"(",
"object",
",",
"types",
",",
"block",
")",
"mlt",
".",
"execute",
"end"
] | See Sunspot.more_like_this | [
"See",
"Sunspot",
".",
"more_like_this"
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/session.rb#L80-L83 | train | Create a new more like this object. | [
30522,
13366,
2062,
1035,
2066,
1035,
2023,
1006,
4874,
1010,
1008,
4127,
1010,
1004,
3796,
1007,
19875,
2102,
1027,
2047,
1035,
2062,
1035,
2066,
1035,
2023,
1006,
4874,
1010,
1008,
4127,
1010,
1004,
3796,
1007,
19875,
2102,
1012,
15389,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-10-01/generated/azure_mgmt_network/packet_captures.rb | Azure::Network::Mgmt::V2018_10_01.PacketCaptures.create | def create(resource_group_name, network_watcher_name, packet_capture_name, parameters, custom_headers:nil)
response = create_async(resource_group_name, network_watcher_name, packet_capture_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create(resource_group_name, network_watcher_name, packet_capture_name, parameters, custom_headers:nil)
response = create_async(resource_group_name, network_watcher_name, packet_capture_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_captur... | Create and start a packet capture on the specified VM.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param packet_capture_name [String] The name of the packet capture session.
@param parameters [PacketCapture] Parameters t... | [
"Create",
"and",
"start",
"a",
"packet",
"capture",
"on",
"the",
"specified",
"VM",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb#L37-L40 | train | Creates a packet capture. | [
30522,
13366,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
14771,
1035,
5425,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb | Azure::AnalysisServices::Mgmt::V2017_08_01_beta.Servers.suspend | def suspend(resource_group_name, server_name, custom_headers:nil)
response = suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
nil
end | ruby | def suspend(resource_group_name, server_name, custom_headers:nil)
response = suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"suspend",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"suspend_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Supends operation of the specified Analysis Services server instance.
@param resource_group_name [String] The name of the Azure Resource group of
which a given Analysis Services server is part. This name must be at least 1
character in length, and no more than 90.
@param server_name [String] The name of the Analys... | [
"Supends",
"operation",
"of",
"the",
"specified",
"Analysis",
"Services",
"server",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb#L293-L296 | train | Suspend a managed cluster. | [
30522,
13366,
28324,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
28324,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
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... |
meew0/discordrb | lib/discordrb/data/member.rb | Discordrb.Member.remove_role | def remove_role(role, reason = nil)
role_ids = role_id_array(role)
if role_ids.count == 1
API::Server.remove_member_role(@bot.token, @server.id, @user.id, role_ids[0], reason)
else
old_role_ids = @roles.map(&:id)
new_role_ids = old_role_ids.reject { |i| role_ids.include?(i) }
... | ruby | def remove_role(role, reason = nil)
role_ids = role_id_array(role)
if role_ids.count == 1
API::Server.remove_member_role(@bot.token, @server.id, @user.id, role_ids[0], reason)
else
old_role_ids = @roles.map(&:id)
new_role_ids = old_role_ids.reject { |i| role_ids.include?(i) }
... | [
"def",
"remove_role",
"(",
"role",
",",
"reason",
"=",
"nil",
")",
"role_ids",
"=",
"role_id_array",
"(",
"role",
")",
"if",
"role_ids",
".",
"count",
"==",
"1",
"API",
"::",
"Server",
".",
"remove_member_role",
"(",
"@bot",
".",
"token",
",",
"@server",... | Removes one or more roles from this member.
@param role [Role, Array<Role>] The role(s) to remove.
@param reason [String] The reason the user's roles are being changed. | [
"Removes",
"one",
"or",
"more",
"roles",
"from",
"this",
"member",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/member.rb#L134-L144 | train | Remove a role from the server | [
30522,
13366,
6366,
1035,
2535,
1006,
2535,
1010,
3114,
1027,
9152,
2140,
1007,
2535,
1035,
8909,
2015,
1027,
2535,
1035,
8909,
1035,
9140,
1006,
2535,
1007,
2065,
2535,
1035,
8909,
2015,
1012,
4175,
1027,
1027,
1015,
17928,
1024,
1024,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
alexreisner/geocoder | lib/geocoder/sql.rb | Geocoder.Sql.full_bearing | def full_bearing(latitude, longitude, lat_attr, lon_attr, options = {})
degrees_per_radian = Geocoder::Calculations::DEGREES_PER_RADIAN
case options[:bearing] || Geocoder.config.distances
when :linear
"MOD(CAST(" +
"(ATAN2( " +
"((#{lon_attr} - #{longitude.to_f}) / #{degr... | ruby | def full_bearing(latitude, longitude, lat_attr, lon_attr, options = {})
degrees_per_radian = Geocoder::Calculations::DEGREES_PER_RADIAN
case options[:bearing] || Geocoder.config.distances
when :linear
"MOD(CAST(" +
"(ATAN2( " +
"((#{lon_attr} - #{longitude.to_f}) / #{degr... | [
"def",
"full_bearing",
"(",
"latitude",
",",
"longitude",
",",
"lat_attr",
",",
"lon_attr",
",",
"options",
"=",
"{",
"}",
")",
"degrees_per_radian",
"=",
"Geocoder",
"::",
"Calculations",
"::",
"DEGREES_PER_RADIAN",
"case",
"options",
"[",
":bearing",
"]",
"|... | Fairly accurate bearing calculation. Takes a latitude, longitude,
and an options hash which must include a :bearing value
(:linear or :spherical).
For use with a database that supports MOD() and trigonometric functions
SIN(), COS(), ASIN(), ATAN2().
Based on:
http://www.beginningspatial.com/calculating_bearing_... | [
"Fairly",
"accurate",
"bearing",
"calculation",
".",
"Takes",
"a",
"latitude",
"longitude",
"and",
"an",
"options",
"hash",
"which",
"must",
"include",
"a",
":",
"bearing",
"value",
"(",
":",
"linear",
"or",
":",
"spherical",
")",
"."
] | e087dc2759264ee6f307b926bb2de4ec2406859e | https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/sql.rb#L68-L91 | train | Returns the full bearing of the given latitude and longitude. | [
30522,
13366,
2440,
1035,
7682,
1006,
15250,
1010,
20413,
1010,
2474,
2102,
1035,
2012,
16344,
1010,
8840,
2078,
1035,
2012,
16344,
1010,
7047,
1027,
1063,
1065,
1007,
5445,
1035,
2566,
1035,
10958,
11692,
1027,
20248,
16044,
2099,
1024,
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... |
haml/haml | lib/haml/options.rb | Haml.Options.for_buffer | def for_buffer
self.class.buffer_option_keys.inject({}) do |hash, key|
value = public_send(key)
if self.class.buffer_defaults[key] != value
hash[key] = value
end
hash
end
end | ruby | def for_buffer
self.class.buffer_option_keys.inject({}) do |hash, key|
value = public_send(key)
if self.class.buffer_defaults[key] != value
hash[key] = value
end
hash
end
end | [
"def",
"for_buffer",
"self",
".",
"class",
".",
"buffer_option_keys",
".",
"inject",
"(",
"{",
"}",
")",
"do",
"|",
"hash",
",",
"key",
"|",
"value",
"=",
"public_send",
"(",
"key",
")",
"if",
"self",
".",
"class",
".",
"buffer_defaults",
"[",
"key",
... | Returns a non-default subset of options: those that {Haml::Buffer} cares about.
All of the values here are such that when `#inspect` is called on the hash,
it can be `Kernel#eval`ed to get the same result back.
See {file:REFERENCE.md#options the Haml options documentation}.
@return [{Symbol => Object}] The option... | [
"Returns",
"a",
"non",
"-",
"default",
"subset",
"of",
"options",
":",
"those",
"that",
"{",
"Haml",
"::",
"Buffer",
"}",
"cares",
"about",
".",
"All",
"of",
"the",
"values",
"here",
"are",
"such",
"that",
"when",
"#inspect",
"is",
"called",
"on",
"the... | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/options.rb#L264-L272 | train | Returns a hash of the buffer options for this buffer. | [
30522,
13366,
2005,
1035,
17698,
2969,
1012,
2465,
1012,
17698,
1035,
5724,
1035,
6309,
1012,
1999,
20614,
1006,
1063,
1065,
1007,
2079,
1064,
23325,
1010,
3145,
1064,
3643,
1027,
2270,
1035,
4604,
1006,
3145,
1007,
2065,
2969,
1012,
2465,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/empty_line_between_blocks.rb | SCSSLint.Linter::EmptyLineBetweenBlocks.check_preceding_node | def check_preceding_node(node, type)
case prev_node(node)
when
nil,
Sass::Tree::FunctionNode,
Sass::Tree::MixinNode,
Sass::Tree::MixinDefNode,
Sass::Tree::RuleNode,
Sass::Tree::CommentNode
# Ignore
nil
else
unless engine.lines[nod... | ruby | def check_preceding_node(node, type)
case prev_node(node)
when
nil,
Sass::Tree::FunctionNode,
Sass::Tree::MixinNode,
Sass::Tree::MixinDefNode,
Sass::Tree::RuleNode,
Sass::Tree::CommentNode
# Ignore
nil
else
unless engine.lines[nod... | [
"def",
"check_preceding_node",
"(",
"node",
",",
"type",
")",
"case",
"prev_node",
"(",
"node",
")",
"when",
"nil",
",",
"Sass",
"::",
"Tree",
"::",
"FunctionNode",
",",
"Sass",
"::",
"Tree",
"::",
"MixinNode",
",",
"Sass",
"::",
"Tree",
"::",
"MixinDefN... | In cases where the previous node is not a block declaration, we won't
have run any checks against it, so we need to check here if the previous
line is an empty line | [
"In",
"cases",
"where",
"the",
"previous",
"node",
"is",
"not",
"a",
"block",
"declaration",
"we",
"won",
"t",
"have",
"run",
"any",
"checks",
"against",
"it",
"so",
"we",
"need",
"to",
"check",
"here",
"if",
"the",
"previous",
"line",
"is",
"an",
"emp... | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/empty_line_between_blocks.rb#L80-L96 | train | Check if the node is a preceding node | [
30522,
13366,
4638,
1035,
11003,
1035,
13045,
1006,
13045,
1010,
2828,
1007,
2553,
3653,
2615,
1035,
13045,
1006,
13045,
1007,
2043,
9152,
2140,
1010,
21871,
2015,
1024,
1024,
3392,
1024,
1024,
3853,
3630,
3207,
1010,
21871,
2015,
1024,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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-autoscaling/lib/aws-sdk-autoscaling/scheduled_action.rb | Aws::AutoScaling.ScheduledAction.delete | def delete(options = {})
options = options.merge(scheduled_action_name: @name)
resp = @client.delete_scheduled_action(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(scheduled_action_name: @name)
resp = @client.delete_scheduled_action(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"scheduled_action_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_scheduled_action",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
scheduled_action.delete({
auto_scaling_group_name: "ResourceName", # required
})
@param [Hash] options ({})
@option options [required, String] :auto_scaling_group_name
The name of the Auto Scaling group.
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/scheduled_action.rb#L232-L236 | train | Delete the scheduled action | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5115,
1035,
2895,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
5115,
1035,
2895,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/collection.rb | Mongo.Collection.with | def with(new_options)
new_options.keys.each do |k|
raise Error::UnchangeableCollectionOption.new(k) unless CHANGEABLE_OPTIONS.include?(k)
end
Collection.new(database, name, options.merge(new_options))
end | ruby | def with(new_options)
new_options.keys.each do |k|
raise Error::UnchangeableCollectionOption.new(k) unless CHANGEABLE_OPTIONS.include?(k)
end
Collection.new(database, name, options.merge(new_options))
end | [
"def",
"with",
"(",
"new_options",
")",
"new_options",
".",
"keys",
".",
"each",
"do",
"|",
"k",
"|",
"raise",
"Error",
"::",
"UnchangeableCollectionOption",
".",
"new",
"(",
"k",
")",
"unless",
"CHANGEABLE_OPTIONS",
".",
"include?",
"(",
"k",
")",
"end",
... | Provides a new collection with either a new read preference or new write concern
merged over the existing read preference / write concern.
@example Get a collection with changed read preference.
collection.with(:read => { :mode => :primary_preferred })
@example Get a collection with changed write concern.
co... | [
"Provides",
"a",
"new",
"collection",
"with",
"either",
"a",
"new",
"read",
"preference",
"or",
"new",
"write",
"concern",
"merged",
"over",
"the",
"existing",
"read",
"preference",
"/",
"write",
"concern",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/collection.rb#L153-L158 | train | Creates a new Collection object. | [
30522,
13366,
2007,
1006,
2047,
1035,
7047,
1007,
2047,
1035,
7047,
1012,
6309,
1012,
2169,
2079,
1064,
1047,
1064,
5333,
7561,
1024,
1024,
4895,
22305,
5243,
3468,
26895,
18491,
7361,
3508,
1012,
2047,
1006,
1047,
1007,
4983,
2689,
3085,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/product_policy.rb | Azure::ApiManagement::Mgmt::V2018_01_01.ProductPolicy.get_with_http_info | def get_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil)
get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil)
get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"custom_headers",
":custom_headers",
")",
"."... | Get the policy configuration at the Product level.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param custom_he... | [
"Get",
"the",
"policy",
"configuration",
"at",
"the",
"Product",
"level",
"."
] | 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/product_policy.rb#L253-L255 | train | Gets the product s index. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
alexreisner/geocoder | lib/geocoder/stores/mongo_base.rb | Geocoder::Store.MongoBase.geocode | def geocode
do_lookup(false) do |o,rs|
if r = rs.first
unless r.coordinates.nil?
o.__send__ "#{self.class.geocoder_options[:coordinates]}=", r.coordinates.reverse
end
r.coordinates
end
end
end | ruby | def geocode
do_lookup(false) do |o,rs|
if r = rs.first
unless r.coordinates.nil?
o.__send__ "#{self.class.geocoder_options[:coordinates]}=", r.coordinates.reverse
end
r.coordinates
end
end
end | [
"def",
"geocode",
"do_lookup",
"(",
"false",
")",
"do",
"|",
"o",
",",
"rs",
"|",
"if",
"r",
"=",
"rs",
".",
"first",
"unless",
"r",
".",
"coordinates",
".",
"nil?",
"o",
".",
"__send__",
"\"#{self.class.geocoder_options[:coordinates]}=\"",
",",
"r",
".",
... | Look up coordinates and assign to +latitude+ and +longitude+ attributes
(or other as specified in +geocoded_by+). Returns coordinates (array). | [
"Look",
"up",
"coordinates",
"and",
"assign",
"to",
"+",
"latitude",
"+",
"and",
"+",
"longitude",
"+",
"attributes",
"(",
"or",
"other",
"as",
"specified",
"in",
"+",
"geocoded_by",
"+",
")",
".",
"Returns",
"coordinates",
"(",
"array",
")",
"."
] | e087dc2759264ee6f307b926bb2de4ec2406859e | https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/stores/mongo_base.rb#L31-L40 | train | Returns the coordinates of the nearest neighbors of the geometry. | [
30522,
13366,
20248,
16044,
2079,
1035,
2298,
6279,
1006,
6270,
1007,
2079,
1064,
1051,
1010,
12667,
1064,
2065,
1054,
1027,
12667,
1012,
2034,
4983,
1054,
1012,
12093,
1012,
9152,
2140,
1029,
1051,
1012,
1035,
1035,
4604,
1035,
1035,
1000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | activerecord/lib/active_record/relation.rb | ActiveRecord.Relation.create_or_find_by | def create_or_find_by(attributes, &block)
transaction(requires_new: true) { create(attributes, &block) }
rescue ActiveRecord::RecordNotUnique
find_by!(attributes)
end | ruby | def create_or_find_by(attributes, &block)
transaction(requires_new: true) { create(attributes, &block) }
rescue ActiveRecord::RecordNotUnique
find_by!(attributes)
end | [
"def",
"create_or_find_by",
"(",
"attributes",
",",
"&",
"block",
")",
"transaction",
"(",
"requires_new",
":",
"true",
")",
"{",
"create",
"(",
"attributes",
",",
"block",
")",
"}",
"rescue",
"ActiveRecord",
"::",
"RecordNotUnique",
"find_by!",
"(",
"attribut... | Attempts to create a record with the given attributes in a table that has a unique constraint
on one or several of its columns. If a row already exists with one or several of these
unique constraints, the exception such an insertion would normally raise is caught,
and the existing record with those attributes is fou... | [
"Attempts",
"to",
"create",
"a",
"record",
"with",
"the",
"given",
"attributes",
"in",
"a",
"table",
"that",
"has",
"a",
"unique",
"constraint",
"on",
"one",
"or",
"several",
"of",
"its",
"columns",
".",
"If",
"a",
"row",
"already",
"exists",
"with",
"on... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/relation.rb#L209-L213 | train | Creates or finds a record by the given attributes. | [
30522,
13366,
3443,
1035,
2030,
1035,
2424,
1035,
2011,
1006,
12332,
1010,
1004,
3796,
1007,
12598,
1006,
5942,
1035,
2047,
1024,
2995,
1007,
1063,
3443,
1006,
12332,
1010,
1004,
3796,
1007,
1065,
5343,
3161,
2890,
27108,
2094,
1024,
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... |
meew0/discordrb | lib/discordrb/data/server.rb | Discordrb.Server.prune_count | def prune_count(days)
raise ArgumentError, 'Days must be between 1 and 30' unless days.between?(1, 30)
response = JSON.parse API::Server.prune_count(@bot.token, @id, days)
response['pruned']
end | ruby | def prune_count(days)
raise ArgumentError, 'Days must be between 1 and 30' unless days.between?(1, 30)
response = JSON.parse API::Server.prune_count(@bot.token, @id, days)
response['pruned']
end | [
"def",
"prune_count",
"(",
"days",
")",
"raise",
"ArgumentError",
",",
"'Days must be between 1 and 30'",
"unless",
"days",
".",
"between?",
"(",
"1",
",",
"30",
")",
"response",
"=",
"JSON",
".",
"parse",
"API",
"::",
"Server",
".",
"prune_count",
"(",
"@bo... | Returns the amount of members that are candidates for pruning
@param days [Integer] the number of days to consider for inactivity
@return [Integer] number of members to be removed
@raise [ArgumentError] if days is not between 1 and 30 (inclusive) | [
"Returns",
"the",
"amount",
"of",
"members",
"that",
"are",
"candidates",
"for",
"pruning"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L276-L281 | train | Prune the number of servers that are currently in use | [
30522,
13366,
10975,
9816,
1035,
4175,
1006,
2420,
1007,
5333,
6685,
2121,
29165,
1010,
1005,
2420,
2442,
2022,
2090,
1015,
1998,
2382,
1005,
4983,
2420,
1012,
2090,
1029,
1006,
1015,
1010,
2382,
1007,
3433,
1027,
1046,
3385,
1012,
11968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.list_storage_accounts | def list_storage_accounts(resource_group_name, account_name, filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
first_page = list_storage_accounts_as_lazy(resource_group_name, account_name, filter:filter, top:top, skip:skip, expand:expand, se... | ruby | def list_storage_accounts(resource_group_name, account_name, filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
first_page = list_storage_accounts_as_lazy(resource_group_name, account_name, filter:filter, top:top, skip:skip, expand:expand, se... | [
"def",
"list_storage_accounts",
"(",
"resource_group_name",
",",
"account_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"expand",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"count",
... | Gets the first page of Azure Storage accounts, if any, linked to the
specified Data Lake Analytics account. The response includes a link to the
next page, if any.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics account.
@param account_name [String] Th... | [
"Gets",
"the",
"first",
"page",
"of",
"Azure",
"Storage",
"accounts",
"if",
"any",
"linked",
"to",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"account",
".",
"The",
"response",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 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#L1142-L1145 | train | Gets all the storage accounts in a resource group. | [
30522,
13366,
2862,
1035,
5527,
1035,
6115,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7818,
1024,
9152,
2140,
1010,
7276,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/stack.rb | Heroku::Command.Stack.index | def index
validate_arguments!
stacks_data = api.get_stack(app).body
styled_header("#{app} Available Stacks")
stacks = stacks_data.map do |stack|
row = [stack['current'] ? '*' : ' ', Codex.out(stack['name'])]
row << '(beta)' if stack['beta']
row << '(deprecated)' if stac... | ruby | def index
validate_arguments!
stacks_data = api.get_stack(app).body
styled_header("#{app} Available Stacks")
stacks = stacks_data.map do |stack|
row = [stack['current'] ? '*' : ' ', Codex.out(stack['name'])]
row << '(beta)' if stack['beta']
row << '(deprecated)' if stac... | [
"def",
"index",
"validate_arguments!",
"stacks_data",
"=",
"api",
".",
"get_stack",
"(",
"app",
")",
".",
"body",
"styled_header",
"(",
"\"#{app} Available Stacks\"",
")",
"stacks",
"=",
"stacks_data",
".",
"map",
"do",
"|",
"stack",
"|",
"row",
"=",
"[",
"s... | stack
show the list of available stacks
Example:
$ heroku stack
=== example Available Stacks
cedar-10
* cedar-14 | [
"stack"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/stack.rb#L19-L33 | train | Returns a list of available stacks for the current app. | [
30522,
13366,
5950,
9398,
3686,
1035,
9918,
999,
20829,
1035,
2951,
1027,
17928,
1012,
2131,
1035,
9991,
1006,
10439,
1007,
1012,
2303,
13650,
1035,
20346,
1006,
1000,
1001,
1063,
10439,
1065,
2800,
20829,
1000,
1007,
20829,
1027,
20829,
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... |
danger/danger | lib/danger/danger_core/executor.rb | Danger.Executor.validate_pr! | def validate_pr!(cork, fail_if_no_pr)
unless EnvironmentManager.pr?(system_env)
ci_name = EnvironmentManager.local_ci_source(system_env).name.split("::").last
msg = "Not a #{ci_name} Pull Request - skipping `danger` run. "
# circle won't run danger properly if the commit is pushed and bui... | ruby | def validate_pr!(cork, fail_if_no_pr)
unless EnvironmentManager.pr?(system_env)
ci_name = EnvironmentManager.local_ci_source(system_env).name.split("::").last
msg = "Not a #{ci_name} Pull Request - skipping `danger` run. "
# circle won't run danger properly if the commit is pushed and bui... | [
"def",
"validate_pr!",
"(",
"cork",
",",
"fail_if_no_pr",
")",
"unless",
"EnvironmentManager",
".",
"pr?",
"(",
"system_env",
")",
"ci_name",
"=",
"EnvironmentManager",
".",
"local_ci_source",
"(",
"system_env",
")",
".",
"name",
".",
"split",
"(",
"\"::\"",
"... | Could we determine that the CI source is inside a PR? | [
"Could",
"we",
"determine",
"that",
"the",
"CI",
"source",
"is",
"inside",
"a",
"PR?"
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/danger_core/executor.rb#L62-L77 | train | Validate the PR | [
30522,
13366,
9398,
3686,
1035,
10975,
999,
1006,
8513,
1010,
8246,
1035,
2065,
1035,
2053,
1035,
10975,
1007,
4983,
4044,
24805,
4590,
1012,
10975,
1029,
1006,
2291,
1035,
4372,
2615,
1007,
25022,
1035,
2171,
1027,
4044,
24805,
4590,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/visibility_intention.rb | Hyrax.VisibilityIntention.embargo_params | def embargo_params
return [] unless wants_embargo?
raise ArgumentError unless valid_embargo?
[release_date, (during || PRIVATE), (after || PUBLIC)]
end | ruby | def embargo_params
return [] unless wants_embargo?
raise ArgumentError unless valid_embargo?
[release_date, (during || PRIVATE), (after || PUBLIC)]
end | [
"def",
"embargo_params",
"return",
"[",
"]",
"unless",
"wants_embargo?",
"raise",
"ArgumentError",
"unless",
"valid_embargo?",
"[",
"release_date",
",",
"(",
"during",
"||",
"PRIVATE",
")",
",",
"(",
"after",
"||",
"PUBLIC",
")",
"]",
"end"
] | @param [String] after
@param [String] during
@param [String] release_date
@param [String] visibility
@return [Array] the parameters for the requested embargo | [
"@param",
"[",
"String",
"]",
"after",
"@param",
"[",
"String",
"]",
"during",
"@param",
"[",
"String",
"]",
"release_date",
"@param",
"[",
"String",
"]",
"visibility"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/visibility_intention.rb#L38-L43 | train | Returns an array of embargo params for the given object. | [
30522,
13366,
7861,
8237,
3995,
1035,
11498,
5244,
2709,
1031,
1033,
4983,
4122,
1035,
7861,
8237,
3995,
1029,
5333,
6685,
2121,
29165,
4983,
9398,
1035,
7861,
8237,
3995,
1029,
1031,
2713,
1035,
3058,
1010,
1006,
2076,
1064,
1064,
2797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/scopes_helper.rb | Decidim.ScopesHelper.scope_name_for_picker | def scope_name_for_picker(scope, global_name)
return global_name unless scope
name = translated_attribute(scope.name)
name << " (#{translated_attribute(scope.scope_type.name)})" if scope.scope_type
name
end | ruby | def scope_name_for_picker(scope, global_name)
return global_name unless scope
name = translated_attribute(scope.name)
name << " (#{translated_attribute(scope.scope_type.name)})" if scope.scope_type
name
end | [
"def",
"scope_name_for_picker",
"(",
"scope",
",",
"global_name",
")",
"return",
"global_name",
"unless",
"scope",
"name",
"=",
"translated_attribute",
"(",
"scope",
".",
"name",
")",
"name",
"<<",
"\" (#{translated_attribute(scope.scope_type.name)})\"",
"if",
"scope",
... | Retrieves the translated name and type for an scope.
scope - a Decidim::Scope
global_name - text to use when scope is nil
Returns a string | [
"Retrieves",
"the",
"translated",
"name",
"and",
"type",
"for",
"an",
"scope",
".",
"scope",
"-",
"a",
"Decidim",
"::",
"Scope",
"global_name",
"-",
"text",
"to",
"use",
"when",
"scope",
"is",
"nil"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/scopes_helper.rb#L26-L32 | train | Returns the name for the picker. | [
30522,
13366,
9531,
1035,
2171,
1035,
2005,
1035,
4060,
2121,
1006,
9531,
1010,
3795,
1035,
2171,
1007,
2709,
3795,
1035,
2171,
4983,
9531,
2171,
1027,
5421,
1035,
17961,
1006,
9531,
1012,
2171,
1007,
2171,
1026,
1026,
1000,
1006,
1001,
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... |
dry-rb/dry-struct | lib/dry/struct.rb | Dry.Struct.to_hash | def to_hash
self.class.schema.each_with_object({}) do |key, result|
result[key.name] = Hashify[self[key.name]] if attributes.key?(key.name)
end
end | ruby | def to_hash
self.class.schema.each_with_object({}) do |key, result|
result[key.name] = Hashify[self[key.name]] if attributes.key?(key.name)
end
end | [
"def",
"to_hash",
"self",
".",
"class",
".",
"schema",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"key",
",",
"result",
"|",
"result",
"[",
"key",
".",
"name",
"]",
"=",
"Hashify",
"[",
"self",
"[",
"key",
".",
"name",
"]",
"]",
"if"... | Converts the {Dry::Struct} to a hash with keys representing
each attribute (as symbols) and their corresponding values
@return [Hash{Symbol => Object}]
@example
class Book < Dry::Struct
attribute :title, Types::Strict::String
attribute :subtitle, Types::Strict::String.optional
end
rom_n_roda = ... | [
"Converts",
"the",
"{",
"Dry",
"::",
"Struct",
"}",
"to",
"a",
"hash",
"with",
"keys",
"representing",
"each",
"attribute",
"(",
"as",
"symbols",
")",
"and",
"their",
"corresponding",
"values"
] | d8af8b933f7ae313ef1475fa328fa4c5371296f3 | https://github.com/dry-rb/dry-struct/blob/d8af8b933f7ae313ef1475fa328fa4c5371296f3/lib/dry/struct.rb#L145-L149 | train | Returns a hash of the attributes that are not present in the schema. | [
30522,
13366,
30524,
1006,
3145,
1012,
2171,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.delete_virtual_network_rule_with_http_info | def delete_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
end | ruby | def delete_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_virtual_network_rule_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"virtual_network_rule_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_virtual_network_rule_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"virtua... | Deletes an VirtualNetworkRule for a Namespace.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param namespace_name [String] The Namespace name
@param virtual_network_rule_name [String] The Virtual Network Rule name.
@param custom_headers [Hash{String => String}] A h... | [
"Deletes",
"an",
"VirtualNetworkRule",
"for",
"a",
"Namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L1178-L1180 | train | Deletes the virtual network rule. | [
30522,
13366,
3972,
12870,
1035,
7484,
1035,
2897,
1035,
3627,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
3627,
1035,
2171,
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_logic/lib/2015-02-01-preview/generated/azure_mgmt_logic/workflow_access_keys.rb | Azure::Logic::Mgmt::V2015_02_01_preview.WorkflowAccessKeys.regenerate_secret_key | def regenerate_secret_key(resource_group_name, workflow_name, access_key_name, parameters, custom_headers:nil)
response = regenerate_secret_key_async(resource_group_name, workflow_name, access_key_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def regenerate_secret_key(resource_group_name, workflow_name, access_key_name, parameters, custom_headers:nil)
response = regenerate_secret_key_async(resource_group_name, workflow_name, access_key_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"regenerate_secret_key",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"access_key_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"regenerate_secret_key_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"a... | Regenerates secret key.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param access_key_name [String] The workflow access key name.
@param parameters [RegenerateSecretKeyParameters] The parameters.
@param custom_headers [Hash{String => String}] A has... | [
"Regenerates",
"secret",
"key",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2015-02-01-preview/generated/azure_mgmt_logic/workflow_access_keys.rb#L525-L528 | train | Regenerate the secret key for a workflow. | [
30522,
13366,
19723,
24454,
3686,
1035,
3595,
1035,
3145,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
3229,
1035,
3145,
1035,
2171,
1010,
11709,
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_container_instance/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb | Azure::ContainerInstance::Mgmt::V2018_02_01_preview.ContainerGroups.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers:nil)
begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers:nil)
begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"container_group_name",
",",
"container_group",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"container_group_name",
",",
"container_grou... | Create or update container groups.
Create or update container groups with specified configurations.
@param resource_group_name [String] The name of the resource group.
@param container_group_name [String] The name of the container group.
@param container_group [ContainerGroup] The properties of the container grou... | [
"Create",
"or",
"update",
"container",
"groups",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_instance/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb#L633-L635 | train | Creates or updates a container group. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11661,
1035,
2177,
1035,
2171,
1010,
11661,
1035,
2177,
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 | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_iterations | def get_iterations(project_id, custom_headers:nil)
response = get_iterations_async(project_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_iterations(project_id, custom_headers:nil)
response = get_iterations_async(project_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_iterations",
"(",
"project_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_iterations_async",
"(",
"project_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?"... | Get iterations for the project.
@param project_id The project id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] operation results. | [
"Get",
"iterations",
"for",
"the",
"project",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L3413-L3416 | train | Gets the number of iterations for a project. | [
30522,
13366,
2131,
1035,
27758,
2015,
1006,
2622,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
27758,
2015,
1035,
2004,
6038,
2278,
1006,
2622,
1035,
8909,
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_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_with_http_info | def list_worker_pool_instance_metrics_with_http_info(resource_group_name, name, worker_pool_name, instance, details:nil, filter:nil, custom_headers:nil)
list_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details:details, filter:filter, custom_headers:custom_headers).val... | ruby | def list_worker_pool_instance_metrics_with_http_info(resource_group_name, name, worker_pool_name, instance, details:nil, filter:nil, custom_headers:nil)
list_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details:details, filter:filter, custom_headers:custom_headers).val... | [
"def",
"list_worker_pool_instance_metrics_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"instance",
",",
"details",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_worker_pool_instance_metric... | 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 Envir... | [
"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#L3596-L3598 | train | Gets metrics for a worker pool instance. | [
30522,
13366,
2862,
1035,
7309,
1035,
4770,
1035,
6013,
1035,
12046,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
6013,
1010,
4751,
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... |
pythonicrubyist/creek | lib/creek/sheet.rb | Creek.Creek::Sheet.fill_in_empty_cells | def fill_in_empty_cells(cells, row_number, last_col, use_simple_rows_format)
new_cells = Hash.new
unless cells.empty?
last_col = last_col.gsub(row_number, '')
("A"..last_col).to_a.each do |column|
id = use_simple_rows_format ? "#{column}" : "#{column}#{row_number}"
new_... | ruby | def fill_in_empty_cells(cells, row_number, last_col, use_simple_rows_format)
new_cells = Hash.new
unless cells.empty?
last_col = last_col.gsub(row_number, '')
("A"..last_col).to_a.each do |column|
id = use_simple_rows_format ? "#{column}" : "#{column}#{row_number}"
new_... | [
"def",
"fill_in_empty_cells",
"(",
"cells",
",",
"row_number",
",",
"last_col",
",",
"use_simple_rows_format",
")",
"new_cells",
"=",
"Hash",
".",
"new",
"unless",
"cells",
".",
"empty?",
"last_col",
"=",
"last_col",
".",
"gsub",
"(",
"row_number",
",",
"''",
... | The unzipped XML file does not contain any node for empty cells.
Empty cells are being padded in using this function | [
"The",
"unzipped",
"XML",
"file",
"does",
"not",
"contain",
"any",
"node",
"for",
"empty",
"cells",
".",
"Empty",
"cells",
"are",
"being",
"padded",
"in",
"using",
"this",
"function"
] | 1a5c99032ee736e8f24ebd524adffba068d236b4 | https://github.com/pythonicrubyist/creek/blob/1a5c99032ee736e8f24ebd524adffba068d236b4/lib/creek/sheet.rb#L144-L157 | train | Fill in empty cells with empty cells | [
30522,
13366,
6039,
1035,
1999,
1035,
4064,
1035,
4442,
1006,
4442,
1010,
5216,
1035,
2193,
1010,
2197,
1035,
8902,
1010,
2224,
1035,
3722,
1035,
10281,
1035,
4289,
1007,
2047,
1035,
4442,
1027,
23325,
1012,
2047,
4983,
4442,
1012,
4064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
watir/watir | lib/watir/capabilities.rb | Watir.Capabilities.process_capabilities | def process_capabilities
caps = @options.delete(:desired_capabilities)
if caps
msg = 'You can pass values directly into Watir::Browser opt without needing to use :desired_capabilities'
Watir.logger.warn msg,
ids: [:use_capabilities]
@selenium_opts.merge!(@o... | ruby | def process_capabilities
caps = @options.delete(:desired_capabilities)
if caps
msg = 'You can pass values directly into Watir::Browser opt without needing to use :desired_capabilities'
Watir.logger.warn msg,
ids: [:use_capabilities]
@selenium_opts.merge!(@o... | [
"def",
"process_capabilities",
"caps",
"=",
"@options",
".",
"delete",
"(",
":desired_capabilities",
")",
"if",
"caps",
"msg",
"=",
"'You can pass values directly into Watir::Browser opt without needing to use :desired_capabilities'",
"Watir",
".",
"logger",
".",
"warn",
"msg... | rubocop:enable Metrics/AbcSize
rubocop:enable Metrics/MethodLength
rubocop:enable Metrics/PerceivedComplexity:
rubocop:enable Metrics/CyclomaticComplexity:: | [
"rubocop",
":",
"enable",
"Metrics",
"/",
"AbcSize",
"rubocop",
":",
"enable",
"Metrics",
"/",
"MethodLength",
"rubocop",
":",
"enable",
"Metrics",
"/",
"PerceivedComplexity",
":",
"rubocop",
":",
"enable",
"Metrics",
"/",
"CyclomaticComplexity",
"::"
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/capabilities.rb#L134-L147 | train | Process the desired capabilities of the browser | [
30522,
13366,
2832,
1035,
9859,
9700,
1027,
1030,
7047,
1012,
3972,
12870,
1006,
1024,
9059,
1035,
9859,
1007,
2065,
9700,
5796,
2290,
1027,
1005,
2017,
2064,
3413,
5300,
3495,
2046,
28194,
4313,
1024,
1024,
16602,
23569,
2302,
11303,
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... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.update_storage_account | def update_storage_account(vault_base_url, storage_account_name, active_key_name:nil, auto_regenerate_key:nil, regeneration_period:nil, storage_account_attributes:nil, tags:nil, custom_headers:nil)
response = update_storage_account_async(vault_base_url, storage_account_name, active_key_name:active_key_name, auto_... | ruby | def update_storage_account(vault_base_url, storage_account_name, active_key_name:nil, auto_regenerate_key:nil, regeneration_period:nil, storage_account_attributes:nil, tags:nil, custom_headers:nil)
response = update_storage_account_async(vault_base_url, storage_account_name, active_key_name:active_key_name, auto_... | [
"def",
"update_storage_account",
"(",
"vault_base_url",
",",
"storage_account_name",
",",
"active_key_name",
":",
"nil",
",",
"auto_regenerate_key",
":",
"nil",
",",
"regeneration_period",
":",
"nil",
",",
"storage_account_attributes",
":",
"nil",
",",
"tags",
":",
... | Updates the specified attributes associated with the given storage account.
This operation requires the storage/set/update permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param storage_account_name [String] The name of the storage account.
@param active_key... | [
"Updates",
"the",
"specified",
"attributes",
"associated",
"with",
"the",
"given",
"storage",
"account",
".",
"This",
"operation",
"requires",
"the",
"storage",
"/",
"set",
"/",
"update",
"permission",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L7425-L7428 | train | Updates the specified storage account. | [
30522,
13366,
10651,
1035,
5527,
1035,
4070,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
3161,
1035,
3145,
1035,
2171,
1024,
9152,
2140,
1010,
8285,
1035,
19723,
24454,
3686,
1035,
3145,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-rds/lib/aws-sdk-rds/db_cluster_parameter_group.rb | Aws::RDS.DBClusterParameterGroup.modify | def modify(options = {})
options = options.merge(db_cluster_parameter_group_name: @name)
resp = @client.modify_db_cluster_parameter_group(options)
DBClusterParameterGroup.new(
name: resp.data.db_cluster_parameter_group_name,
client: @client
)
end | ruby | def modify(options = {})
options = options.merge(db_cluster_parameter_group_name: @name)
resp = @client.modify_db_cluster_parameter_group(options)
DBClusterParameterGroup.new(
name: resp.data.db_cluster_parameter_group_name,
client: @client
)
end | [
"def",
"modify",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_cluster_parameter_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"modify_db_cluster_parameter_group",
"(",
"options",
")",
"DBClusterParameterGroup... | @example Request syntax with placeholder values
dbclusterparametergroup = db_cluster_parameter_group.modify({
parameters: [ # required
{
parameter_name: "String",
parameter_value: "String",
description: "String",
source: "String",
apply_type: "String",
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_parameter_group.rb#L267-L274 | train | Modify the DB cluster parameter group | [
30522,
13366,
19933,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
9324,
1035,
16381,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
19933,
1035,
16962,
1035,
932... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"certificate_distinguished_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"certificate_order_name",
","... | Create or update a certificate purchase order.
Create or update a certificate purchase order.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param certificate_order_name [String] Name of the certificate order.
@param certificate_distinguished_name [AppServiceCertif... | [
"Create",
"or",
"update",
"a",
"certificate",
"purchase",
"order",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L2072-L2074 | train | Creates or updates a certificate order or certificate distinguished name. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8196,
1035,
2344,
1035,
2171,
1010,
8196,
1035,
5182,
1035,
2171,
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 | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.merge_certificate | def merge_certificate(vault_base_url, certificate_name, x509certificates, certificate_attributes:nil, tags:nil, custom_headers:nil)
response = merge_certificate_async(vault_base_url, certificate_name, x509certificates, certificate_attributes:certificate_attributes, tags:tags, custom_headers:custom_headers).value!... | ruby | def merge_certificate(vault_base_url, certificate_name, x509certificates, certificate_attributes:nil, tags:nil, custom_headers:nil)
response = merge_certificate_async(vault_base_url, certificate_name, x509certificates, certificate_attributes:certificate_attributes, tags:tags, custom_headers:custom_headers).value!... | [
"def",
"merge_certificate",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"x509certificates",
",",
"certificate_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"merge_certificate_async",
"(",
"vault_b... | Merges a certificate or a certificate chain with a key pair existing on the
server.
The MergeCertificate operation performs the merging of a certificate or
certificate chain with a key pair currently available in the service. This
operation requires the certificates/create permission.
@param vault_base_url [Stri... | [
"Merges",
"a",
"certificate",
"or",
"a",
"certificate",
"chain",
"with",
"a",
"key",
"pair",
"existing",
"on",
"the",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L6393-L6396 | train | Merge a certificate into a single key vault. | [
30522,
13366,
13590,
1035,
8196,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
1060,
12376,
2683,
17119,
3775,
8873,
16280,
2015,
1010,
8196,
1035,
12332,
1024,
9152,
2140,
1010,
22073,
1024,
9152,
2140,
1010,
76... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | stdlib/benchmark.rb | Benchmark.Tms.add! | def add!(&blk)
t = Benchmark.measure(&blk)
@utime = utime + t.utime
@stime = stime + t.stime
@cutime = cutime + t.cutime
@cstime = cstime + t.cstime
@real = real + t.real
self
end | ruby | def add!(&blk)
t = Benchmark.measure(&blk)
@utime = utime + t.utime
@stime = stime + t.stime
@cutime = cutime + t.cutime
@cstime = cstime + t.cstime
@real = real + t.real
self
end | [
"def",
"add!",
"(",
"&",
"blk",
")",
"t",
"=",
"Benchmark",
".",
"measure",
"(",
"blk",
")",
"@utime",
"=",
"utime",
"+",
"t",
".",
"utime",
"@stime",
"=",
"stime",
"+",
"t",
".",
"stime",
"@cutime",
"=",
"cutime",
"+",
"t",
".",
"cutime",
"@csti... | An in-place version of #add. | [
"An",
"in",
"-",
"place",
"version",
"of",
"#add",
"."
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/stdlib/benchmark.rb#L438-L446 | train | Add a block to the block. | [
30522,
13366,
5587,
999,
1006,
1004,
1038,
13687,
1007,
1056,
1027,
6847,
10665,
1012,
5468,
1006,
1004,
1038,
13687,
1007,
1030,
21183,
14428,
1027,
21183,
14428,
1009,
1056,
1012,
21183,
14428,
1030,
2358,
14428,
1027,
2358,
14428,
1009,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb | Azure::Kusto::Mgmt::V2018_09_07_privatepreview.Databases.list_principals | def list_principals(resource_group_name, cluster_name, database_name, custom_headers:nil)
response = list_principals_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_principals(resource_group_name, cluster_name, database_name, custom_headers:nil)
response = list_principals_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_principals",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_principals_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"custom_headers... | Returns a list of database principals of the given Kusto cluster and
database.
@param resource_group_name [String] The name of the resource group containing
the Kusto cluster.
@param cluster_name [String] The name of the Kusto cluster.
@param database_name [String] The name of the database in the Kusto cluster.
... | [
"Returns",
"a",
"list",
"of",
"database",
"principals",
"of",
"the",
"given",
"Kusto",
"cluster",
"and",
"database",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb#L481-L484 | train | Gets the list of principals for the specified database. | [
30522,
13366,
2862,
1035,
27928,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
27928,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb | Azure::Network::Mgmt::V2018_07_01.VirtualWANs.begin_delete | def begin_delete(resource_group_name, virtual_wanname, custom_headers:nil)
response = begin_delete_async(resource_group_name, virtual_wanname, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, virtual_wanname, custom_headers:nil)
response = begin_delete_async(resource_group_name, virtual_wanname, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Deletes a VirtualWAN.
@param resource_group_name [String] The resource group name of the
VirtualWan.
@param virtual_wanname [String] The name of the VirtualWAN being deleted.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"a",
"VirtualWAN",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb#L687-L690 | train | Deletes a virtual wan. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
10587,
4168,
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... |
fastlane/fastlane | cert/lib/cert/runner.rb | Cert.Runner.certificate_type | def certificate_type
case Cert.config[:platform].to_s
when 'ios', 'tvos'
cert_type = Spaceship.certificate.production
cert_type = Spaceship.certificate.in_house if Spaceship.client.in_house?
cert_type = Spaceship.certificate.development if Cert.config[:development]
when 'macos... | ruby | def certificate_type
case Cert.config[:platform].to_s
when 'ios', 'tvos'
cert_type = Spaceship.certificate.production
cert_type = Spaceship.certificate.in_house if Spaceship.client.in_house?
cert_type = Spaceship.certificate.development if Cert.config[:development]
when 'macos... | [
"def",
"certificate_type",
"case",
"Cert",
".",
"config",
"[",
":platform",
"]",
".",
"to_s",
"when",
"'ios'",
",",
"'tvos'",
"cert_type",
"=",
"Spaceship",
".",
"certificate",
".",
"production",
"cert_type",
"=",
"Spaceship",
".",
"certificate",
".",
"in_hous... | The kind of certificate we're interested in | [
"The",
"kind",
"of",
"certificate",
"we",
"re",
"interested",
"in"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/cert/lib/cert/runner.rb#L136-L150 | train | Returns the certificate type of the certificate. | [
30522,
13366,
8196,
1035,
2828,
2553,
8292,
5339,
1012,
9530,
8873,
2290,
1031,
1024,
4132,
1033,
1012,
2000,
1035,
1055,
2043,
1005,
16380,
1005,
1010,
1005,
2694,
2891,
1005,
8292,
5339,
1035,
2828,
1027,
25516,
1012,
8196,
1012,
2537,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
cucumber/aruba | lib/aruba/command.rb | Aruba.Command.stop | def stop(*)
return if __getobj__.stopped?
__getobj__.stop
event_bus.notify Events::CommandStopped.new(self)
self
end | ruby | def stop(*)
return if __getobj__.stopped?
__getobj__.stop
event_bus.notify Events::CommandStopped.new(self)
self
end | [
"def",
"stop",
"(",
"*",
")",
"return",
"if",
"__getobj__",
".",
"stopped?",
"__getobj__",
".",
"stop",
"event_bus",
".",
"notify",
"Events",
"::",
"CommandStopped",
".",
"new",
"(",
"self",
")",
"self",
"end"
] | Stop command | [
"Stop",
"command"
] | add17615322f575588aef1fccce875396cdf36e9 | https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/command.rb#L50-L57 | train | Stop the command | [
30522,
13366,
2644,
1006,
1008,
1007,
2709,
2065,
1035,
1035,
2131,
16429,
3501,
1035,
1035,
1012,
3030,
1029,
1035,
1035,
2131,
16429,
3501,
1035,
1035,
1012,
2644,
2724,
1035,
3902,
1012,
2025,
8757,
2824,
1024,
1024,
10954,
14399,
5669,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/page_iterator.rb | Github.PageIterator.update_page_links | def update_page_links(links) # :nodoc:
ATTRIBUTES.each do |attr|
send(:"#{attr}_page_uri=", links.send(:"#{attr}"))
send(:"#{attr}_page=", parse_page_number(links.send(:"#{attr}")))
end
end | ruby | def update_page_links(links) # :nodoc:
ATTRIBUTES.each do |attr|
send(:"#{attr}_page_uri=", links.send(:"#{attr}"))
send(:"#{attr}_page=", parse_page_number(links.send(:"#{attr}")))
end
end | [
"def",
"update_page_links",
"(",
"links",
")",
"# :nodoc:",
"ATTRIBUTES",
".",
"each",
"do",
"|",
"attr",
"|",
"send",
"(",
":\"",
"#{",
"attr",
"}",
"\"",
",",
"links",
".",
"send",
"(",
":\"",
"#{",
"attr",
"}",
"\"",
")",
")",
"send",
"(",
":\""... | Wholesale update of all link attributes | [
"Wholesale",
"update",
"of",
"all",
"link",
"attributes"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/page_iterator.rb#L131-L136 | train | Update the page links | [
30522,
13366,
10651,
1035,
3931,
1035,
6971,
1006,
6971,
1007,
1001,
1024,
7293,
10085,
1024,
12332,
1012,
2169,
2079,
1064,
2012,
16344,
1064,
4604,
1006,
1024,
1000,
1001,
1063,
2012,
16344,
1065,
1035,
3931,
1035,
24471,
2072,
1027,
1000... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.area | def area(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'area_for', &block)
define_method(name) do
return platform.click_area_for identifier.clone unless block_given?
self.send("#{name}_element").click
end
end | ruby | def area(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'area_for', &block)
define_method(name) do
return platform.click_area_for identifier.clone unless block_given?
self.send("#{name}_element").click
end
end | [
"def",
"area",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'area_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"return",
"pla... | adds three methods - one to click the area,
another to return the area element, and another to check the area's existence.
@example
area(:message, :id => 'message')
# will generate 'message', 'message_element', and 'message?' methods
@param [Symbol] the name used for the generated methods
@param [Hash] iden... | [
"adds",
"three",
"methods",
"-",
"one",
"to",
"click",
"the",
"area",
"another",
"to",
"return",
"the",
"area",
"element",
"and",
"another",
"to",
"check",
"the",
"area",
"s",
"existence",
"."
] | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L843-L849 | train | Add a method to click an area of the page. | [
30522,
13366,
2181,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
2181,
1035,
2005,
1005,
1010,
1004,
3796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.list_data_lake_store_accounts_as_lazy | def list_data_lake_store_accounts_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
response = list_data_lake_store_accounts_async(resource_group_name, account_name, filter:filter, top:top, skip:ski... | ruby | def list_data_lake_store_accounts_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
response = list_data_lake_store_accounts_async(resource_group_name, account_name, filter:filter, top:top, skip:ski... | [
"def",
"list_data_lake_store_accounts_as_lazy",
"(",
"resource_group_name",
",",
"account_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"expand",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
"... | Gets the first page of Data Lake Store accounts linked to the specified Data
Lake Analytics account. The response includes a link to the next page, if
any.
@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 ... | [
"Gets",
"the",
"first",
"page",
"of",
"Data",
"Lake",
"Store",
"accounts",
"linked",
"to",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"account",
".",
"The",
"response",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 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#L3043-L3052 | train | Gets a list of all the data lake store accounts. | [
30522,
13366,
2862,
1035,
2951,
1035,
2697,
1035,
3573,
1035,
6115,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/spring | lib/spring/json.rb | Spring.OkJson.ucharcopy | def ucharcopy(t, s, i)
n = s.length - i
raise Utf8Error if n < 1
c0 = s[i].ord
# 1-byte, 7-bit sequence?
if c0 < Utagx
t.putc(c0)
return 1
end
raise Utf8Error if c0 < Utag2 # unexpected continuation byte?
raise Utf8Error if n < 2 # need continuation byte
c1 = s[i+1].o... | ruby | def ucharcopy(t, s, i)
n = s.length - i
raise Utf8Error if n < 1
c0 = s[i].ord
# 1-byte, 7-bit sequence?
if c0 < Utagx
t.putc(c0)
return 1
end
raise Utf8Error if c0 < Utag2 # unexpected continuation byte?
raise Utf8Error if n < 2 # need continuation byte
c1 = s[i+1].o... | [
"def",
"ucharcopy",
"(",
"t",
",",
"s",
",",
"i",
")",
"n",
"=",
"s",
".",
"length",
"-",
"i",
"raise",
"Utf8Error",
"if",
"n",
"<",
"1",
"c0",
"=",
"s",
"[",
"i",
"]",
".",
"ord",
"# 1-byte, 7-bit sequence?",
"if",
"c0",
"<",
"Utagx",
"t",
"."... | Copies the valid UTF-8 bytes of a single character
from string s at position i to I/O object t, and
returns the number of bytes copied.
If no valid UTF-8 char exists at position i,
ucharcopy writes Ustrerr and returns 1. | [
"Copies",
"the",
"valid",
"UTF",
"-",
"8",
"bytes",
"of",
"a",
"single",
"character",
"from",
"string",
"s",
"at",
"position",
"i",
"to",
"I",
"/",
"O",
"object",
"t",
"and",
"returns",
"the",
"number",
"of",
"bytes",
"copied",
".",
"If",
"no",
"vali... | e7a36afa436fcc59b6945f68dbc08f1076e65585 | https://github.com/rails/spring/blob/e7a36afa436fcc59b6945f68dbc08f1076e65585/lib/spring/json.rb#L526-L588 | train | Copy a character sequence into a byte sequence. | [
30522,
13366,
15384,
8167,
3597,
7685,
1006,
1056,
1010,
1055,
1010,
1045,
1007,
1050,
1027,
1055,
1012,
3091,
1011,
1045,
5333,
21183,
2546,
2620,
2121,
29165,
2065,
1050,
1026,
1015,
1039,
2692,
1027,
1055,
1031,
1045,
1033,
1012,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_websearch/lib/1.0/generated/azure_cognitiveservices_websearch/web.rb | Azure::CognitiveServices::WebSearch::V1_0.Web.search | def search(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, answer_count:nil, country_code:nil, count:nil, freshness:nil, market:'en-us', offset:nil, promote:nil, response_filter:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:... | ruby | def search(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, answer_count:nil, country_code:nil, count:nil, freshness:nil, market:'en-us', offset:nil, promote:nil, response_filter:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:... | [
"def",
"search",
"(",
"query",
",",
"accept_language",
":",
"nil",
",",
"pragma",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"answer_count",
":",
"nil",
",",
... | The Web Search API lets you send a search query to Bing and get back search
results that include links to webpages, images, and more.
@param query [String] The user's search query term. The term may not be
empty. The term may contain Bing Advanced Operators. For example, to limit
results to a specific domain, use ... | [
"The",
"Web",
"Search",
"API",
"lets",
"you",
"send",
"a",
"search",
"query",
"to",
"Bing",
"and",
"get",
"back",
"search",
"results",
"that",
"include",
"links",
"to",
"webpages",
"images",
"and",
"more",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_websearch/lib/1.0/generated/azure_cognitiveservices_websearch/web.rb#L253-L256 | train | Search for a given search query. | [
30522,
13366,
3945,
1006,
23032,
1010,
5138,
1035,
2653,
1024,
9152,
2140,
1010,
10975,
8490,
2863,
1024,
9152,
2140,
1010,
5310,
1035,
4005,
1024,
9152,
2140,
1010,
7396,
1035,
8909,
1024,
9152,
2140,
1010,
7396,
1035,
12997,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.logger | def logger
unless @logger
if ENV["VERBOSE"]
@logger = Logger.new(STDOUT)
else
# Log to file by default
path = "/tmp/spaceship#{Time.now.to_i}_#{Process.pid}_#{Thread.current.object_id}.log"
@logger = Logger.new(path)
end
@logger.formatter = ... | ruby | def logger
unless @logger
if ENV["VERBOSE"]
@logger = Logger.new(STDOUT)
else
# Log to file by default
path = "/tmp/spaceship#{Time.now.to_i}_#{Process.pid}_#{Thread.current.object_id}.log"
@logger = Logger.new(path)
end
@logger.formatter = ... | [
"def",
"logger",
"unless",
"@logger",
"if",
"ENV",
"[",
"\"VERBOSE\"",
"]",
"@logger",
"=",
"Logger",
".",
"new",
"(",
"STDOUT",
")",
"else",
"# Log to file by default",
"path",
"=",
"\"/tmp/spaceship#{Time.now.to_i}_#{Process.pid}_#{Thread.current.object_id}.log\"",
"@lo... | @!group Request Logger
The logger in which all requests are logged
/tmp/spaceship[time]_[pid]_["threadid"].log by default | [
"@!group",
"Request",
"Logger"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L235-L252 | train | Returns a logger object for this object. | [
30522,
13366,
8833,
4590,
4983,
1030,
8833,
4590,
2065,
4372,
2615,
1031,
1000,
12034,
9232,
1000,
1033,
1030,
8833,
4590,
1027,
8833,
4590,
1012,
2047,
1006,
2358,
26797,
2102,
1007,
2842,
1001,
8833,
2000,
5371,
2011,
12398,
4130,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/mfa_device.rb | Aws::IAM.MfaDevice.associate | def associate(options = {})
options = options.merge(
user_name: @user_name,
serial_number: @serial_number
)
resp = @client.enable_mfa_device(options)
resp.data
end | ruby | def associate(options = {})
options = options.merge(
user_name: @user_name,
serial_number: @serial_number
)
resp = @client.enable_mfa_device(options)
resp.data
end | [
"def",
"associate",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@user_name",
",",
"serial_number",
":",
"@serial_number",
")",
"resp",
"=",
"@client",
".",
"enable_mfa_device",
"(",
"options",
")",
"... | @!group Actions
@example Request syntax with placeholder values
mfa_device.associate({
authentication_code_1: "authenticationCodeType", # required
authentication_code_2: "authenticationCodeType", # required
})
@param [Hash] options ({})
@option options [required, String] :authentication_code_1
An... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/mfa_device.rb#L212-L219 | train | Enable the MFA device with the specified user name and serial number | [
30522,
13366,
5482,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
5310,
1035,
2171,
1010,
7642,
1035,
2193,
1024,
1030,
7642,
1035,
2193,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/chef-zero | lib/chef_zero/rest_base.rb | ChefZero.RestBase.build_uri | def build_uri(base_uri, rest_path)
if server.options[:single_org]
# Strip off /organizations/chef if we are in single org mode
if rest_path[0..1] != [ "organizations", server.options[:single_org] ]
raise "Unexpected URL #{rest_path[0..1]} passed to build_uri in single org mode"
e... | ruby | def build_uri(base_uri, rest_path)
if server.options[:single_org]
# Strip off /organizations/chef if we are in single org mode
if rest_path[0..1] != [ "organizations", server.options[:single_org] ]
raise "Unexpected URL #{rest_path[0..1]} passed to build_uri in single org mode"
e... | [
"def",
"build_uri",
"(",
"base_uri",
",",
"rest_path",
")",
"if",
"server",
".",
"options",
"[",
":single_org",
"]",
"# Strip off /organizations/chef if we are in single org mode",
"if",
"rest_path",
"[",
"0",
"..",
"1",
"]",
"!=",
"[",
"\"organizations\"",
",",
"... | To be called from inside rest endpoints | [
"To",
"be",
"called",
"from",
"inside",
"rest",
"endpoints"
] | 5873d906942770a34f0cf0fed05973ec3240a275 | https://github.com/chef/chef-zero/blob/5873d906942770a34f0cf0fed05973ec3240a275/lib/chef_zero/rest_base.rb#L273-L284 | train | Build the URI for the given base_uri and rest_path | [
30522,
13366,
3857,
1035,
24471,
2072,
1006,
2918,
1035,
24471,
2072,
1010,
2717,
1035,
4130,
1007,
2065,
8241,
1012,
7047,
1031,
1024,
2309,
1035,
8917,
1033,
1001,
6167,
2125,
1013,
4411,
1013,
10026,
2065,
2057,
2024,
1999,
2309,
8917,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.text_area | def text_area(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'text_area_for', &block)
define_method(name) do
return platform.text_area_value_for identifier.clone unless block_given?
self.send("#{name}_element").value
end
define_method("#{name}=") do |v... | ruby | def text_area(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'text_area_for', &block)
define_method(name) do
return platform.text_area_value_for identifier.clone unless block_given?
self.send("#{name}_element").value
end
define_method("#{name}=") do |v... | [
"def",
"text_area",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'text_area_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"retur... | adds four methods to the page object - one to set text in a text area,
another to retrieve text from a text area, another to return the text
area element, and another to check the text area's existence.
@example
text_area(:address, :id => "address")
# will generate 'address', 'address=', 'address_element',
... | [
"adds",
"four",
"methods",
"to",
"the",
"page",
"object",
"-",
"one",
"to",
"set",
"text",
"in",
"a",
"text",
"area",
"another",
"to",
"retrieve",
"text",
"from",
"a",
"text",
"area",
"another",
"to",
"return",
"the",
"text",
"area",
"element",
"and",
... | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L244-L254 | train | Define a text area method. | [
30522,
13366,
3793,
1035,
2181,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
3793,
1035,
2181,
1035,
2005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.create_or_update_virtual_network_rule_with_http_info | def create_or_update_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
... | ruby | def create_or_update_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
... | [
"def",
"create_or_update_virtual_network_rule_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"virtual_network_rule_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_virtual_network_rule_async",
"(",
"resource_group_name",
... | Creates or updates an VirtualNetworkRule for a Namespace.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param namespace_name [String] The Namespace name
@param virtual_network_rule_name [String] The Virtual Network Rule name.
@param parameters [VirtualNetworkRule] ... | [
"Creates",
"or",
"updates",
"an",
"VirtualNetworkRule",
"for",
"a",
"Namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L1066-L1068 | train | Creates or updates a virtual network rule. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
7484,
1035,
2897,
1035,
3627,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
3627,
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... |
appium/ruby_lib | lib/appium_lib/ios/element/textfield.rb | Appium.Ios.last_textfield | def last_textfield
result = eles_by_json(_textfield_visible).last
raise _no_such_element if result.nil?
result
end | ruby | def last_textfield
result = eles_by_json(_textfield_visible).last
raise _no_such_element if result.nil?
result
end | [
"def",
"last_textfield",
"result",
"=",
"eles_by_json",
"(",
"_textfield_visible",
")",
".",
"last",
"raise",
"_no_such_element",
"if",
"result",
".",
"nil?",
"result",
"end"
] | Find the last TextField.
@return [TextField] | [
"Find",
"the",
"last",
"TextField",
"."
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/textfield.rb#L75-L80 | train | Returns the last element in the textfield visible list. | [
30522,
13366,
2197,
1035,
3793,
3790,
2765,
1027,
3449,
2229,
1035,
2011,
1035,
1046,
3385,
1006,
1035,
3793,
3790,
1035,
5710,
1007,
1012,
2197,
5333,
1035,
2053,
1035,
2107,
1035,
5783,
2065,
2765,
1012,
9152,
2140,
1029,
2765,
2203,
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... |
kmuto/review | lib/epubmaker/producer.rb | EPUBMaker.Producer.cover | def cover(wobj)
type = @config['epubversion'] >= 3 ? 'cover' : nil
s = @epub.cover(type)
if !s.nil? && !wobj.nil?
wobj.puts s
end
end | ruby | def cover(wobj)
type = @config['epubversion'] >= 3 ? 'cover' : nil
s = @epub.cover(type)
if !s.nil? && !wobj.nil?
wobj.puts s
end
end | [
"def",
"cover",
"(",
"wobj",
")",
"type",
"=",
"@config",
"[",
"'epubversion'",
"]",
">=",
"3",
"?",
"'cover'",
":",
"nil",
"s",
"=",
"@epub",
".",
"cover",
"(",
"type",
")",
"if",
"!",
"s",
".",
"nil?",
"&&",
"!",
"wobj",
".",
"nil?",
"wobj",
... | Write cover file to IO object +wobj+.
If Producer#config["coverimage"] is defined, it will be used for
the cover image. | [
"Write",
"cover",
"file",
"to",
"IO",
"object",
"+",
"wobj",
"+",
".",
"If",
"Producer#config",
"[",
"coverimage",
"]",
"is",
"defined",
"it",
"will",
"be",
"used",
"for",
"the",
"cover",
"image",
"."
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/producer.rb#L133-L139 | train | This method is used to cover the EPUB file. | [
30522,
13366,
3104,
1006,
24185,
2497,
3501,
1007,
2828,
1027,
1030,
9530,
8873,
2290,
1031,
1005,
4958,
12083,
27774,
1005,
1033,
1028,
1027,
1017,
1029,
1005,
3104,
1005,
1024,
9152,
2140,
1055,
1027,
1030,
4958,
12083,
1012,
3104,
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... |
elastic/elasticsearch-rails | elasticsearch-model/examples/activerecord_associations.rb | Searchable.Indexing.as_indexed_json | def as_indexed_json(options={})
self.as_json(
include: { categories: { only: :title},
authors: { methods: [:full_name, :department], only: [:full_name, :department] },
comments: { only: :text }
})
end | ruby | def as_indexed_json(options={})
self.as_json(
include: { categories: { only: :title},
authors: { methods: [:full_name, :department], only: [:full_name, :department] },
comments: { only: :text }
})
end | [
"def",
"as_indexed_json",
"(",
"options",
"=",
"{",
"}",
")",
"self",
".",
"as_json",
"(",
"include",
":",
"{",
"categories",
":",
"{",
"only",
":",
":title",
"}",
",",
"authors",
":",
"{",
"methods",
":",
"[",
":full_name",
",",
":department",
"]",
... | Customize the JSON serialization for Elasticsearch | [
"Customize",
"the",
"JSON",
"serialization",
"for",
"Elasticsearch"
] | a67ecc1afc3a0615efa7ca6daecbb9132f61c318 | https://github.com/elastic/elasticsearch-rails/blob/a67ecc1afc3a0615efa7ca6daecbb9132f61c318/elasticsearch-model/examples/activerecord_associations.rb#L102-L108 | train | Returns a JSON representation of the object as indexed. | [
30522,
13366,
2004,
1035,
25331,
1035,
1046,
3385,
1006,
7047,
1027,
1063,
1065,
1007,
2969,
1012,
2004,
1035,
1046,
3385,
1006,
2421,
1024,
1063,
7236,
1024,
1063,
2069,
1024,
1024,
2516,
1065,
1010,
6048,
1024,
1063,
4725,
1024,
1031,
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... |
hashicorp/vagrant | lib/vagrant/box_collection.rb | Vagrant.BoxCollection.add | def add(path, name, version, **opts)
providers = opts[:providers]
providers = Array(providers) if providers
provider = nil
# A helper to check if a box exists. We store this in a variable
# since we call it multiple times.
check_box_exists = lambda do |box_formats|
box = fin... | ruby | def add(path, name, version, **opts)
providers = opts[:providers]
providers = Array(providers) if providers
provider = nil
# A helper to check if a box exists. We store this in a variable
# since we call it multiple times.
check_box_exists = lambda do |box_formats|
box = fin... | [
"def",
"add",
"(",
"path",
",",
"name",
",",
"version",
",",
"**",
"opts",
")",
"providers",
"=",
"opts",
"[",
":providers",
"]",
"providers",
"=",
"Array",
"(",
"providers",
")",
"if",
"providers",
"provider",
"=",
"nil",
"# A helper to check if a box exist... | Initializes the collection.
@param [Pathname] directory The directory that contains the collection
of boxes.
This adds a new box to the system.
There are some exceptional cases:
* BoxAlreadyExists - The box you're attempting to add already exists.
* BoxProviderDoesntMatch - If the given box provider doesn't m... | [
"Initializes",
"the",
"collection",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/box_collection.rb#L77-L208 | train | Add a box to the collection | [
30522,
13366,
5587,
1006,
4130,
1010,
2171,
1010,
2544,
1010,
1008,
1008,
23569,
2015,
1007,
11670,
1027,
23569,
2015,
1031,
1024,
11670,
1033,
11670,
1027,
9140,
1006,
11670,
1007,
2065,
11670,
10802,
1027,
9152,
2140,
1001,
30524,
3482,
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 | 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.disable_node | def disable_node(node_name, deactivation_intent_description, timeout:60, custom_headers:nil)
response = disable_node_async(node_name, deactivation_intent_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def disable_node(node_name, deactivation_intent_description, timeout:60, custom_headers:nil)
response = disable_node_async(node_name, deactivation_intent_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"disable_node",
"(",
"node_name",
",",
"deactivation_intent_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"disable_node_async",
"(",
"node_name",
",",
"deactivation_intent_description",
",",
"timeout",
":",
... | Deactivate a Service Fabric cluster node with the specified deactivation
intent.
Deactivate a Service Fabric cluster node with the specified deactivation
intent. Once the deactivation is in progress, the deactivation intent can be
increased, but not decreased (for example, a node which is was deactivated
with the... | [
"Deactivate",
"a",
"Service",
"Fabric",
"cluster",
"node",
"with",
"the",
"specified",
"deactivation",
"intent",
"."
] | 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#L4174-L4177 | train | Disables a node. | [
30522,
13366,
4487,
19150,
1035,
13045,
1006,
13045,
1035,
2171,
1010,
26709,
6593,
25761,
1035,
7848,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4487,
19150,
1035,
13045,
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 | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_custom_prebuilt_entity_role | def update_custom_prebuilt_entity_role(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:nil)
response = update_custom_prebuilt_entity_role_async(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:custom_headers).value!
response.body unless resp... | ruby | def update_custom_prebuilt_entity_role(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:nil)
response = update_custom_prebuilt_entity_role_async(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:custom_headers).value!
response.body unless resp... | [
"def",
"update_custom_prebuilt_entity_role",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"entity_role_update_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_custom_prebuilt_entity_role_async",
"(",
"app_id",
",",
"v... | Update a role for a given prebuilt entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity ID.
@param role_id The entity role ID.
@param entity_role_update_object [EntityRoleUpdateObject] The new entity
role.
@param custom_... | [
"Update",
"a",
"role",
"for",
"a",
"given",
"prebuilt",
"entity",
"in",
"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#L11068-L11071 | train | Updates a prebuilt entity role. | [
30522,
13366,
10651,
1035,
7661,
1035,
3653,
8569,
4014,
2102,
1035,
9178,
1035,
2535,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
9178,
1035,
2535,
1035,
10651,
1035,
4874,
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_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb | Azure::Kusto::Mgmt::V2018_09_07_privatepreview.Databases.check_name_availability_with_http_info | def check_name_availability_with_http_info(resource_group_name, cluster_name, database_name, custom_headers:nil)
check_name_availability_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
end | ruby | def check_name_availability_with_http_info(resource_group_name, cluster_name, database_name, custom_headers:nil)
check_name_availability_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
end | [
"def",
"check_name_availability_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"custom_headers",
":",
"nil",
")",
"check_name_availability_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"cust... | Checks that the database name is valid and is not already in use.
@param resource_group_name [String] The name of the resource group containing
the Kusto cluster.
@param cluster_name [String] The name of the Kusto cluster.
@param database_name [DatabaseCheckNameRequest] The name of the database.
@param custom_hea... | [
"Checks",
"that",
"the",
"database",
"name",
"is",
"valid",
"and",
"is",
"not",
"already",
"in",
"use",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb#L55-L57 | train | Checks the name availability of the database. | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4638,
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 | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.get_pattern_any_entity_role | def get_pattern_any_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil)
response = get_pattern_any_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_pattern_any_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil)
response = get_pattern_any_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_pattern_any_entity_role",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_pattern_any_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id"... | Get one role for a given Pattern.any entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity ID.
@param role_id entity role ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HT... | [
"Get",
"one",
"role",
"for",
"a",
"given",
"Pattern",
".",
"any",
"entity",
"in",
"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#L10342-L10345 | train | Gets the pattern any entity role. | [
30522,
13366,
2131,
1035,
5418,
1035,
2151,
1035,
9178,
1035,
2535,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.