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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mongodb/mongo-ruby-driver | lib/mongo/server_selector.rb | Mongo.ServerSelector.get | def get(preference = {})
return preference if PREFERENCES.values.include?(preference.class)
Mongo::Lint.validate_underscore_read_preference(preference)
PREFERENCES.fetch((preference[:mode] || :primary).to_sym).new(preference)
end | ruby | def get(preference = {})
return preference if PREFERENCES.values.include?(preference.class)
Mongo::Lint.validate_underscore_read_preference(preference)
PREFERENCES.fetch((preference[:mode] || :primary).to_sym).new(preference)
end | [
"def",
"get",
"(",
"preference",
"=",
"{",
"}",
")",
"return",
"preference",
"if",
"PREFERENCES",
".",
"values",
".",
"include?",
"(",
"preference",
".",
"class",
")",
"Mongo",
"::",
"Lint",
".",
"validate_underscore_read_preference",
"(",
"preference",
")",
... | Create a server selector object.
@example Get a server selector object for selecting a secondary with
specific tag sets.
Mongo::ServerSelector.get(:mode => :secondary, :tag_sets => [{'dc' => 'nyc'}])
@param [ Hash ] preference The server preference.
@since 2.0.0 | [
"Create",
"a",
"server",
"selector",
"object",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/server_selector.rb#L72-L76 | train | Get the current preference | [
30522,
13366,
2131,
1006,
12157,
1027,
1063,
1065,
1007,
2709,
12157,
2065,
18394,
1012,
30524,
2890,
1035,
3191,
1035,
12157,
1006,
12157,
1007,
18394,
1012,
18584,
1006,
1006,
12157,
1031,
1024,
5549,
1033,
1064,
1064,
1024,
3078,
1007,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-06-01/generated/azure_mgmt_compute/gallery_images.rb | Azure::Compute::Mgmt::V2018_06_01.GalleryImages.list_by_gallery_as_lazy | def list_by_gallery_as_lazy(resource_group_name, gallery_name, custom_headers:nil)
response = list_by_gallery_async(resource_group_name, gallery_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
lis... | ruby | def list_by_gallery_as_lazy(resource_group_name, gallery_name, custom_headers:nil)
response = list_by_gallery_async(resource_group_name, gallery_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
lis... | [
"def",
"list_by_gallery_as_lazy",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_gallery_async",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | List gallery Image Definitions in a gallery.
@param resource_group_name [String] The name of the resource group.
@param gallery_name [String] The name of the Shared Image Gallery from which
Image Definitions are to be listed.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be add... | [
"List",
"gallery",
"Image",
"Definitions",
"in",
"a",
"gallery",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-06-01/generated/azure_mgmt_compute/gallery_images.rb#L654-L663 | train | Gets the list of all the image images in a gallery. | [
30522,
13366,
2862,
1035,
2011,
1035,
3916,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3916,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
3916,
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... |
meew0/discordrb | lib/discordrb/events/message.rb | Discordrb::Events.MessageEvent.send_file | def send_file(file, caption: nil, filename: nil, spoiler: nil)
@message.channel.send_file(file, caption: caption, filename: filename, spoiler: spoiler)
end | ruby | def send_file(file, caption: nil, filename: nil, spoiler: nil)
@message.channel.send_file(file, caption: caption, filename: filename, spoiler: spoiler)
end | [
"def",
"send_file",
"(",
"file",
",",
"caption",
":",
"nil",
",",
"filename",
":",
"nil",
",",
"spoiler",
":",
"nil",
")",
"@message",
".",
"channel",
".",
"send_file",
"(",
"file",
",",
"caption",
":",
"caption",
",",
"filename",
":",
"filename",
",",... | Sends file with a caption to the channel this message was sent in, right now.
It is usually preferable to use {#<<} and {#attach_file} instead
because it avoids rate limiting problems
@param file [File] The file to send to the channel
@param caption [String] The caption attached to the file
@param filename [String... | [
"Sends",
"file",
"with",
"a",
"caption",
"to",
"the",
"channel",
"this",
"message",
"was",
"sent",
"in",
"right",
"now",
".",
"It",
"is",
"usually",
"preferable",
"to",
"use",
"{",
"#<<",
"}",
"and",
"{",
"#attach_file",
"}",
"instead",
"because",
"it",
... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/events/message.rb#L133-L135 | train | Send a file to the channel | [
30522,
13366,
4604,
1035,
5371,
1006,
5371,
1010,
14408,
3258,
1024,
9152,
2140,
1010,
5371,
18442,
1024,
9152,
2140,
1010,
27594,
2121,
1024,
9152,
2140,
1007,
1030,
4471,
1012,
3149,
1012,
4604,
1035,
5371,
1006,
5371,
1010,
14408,
3258,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_domains | def get_domains(custom_headers:nil)
response = get_domains_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_domains(custom_headers:nil)
response = get_domains_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_domains",
"(",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_domains_async",
"(",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | Get a list of the available domains.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] operation results. | [
"Get",
"a",
"list",
"of",
"the",
"available",
"domains",
"."
] | 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#L122-L125 | train | Gets the list of domains. | [
30522,
13366,
2131,
1035,
13100,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13100,
1035,
2004,
6038,
2278,
1006,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/pools.rb | Azure::NetApp::Mgmt::V2017_08_15_preview.Pools.get_with_http_info | def get_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
get_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
get_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Get a capacity pool
@param resource_group_name [String] The name of the resource group.
@param account_name [String] The name of the NetApp account
@param pool_name [String] The name of the capacity pool
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request... | [
"Get",
"a",
"capacity",
"pool"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/pools.rb#L146-L148 | train | Gets the specified pool s non - existent content. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4770,
1035,
2171,
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... |
tongueroo/jets | lib/jets/resource/lambda/function.rb | Jets::Resource::Lambda.Function.finalize_properties! | def finalize_properties!(props)
handler = full_handler(props)
runtime = get_runtime(props)
managed = {
handler: handler,
runtime: runtime,
description: description,
}
managed[:function_name] = function_name if function_name
layers = get_layers(runtime)
m... | ruby | def finalize_properties!(props)
handler = full_handler(props)
runtime = get_runtime(props)
managed = {
handler: handler,
runtime: runtime,
description: description,
}
managed[:function_name] = function_name if function_name
layers = get_layers(runtime)
m... | [
"def",
"finalize_properties!",
"(",
"props",
")",
"handler",
"=",
"full_handler",
"(",
"props",
")",
"runtime",
"=",
"get_runtime",
"(",
"props",
")",
"managed",
"=",
"{",
"handler",
":",
"handler",
",",
"runtime",
":",
"runtime",
",",
"description",
":",
... | Properties managed by Jets with merged with finality. | [
"Properties",
"managed",
"by",
"Jets",
"with",
"merged",
"with",
"finality",
"."
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/resource/lambda/function.rb#L124-L136 | train | Finalizes the properties of the object. | [
30522,
13366,
2345,
4697,
1035,
5144,
999,
1006,
24387,
1007,
28213,
1027,
2440,
1035,
28213,
1006,
24387,
1007,
2448,
7292,
1027,
2131,
1035,
2448,
7292,
1006,
24387,
1007,
3266,
1027,
1063,
28213,
1024,
28213,
1010,
2448,
7292,
1024,
2448... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/fields/common_address_field.rb | Mail.CommonAddressField.decoded_group_addresses | def decoded_group_addresses
groups.map { |k,v| v.map { |a| a.decoded } }.flatten
end | ruby | def decoded_group_addresses
groups.map { |k,v| v.map { |a| a.decoded } }.flatten
end | [
"def",
"decoded_group_addresses",
"groups",
".",
"map",
"{",
"|",
"k",
",",
"v",
"|",
"v",
".",
"map",
"{",
"|",
"a",
"|",
"a",
".",
"decoded",
"}",
"}",
".",
"flatten",
"end"
] | Returns a list of decoded group addresses | [
"Returns",
"a",
"list",
"of",
"decoded",
"group",
"addresses"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/fields/common_address_field.rb#L80-L82 | train | Returns an array of decoded group addresses in the order they were added to the group. | [
30522,
13366,
21933,
5732,
1035,
2177,
1035,
11596,
2967,
1012,
4949,
1063,
1064,
1047,
1010,
1058,
1064,
1058,
1012,
4949,
1063,
1064,
1037,
1064,
1037,
1012,
21933,
5732,
1065,
1065,
1012,
4257,
6528,
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 | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.RunbookOperations.delete_with_http_info | def delete_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"custom_headers",
... | Delete the runbook by name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param runbook_name [String] The runbook name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to ... | [
"Delete",
"the",
"runbook",
"by",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb#L494-L496 | train | Deletes a runbook. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
2448,
8654,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.render_tag | def render_tag(tags, name, value, name_key: nil, value_key: :content)
name_key ||= configured_name_key(name)
tags << Tag.new(:meta, name_key => name.to_s, value_key => value) if value.present?
end | ruby | def render_tag(tags, name, value, name_key: nil, value_key: :content)
name_key ||= configured_name_key(name)
tags << Tag.new(:meta, name_key => name.to_s, value_key => value) if value.present?
end | [
"def",
"render_tag",
"(",
"tags",
",",
"name",
",",
"value",
",",
"name_key",
":",
"nil",
",",
"value_key",
":",
":content",
")",
"name_key",
"||=",
"configured_name_key",
"(",
"name",
")",
"tags",
"<<",
"Tag",
".",
"new",
"(",
":meta",
",",
"name_key",
... | Recursive method to process a hash with meta tags
@param [Array<Tag>] tags a buffer object to store tag in.
@param [String, Symbol] name a Hash or a String to render as meta tag.
@param [String, Symbol] value text content or a symbol reference to
top-level meta tag. | [
"Recursive",
"method",
"to",
"process",
"a",
"hash",
"with",
"meta",
"tags"
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L247-L250 | train | Render a meta tag | [
30522,
13366,
17552,
1035,
6415,
1006,
22073,
1010,
2171,
1010,
3643,
1010,
2171,
1035,
3145,
1024,
9152,
2140,
1010,
3643,
1035,
3145,
1024,
1024,
4180,
1007,
2171,
1035,
3145,
1064,
1064,
1027,
26928,
1035,
2171,
1035,
3145,
1006,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.network_acls | def network_acls(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_network_acls(options)
resp.each_page do |page|
batch = []
page.data.network_acls.each do |n|
batch << NetworkAcl.new(
id: n.network_acl_id,
data: n,
... | ruby | def network_acls(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_network_acls(options)
resp.each_page do |page|
batch = []
page.data.network_acls.each do |n|
batch << NetworkAcl.new(
id: n.network_acl_id,
data: n,
... | [
"def",
"network_acls",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"resp",
"=",
"@client",
".",
"describe_network_acls",
"(",
"options",
")",
"resp",
".",
"each_page",
"do",
"|",
"page",
"|",
"batc... | @example Request syntax with placeholder values
network_acls = ec2.network_acls({
filters: [
{
name: "String",
values: ["String"],
},
],
dry_run: false,
network_acl_ids: ["String"],
})
@param [Hash] options ({})
@option options [Array<Types::Filter>] :filters... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L2018-L2034 | train | Returns an array of NetworkAcl objects | [
30522,
13366,
2897,
1035,
9353,
4877,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
2897,
1035,
9353,
4877,
1006,
7047,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dry-rb/dry-initializer | lib/dry/initializer/config.rb | Dry::Initializer.Config.inch | def inch
line = Builders::Signature[self]
line = line.gsub("__dry_initializer_options__", "options")
lines = ["@!method initialize(#{line})"]
lines += ["Initializes an instance of #{extended_class}"]
lines += definitions.values.map(&:inch)
lines += ["@return [#{extended_class}]"... | ruby | def inch
line = Builders::Signature[self]
line = line.gsub("__dry_initializer_options__", "options")
lines = ["@!method initialize(#{line})"]
lines += ["Initializes an instance of #{extended_class}"]
lines += definitions.values.map(&:inch)
lines += ["@return [#{extended_class}]"... | [
"def",
"inch",
"line",
"=",
"Builders",
"::",
"Signature",
"[",
"self",
"]",
"line",
"=",
"line",
".",
"gsub",
"(",
"\"__dry_initializer_options__\"",
",",
"\"options\"",
")",
"lines",
"=",
"[",
"\"@!method initialize(#{line})\"",
"]",
"lines",
"+=",
"[",
"\"I... | Human-readable representation of configured params and options
@return [String] | [
"Human",
"-",
"readable",
"representation",
"of",
"configured",
"params",
"and",
"options"
] | 422d331468602ff0d3543fbb336b784343e5cc31 | https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/config.rb#L115-L123 | train | Inch the signature of the method | [
30522,
13366,
4960,
2240,
1027,
16472,
1024,
1024,
8085,
1031,
2969,
1033,
2240,
1027,
2240,
1012,
28177,
12083,
1006,
1000,
1035,
1035,
4318,
1035,
3988,
17629,
1035,
7047,
1035,
1035,
1000,
1010,
1000,
7047,
1000,
1007,
3210,
1027,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_controller/metal/data_streaming.rb | ActionController.DataStreaming.send_data | def send_data(data, options = {}) #:doc:
send_file_headers! options
render options.slice(:status, :content_type).merge(body: data)
end | ruby | def send_data(data, options = {}) #:doc:
send_file_headers! options
render options.slice(:status, :content_type).merge(body: data)
end | [
"def",
"send_data",
"(",
"data",
",",
"options",
"=",
"{",
"}",
")",
"#:doc:",
"send_file_headers!",
"options",
"render",
"options",
".",
"slice",
"(",
":status",
",",
":content_type",
")",
".",
"merge",
"(",
"body",
":",
"data",
")",
"end"
] | Sends the given binary data to the browser. This method is similar to
<tt>render plain: data</tt>, but also allows you to specify whether
the browser should display the response as a file attachment (i.e. in a
download dialog) or as inline data. You may also set the content type,
the file name, and other things.
... | [
"Sends",
"the",
"given",
"binary",
"data",
"to",
"the",
"browser",
".",
"This",
"method",
"is",
"similar",
"to",
"<tt",
">",
"render",
"plain",
":",
"data<",
"/",
"tt",
">",
"but",
"also",
"allows",
"you",
"to",
"specify",
"whether",
"the",
"browser",
... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/data_streaming.rb#L109-L112 | train | Send data to the client | [
30522,
13366,
4604,
1035,
2951,
1006,
2951,
1010,
7047,
1027,
1063,
1065,
1007,
1001,
1024,
9986,
1024,
4604,
1035,
5371,
30524,
2828,
1007,
1012,
13590,
1006,
2303,
1024,
2951,
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,
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... |
httprb/http | lib/http/headers.rb | HTTP.Headers.normalize_header | def normalize_header(name)
return name if name =~ CANONICAL_NAME_RE
normalized = name.split(/[\-_]/).each(&:capitalize!).join("-")
return normalized if normalized =~ COMPLIANT_NAME_RE
raise HeaderError, "Invalid HTTP header field name: #{name.inspect}"
end | ruby | def normalize_header(name)
return name if name =~ CANONICAL_NAME_RE
normalized = name.split(/[\-_]/).each(&:capitalize!).join("-")
return normalized if normalized =~ COMPLIANT_NAME_RE
raise HeaderError, "Invalid HTTP header field name: #{name.inspect}"
end | [
"def",
"normalize_header",
"(",
"name",
")",
"return",
"name",
"if",
"name",
"=~",
"CANONICAL_NAME_RE",
"normalized",
"=",
"name",
".",
"split",
"(",
"/",
"\\-",
"/",
")",
".",
"each",
"(",
":capitalize!",
")",
".",
"join",
"(",
"\"-\"",
")",
"return",
... | Transforms `name` to canonical HTTP header capitalization
@param [String] name
@raise [HeaderError] if normalized name does not
match {HEADER_NAME_RE}
@return [String] canonical HTTP header name | [
"Transforms",
"name",
"to",
"canonical",
"HTTP",
"header",
"capitalization"
] | f37a10ea4fab3ee411907ea2e4251ddf0ca33a93 | https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/headers.rb#L203-L211 | train | Normalize a header name | [
30522,
13366,
3671,
4697,
1035,
20346,
1006,
2171,
1007,
2709,
2171,
2065,
2171,
1027,
1066,
18562,
1035,
2171,
1035,
2128,
3671,
3550,
1027,
2171,
1012,
3975,
1006,
1013,
1031,
1032,
1011,
1035,
1033,
1013,
1007,
1012,
2169,
1006,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
CocoaPods/Xcodeproj | lib/xcodeproj/config.rb | Xcodeproj.Config.merge! | def merge!(xcconfig)
if xcconfig.is_a? Config
merge_attributes!(xcconfig.attributes)
other_linker_flags.keys.each do |key|
other_linker_flags[key].merge(xcconfig.other_linker_flags[key])
end
else
merge_attributes!(xcconfig.to_hash)
if flags = attributes.dele... | ruby | def merge!(xcconfig)
if xcconfig.is_a? Config
merge_attributes!(xcconfig.attributes)
other_linker_flags.keys.each do |key|
other_linker_flags[key].merge(xcconfig.other_linker_flags[key])
end
else
merge_attributes!(xcconfig.to_hash)
if flags = attributes.dele... | [
"def",
"merge!",
"(",
"xcconfig",
")",
"if",
"xcconfig",
".",
"is_a?",
"Config",
"merge_attributes!",
"(",
"xcconfig",
".",
"attributes",
")",
"other_linker_flags",
".",
"keys",
".",
"each",
"do",
"|",
"key",
"|",
"other_linker_flags",
"[",
"key",
"]",
".",
... | @!group Merging
-------------------------------------------------------------------------
Merges the given xcconfig representation in the receiver.
@example
config = Config.new('PODS_ROOT' => '"$(SRCROOT)/Pods"', 'OTHER_LDFLAGS' => '-lxml2')
config.merge!('OTHER_LDFLAGS' => '-lz', 'HEADER_SEARCH_PATHS' => '"$... | [
"@!group",
"Merging",
"-------------------------------------------------------------------------",
"Merges",
"the",
"given",
"xcconfig",
"representation",
"in",
"the",
"receiver",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/config.rb#L205-L220 | train | Merge the attributes of the other_linker_flags with the attributes of the other_linker_flags | [
30522,
13366,
13590,
999,
1006,
1060,
21408,
2078,
8873,
2290,
1007,
2065,
1060,
21408,
2078,
8873,
2290,
1012,
2003,
1035,
1037,
1029,
9530,
8873,
2290,
13590,
1035,
12332,
999,
1006,
1060,
21408,
2078,
8873,
2290,
1012,
12332,
1007,
2060,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_cluster_upgrade_progress | def get_cluster_upgrade_progress(timeout:60, custom_headers:nil)
response = get_cluster_upgrade_progress_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_cluster_upgrade_progress(timeout:60, custom_headers:nil)
response = get_cluster_upgrade_progress_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_cluster_upgrade_progress",
"(",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_cluster_upgrade_progress_async",
"(",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | Gets the progress of the current cluster upgrade.
Gets the current progress of the ongoing cluster upgrade. If no upgrade is
currently in progress, gets the last state of the previous cluster upgrade.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the t... | [
"Gets",
"the",
"progress",
"of",
"the",
"current",
"cluster",
"upgrade",
"."
] | 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#L1802-L1805 | train | Gets the current cluster upgrade progress. | [
30522,
13366,
2131,
1035,
9324,
1035,
12200,
1035,
5082,
1006,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9324,
1035,
12200,
1035,
5082,
1035,
2004,
6038,
2278,
1006,
2051,
5833,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb | Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.get_with_http_info | def get_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:nil)
get_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:nil)
get_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_group_name",
",",
"server_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_grou... | Get a ServerEndpoint.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param sync_group_name [String] Name of Sync Group resource.
@param server_endpoint_name [String] Name of Server... | [
"Get",
"a",
"ServerEndpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L165-L167 | train | Gets the specified server endpoint. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-core/lib/aws-sdk-core/endpoint_cache.rb | Aws.EndpointCache.key? | def key?(key)
if @entries.key?(key) && (@entries[key].nil? || @entries[key].expired?)
self.delete(key)
end
@entries.key?(key)
end | ruby | def key?(key)
if @entries.key?(key) && (@entries[key].nil? || @entries[key].expired?)
self.delete(key)
end
@entries.key?(key)
end | [
"def",
"key?",
"(",
"key",
")",
"if",
"@entries",
".",
"key?",
"(",
"key",
")",
"&&",
"(",
"@entries",
"[",
"key",
"]",
".",
"nil?",
"||",
"@entries",
"[",
"key",
"]",
".",
"expired?",
")",
"self",
".",
"delete",
"(",
"key",
")",
"end",
"@entries... | checking whether an unexpired endpoint key exists in cache
@param [String] key
@return [Boolean] | [
"checking",
"whether",
"an",
"unexpired",
"endpoint",
"key",
"exists",
"in",
"cache"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-core/lib/aws-sdk-core/endpoint_cache.rb#L62-L67 | train | Returns true if the key exists in the cache | [
30522,
13366,
3145,
1029,
1006,
3145,
1007,
2065,
1030,
10445,
1012,
3145,
1029,
1006,
3145,
1007,
1004,
1004,
1006,
1030,
10445,
1031,
3145,
1033,
1012,
9152,
2140,
1029,
1064,
1064,
1030,
10445,
1031,
3145,
1033,
1012,
13735,
1029,
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... |
rails/rails | actionpack/lib/action_dispatch/http/request.rb | ActionDispatch.Request.POST | def POST
fetch_header("action_dispatch.request.request_parameters") do
pr = parse_formatted_parameters(params_parsers) do |params|
super || {}
end
self.request_parameters = Request::Utils.normalize_encode_params(pr)
end
rescue Rack::Utils::ParameterTypeError, Rack::Util... | ruby | def POST
fetch_header("action_dispatch.request.request_parameters") do
pr = parse_formatted_parameters(params_parsers) do |params|
super || {}
end
self.request_parameters = Request::Utils.normalize_encode_params(pr)
end
rescue Rack::Utils::ParameterTypeError, Rack::Util... | [
"def",
"POST",
"fetch_header",
"(",
"\"action_dispatch.request.request_parameters\"",
")",
"do",
"pr",
"=",
"parse_formatted_parameters",
"(",
"params_parsers",
")",
"do",
"|",
"params",
"|",
"super",
"||",
"{",
"}",
"end",
"self",
".",
"request_parameters",
"=",
... | Override Rack's POST method to support indifferent access. | [
"Override",
"Rack",
"s",
"POST",
"method",
"to",
"support",
"indifferent",
"access",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_dispatch/http/request.rb#L379-L388 | train | Get the request parameters from the header | [
30522,
13366,
2695,
18584,
1035,
20346,
1006,
1000,
2895,
1035,
18365,
1012,
5227,
1012,
5227,
1035,
11709,
1000,
1007,
2079,
10975,
1027,
11968,
3366,
1035,
4289,
3064,
1035,
11709,
1006,
11498,
5244,
1035,
11968,
8043,
2015,
1007,
2079,
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... |
samvera/hyrax | app/services/hyrax/admin_set_create_service.rb | Hyrax.AdminSetCreateService.create_default_access_for | def create_default_access_for(permission_template:, workflow:)
permission_template.access_grants.create(agent_type: 'group', agent_id: ::Ability.registered_group_name, access: Hyrax::PermissionTemplateAccess::DEPOSIT)
deposit = Sipity::Role[Hyrax::RoleRegistry::DEPOSITING]
workflow.update_respon... | ruby | def create_default_access_for(permission_template:, workflow:)
permission_template.access_grants.create(agent_type: 'group', agent_id: ::Ability.registered_group_name, access: Hyrax::PermissionTemplateAccess::DEPOSIT)
deposit = Sipity::Role[Hyrax::RoleRegistry::DEPOSITING]
workflow.update_respon... | [
"def",
"create_default_access_for",
"(",
"permission_template",
":",
",",
"workflow",
":",
")",
"permission_template",
".",
"access_grants",
".",
"create",
"(",
"agent_type",
":",
"'group'",
",",
"agent_id",
":",
"::",
"Ability",
".",
"registered_group_name",
",",
... | Gives deposit access to registered users to default AdminSet | [
"Gives",
"deposit",
"access",
"to",
"registered",
"users",
"to",
"default",
"AdminSet"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/admin_set_create_service.rb#L122-L126 | train | Create default access for a given permission template | [
30522,
13366,
3443,
1035,
12398,
1035,
3229,
1035,
2005,
1006,
6656,
1035,
23561,
1024,
1010,
2147,
12314,
1024,
1007,
6656,
1035,
23561,
1012,
3229,
1035,
8624,
1012,
3443,
1006,
4005,
1035,
2828,
1024,
1005,
2177,
1005,
1010,
4005,
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... |
mongodb/mongo-ruby-driver | lib/mongo/client.rb | Mongo.Client.database_names | def database_names(filter = {}, opts = {})
list_databases(filter, true, opts).collect{ |info| info[Database::NAME] }
end | ruby | def database_names(filter = {}, opts = {})
list_databases(filter, true, opts).collect{ |info| info[Database::NAME] }
end | [
"def",
"database_names",
"(",
"filter",
"=",
"{",
"}",
",",
"opts",
"=",
"{",
"}",
")",
"list_databases",
"(",
"filter",
",",
"true",
",",
"opts",
")",
".",
"collect",
"{",
"|",
"info",
"|",
"info",
"[",
"Database",
"::",
"NAME",
"]",
"}",
"end"
] | Get the names of all databases.
@example Get the database names.
client.database_names
@param [ Hash ] filter The filter criteria for getting a list of databases.
@param [ Hash ] opts The command options.
@return [ Array<String> ] The names of the databases.
@since 2.0.5 | [
"Get",
"the",
"names",
"of",
"all",
"databases",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/client.rb#L595-L597 | train | Returns the list of database names | [
30522,
13366,
7809,
1035,
3415,
1006,
11307,
1027,
1063,
1065,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2862,
1035,
17881,
1006,
11307,
1010,
2995,
1010,
23569,
2015,
1007,
1012,
8145,
1063,
1064,
18558,
1064,
18558,
1031,
7809,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_runs.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowRuns.cancel_with_http_info | def cancel_with_http_info(resource_group_name, workflow_name, run_name, custom_headers:nil)
cancel_async(resource_group_name, workflow_name, run_name, custom_headers:custom_headers).value!
end | ruby | def cancel_with_http_info(resource_group_name, workflow_name, run_name, custom_headers:nil)
cancel_async(resource_group_name, workflow_name, run_name, custom_headers:custom_headers).value!
end | [
"def",
"cancel_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"custom_headers",
":",
"nil",
")",
"cancel_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"custom_headers",
":custom_headers",
")",
... | Cancels a workflow run.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param run_name [String] The workflow run name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzu... | [
"Cancels",
"a",
"workflow",
"run",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_runs.rb#L247-L249 | train | Cancels a workflow run. | [
30522,
13366,
17542,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2448,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
17542,
1035,
2004,
6038,
2278,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filter_rules.rb | Azure::Network::Mgmt::V2018_07_01.RouteFilterRules.begin_create_or_update | def begin_create_or_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:custom_headers).value!
response.body unless ... | ruby | def begin_create_or_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:custom_headers).value!
response.body unless ... | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"rule_name",
",",
"route_filter_rule_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"route_fil... | Creates or updates a route in the specified route filter.
@param resource_group_name [String] The name of the resource group.
@param route_filter_name [String] The name of the route filter.
@param rule_name [String] The name of the route filter rule.
@param route_filter_rule_parameters [RouteFilterRule] Parameters... | [
"Creates",
"or",
"updates",
"a",
"route",
"in",
"the",
"specified",
"route",
"filter",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filter_rules.rb#L446-L449 | train | Creates or updates a route filter rule. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
2171,
1010,
3627,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
3627,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cloudfoundry/bosh | src/bosh-registry/lib/bosh/registry/instance_manager.rb | Bosh::Registry.InstanceManager.update_settings | def update_settings(instance_id, settings)
params = {
:instance_id => instance_id
}
instance = Models::RegistryInstance[params] || Models::RegistryInstance.new(params)
instance.settings = settings
instance.save
end | ruby | def update_settings(instance_id, settings)
params = {
:instance_id => instance_id
}
instance = Models::RegistryInstance[params] || Models::RegistryInstance.new(params)
instance.settings = settings
instance.save
end | [
"def",
"update_settings",
"(",
"instance_id",
",",
"settings",
")",
"params",
"=",
"{",
":instance_id",
"=>",
"instance_id",
"}",
"instance",
"=",
"Models",
"::",
"RegistryInstance",
"[",
"params",
"]",
"||",
"Models",
"::",
"RegistryInstance",
".",
"new",
"("... | Updates instance settings
@param [String] instance_id instance id (instance record
will be created in DB if it doesn't already exist)
@param [String] settings New settings for the instance | [
"Updates",
"instance",
"settings"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-registry/lib/bosh/registry/instance_manager.rb#L10-L18 | train | Update the settings of an existing instance | [
30522,
13366,
10651,
1035,
10906,
1006,
6013,
1035,
8909,
1010,
10906,
1007,
11498,
5244,
1027,
1063,
1024,
6013,
1035,
8909,
1027,
1028,
6013,
1035,
8909,
1065,
6013,
1027,
4275,
1024,
1024,
15584,
7076,
26897,
1031,
11498,
5244,
1033,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/fast_file.rb | Fastlane.FastFile.sh | def sh(*command, log: true, error_callback: nil, &b)
FastFile.sh(*command, log: log, error_callback: error_callback, &b)
end | ruby | def sh(*command, log: true, error_callback: nil, &b)
FastFile.sh(*command, log: log, error_callback: error_callback, &b)
end | [
"def",
"sh",
"(",
"*",
"command",
",",
"log",
":",
"true",
",",
"error_callback",
":",
"nil",
",",
"&",
"b",
")",
"FastFile",
".",
"sh",
"(",
"command",
",",
"log",
":",
"log",
",",
"error_callback",
":",
"error_callback",
",",
"b",
")",
"end"
] | Execute shell command | [
"Execute",
"shell",
"command"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/fast_file.rb#L185-L187 | train | Execute the command. | [
30522,
13366,
14021,
1006,
1008,
3094,
1010,
8833,
1024,
2995,
1010,
7561,
1035,
2655,
5963,
1024,
9152,
2140,
1010,
1004,
1038,
1007,
3435,
8873,
2571,
1012,
14021,
1006,
1008,
3094,
1010,
8833,
1024,
8833,
1010,
7561,
1035,
2655,
5963,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/vpn_sites.rb | Azure::Network::Mgmt::V2018_10_01.VpnSites.delete | def delete(resource_group_name, vpn_site_name, custom_headers:nil)
response = delete_async(resource_group_name, vpn_site_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, vpn_site_name, custom_headers:nil)
response = delete_async(resource_group_name, vpn_site_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Deletes a VpnSite.
@param resource_group_name [String] The resource group name of the VpnSite.
@param vpn_site_name [String] The name of the VpnSite being deleted.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"a",
"VpnSite",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb#L219-L222 | train | Deletes a virtual network site. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
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_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.query_predictions | def query_predictions(project_id, query, custom_headers:nil)
response = query_predictions_async(project_id, query, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def query_predictions(project_id, query, custom_headers:nil)
response = query_predictions_async(project_id, query, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"query_predictions",
"(",
"project_id",
",",
"query",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"query_predictions_async",
"(",
"project_id",
",",
"query",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",... | Get images that were sent to your prediction endpoint.
@param project_id The project id.
@param query [PredictionQueryToken] Parameters used to query the predictions.
Limited to combining 2 tags.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@ret... | [
"Get",
"images",
"that",
"were",
"sent",
"to",
"your",
"prediction",
"endpoint",
"."
] | 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#L2331-L2334 | train | Query predictions for a given project. | [
30522,
13366,
23032,
1035,
20932,
1006,
2622,
1035,
8909,
1010,
23032,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
23032,
1035,
20932,
1035,
2004,
6038,
2278,
1006,
2622,
1035,
8909,
1010,
23032,
1010,
7661,
1035,
203... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/drawing/drawing.rb | Axlsx.Drawing.to_xml_string | def to_xml_string(str = '')
str << '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
str << ('<xdr:wsDr xmlns:xdr="' << XML_NS_XDR << '" xmlns:a="' << XML_NS_A << '">')
anchors.each { |anchor| anchor.to_xml_string(str) }
str << '</xdr:wsDr>'
end | ruby | def to_xml_string(str = '')
str << '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
str << ('<xdr:wsDr xmlns:xdr="' << XML_NS_XDR << '" xmlns:a="' << XML_NS_A << '">')
anchors.each { |anchor| anchor.to_xml_string(str) }
str << '</xdr:wsDr>'
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>'",
"str",
"<<",
"(",
"'<xdr:wsDr xmlns:xdr=\"'",
"<<",
"XML_NS_XDR",
"<<",
"'\" xmlns:a=\"'",
"<<",
"XML_NS_A",
"<<",
"'\">'",
")",
"anchors"... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/drawing.rb#L159-L164 | train | Convert the object to XML string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1005,
1026,
1029,
20950,
2544,
1027,
1000,
1015,
1012,
1014,
1000,
17181,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
26609,
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... |
rubocop-hq/rubocop | lib/rubocop/config_loader_resolver.rb | RuboCop.ConfigLoaderResolver.merge | def merge(base_hash, derived_hash, **opts)
result = base_hash.merge(derived_hash)
keys_appearing_in_both = base_hash.keys & derived_hash.keys
keys_appearing_in_both.each do |key|
if opts[:unset_nil] && derived_hash[key].nil?
result.delete(key)
elsif base_hash[key].is_a?(Hash)... | ruby | def merge(base_hash, derived_hash, **opts)
result = base_hash.merge(derived_hash)
keys_appearing_in_both = base_hash.keys & derived_hash.keys
keys_appearing_in_both.each do |key|
if opts[:unset_nil] && derived_hash[key].nil?
result.delete(key)
elsif base_hash[key].is_a?(Hash)... | [
"def",
"merge",
"(",
"base_hash",
",",
"derived_hash",
",",
"**",
"opts",
")",
"result",
"=",
"base_hash",
".",
"merge",
"(",
"derived_hash",
")",
"keys_appearing_in_both",
"=",
"base_hash",
".",
"keys",
"&",
"derived_hash",
".",
"keys",
"keys_appearing_in_both"... | Return a recursive merge of two hashes. That is, a normal hash merge,
with the addition that any value that is a hash, and occurs in both
arguments, will also be merged. And so on.
rubocop:disable Metrics/AbcSize | [
"Return",
"a",
"recursive",
"merge",
"of",
"two",
"hashes",
".",
"That",
"is",
"a",
"normal",
"hash",
"merge",
"with",
"the",
"addition",
"that",
"any",
"value",
"that",
"is",
"a",
"hash",
"and",
"occurs",
"in",
"both",
"arguments",
"will",
"also",
"be",... | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/config_loader_resolver.rb#L83-L98 | train | Merge two hashes together | [
30522,
13366,
13590,
1006,
2918,
1035,
23325,
1010,
5173,
1035,
23325,
1010,
1008,
1008,
23569,
2015,
1007,
2765,
1027,
2918,
1035,
23325,
1012,
13590,
1006,
5173,
1035,
23325,
1007,
6309,
1035,
6037,
1035,
1999,
1035,
2119,
1027,
2918,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/data_criteria.rb | HQMF2.DataCriteria.retrieve_field_values_model_for_model | def retrieve_field_values_model_for_model
field_values = {}
@field_values.each_pair do |id, val|
field_values[id] = val.to_model
end
@code_list_id ||= code_list_id
# Model transfers as a field
if %w(transfer_to transfer_from).include? @definition
field_code_list_id =... | ruby | def retrieve_field_values_model_for_model
field_values = {}
@field_values.each_pair do |id, val|
field_values[id] = val.to_model
end
@code_list_id ||= code_list_id
# Model transfers as a field
if %w(transfer_to transfer_from).include? @definition
field_code_list_id =... | [
"def",
"retrieve_field_values_model_for_model",
"field_values",
"=",
"{",
"}",
"@field_values",
".",
"each_pair",
"do",
"|",
"id",
",",
"val",
"|",
"field_values",
"[",
"id",
"]",
"=",
"val",
".",
"to_model",
"end",
"@code_list_id",
"||=",
"code_list_id",
"# Mod... | Generate the models of the field values | [
"Generate",
"the",
"models",
"of",
"the",
"field",
"values"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria.rb#L246-L264 | train | Returns the field_values model for the given object | [
30522,
13366,
12850,
1035,
2492,
1035,
5300,
1035,
2944,
1035,
2005,
1035,
2944,
2492,
1035,
5300,
1027,
1063,
1065,
1030,
2492,
1035,
5300,
1012,
2169,
1035,
3940,
2079,
1064,
8909,
1010,
11748,
1064,
2492,
1035,
5300,
1031,
8909,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V1_0.ComputerVisionClient.recognize_text | def recognize_text(url, detect_handwriting:false, custom_headers:nil)
response = recognize_text_async(url, detect_handwriting:detect_handwriting, custom_headers:custom_headers).value!
nil
end | ruby | def recognize_text(url, detect_handwriting:false, custom_headers:nil)
response = recognize_text_async(url, detect_handwriting:detect_handwriting, custom_headers:custom_headers).value!
nil
end | [
"def",
"recognize_text",
"(",
"url",
",",
"detect_handwriting",
":",
"false",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"recognize_text_async",
"(",
"url",
",",
"detect_handwriting",
":detect_handwriting",
",",
"custom_headers",
":custom_headers",
")",
... | 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#L1088-L1091 | train | Recognizes text in a given image. | [
30522,
13366,
6807,
1035,
3793,
1006,
24471,
2140,
1010,
11487,
1035,
24149,
1024,
6270,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6807,
1035,
3793,
1035,
2004,
6038,
2278,
1006,
24471,
2140,
1010,
11487,
1035,
2414... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb | Azure::ContainerService::Mgmt::V2019_02_01.ManagedClusters.begin_reset_aadprofile_with_http_info | def begin_reset_aadprofile_with_http_info(resource_group_name, resource_name, parameters, custom_headers:nil)
begin_reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_reset_aadprofile_with_http_info(resource_group_name, resource_name, parameters, custom_headers:nil)
begin_reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_reset_aadprofile_with_http_info",
"(",
"resource_group_name",
",",
"resource_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_reset_aadprofile_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"parameters",
",",
"custom_hea... | Reset AAD Profile of a managed cluster.
Update the AAD Profile for a managed cluster.
@param resource_group_name [String] The name of the resource group.
@param resource_name [String] The name of the managed cluster resource.
@param parameters [ManagedClusterAADProfile] Parameters supplied to the Reset
AAD Profi... | [
"Reset",
"AAD",
"Profile",
"of",
"a",
"managed",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb#L1418-L1420 | train | Reset an ad - profile. | [
30522,
13366,
4088,
1035,
25141,
1035,
9779,
18927,
3217,
8873,
2571,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
30524,
2171,
1010,
7692,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
7661... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.normalized_query | def normalized_query(*flags)
return nil unless self.query
return @normalized_query if defined?(@normalized_query)
@normalized_query ||= begin
modified_query_class = Addressable::URI::CharacterClasses::QUERY.dup
# Make sure possible key-value pair delimiters are escaped.
modifie... | ruby | def normalized_query(*flags)
return nil unless self.query
return @normalized_query if defined?(@normalized_query)
@normalized_query ||= begin
modified_query_class = Addressable::URI::CharacterClasses::QUERY.dup
# Make sure possible key-value pair delimiters are escaped.
modifie... | [
"def",
"normalized_query",
"(",
"*",
"flags",
")",
"return",
"nil",
"unless",
"self",
".",
"query",
"return",
"@normalized_query",
"if",
"defined?",
"(",
"@normalized_query",
")",
"@normalized_query",
"||=",
"begin",
"modified_query_class",
"=",
"Addressable",
"::",... | The query component for this URI, normalized.
@return [String] The query component, normalized. | [
"The",
"query",
"component",
"for",
"this",
"URI",
"normalized",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1590-L1607 | train | Returns the normalized query for this URI. | [
30522,
13366,
3671,
3550,
1035,
23032,
1006,
1008,
9245,
1007,
2709,
9152,
2140,
4983,
2969,
1012,
23032,
2709,
1030,
3671,
3550,
1035,
23032,
2065,
4225,
1029,
1006,
1030,
3671,
3550,
1035,
23032,
1007,
1030,
3671,
3550,
1035,
23032,
1064,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
toptal/chewy | lib/chewy/query.rb | Chewy.Query.explain | def explain(value = nil)
chain { criteria.update_request_options explain: (value.nil? ? true : value) }
end | ruby | def explain(value = nil)
chain { criteria.update_request_options explain: (value.nil? ? true : value) }
end | [
"def",
"explain",
"(",
"value",
"=",
"nil",
")",
"chain",
"{",
"criteria",
".",
"update_request_options",
"explain",
":",
"(",
"value",
".",
"nil?",
"?",
"true",
":",
"value",
")",
"}",
"end"
] | Comparation with other query or collection
If other is collection - search request is executed and
result is used for comparation
@example
UsersIndex.filter(term: {name: 'Johny'}) == UsersIndex.filter(term: {name: 'Johny'}) # => true
UsersIndex.filter(term: {name: 'Johny'}) == UsersIndex.filter(term: {name: '... | [
"Comparation",
"with",
"other",
"query",
"or",
"collection",
"If",
"other",
"is",
"collection",
"-",
"search",
"request",
"is",
"executed",
"and",
"result",
"is",
"used",
"for",
"comparation"
] | cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b | https://github.com/toptal/chewy/blob/cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b/lib/chewy/query.rb#L75-L77 | train | Returns the current request options for the current request | [
30522,
13366,
4863,
1006,
3643,
1027,
9152,
2140,
1007,
4677,
1063,
9181,
1012,
10651,
1035,
5227,
1035,
7047,
4863,
1024,
1006,
3643,
1012,
9152,
2140,
1029,
1029,
2995,
1024,
3643,
1007,
1065,
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 | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_composite_entity_child | def add_composite_entity_child(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:nil)
response = add_composite_entity_child_async(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def add_composite_entity_child(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:nil)
response = add_composite_entity_child_async(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"add_composite_entity_child",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"composite_child_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_composite_entity_child_async",
"(",
"app_id",
",",
"version_id",
",",
"c_... | Creates a single child in an existing composite entity model in a version of
the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param c_entity_id The composite entity extractor ID.
@param composite_child_model_create_object [CompositeChildModelCreateObject]
A model obj... | [
"Creates",
"a",
"single",
"child",
"in",
"an",
"existing",
"composite",
"entity",
"model",
"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#L5433-L5436 | train | Adds a composite entity child to a version of the application. | [
30522,
13366,
5587,
1035,
12490,
1035,
9178,
1035,
2775,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1039,
1035,
9178,
1035,
8909,
1010,
12490,
1035,
2775,
1035,
2944,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/functions.rb | Puppet::Functions.DispatcherBuilder.return_type | def return_type(type)
unless type.is_a?(String) || type.is_a?(Puppet::Pops::Types::PAnyType)
raise ArgumentError, _("Argument to 'return_type' must be a String reference to a Puppet Data Type. Got %{type_class}") % { type_class: type.class }
end
@return_type = type
end | ruby | def return_type(type)
unless type.is_a?(String) || type.is_a?(Puppet::Pops::Types::PAnyType)
raise ArgumentError, _("Argument to 'return_type' must be a String reference to a Puppet Data Type. Got %{type_class}") % { type_class: type.class }
end
@return_type = type
end | [
"def",
"return_type",
"(",
"type",
")",
"unless",
"type",
".",
"is_a?",
"(",
"String",
")",
"||",
"type",
".",
"is_a?",
"(",
"Puppet",
"::",
"Pops",
"::",
"Types",
"::",
"PAnyType",
")",
"raise",
"ArgumentError",
",",
"_",
"(",
"\"Argument to 'return_type'... | Defines the return type. Defaults to 'Any'
@param [String] type a reference to a Puppet Data Type
@api public | [
"Defines",
"the",
"return",
"type",
".",
"Defaults",
"to",
"Any",
"@param",
"[",
"String",
"]",
"type",
"a",
"reference",
"to",
"a",
"Puppet",
"Data",
"Type"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/functions.rb#L520-L525 | train | Sets the return type for this object. | [
30522,
13366,
2709,
1035,
2828,
1006,
2828,
1007,
4983,
2828,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
1064,
1064,
2828,
1012,
2003,
30524,
1024,
1024,
6090,
22123,
18863,
1007,
5333,
6685,
2121,
29165,
1010,
1035,
1006,
1000,
6685,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/views.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Views.list_by_hub_with_http_info | def list_by_hub_with_http_info(resource_group_name, hub_name, user_id, custom_headers:nil)
list_by_hub_async(resource_group_name, hub_name, user_id, custom_headers:custom_headers).value!
end | ruby | def list_by_hub_with_http_info(resource_group_name, hub_name, user_id, custom_headers:nil)
list_by_hub_async(resource_group_name, hub_name, user_id, custom_headers:custom_headers).value!
end | [
"def",
"list_by_hub_with_http_info",
"(",
"resource_group_name",
",",
"hub_name",
",",
"user_id",
",",
"custom_headers",
":",
"nil",
")",
"list_by_hub_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"user_id",
",",
"custom_headers",
":custom_headers",
")",
"... | Gets all available views for given user in the specified hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param user_id [String] The user ID. Use * to retreive hub level views.
@param custom_headers [Hash{String => String}] A hash of custom hea... | [
"Gets",
"all",
"available",
"views",
"for",
"given",
"user",
"in",
"the",
"specified",
"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/views.rb#L54-L56 | train | Gets the list of all the segmentation of the user in the hub. | [
30522,
13366,
2862,
1035,
2011,
1035,
9594,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
5310,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/authstore.rb | Puppet.Network::AuthStore.allowed? | def allowed?(name, ip)
if name or ip
# This is probably unnecessary, and can cause some weirdness in
# cases where we're operating over localhost but don't have a real
# IP defined.
raise Puppet::DevError, _("Name and IP must be passed to 'allowed?'") unless name and ip
# e... | ruby | def allowed?(name, ip)
if name or ip
# This is probably unnecessary, and can cause some weirdness in
# cases where we're operating over localhost but don't have a real
# IP defined.
raise Puppet::DevError, _("Name and IP must be passed to 'allowed?'") unless name and ip
# e... | [
"def",
"allowed?",
"(",
"name",
",",
"ip",
")",
"if",
"name",
"or",
"ip",
"# This is probably unnecessary, and can cause some weirdness in",
"# cases where we're operating over localhost but don't have a real",
"# IP defined.",
"raise",
"Puppet",
"::",
"DevError",
",",
"_",
"... | Is a given combination of name and ip address allowed? If either input
is non-nil, then both inputs must be provided. If neither input
is provided, then the authstore is considered local and defaults to "true". | [
"Is",
"a",
"given",
"combination",
"of",
"name",
"and",
"ip",
"address",
"allowed?",
"If",
"either",
"input",
"is",
"non",
"-",
"nil",
"then",
"both",
"inputs",
"must",
"be",
"provided",
".",
"If",
"neither",
"input",
"is",
"provided",
"then",
"the",
"au... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/authstore.rb#L17-L38 | train | Returns true if the given name and IP is allowed for this domain. | [
30522,
13366,
3039,
1029,
1006,
2171,
1010,
12997,
1007,
2065,
2171,
2030,
12997,
1001,
2023,
2003,
2763,
14203,
1010,
1998,
2064,
3426,
2070,
6881,
2791,
1999,
1001,
3572,
2073,
2057,
1005,
2128,
4082,
2058,
2334,
15006,
2102,
2021,
2123,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/role.rb | Aws::IAM.Role.attached_policies | def attached_policies(options = {})
batches = Enumerator.new do |y|
options = options.merge(role_name: @name)
resp = @client.list_attached_role_policies(options)
resp.each_page do |page|
batch = []
page.data.attached_policies.each do |a|
batch << Policy.new(... | ruby | def attached_policies(options = {})
batches = Enumerator.new do |y|
options = options.merge(role_name: @name)
resp = @client.list_attached_role_policies(options)
resp.each_page do |page|
batch = []
page.data.attached_policies.each do |a|
batch << Policy.new(... | [
"def",
"attached_policies",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"role_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"list_attached_role_... | @example Request syntax with placeholder values
attached_policies = role.attached_policies({
path_prefix: "policyPathType",
})
@param [Hash] options ({})
@option options [String] :path_prefix
The path prefix for filtering the results. This parameter is optional.
If it is not included, it defaults to... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/role.rb#L346-L362 | train | Returns an array of all attached policies for this role | [
30522,
13366,
4987,
1035,
6043,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
2535,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
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... |
grpc/grpc | src/ruby/lib/grpc/generic/rpc_server.rb | GRPC.RpcServer.handle | def handle(service)
@run_mutex.synchronize do
unless @running_state == :not_started
fail 'cannot add services if the server has been started'
end
cls = service.is_a?(Class) ? service : service.class
assert_valid_service_class(cls)
add_rpc_descs_for(service)
... | ruby | def handle(service)
@run_mutex.synchronize do
unless @running_state == :not_started
fail 'cannot add services if the server has been started'
end
cls = service.is_a?(Class) ? service : service.class
assert_valid_service_class(cls)
add_rpc_descs_for(service)
... | [
"def",
"handle",
"(",
"service",
")",
"@run_mutex",
".",
"synchronize",
"do",
"unless",
"@running_state",
"==",
":not_started",
"fail",
"'cannot add services if the server has been started'",
"end",
"cls",
"=",
"service",
".",
"is_a?",
"(",
"Class",
")",
"?",
"servi... | handle registration of classes
service is either a class that includes GRPC::GenericService and whose
#new function can be called without argument or any instance of such a
class.
E.g, after
class Divider
include GRPC::GenericService
rpc :div DivArgs, DivReply # single request, single response
def i... | [
"handle",
"registration",
"of",
"classes"
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/rpc_server.rb#L333-L342 | train | Add the given service to the cluster. | [
30522,
13366,
5047,
1006,
2326,
1007,
1030,
30524,
1027,
1027,
1024,
2025,
1035,
2318,
8246,
1005,
3685,
5587,
2578,
2065,
1996,
8241,
2038,
2042,
2318,
1005,
2203,
18856,
2015,
1027,
2326,
1012,
2003,
1035,
1037,
1029,
1006,
2465,
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... |
grodowski/undercover | lib/undercover.rb | Undercover.Report.build_warnings | def build_warnings
flagged_results = Set.new
changeset.each_changed_line do |filepath, line_no|
dist_from_line_no = lambda do |res|
return BigDecimal::INFINITY if line_no < res.first_line
res_lines = res.first_line..res.last_line
return BigDecimal::INFINITY unless res... | ruby | def build_warnings
flagged_results = Set.new
changeset.each_changed_line do |filepath, line_no|
dist_from_line_no = lambda do |res|
return BigDecimal::INFINITY if line_no < res.first_line
res_lines = res.first_line..res.last_line
return BigDecimal::INFINITY unless res... | [
"def",
"build_warnings",
"flagged_results",
"=",
"Set",
".",
"new",
"changeset",
".",
"each_changed_line",
"do",
"|",
"filepath",
",",
"line_no",
"|",
"dist_from_line_no",
"=",
"lambda",
"do",
"|",
"res",
"|",
"return",
"BigDecimal",
"::",
"INFINITY",
"if",
"l... | TODO: this is experimental and might be incorrect!
rubocop:disable Metrics/MethodLength, Metrics/AbcSize | [
"TODO",
":",
"this",
"is",
"experimental",
"and",
"might",
"be",
"incorrect!",
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength",
"Metrics",
"/",
"AbcSize"
] | 8f9cb32094d1669d67ff957337f95243c4d15ff2 | https://github.com/grodowski/undercover/blob/8f9cb32094d1669d67ff957337f95243c4d15ff2/lib/undercover.rb#L51-L72 | train | Build warnings from the changeset | [
30522,
13366,
3857,
1035,
16234,
5210,
5999,
1035,
3463,
1027,
2275,
1012,
2047,
3431,
3388,
1012,
2169,
1035,
2904,
1035,
2240,
2079,
1064,
5371,
15069,
1010,
2240,
1035,
2053,
1064,
4487,
3367,
1035,
2013,
1035,
2240,
1035,
2053,
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_serialconsole/lib/2018-05-01/generated/azure_mgmt_serialconsole/console.rb | Azure::Serialconsole::Mgmt::V2018_05_01.Console.disable_console | def disable_console(custom_headers:nil)
response = disable_console_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def disable_console(custom_headers:nil)
response = disable_console_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"disable_console",
"(",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"disable_console_async",
"(",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | Disables Serial Console for a subscription
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [SetDisabledResult] operation results. | [
"Disables",
"Serial",
"Console",
"for",
"a",
"subscription"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_serialconsole/lib/2018-05-01/generated/azure_mgmt_serialconsole/console.rb#L118-L121 | train | Disables console. | [
30522,
13366,
4487,
19150,
1035,
10122,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4487,
19150,
1035,
10122,
1035,
2004,
6038,
2278,
1006,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sferik/twitter | lib/twitter/configuration.rb | Twitter.Configuration.photo_sizes | def photo_sizes
@attrs.fetch(:photo_sizes, []).each_with_object({}) do |(key, value), object|
object[key] = Size.new(value)
end
end | ruby | def photo_sizes
@attrs.fetch(:photo_sizes, []).each_with_object({}) do |(key, value), object|
object[key] = Size.new(value)
end
end | [
"def",
"photo_sizes",
"@attrs",
".",
"fetch",
"(",
":photo_sizes",
",",
"[",
"]",
")",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"(",
"key",
",",
"value",
")",
",",
"object",
"|",
"object",
"[",
"key",
"]",
"=",
"Size",
".",
"new",
... | Returns an array of photo sizes
@return [Array<Twitter::Size>] | [
"Returns",
"an",
"array",
"of",
"photo",
"sizes"
] | 844818cad07ce490ccb9d8542ebb6b4fc7a61cb4 | https://github.com/sferik/twitter/blob/844818cad07ce490ccb9d8542ebb6b4fc7a61cb4/lib/twitter/configuration.rb#L20-L24 | train | Returns the array of the image sizes that are used to generate the image. | [
30522,
13366,
6302,
1035,
10826,
1030,
2012,
16344,
2015,
1012,
18584,
1006,
1024,
6302,
1035,
10826,
1010,
1031,
1033,
1007,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1063,
1065,
1007,
2079,
1064,
1006,
3145,
1010,
3643,
1007,
1010,
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 | 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_correlated_event_list_with_http_info | def get_correlated_event_list_with_http_info(event_instance_id, timeout:60, custom_headers:nil)
get_correlated_event_list_async(event_instance_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_correlated_event_list_with_http_info(event_instance_id, timeout:60, custom_headers:nil)
get_correlated_event_list_async(event_instance_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_correlated_event_list_with_http_info",
"(",
"event_instance_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_correlated_event_list_async",
"(",
"event_instance_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_hea... | Gets all correlated events for a given event.
The response is list of FabricEvents.
@param event_instance_id [String] The EventInstanceId.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration that the client is willing
to wait for the reque... | [
"Gets",
"all",
"correlated",
"events",
"for",
"a",
"given",
"event",
"."
] | 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#L29194-L29196 | train | Gets the list of Correlated Events. | [
30522,
13366,
2131,
1035,
23900,
1035,
2724,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2724,
1035,
6013,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
23900,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.RunbookOperations.get_with_http_info | def get_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
get_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
get_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"custom_headers",
":cus... | Retrieve the runbook identified by runbook name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param runbook_name [String] The runbook name.
@param custom_headers [Hash{String => String}] A hash of custom headers th... | [
"Retrieve",
"the",
"runbook",
"identified",
"by",
"runbook",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb#L157-L159 | train | Gets the specified runbook s index. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
2448,
8654,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/conditional_formatting.rb | Axlsx.ConditionalFormatting.add_rule | def add_rule(rule)
if rule.is_a? Axlsx::ConditionalFormattingRule
@rules << rule
elsif rule.is_a? Hash
@rules << ConditionalFormattingRule.new(rule)
end
end | ruby | def add_rule(rule)
if rule.is_a? Axlsx::ConditionalFormattingRule
@rules << rule
elsif rule.is_a? Hash
@rules << ConditionalFormattingRule.new(rule)
end
end | [
"def",
"add_rule",
"(",
"rule",
")",
"if",
"rule",
".",
"is_a?",
"Axlsx",
"::",
"ConditionalFormattingRule",
"@rules",
"<<",
"rule",
"elsif",
"rule",
".",
"is_a?",
"Hash",
"@rules",
"<<",
"ConditionalFormattingRule",
".",
"new",
"(",
"rule",
")",
"end",
"end... | Add a ConditionalFormattingRule. If a hash of options is passed
in create a rule on the fly.
@param [ConditionalFormattingRule|Hash] rule A rule to use, or the options necessary to create one.
@see ConditionalFormattingRule#initialize | [
"Add",
"a",
"ConditionalFormattingRule",
".",
"If",
"a",
"hash",
"of",
"options",
"is",
"passed",
"in",
"create",
"a",
"rule",
"on",
"the",
"fly",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/conditional_formatting.rb#L54-L60 | train | Adds a rule to the rules list | [
30522,
13366,
5587,
1035,
3627,
1006,
3627,
1007,
2065,
3627,
1012,
2003,
1035,
1037,
1029,
22260,
4877,
2595,
1024,
1024,
18462,
14192,
19321,
2075,
6820,
2571,
1030,
3513,
1026,
1026,
3627,
3449,
5332,
2546,
3627,
1012,
2003,
1035,
1037,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/service_endpoint_policy_definitions.rb | Azure::Network::Mgmt::V2018_08_01.ServiceEndpointPolicyDefinitions.begin_delete | def begin_delete(resource_group_name, service_endpoint_policy_name, service_endpoint_policy_definition_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, service_endpoint_policy_name, service_endpoint_policy_definition_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, service_endpoint_policy_name, service_endpoint_policy_definition_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, service_endpoint_policy_name, service_endpoint_policy_definition_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"service_endpoint_policy_definition_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name"... | Deletes the specified ServiceEndpoint policy definitions.
@param resource_group_name [String] The name of the resource group.
@param service_endpoint_policy_name [String] The name of the Service Endpoint
Policy.
@param service_endpoint_policy_definition_name [String] The name of the
service endpoint policy defini... | [
"Deletes",
"the",
"specified",
"ServiceEndpoint",
"policy",
"definitions",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/service_endpoint_policy_definitions.rb#L335-L338 | train | Deletes a service endpoint policy definition. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2203,
8400,
1035,
3343,
1035,
2171,
1010,
2326,
1035,
2203,
8400,
1035,
3343,
1035,
6210,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
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 | supply/lib/supply/client.rb | Supply.Client.apks_version_codes | def apks_version_codes
ensure_active_edit!
result = call_google_api { client.list_apks(current_package_name, current_edit.id) }
return Array(result.apks).map(&:version_code)
end | ruby | def apks_version_codes
ensure_active_edit!
result = call_google_api { client.list_apks(current_package_name, current_edit.id) }
return Array(result.apks).map(&:version_code)
end | [
"def",
"apks_version_codes",
"ensure_active_edit!",
"result",
"=",
"call_google_api",
"{",
"client",
".",
"list_apks",
"(",
"current_package_name",
",",
"current_edit",
".",
"id",
")",
"}",
"return",
"Array",
"(",
"result",
".",
"apks",
")",
".",
"map",
"(",
"... | Get a list of all APK version codes - returns the list of version codes | [
"Get",
"a",
"list",
"of",
"all",
"APK",
"version",
"codes",
"-",
"returns",
"the",
"list",
"of",
"version",
"codes"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L205-L211 | train | Returns an array of version codes for all the apks in the current edit. | [
30522,
13366,
9706,
5705,
1035,
2544,
1035,
9537,
5676,
1035,
3161,
1035,
10086,
999,
2765,
1027,
2655,
1035,
8224,
1035,
17928,
1063,
7396,
1012,
2862,
1035,
9706,
5705,
1006,
2783,
1035,
7427,
1035,
2171,
1010,
2783,
1035,
10086,
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... |
rails/sprockets | lib/sprockets/loader.rb | Sprockets.Loader.load | def load(uri)
unloaded = UnloadedAsset.new(uri, self)
if unloaded.params.key?(:id)
unless asset = asset_from_cache(unloaded.asset_key)
id = unloaded.params.delete(:id)
uri_without_id = build_asset_uri(unloaded.filename, unloaded.params)
asset = load_from_unloaded(Unload... | ruby | def load(uri)
unloaded = UnloadedAsset.new(uri, self)
if unloaded.params.key?(:id)
unless asset = asset_from_cache(unloaded.asset_key)
id = unloaded.params.delete(:id)
uri_without_id = build_asset_uri(unloaded.filename, unloaded.params)
asset = load_from_unloaded(Unload... | [
"def",
"load",
"(",
"uri",
")",
"unloaded",
"=",
"UnloadedAsset",
".",
"new",
"(",
"uri",
",",
"self",
")",
"if",
"unloaded",
".",
"params",
".",
"key?",
"(",
":id",
")",
"unless",
"asset",
"=",
"asset_from_cache",
"(",
"unloaded",
".",
"asset_key",
")... | Public: Load Asset by Asset URI.
uri - A String containing complete URI to a file including schema
and full path such as:
"file:///Path/app/assets/js/app.js?type=application/javascript"
Returns Asset. | [
"Public",
":",
"Load",
"Asset",
"by",
"Asset",
"URI",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/loader.rb#L31-L64 | train | Loads an asset from the cache. | [
30522,
13366,
7170,
1006,
24471,
2072,
1007,
4895,
17468,
1027,
4895,
17468,
27241,
2102,
1012,
2047,
1006,
24471,
2072,
1010,
2969,
1007,
2065,
4895,
17468,
1012,
11498,
5244,
1012,
3145,
1029,
1006,
1024,
8909,
1007,
4983,
11412,
1027,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb | Azure::EventGrid::Mgmt::V2018_01_01.EventSubscriptions.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"scope",
",",
"event_subscription_name",
",",
"event_subscription_info",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"scope",
",",
"event_subscription_name",
",",
"event_subscription_info",
... | Create or update an event subscription
Asynchronously creates a new event subscription or updates an existing event
subscription based on the specified scope.
@param scope [String] The identifier of the resource to which the event
subscription needs to be created or updated. The scope can be a subscription,
or a... | [
"Create",
"or",
"update",
"an",
"event",
"subscription"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb#L1460-L1462 | train | Creates or updates an existing event specification. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
9531,
1010,
2724,
1035,
15002,
1035,
2171,
1010,
2724,
1035,
15002,
1035,
18558,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
30524,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/employee_wage.rb | SquareConnect.EmployeeWage.employee_id= | def employee_id=(employee_id)
if employee_id.nil?
fail ArgumentError, "employee_id cannot be nil"
end
if employee_id.to_s.length < 1
fail ArgumentError, "invalid value for 'employee_id', the character length must be great than or equal to 1."
end
@employee_id = employee_i... | ruby | def employee_id=(employee_id)
if employee_id.nil?
fail ArgumentError, "employee_id cannot be nil"
end
if employee_id.to_s.length < 1
fail ArgumentError, "invalid value for 'employee_id', the character length must be great than or equal to 1."
end
@employee_id = employee_i... | [
"def",
"employee_id",
"=",
"(",
"employee_id",
")",
"if",
"employee_id",
".",
"nil?",
"fail",
"ArgumentError",
",",
"\"employee_id cannot be nil\"",
"end",
"if",
"employee_id",
".",
"to_s",
".",
"length",
"<",
"1",
"fail",
"ArgumentError",
",",
"\"invalid value fo... | Custom attribute writer method with validation
@param [Object] employee_id Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/employee_wage.rb#L99-L109 | train | Set the employee_id of the object. | [
30522,
13366,
7904,
1035,
8909,
1027,
1006,
7904,
1035,
8909,
1007,
2065,
7904,
1035,
8909,
1012,
9152,
2140,
1029,
8246,
6685,
2121,
29165,
1010,
1000,
7904,
1035,
8909,
3685,
2022,
9152,
2140,
1000,
2203,
2065,
7904,
1035,
8909,
1012,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/routes.rb | Azure::Network::Mgmt::V2018_07_01.Routes.begin_delete_with_http_info | def begin_delete_with_http_info(resource_group_name, route_table_name, route_name, custom_headers:nil)
begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers:custom_headers).value!
end | ruby | def begin_delete_with_http_info(resource_group_name, route_table_name, route_name, custom_headers:nil)
begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_with_http_info",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"route_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_async",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"route_name",
",",
"custom_headers",
":cus... | Deletes the specified route from a route table.
@param resource_group_name [String] The name of the resource group.
@param route_table_name [String] The name of the route table.
@param route_name [String] The name of the route.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be a... | [
"Deletes",
"the",
"specified",
"route",
"from",
"a",
"route",
"table",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/routes.rb#L326-L328 | train | Deletes a route from the route table. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
2795,
1035,
2171,
1010,
2799,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb | Azure::Network::Mgmt::V2018_07_01.VirtualWANs.create_or_update | def create_or_update(resource_group_name, virtual_wanname, wanparameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, virtual_wanname, wanparameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"wanparameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"wanparameters",
",",
"custom... | Creates a VirtualWAN resource if it doesn't exist else updates the existing
VirtualWAN.
@param resource_group_name [String] The resource group name of the
VirtualWan.
@param virtual_wanname [String] The name of the VirtualWAN being created or
updated.
@param wanparameters [VirtualWAN] Parameters supplied to crea... | [
"Creates",
"a",
"VirtualWAN",
"resource",
"if",
"it",
"doesn",
"t",
"exist",
"else",
"updates",
"the",
"existing",
"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#L134-L137 | train | Creates or updates a virtual wan. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
10587,
4168,
1010,
14071,
28689,
22828,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
1065... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/drawing/drawing.rb | Axlsx.Drawing.charts | def charts
charts = @anchors.select { |a| a.object.is_a?(GraphicFrame) }
charts.map { |a| a.object.chart }
end | ruby | def charts
charts = @anchors.select { |a| a.object.is_a?(GraphicFrame) }
charts.map { |a| a.object.chart }
end | [
"def",
"charts",
"charts",
"=",
"@anchors",
".",
"select",
"{",
"|",
"a",
"|",
"a",
".",
"object",
".",
"is_a?",
"(",
"GraphicFrame",
")",
"}",
"charts",
".",
"map",
"{",
"|",
"a",
"|",
"a",
".",
"object",
".",
"chart",
"}",
"end"
] | An array of charts that are associated with this drawing's anchors
@return [Array] | [
"An",
"array",
"of",
"charts",
"that",
"are",
"associated",
"with",
"this",
"drawing",
"s",
"anchors"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/drawing.rb#L104-L107 | train | Returns an array of charts that are in the correct order. | [
30522,
13366,
6093,
6093,
1027,
1030,
24674,
1012,
7276,
1063,
1064,
1037,
1064,
1037,
1012,
4874,
1012,
2003,
1035,
1037,
1029,
1006,
8425,
15643,
1007,
1065,
6093,
1012,
4949,
1063,
1064,
1037,
1064,
1037,
1012,
4874,
1012,
3673,
1065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
geokit/geokit-rails | lib/geokit-rails/acts_as_mappable.rb | Geokit.ActsAsMappable.auto_geocode_address | def auto_geocode_address
address=self.send(auto_geocode_field).to_s
geo=Geokit::Geocoders::MultiGeocoder.geocode(address)
if geo.success
self.send("#{lat_column_name}=", geo.send(:"#{lat_column_name}"))
self.send("#{lng_column_name}=", geo.send(:"#{lng_column_name}"))
else
... | ruby | def auto_geocode_address
address=self.send(auto_geocode_field).to_s
geo=Geokit::Geocoders::MultiGeocoder.geocode(address)
if geo.success
self.send("#{lat_column_name}=", geo.send(:"#{lat_column_name}"))
self.send("#{lng_column_name}=", geo.send(:"#{lng_column_name}"))
else
... | [
"def",
"auto_geocode_address",
"address",
"=",
"self",
".",
"send",
"(",
"auto_geocode_field",
")",
".",
"to_s",
"geo",
"=",
"Geokit",
"::",
"Geocoders",
"::",
"MultiGeocoder",
".",
"geocode",
"(",
"address",
")",
"if",
"geo",
".",
"success",
"self",
".",
... | ClassMethods
this is the callback for auto_geocoding | [
"ClassMethods",
"this",
"is",
"the",
"callback",
"for",
"auto_geocoding"
] | cc5fd43ab4e69878fb31ebd1fc22918e2952b560 | https://github.com/geokit/geokit-rails/blob/cc5fd43ab4e69878fb31ebd1fc22918e2952b560/lib/geokit-rails/acts_as_mappable.rb#L387-L399 | train | auto_geocode_field is used to auto geocode the address | [
30522,
13366,
8285,
1035,
20248,
16044,
1035,
4769,
4769,
1027,
2969,
1012,
4604,
1006,
8285,
1035,
20248,
16044,
1035,
2492,
1007,
1012,
2000,
1035,
1055,
20248,
1027,
20248,
23615,
1024,
1024,
20248,
16044,
2869,
1024,
1024,
4800,
3351,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.add_video_frame_stream | def add_video_frame_stream(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:nil, custom_headers:nil)
response = add_video_frame_stream_async(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:timescale, custom_headers:custom_headers).value!
nil
e... | ruby | def add_video_frame_stream(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:nil, custom_headers:nil)
response = add_video_frame_stream_async(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:timescale, custom_headers:custom_headers).value!
nil
e... | [
"def",
"add_video_frame_stream",
"(",
"content_type",
",",
"team_name",
",",
"review_id",
",",
"frame_image_zip",
",",
"frame_metadata",
",",
"timescale",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_video_frame_stream_async",
"(",
"cont... | Use this method to add frames for a video review.Timescale: This parameter is
a factor which is used to convert the timestamp on a frame into milliseconds.
Timescale is provided in the output of the Content Moderator video media
processor on the Azure Media Services platform.Timescale in the Video
Moderation output... | [
"Use",
"this",
"method",
"to",
"add",
"frames",
"for",
"a",
"video",
"review",
".",
"Timescale",
":",
"This",
"parameter",
"is",
"a",
"factor",
"which",
"is",
"used",
"to",
"convert",
"the",
"timestamp",
"on",
"a",
"frame",
"into",
"milliseconds",
".",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L1721-L1724 | train | Adds a video frame stream to the review. | [
30522,
13366,
5587,
1035,
2678,
1035,
4853,
1035,
5460,
1006,
4180,
1035,
2828,
1010,
2136,
1035,
2171,
1010,
3319,
1035,
8909,
1010,
4853,
1035,
3746,
1035,
14101,
1010,
4853,
1035,
27425,
1010,
2335,
9289,
2063,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Tasks.begin_create_with_http_info | def begin_create_with_http_info(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_with_http_info(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"task_create_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
... | Creates a task for a container registry with the specified parameters.
@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 task_name [String] The name of the container registry task.
@p... | [
"Creates",
"a",
"task",
"for",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb#L506-L508 | train | Creates a task in a registry. | [
30522,
13366,
4088,
1035,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4708,
1035,
2171,
1010,
4708,
1035,
3443,
1035,
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... |
rails/rails | activerecord/lib/active_record/transactions.rb | ActiveRecord.Transactions.rolledback! | def rolledback!(force_restore_state: false, should_run_callbacks: true) #:nodoc:
if should_run_callbacks && trigger_transactional_callbacks?
_run_rollback_callbacks
_run_rollback_without_transaction_enrollment_callbacks
end
ensure
restore_transaction_record_state(force_restore_stat... | ruby | def rolledback!(force_restore_state: false, should_run_callbacks: true) #:nodoc:
if should_run_callbacks && trigger_transactional_callbacks?
_run_rollback_callbacks
_run_rollback_without_transaction_enrollment_callbacks
end
ensure
restore_transaction_record_state(force_restore_stat... | [
"def",
"rolledback!",
"(",
"force_restore_state",
":",
"false",
",",
"should_run_callbacks",
":",
"true",
")",
"#:nodoc:",
"if",
"should_run_callbacks",
"&&",
"trigger_transactional_callbacks?",
"_run_rollback_callbacks",
"_run_rollback_without_transaction_enrollment_callbacks",
... | Call the #after_rollback callbacks. The +force_restore_state+ argument indicates if the record
state should be rolled back to the beginning or just to the last savepoint. | [
"Call",
"the",
"#after_rollback",
"callbacks",
".",
"The",
"+",
"force_restore_state",
"+",
"argument",
"indicates",
"if",
"the",
"record",
"state",
"should",
"be",
"rolled",
"back",
"to",
"the",
"beginning",
"or",
"just",
"to",
"the",
"last",
"savepoint",
"."... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/transactions.rb#L348-L356 | train | This method is called when a transaction has been rolled back. | [
30522,
13366,
4565,
5963,
999,
1006,
2486,
1035,
9239,
1035,
2110,
1024,
6270,
1010,
2323,
1035,
2448,
1035,
2655,
12221,
1024,
2995,
1007,
1001,
1024,
7293,
10085,
1024,
2065,
2323,
1035,
2448,
1035,
2655,
12221,
1004,
1004,
9495,
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 | sigh/lib/sigh/runner.rb | Sigh.Runner.profile_type | def profile_type
return @profile_type if @profile_type
@profile_type = Spaceship.provisioning_profile.app_store
@profile_type = Spaceship.provisioning_profile.in_house if Spaceship.client.in_house?
@profile_type = Spaceship.provisioning_profile.ad_hoc if Sigh.config[:adhoc]
@profile_type ... | ruby | def profile_type
return @profile_type if @profile_type
@profile_type = Spaceship.provisioning_profile.app_store
@profile_type = Spaceship.provisioning_profile.in_house if Spaceship.client.in_house?
@profile_type = Spaceship.provisioning_profile.ad_hoc if Sigh.config[:adhoc]
@profile_type ... | [
"def",
"profile_type",
"return",
"@profile_type",
"if",
"@profile_type",
"@profile_type",
"=",
"Spaceship",
".",
"provisioning_profile",
".",
"app_store",
"@profile_type",
"=",
"Spaceship",
".",
"provisioning_profile",
".",
"in_house",
"if",
"Spaceship",
".",
"client",
... | The kind of provisioning profile we're interested in | [
"The",
"kind",
"of",
"provisioning",
"profile",
"we",
"re",
"interested",
"in"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/sigh/lib/sigh/runner.rb#L55-L65 | train | Returns the profile type for this object. | [
30522,
13366,
6337,
1035,
2828,
2709,
1030,
6337,
1035,
2828,
2065,
1030,
6337,
1035,
2828,
1030,
6337,
1035,
2828,
1027,
25516,
1012,
9347,
2075,
1035,
6337,
1012,
10439,
1035,
3573,
1030,
6337,
1035,
2828,
1027,
25516,
1012,
9347,
2075,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameter... | ruby | def begin_create_or_update_with_http_info(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameter... | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"virtual_wan_name",
",",
"p2svpn_server_configuration_name",
",",
"p2svpn_server_configuration_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_... | Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it
doesn't exist else updates the existing P2SVpnServerConfiguration.
@param resource_group_name [String] The resource group name of the
VirtualWan.
@param virtual_wan_name [String] The name of the VirtualWan.
@param p2svpn_server_configuration... | [
"Creates",
"a",
"P2SVpnServerConfiguration",
"to",
"associate",
"with",
"a",
"VirtualWan",
"if",
"it",
"doesn",
"t",
"exist",
"else",
"updates",
"the",
"existing",
"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#L355-L357 | train | Creates or updates a virtual wan server configuration. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
14071,
1035,
2171,
1010,
1052,
2475,
2015,
2615,
2361,
2078,
1035,
8241,
1035,
9563,
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 | fastlane_core/lib/fastlane_core/project.rb | FastlaneCore.Project.default_build_settings | def default_build_settings(key: nil, optional: true)
options[:scheme] ||= schemes.first if is_workspace
build_settings(key: key, optional: optional)
end | ruby | def default_build_settings(key: nil, optional: true)
options[:scheme] ||= schemes.first if is_workspace
build_settings(key: key, optional: optional)
end | [
"def",
"default_build_settings",
"(",
"key",
":",
"nil",
",",
"optional",
":",
"true",
")",
"options",
"[",
":scheme",
"]",
"||=",
"schemes",
".",
"first",
"if",
"is_workspace",
"build_settings",
"(",
"key",
":",
"key",
",",
"optional",
":",
"optional",
")... | Returns the build settings and sets the default scheme to the options hash | [
"Returns",
"the",
"build",
"settings",
"and",
"sets",
"the",
"default",
"scheme",
"to",
"the",
"options",
"hash"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/project.rb#L385-L388 | train | Default build settings for the workspace | [
30522,
13366,
12398,
1035,
3857,
1035,
10906,
1006,
3145,
1024,
9152,
2140,
1010,
11887,
1024,
2995,
1007,
7047,
1031,
1024,
5679,
1033,
1064,
1064,
1027,
11683,
1012,
2034,
2065,
2003,
1035,
2573,
15327,
3857,
1035,
10906,
1006,
3145,
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... |
rmagick/rmagick | examples/histogram.rb | Magick.Image.pixel_intensity | def pixel_intensity(pixel)
(306 * (pixel.red & MAX_QUANTUM) + 601 * (pixel.green & MAX_QUANTUM) + 117 * (pixel.blue & MAX_QUANTUM)) / 1024
end | ruby | def pixel_intensity(pixel)
(306 * (pixel.red & MAX_QUANTUM) + 601 * (pixel.green & MAX_QUANTUM) + 117 * (pixel.blue & MAX_QUANTUM)) / 1024
end | [
"def",
"pixel_intensity",
"(",
"pixel",
")",
"(",
"306",
"*",
"(",
"pixel",
".",
"red",
"&",
"MAX_QUANTUM",
")",
"+",
"601",
"*",
"(",
"pixel",
".",
"green",
"&",
"MAX_QUANTUM",
")",
"+",
"117",
"*",
"(",
"pixel",
".",
"blue",
"&",
"MAX_QUANTUM",
"... | Returns a value between 0 and MAX_QUANTUM. Same as the PixelIntensity macro. | [
"Returns",
"a",
"value",
"between",
"0",
"and",
"MAX_QUANTUM",
".",
"Same",
"as",
"the",
"PixelIntensity",
"macro",
"."
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/examples/histogram.rb#L190-L192 | train | Returns the intensity of a pixel | [
30522,
13366,
22138,
1035,
8015,
1006,
22138,
1007,
1006,
24622,
1008,
1006,
22138,
1012,
2417,
1004,
4098,
1035,
8559,
1007,
1009,
3438,
2487,
1008,
1006,
22138,
1012,
2665,
1004,
4098,
1035,
8559,
1007,
1009,
12567,
1008,
1006,
22138,
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_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_service_backup_configuration_info | def get_service_backup_configuration_info(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_service_backup_configuration_info_async(service_id, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
... | ruby | def get_service_backup_configuration_info(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_service_backup_configuration_info_async(service_id, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
... | [
"def",
"get_service_backup_configuration_info",
"(",
"service_id",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_service_backup_configuration_info_async",
"... | Gets the Service Fabric service backup configuration information.
Gets the Service Fabric backup configuration information for the service and
the partitions under this service.
@param service_id [String] The identity of the service. This is typically the
full name of the service without the 'fabric:' URI scheme.... | [
"Gets",
"the",
"Service",
"Fabric",
"service",
"backup",
"configuration",
"information",
"."
] | 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#L24118-L24121 | train | Gets backup configuration information for the specified service. | [
30522,
13366,
2131,
1035,
2326,
1035,
10200,
1035,
9563,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
4098,
1035,
3463,
1024,
1014,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/subscription.rb | Aws::SNS.Subscription.set_attributes | def set_attributes(options = {})
options = options.merge(subscription_arn: @arn)
resp = @client.set_subscription_attributes(options)
resp.data
end | ruby | def set_attributes(options = {})
options = options.merge(subscription_arn: @arn)
resp = @client.set_subscription_attributes(options)
resp.data
end | [
"def",
"set_attributes",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"subscription_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"set_subscription_attributes",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
subscription.set_attributes({
attribute_name: "attributeName", # required
attribute_value: "attributeValue",
})
@param [Hash] options ({})
@option options [required, String] :attribute_name
A map of attributes with their corresponding values.
The... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/subscription.rb#L142-L146 | train | Set the attributes of the subscription | [
30522,
13366,
2275,
1035,
12332,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
15002,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2275,
1035,
15002,
1035,
12332,
1006,
70... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
petergoldstein/dalli | lib/dalli/client.rb | Dalli.Client.cas! | def cas!(key, ttl=nil, options=nil, &block)
cas_core(key, true, ttl, options, &block)
end | ruby | def cas!(key, ttl=nil, options=nil, &block)
cas_core(key, true, ttl, options, &block)
end | [
"def",
"cas!",
"(",
"key",
",",
"ttl",
"=",
"nil",
",",
"options",
"=",
"nil",
",",
"&",
"block",
")",
"cas_core",
"(",
"key",
",",
"true",
",",
"ttl",
",",
"options",
",",
"block",
")",
"end"
] | like #cas, but will yield to the block whether or not the value
already exists.
Returns:
- false if the value was changed by someone else.
- true if the value was successfully updated. | [
"like",
"#cas",
"but",
"will",
"yield",
"to",
"the",
"block",
"whether",
"or",
"not",
"the",
"value",
"already",
"exists",
"."
] | 5755dbfd06e333a8239f976d4b10492b4555b726 | https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/client.rb#L125-L127 | train | CAS the value at key | [
30522,
13366,
25222,
999,
1006,
3145,
1010,
23746,
2140,
1027,
9152,
2140,
1010,
7047,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
25222,
1035,
4563,
1006,
3145,
1010,
2995,
1010,
23746,
2140,
1010,
7047,
1010,
1004,
3796,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.list_connections | def list_connections(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_connections(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_connections",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_connections_as_lazy",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"custom_headers",
":custom_... | Gets all the connections in a virtual network gateway.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_name [String] The name of the virtual network
gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP re... | [
"Gets",
"all",
"the",
"connections",
"in",
"a",
"virtual",
"network",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L354-L357 | train | Gets all the connections in a virtual network gateway. | [
30522,
13366,
2862,
1035,
7264,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
7264,
1035,
2004,
1035,
13971,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb | Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.begin_stop | def begin_stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
response = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
response = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_stop",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"cust... | Stop StreamingEndpoint
Stops an existing StreamingEndpoint.
@param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param streaming_endpoint_name [String] The name of the StreamingEndpoint.
@param custom_hea... | [
"Stop",
"StreamingEndpoint"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb#L998-L1001 | train | Stops the streaming endpoint. | [
30522,
13366,
4088,
1035,
2644,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
30524,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
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_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.list_storage_containers | def list_storage_containers(resource_group_name, account_name, storage_account_name, custom_headers:nil)
first_page = list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_storage_containers(resource_group_name, account_name, storage_account_name, custom_headers:nil)
first_page = list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_storage_containers",
"(",
"resource_group_name",
",",
"account_name",
",",
"storage_account_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_storage_containers_as_lazy",
"(",
"resource_group_name",
",",
"account_name",
",",
"storage_accou... | Lists the Azure Storage containers, if any, associated with the specified
Data Lake Analytics and Azure Storage account combination. The response
includes a link to the next page of results, if any.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics accou... | [
"Lists",
"the",
"Azure",
"Storage",
"containers",
"if",
"any",
"associated",
"with",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"and",
"Azure",
"Storage",
"account",
"combination",
".",
"The",
"response",
"includes",
"a",
"link",
"to",
"the",
"next",
"pa... | 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#L579-L582 | train | Gets all the containers in a storage account. | [
30522,
13366,
2862,
1035,
5527,
1035,
16143,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
5527,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.patch_async | def patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
# Send request
promise = begin_patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | ruby | def patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
# Send request
promise = begin_patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | [
"def",
"patch_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_patch_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
","... | @param resource_group_name [String] Name of the resource group in which the
web service is located.
@param web_service_name [String] The name of the web service.
@param patch_payload [WebService] The payload to use to patch the web
service.
@param custom_headers [Hash{String => String}] A hash of custom headers th... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"resource",
"group",
"in",
"which",
"the",
"web",
"service",
"is",
"located",
".",
"@param",
"web_service_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"web",
"service",
".",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L222-L238 | train | Patch a web service. | [
30522,
13366,
8983,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
8983,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lynndylanhurley/devise_token_auth | app/controllers/devise_token_auth/omniauth_callbacks_controller.rb | DeviseTokenAuth.OmniauthCallbacksController.omniauth_params | def omniauth_params
unless defined?(@_omniauth_params)
if request.env['omniauth.params'] && request.env['omniauth.params'].any?
@_omniauth_params = request.env['omniauth.params']
elsif session['dta.omniauth.params'] && session['dta.omniauth.params'].any?
@_omniauth_params ||= s... | ruby | def omniauth_params
unless defined?(@_omniauth_params)
if request.env['omniauth.params'] && request.env['omniauth.params'].any?
@_omniauth_params = request.env['omniauth.params']
elsif session['dta.omniauth.params'] && session['dta.omniauth.params'].any?
@_omniauth_params ||= s... | [
"def",
"omniauth_params",
"unless",
"defined?",
"(",
"@_omniauth_params",
")",
"if",
"request",
".",
"env",
"[",
"'omniauth.params'",
"]",
"&&",
"request",
".",
"env",
"[",
"'omniauth.params'",
"]",
".",
"any?",
"@_omniauth_params",
"=",
"request",
".",
"env",
... | this will be determined differently depending on the action that calls
it. redirect_callbacks is called upon returning from successful omniauth
authentication, and the target params live in an omniauth-specific
request.env variable. this variable is then persisted thru the redirect
using our own dta.omniauth.params... | [
"this",
"will",
"be",
"determined",
"differently",
"depending",
"on",
"the",
"action",
"that",
"calls",
"it",
".",
"redirect_callbacks",
"is",
"called",
"upon",
"returning",
"from",
"successful",
"omniauth",
"authentication",
"and",
"the",
"target",
"params",
"liv... | 0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44 | https://github.com/lynndylanhurley/devise_token_auth/blob/0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb#L88-L103 | train | Returns the params for the omniauth window. | [
30522,
13366,
18168,
6200,
14317,
1035,
11498,
5244,
4983,
4225,
1029,
1006,
1030,
1035,
18168,
6200,
14317,
1035,
11498,
5244,
1007,
2065,
5227,
1012,
4372,
2615,
1031,
1005,
18168,
6200,
14317,
1012,
11498,
5244,
1005,
1033,
1004,
1004,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.get_virtual_network_rule_with_http_info | def get_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
end | ruby | def get_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
end | [
"def",
"get_virtual_network_rule_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"virtual_network_rule_name",
",",
"custom_headers",
":",
"nil",
")",
"get_virtual_network_rule_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"virtual_netw... | Gets an VirtualNetworkRule for a Namespace by rule name.
@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 => St... | [
"Gets",
"an",
"VirtualNetworkRule",
"for",
"a",
"Namespace",
"by",
"rule",
"name",
"."
] | 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#L1272-L1274 | train | Gets the specified virtual network rule. | [
30522,
13366,
2131,
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,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb | Azure::SQL::Mgmt::V2014_04_01.Databases.list_by_server | def list_by_server(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil)
response = list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_server(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil)
response = list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_server",
"(",
"resource_group_name",
",",
"server_name",
",",
"expand",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_server_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"... | Returns a list of databases in a server.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param expand [String] A comma separated list of ... | [
"Returns",
"a",
"list",
"of",
"databases",
"in",
"a",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L440-L443 | train | Gets the list of all the elastic network interfaces in a server. | [
30522,
13366,
2862,
1035,
2011,
1035,
8241,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
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... |
refinery/refinerycms | pages/app/models/refinery/page.rb | Refinery.Page.custom_slug_or_title | def custom_slug_or_title
(Refinery::Pages.use_custom_slugs && custom_slug.presence) ||
menu_title.presence || title.presence
end | ruby | def custom_slug_or_title
(Refinery::Pages.use_custom_slugs && custom_slug.presence) ||
menu_title.presence || title.presence
end | [
"def",
"custom_slug_or_title",
"(",
"Refinery",
"::",
"Pages",
".",
"use_custom_slugs",
"&&",
"custom_slug",
".",
"presence",
")",
"||",
"menu_title",
".",
"presence",
"||",
"title",
".",
"presence",
"end"
] | Returns in cascading order: custom_slug or menu_title or title depending on
which attribute is first found to be present for this page. | [
"Returns",
"in",
"cascading",
"order",
":",
"custom_slug",
"or",
"menu_title",
"or",
"title",
"depending",
"on",
"which",
"attribute",
"is",
"first",
"found",
"to",
"be",
"present",
"for",
"this",
"page",
"."
] | 67f117f937c5264ec0aeabe8e7eac1d562c5bc7b | https://github.com/refinery/refinerycms/blob/67f117f937c5264ec0aeabe8e7eac1d562c5bc7b/pages/app/models/refinery/page.rb#L176-L179 | train | Returns the custom slug or the title | [
30522,
13366,
7661,
1035,
23667,
1035,
2030,
1035,
2516,
1006,
21034,
1024,
1024,
5530,
1012,
2224,
1035,
7661,
1035,
23667,
2015,
1004,
1004,
7661,
1035,
23667,
1012,
3739,
1007,
1064,
1064,
12183,
1035,
2516,
1012,
3739,
1064,
1064,
2516,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | activesupport/lib/active_support/backtrace_cleaner.rb | ActiveSupport.BacktraceCleaner.clean | def clean(backtrace, kind = :silent)
filtered = filter_backtrace(backtrace)
case kind
when :silent
silence(filtered)
when :noise
noise(filtered)
else
filtered
end
end | ruby | def clean(backtrace, kind = :silent)
filtered = filter_backtrace(backtrace)
case kind
when :silent
silence(filtered)
when :noise
noise(filtered)
else
filtered
end
end | [
"def",
"clean",
"(",
"backtrace",
",",
"kind",
"=",
":silent",
")",
"filtered",
"=",
"filter_backtrace",
"(",
"backtrace",
")",
"case",
"kind",
"when",
":silent",
"silence",
"(",
"filtered",
")",
"when",
":noise",
"noise",
"(",
"filtered",
")",
"else",
"fi... | Returns the backtrace after all filters and silencers have been run
against it. Filters run first, then silencers. | [
"Returns",
"the",
"backtrace",
"after",
"all",
"filters",
"and",
"silencers",
"have",
"been",
"run",
"against",
"it",
".",
"Filters",
"run",
"first",
"then",
"silencers",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/backtrace_cleaner.rb#L41-L52 | train | clean the backtrace | [
30522,
13366,
4550,
1006,
2067,
6494,
3401,
1010,
2785,
1027,
1024,
4333,
1007,
21839,
1027,
11307,
1035,
2067,
6494,
3401,
1006,
2067,
6494,
3401,
1007,
2553,
2785,
2043,
1024,
4333,
4223,
1006,
21839,
1007,
2043,
1024,
5005,
5005,
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... |
boazsegev/combine_pdf | lib/combine_pdf/fonts.rb | CombinePDF.Fonts.initiate_library | def initiate_library
# do nothing if the library is already initiated
return false if FONTS_LIBRARY.key? :Helvetica
# font metrics objects to be used
times_metrics = { "\u0000" => { wx: 250, boundingbox: [0, 0, 0, 0] }, '!' => { wx: 333, boundingbox: [130, -9, 238, 676] }, '"' => { wx: 408, boun... | ruby | def initiate_library
# do nothing if the library is already initiated
return false if FONTS_LIBRARY.key? :Helvetica
# font metrics objects to be used
times_metrics = { "\u0000" => { wx: 250, boundingbox: [0, 0, 0, 0] }, '!' => { wx: 333, boundingbox: [130, -9, 238, 676] }, '"' => { wx: 408, boun... | [
"def",
"initiate_library",
"# do nothing if the library is already initiated",
"return",
"false",
"if",
"FONTS_LIBRARY",
".",
"key?",
":Helvetica",
"# font metrics objects to be used",
"times_metrics",
"=",
"{",
"\"\\u0000\"",
"=>",
"{",
"wx",
":",
"250",
",",
"boundingbox"... | this function registers the 14 standard fonts to the library.
it will be called when the module first requests a font from the library.
if the 14 standard fonts are already registered, it will simply return false. | [
"this",
"function",
"registers",
"the",
"14",
"standard",
"fonts",
"to",
"the",
"library",
"."
] | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/fonts.rb#L156-L198 | train | Initialize the library object | [
30522,
13366,
17820,
1035,
3075,
1001,
2079,
2498,
2065,
1996,
3075,
2003,
2525,
7531,
2709,
6270,
2065,
15489,
2015,
1035,
3075,
1012,
3145,
1029,
1024,
2002,
2140,
19510,
5555,
1001,
15489,
12046,
2015,
5200,
2000,
2022,
2109,
2335,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/sheet_view.rb | Axlsx.SheetView.to_xml_string | def to_xml_string(str = '')
str << '<sheetViews>'
str << '<sheetView '
serialized_attributes str
str << '>'
@pane.to_xml_string(str) if @pane
@selections.each do |key, selection|
selection.to_xml_string(str)
end
str << '</sheetView>'
str << '</sheetViews>'
... | ruby | def to_xml_string(str = '')
str << '<sheetViews>'
str << '<sheetView '
serialized_attributes str
str << '>'
@pane.to_xml_string(str) if @pane
@selections.each do |key, selection|
selection.to_xml_string(str)
end
str << '</sheetView>'
str << '</sheetViews>'
... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"'<sheetViews>'",
"str",
"<<",
"'<sheetView '",
"serialized_attributes",
"str",
"str",
"<<",
"'>'",
"@pane",
".",
"to_xml_string",
"(",
"str",
")",
"if",
"@pane",
"@selections",
".",
"each",
"d... | Serializes the data validation
@param [String] str
@return [String] | [
"Serializes",
"the",
"data",
"validation"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/sheet_view.rb#L200-L211 | train | Serialize the object to XML string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1005,
1026,
7123,
8584,
2015,
1028,
1005,
2358,
2099,
1026,
1026,
1005,
1026,
7123,
8584,
1005,
27289,
1035,
12332,
2358,
2099,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_privatedns/lib/2018-09-01/generated/azure_mgmt_privatedns/record_sets.rb | Azure::PrivateDns::Mgmt::V2018_09_01.RecordSets.list_with_http_info | def list_with_http_info(resource_group_name, private_zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil)
list_async(resource_group_name, private_zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(resource_group_name, private_zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil)
list_async(resource_group_name, private_zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"top",
":",
"nil",
",",
"recordsetnamesuffix",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"top"... | Lists all record sets in a Private DNS zone.
@param resource_group_name [String] The name of the resource group.
@param private_zone_name [String] The name of the Private DNS zone (without a
terminating dot).
@param top [Integer] The maximum number of record sets to return. If not
specified, returns up to 100 rec... | [
"Lists",
"all",
"record",
"sets",
"in",
"a",
"Private",
"DNS",
"zone",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_privatedns/lib/2018-09-01/generated/azure_mgmt_privatedns/record_sets.rb#L711-L713 | train | Gets the list of all the records in a Private DNS zone. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2797,
1035,
4224,
1035,
2171,
1010,
2327,
1024,
9152,
2140,
1010,
2636,
3388,
18442,
6342,
26989,
2595,
1024,
9152,
2140,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V1_0.ComputerVisionClient.describe_image_in_stream_with_http_info | def describe_image_in_stream_with_http_info(image, max_candidates:'1', language:nil, custom_headers:nil)
describe_image_in_stream_async(image, max_candidates:max_candidates, language:language, custom_headers:custom_headers).value!
end | ruby | def describe_image_in_stream_with_http_info(image, max_candidates:'1', language:nil, custom_headers:nil)
describe_image_in_stream_async(image, max_candidates:max_candidates, language:language, custom_headers:custom_headers).value!
end | [
"def",
"describe_image_in_stream_with_http_info",
"(",
"image",
",",
"max_candidates",
":",
"'1'",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"describe_image_in_stream_async",
"(",
"image",
",",
"max_candidates",
":max_candidates",
",",
"lang... | This operation generates a description of an image in human readable language
with complete sentences. The description is based on a collection of content
tags, which are also returned by the operation. More than one description can
be generated for each image. Descriptions are ordered by their confidence
score. ... | [
"This",
"operation",
"generates",
"a",
"description",
"of",
"an",
"image",
"in",
"human",
"readable",
"language",
"with",
"complete",
"sentences",
".",
"The",
"description",
"is",
"based",
"on",
"a",
"collection",
"of",
"content",
"tags",
"which",
"are",
"also... | 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#L1778-L1780 | train | Gets the number of documents in an image in an image stream. | [
30522,
13366,
6235,
1035,
3746,
1035,
1999,
1035,
5460,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3746,
1010,
4098,
1035,
5347,
1024,
1005,
1015,
1005,
1010,
2653,
1024,
9152,
2140,
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... |
piotrmurach/github | lib/github_api/pagination.rb | Github.Pagination.page | def page(page_number)
request = page_iterator.get_page(page_number)
self.instance_eval { @env = request.env } if request
request
end | ruby | def page(page_number)
request = page_iterator.get_page(page_number)
self.instance_eval { @env = request.env } if request
request
end | [
"def",
"page",
"(",
"page_number",
")",
"request",
"=",
"page_iterator",
".",
"get_page",
"(",
"page_number",
")",
"self",
".",
"instance_eval",
"{",
"@env",
"=",
"request",
".",
"env",
"}",
"if",
"request",
"request",
"end"
] | Retrieves a specific result for a page given page number.
The <tt>page_number</tt> parameter is not validate, hitting a page
that does not exist will return Github API error. Consequently, if
there is only one page, this method returns nil | [
"Retrieves",
"a",
"specific",
"result",
"for",
"a",
"page",
"given",
"page",
"number",
".",
"The",
"<tt",
">",
"page_number<",
"/",
"tt",
">",
"parameter",
"is",
"not",
"validate",
"hitting",
"a",
"page",
"that",
"does",
"not",
"exist",
"will",
"return",
... | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/pagination.rb#L85-L89 | train | Get the next page of the request | [
30522,
13366,
3931,
1006,
3931,
1035,
2193,
1007,
5227,
1027,
3931,
1035,
2009,
6906,
4263,
1012,
2131,
1035,
3931,
1006,
3931,
1035,
2193,
1007,
2969,
1012,
6013,
1035,
9345,
2140,
1063,
1030,
4372,
2615,
1027,
5227,
1012,
4372,
2615,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/option_group.rb | Aws::RDS.OptionGroup.modify | def modify(options = {})
options = options.merge(option_group_name: @name)
resp = @client.modify_option_group(options)
OptionGroup.new(
name: resp.data.option_group.option_group_name,
data: resp.data.option_group,
client: @client
)
end | ruby | def modify(options = {})
options = options.merge(option_group_name: @name)
resp = @client.modify_option_group(options)
OptionGroup.new(
name: resp.data.option_group.option_group_name,
data: resp.data.option_group,
client: @client
)
end | [
"def",
"modify",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"option_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"modify_option_group",
"(",
"options",
")",
"OptionGroup",
".",
"new",
"(",
"name",
":... | @example Request syntax with placeholder values
optiongroup = option_group.modify({
options_to_include: [
{
option_name: "String", # required
port: 1,
option_version: "String",
db_security_group_memberships: ["String"],
vpc_security_group_memberships: ["Strin... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/option_group.rb#L354-L362 | train | Modify the option group | [
30522,
13366,
19933,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5724,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
19933,
1035,
5724,
1035,
2177,
1006,
7047,
1007,
5724,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/channel.rb | Discordrb.Channel.history | def history(amount, before_id = nil, after_id = nil, around_id = nil)
logs = API::Channel.messages(@bot.token, @id, amount, before_id, after_id, around_id)
JSON.parse(logs).map { |message| Message.new(message, @bot) }
end | ruby | def history(amount, before_id = nil, after_id = nil, around_id = nil)
logs = API::Channel.messages(@bot.token, @id, amount, before_id, after_id, around_id)
JSON.parse(logs).map { |message| Message.new(message, @bot) }
end | [
"def",
"history",
"(",
"amount",
",",
"before_id",
"=",
"nil",
",",
"after_id",
"=",
"nil",
",",
"around_id",
"=",
"nil",
")",
"logs",
"=",
"API",
"::",
"Channel",
".",
"messages",
"(",
"@bot",
".",
"token",
",",
"@id",
",",
"amount",
",",
"before_id... | Retrieves some of this channel's message history.
@param amount [Integer] How many messages to retrieve. This must be less than or equal to 100, if it is higher
than 100 it will be treated as 100 on Discord's side.
@param before_id [Integer] The ID of the most recent message the retrieval should start at, or nil i... | [
"Retrieves",
"some",
"of",
"this",
"channel",
"s",
"message",
"history",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L529-L532 | train | Returns a list of messages that were sent to this channel. | [
30522,
13366,
2381,
1006,
3815,
1010,
2077,
1035,
8909,
1027,
9152,
2140,
1010,
2044,
1035,
8909,
1027,
9152,
2140,
1010,
2105,
1035,
8909,
1027,
9152,
2140,
1007,
15664,
1027,
17928,
1024,
1024,
3149,
1012,
7696,
1006,
1030,
28516,
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... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/job_runner.rb | Bosh::Director.JobRunner.truncate | def truncate(string, len = 128)
stripped = string.strip[0..len]
if stripped.length > len
stripped.gsub(/\s+?(\S+)?$/, "") + "..."
else
stripped
end
end | ruby | def truncate(string, len = 128)
stripped = string.strip[0..len]
if stripped.length > len
stripped.gsub(/\s+?(\S+)?$/, "") + "..."
else
stripped
end
end | [
"def",
"truncate",
"(",
"string",
",",
"len",
"=",
"128",
")",
"stripped",
"=",
"string",
".",
"strip",
"[",
"0",
"..",
"len",
"]",
"if",
"stripped",
".",
"length",
">",
"len",
"stripped",
".",
"gsub",
"(",
"/",
"\\s",
"\\S",
"/",
",",
"\"\"",
")... | Truncates string to fit task result length
@param [String] string The original string
@param [Integer] len Desired string length
@return [String] Truncated string | [
"Truncates",
"string",
"to",
"fit",
"task",
"result",
"length"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/job_runner.rb#L137-L144 | train | Truncate a string to a specified length. | [
30522,
13366,
19817,
4609,
16280,
1006,
5164,
1010,
18798,
1027,
11899,
1007,
10040,
1027,
5164,
1012,
6167,
1031,
1014,
1012,
1012,
18798,
1033,
2065,
10040,
1012,
3091,
1028,
18798,
10040,
1012,
28177,
12083,
1006,
1013,
1032,
1055,
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_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_runs.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowRuns.cancel | def cancel(resource_group_name, workflow_name, run_name, custom_headers:nil)
response = cancel_async(resource_group_name, workflow_name, run_name, custom_headers:custom_headers).value!
nil
end | ruby | def cancel(resource_group_name, workflow_name, run_name, custom_headers:nil)
response = cancel_async(resource_group_name, workflow_name, run_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"cancel",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"custom_headers",
":custom_headers",
... | Cancels a workflow run.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param run_name [String] The workflow run name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Cancels",
"a",
"workflow",
"run",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_runs.rb#L231-L234 | train | Cancels a run. | [
30522,
13366,
17542,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2448,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
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... |
plataformatec/devise | lib/devise/parameter_sanitizer.rb | Devise.ParameterSanitizer.sanitize | def sanitize(action)
permissions = @permitted[action]
if permissions.respond_to?(:call)
cast_to_hash permissions.call(default_params)
elsif permissions.present?
cast_to_hash permit_keys(default_params, permissions)
else
unknown_action!(action)
end
end | ruby | def sanitize(action)
permissions = @permitted[action]
if permissions.respond_to?(:call)
cast_to_hash permissions.call(default_params)
elsif permissions.present?
cast_to_hash permit_keys(default_params, permissions)
else
unknown_action!(action)
end
end | [
"def",
"sanitize",
"(",
"action",
")",
"permissions",
"=",
"@permitted",
"[",
"action",
"]",
"if",
"permissions",
".",
"respond_to?",
"(",
":call",
")",
"cast_to_hash",
"permissions",
".",
"call",
"(",
"default_params",
")",
"elsif",
"permissions",
".",
"prese... | Sanitize the parameters for a specific +action+.
=== Arguments
* +action+ - A +Symbol+ with the action that the controller is
performing, like +sign_up+, +sign_in+, etc.
=== Examples
# Inside the `RegistrationsController#create` action.
resource = build_resource(devise_parameter_sanitizer.sanitize(:si... | [
"Sanitize",
"the",
"parameters",
"for",
"a",
"specific",
"+",
"action",
"+",
"."
] | 07f2712a22aa05b8da61c85307b80a3bd2ed6c4c | https://github.com/plataformatec/devise/blob/07f2712a22aa05b8da61c85307b80a3bd2ed6c4c/lib/devise/parameter_sanitizer.rb#L70-L80 | train | sanitize the given action | [
30522,
13366,
2624,
25090,
4371,
1006,
2895,
1007,
6656,
2015,
1027,
1030,
7936,
1031,
2895,
1033,
2065,
6656,
2015,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2655,
1007,
3459,
1035,
2000,
1035,
23325,
6656,
2015,
1012,
2655,
1006,
12398,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_parameter_group_family.rb | Aws::RDS.DBParameterGroupFamily.engine_default_cluster_parameters | def engine_default_cluster_parameters(options = {})
batches = Enumerator.new do |y|
batch = []
options = options.merge(db_parameter_group_family: @name)
resp = @client.describe_engine_default_cluster_parameters(options)
resp.data.engine_defaults.parameters.each do |p|
bat... | ruby | def engine_default_cluster_parameters(options = {})
batches = Enumerator.new do |y|
batch = []
options = options.merge(db_parameter_group_family: @name)
resp = @client.describe_engine_default_cluster_parameters(options)
resp.data.engine_defaults.parameters.each do |p|
bat... | [
"def",
"engine_default_cluster_parameters",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"batch",
"=",
"[",
"]",
"options",
"=",
"options",
".",
"merge",
"(",
"db_parameter_group_family",
":",
"@name",
... | @!group Associations
@example Request syntax with placeholder values
engine_default_cluster_parameters = db_parameter_group_family.engine_default_cluster_parameters({
filters: [
{
name: "String", # required
values: ["String"], # required
},
],
max_records: 1,
mar... | [
"@!group",
"Associations",
"@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_parameter_group_family.rb#L188-L203 | train | Returns a list of all the engine default cluster parameters | [
30522,
13366,
3194,
1035,
12398,
1035,
9324,
1035,
11709,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
14108,
1027,
1031,
1033,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.ReplicationNetworkMappings.begin_update_with_http_info | def begin_update_with_http_info(fabric_name, network_name, network_mapping_name, input, custom_headers:nil)
begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(fabric_name, network_name, network_mapping_name, input, custom_headers:nil)
begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"fabric_name",
",",
"network_name",
",",
"network_mapping_name",
",",
"input",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"fabric_name",
",",
"network_name",
",",
"network_mapping_name",
",",
"input",
... | Updates network mapping.
The operation to update an ASR network mapping.
@param fabric_name [String] Primary fabric name.
@param network_name [String] Primary network name.
@param network_mapping_name [String] Network mapping name.
@param input [UpdateNetworkMappingInput] Update network mapping input.
@param cu... | [
"Updates",
"network",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb#L699-L701 | train | Updates a network mapping in the specified fabric. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8313,
1035,
2171,
1010,
2897,
1035,
2171,
1010,
2897,
1035,
12375,
1035,
2171,
1010,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
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_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Managers.list_feature_support_status | def list_feature_support_status(resource_group_name, manager_name, filter:nil, custom_headers:nil)
response = list_feature_support_status_async(resource_group_name, manager_name, filter:filter, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_feature_support_status(resource_group_name, manager_name, filter:nil, custom_headers:nil)
response = list_feature_support_status_async(resource_group_name, manager_name, filter:filter, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_feature_support_status",
"(",
"resource_group_name",
",",
"manager_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_feature_support_status_async",
"(",
"resource_group_name",
",",
"manager_name",
",",
"filter"... | Lists the features and their support status
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param filter [String] OData Filter options
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@retur... | [
"Lists",
"the",
"features",
"and",
"their",
"support",
"status"
] | 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/managers.rb#L1188-L1191 | train | Gets the feature support status of the specified managed product. | [
30522,
13366,
2862,
1035,
3444,
1035,
2490,
1035,
3570,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
3444,
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... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.hostname= | def hostname=(new_hostname)
if new_hostname &&
(new_hostname.respond_to?(:ipv4?) || new_hostname.respond_to?(:ipv6?))
new_hostname = new_hostname.to_s
elsif new_hostname && !new_hostname.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_hostname.class} into String."
... | ruby | def hostname=(new_hostname)
if new_hostname &&
(new_hostname.respond_to?(:ipv4?) || new_hostname.respond_to?(:ipv6?))
new_hostname = new_hostname.to_s
elsif new_hostname && !new_hostname.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_hostname.class} into String."
... | [
"def",
"hostname",
"=",
"(",
"new_hostname",
")",
"if",
"new_hostname",
"&&",
"(",
"new_hostname",
".",
"respond_to?",
"(",
":ipv4?",
")",
"||",
"new_hostname",
".",
"respond_to?",
"(",
":ipv6?",
")",
")",
"new_hostname",
"=",
"new_hostname",
".",
"to_s",
"e... | This method is same as URI::Generic#host= except
the argument can be a bare IPv6 address (or 'IPvFuture').
@see Addressable::URI#host=
@param [String, #to_str] new_hostname The new hostname for this URI. | [
"This",
"method",
"is",
"same",
"as",
"URI",
"::",
"Generic#host",
"=",
"except",
"the",
"argument",
"can",
"be",
"a",
"bare",
"IPv6",
"address",
"(",
"or",
"IPvFuture",
")",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1159-L1169 | train | Sets the hostname of the connection. | [
30522,
13366,
3677,
18442,
1027,
1006,
2047,
1035,
3677,
18442,
1007,
2065,
2047,
1035,
3677,
18442,
1004,
1004,
1006,
2047,
1035,
3677,
18442,
30524,
2047,
1035,
3677,
18442,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
12997,
2615,
2575,
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... |
jekyll/jekyll-admin | lib/jekyll-admin/file_helper.rb | JekyllAdmin.FileHelper.delete_file | def delete_file(path)
Jekyll.logger.debug "DELETING:", path
FileUtils.rm_f sanitized_path(path)
site.process
end | ruby | def delete_file(path)
Jekyll.logger.debug "DELETING:", path
FileUtils.rm_f sanitized_path(path)
site.process
end | [
"def",
"delete_file",
"(",
"path",
")",
"Jekyll",
".",
"logger",
".",
"debug",
"\"DELETING:\"",
",",
"path",
"FileUtils",
".",
"rm_f",
"sanitized_path",
"(",
"path",
")",
"site",
".",
"process",
"end"
] | Delete the file at the given path | [
"Delete",
"the",
"file",
"at",
"the",
"given",
"path"
] | bc053b3b93faba679e8666091c42c47970e3bb5e | https://github.com/jekyll/jekyll-admin/blob/bc053b3b93faba679e8666091c42c47970e3bb5e/lib/jekyll-admin/file_helper.rb#L33-L37 | train | Delete a file from the cache | [
30522,
13366,
3972,
12870,
1035,
5371,
1006,
4130,
1007,
15333,
4801,
3363,
1012,
8833,
4590,
1012,
2139,
8569,
2290,
1000,
3972,
20624,
3070,
1024,
1000,
1010,
4130,
5371,
21823,
4877,
1012,
28549,
1035,
1042,
2624,
25090,
5422,
1035,
4130... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_replica_health_using_policy_with_http_info | def get_replica_health_using_policy_with_http_info(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, application_health_policy... | ruby | def get_replica_health_using_policy_with_http_info(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, application_health_policy... | [
"def",
"get_replica_health_using_policy_with_http_info",
"(",
"partition_id",
",",
"replica_id",
",",
"events_health_state_filter",
":",
"0",
",",
"application_health_policy",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_replica_he... | Gets the health of a Service Fabric stateful service replica or stateless
service instance using the specified policy.
Gets the health of a Service Fabric stateful service replica or stateless
service instance.
Use EventsHealthStateFilter to filter the collection of health events
reported on the cluster based on ... | [
"Gets",
"the",
"health",
"of",
"a",
"Service",
"Fabric",
"stateful",
"service",
"replica",
"or",
"stateless",
"service",
"instance",
"using",
"the",
"specified",
"policy",
"."
] | 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#L14960-L14962 | train | Gets the health of the replica using the specified policy. | [
30522,
13366,
2131,
1035,
15059,
1035,
2740,
1035,
2478,
1035,
3343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
15059,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
4646,
1035,
2740,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_cluster_event_list_with_http_info | def get_cluster_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
get_cluster_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_an... | ruby | def get_cluster_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
get_cluster_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_an... | [
"def",
"get_cluster_event_list_with_http_info",
"(",
"start_time_utc",
",",
"end_time_utc",
",",
"timeout",
":",
"60",
",",
"events_types_filter",
":",
"nil",
",",
"exclude_analysis_events",
":",
"nil",
",",
"skip_correlation_lookup",
":",
"nil",
",",
"custom_headers",
... | Gets all Cluster-related events.
The response is list of ClusterEvent objects.
@param start_time_utc [String] The start time of a lookup query in ISO UTC
yyyy-MM-ddTHH:mm:ssZ.
@param end_time_utc [String] The end time of a lookup query in ISO UTC
yyyy-MM-ddTHH:mm:ssZ.
@param timeout [Integer] The server timeout... | [
"Gets",
"all",
"Cluster",
"-",
"related",
"events",
"."
] | 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#L27243-L27245 | train | Gets the cluster event list. | [
30522,
13366,
2131,
1035,
9324,
1035,
2724,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2707,
1035,
2051,
1035,
11396,
1010,
2203,
1035,
2051,
1035,
11396,
1010,
2051,
5833,
1024,
3438,
1010,
2824,
1035,
4127,
1035,
11307,
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... |
daddyz/phonelib | lib/phonelib/phone_analyzer.rb | Phonelib.PhoneAnalyzer.analyze | def analyze(phone, passed_country)
country = country_or_default_country passed_country
result = parse_country(phone, country)
d_result = case
when result && result.values.find { |e| e[:valid].any? }
# all is good, return result
when passed_country.... | ruby | def analyze(phone, passed_country)
country = country_or_default_country passed_country
result = parse_country(phone, country)
d_result = case
when result && result.values.find { |e| e[:valid].any? }
# all is good, return result
when passed_country.... | [
"def",
"analyze",
"(",
"phone",
",",
"passed_country",
")",
"country",
"=",
"country_or_default_country",
"passed_country",
"result",
"=",
"parse_country",
"(",
"phone",
",",
"country",
")",
"d_result",
"=",
"case",
"when",
"result",
"&&",
"result",
".",
"values... | parses provided phone if it is valid for country data and
returns result of analyze
==== Attributes
* +phone+ - Phone number for parsing
* +passed_country+ - Country provided for parsing. Must be ISO code of
country (2 letters) like 'US', 'us' or :us for United States | [
"parses",
"provided",
"phone",
"if",
"it",
"is",
"valid",
"for",
"country",
"data",
"and",
"returns",
"result",
"of",
"analyze"
] | aa0023eab7c896b71275bf342bc7f49735cbdbbf | https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone_analyzer.rb#L18-L33 | train | Parses the phone and returns the correct result | [
30522,
13366,
17908,
1006,
3042,
1010,
2979,
1035,
2406,
1007,
2406,
1027,
2406,
1035,
2030,
1035,
12398,
1035,
2406,
2979,
1035,
2406,
2765,
1027,
11968,
3366,
1035,
2406,
1006,
3042,
1010,
2406,
1007,
1040,
1035,
2765,
1027,
2553,
2043,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
david942j/one_gadget | lib/one_gadget/helper.rb | OneGadget.Helper.download_build | def download_build(file)
temp = Tempfile.new(['gadgets', file + '.rb'])
temp.write(url_request(url_of_file(File.join('lib', 'one_gadget', 'builds', file + '.rb'))))
temp.tap(&:close)
end | ruby | def download_build(file)
temp = Tempfile.new(['gadgets', file + '.rb'])
temp.write(url_request(url_of_file(File.join('lib', 'one_gadget', 'builds', file + '.rb'))))
temp.tap(&:close)
end | [
"def",
"download_build",
"(",
"file",
")",
"temp",
"=",
"Tempfile",
".",
"new",
"(",
"[",
"'gadgets'",
",",
"file",
"+",
"'.rb'",
"]",
")",
"temp",
".",
"write",
"(",
"url_request",
"(",
"url_of_file",
"(",
"File",
".",
"join",
"(",
"'lib'",
",",
"'o... | Download the latest version of +file+ in +lib/one_gadget/builds/+ from remote repo.
@param [String] file The filename desired.
@return [Tempfile] The temp file be created. | [
"Download",
"the",
"latest",
"version",
"of",
"+",
"file",
"+",
"in",
"+",
"lib",
"/",
"one_gadget",
"/",
"builds",
"/",
"+",
"from",
"remote",
"repo",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/helper.rb#L156-L160 | train | Download a build from one_gadget | [
30522,
13366,
8816,
1035,
3857,
1006,
5371,
1007,
8915,
8737,
1027,
8915,
8737,
8873,
2571,
1012,
2047,
1006,
1031,
1005,
11721,
28682,
1005,
1010,
5371,
1009,
1005,
1012,
21144,
1005,
1033,
30524,
1006,
24471,
2140,
1035,
5227,
1006,
24471... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
ms-ati/docile | lib/docile/execution.rb | Docile.Execution.exec_in_proxy_context | def exec_in_proxy_context(dsl, proxy_type, *args, &block)
block_context = eval("self", block.binding)
proxy_context = proxy_type.new(dsl, block_context)
begin
block_context.instance_variables.each do |ivar|
value_from_block = block_context.instance_variable_get(ivar)
proxy_... | ruby | def exec_in_proxy_context(dsl, proxy_type, *args, &block)
block_context = eval("self", block.binding)
proxy_context = proxy_type.new(dsl, block_context)
begin
block_context.instance_variables.each do |ivar|
value_from_block = block_context.instance_variable_get(ivar)
proxy_... | [
"def",
"exec_in_proxy_context",
"(",
"dsl",
",",
"proxy_type",
",",
"*",
"args",
",",
"&",
"block",
")",
"block_context",
"=",
"eval",
"(",
"\"self\"",
",",
"block",
".",
"binding",
")",
"proxy_context",
"=",
"proxy_type",
".",
"new",
"(",
"dsl",
",",
"b... | Execute a block in the context of an object whose methods represent the
commands in a DSL, using a specific proxy class.
@param dsl [Object] context object whose methods make up the
(initial) DSL
@param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy]
... | [
"Execute",
"a",
"block",
"in",
"the",
"context",
"of",
"an",
"object",
"whose",
"methods",
"represent",
"the",
"commands",
"in",
"a",
"DSL",
"using",
"a",
"specific",
"proxy",
"class",
"."
] | 67517e7573f1dc511922534078d68659403e0ac6 | https://github.com/ms-ati/docile/blob/67517e7573f1dc511922534078d68659403e0ac6/lib/docile/execution.rb#L17-L38 | train | exec_in_proxy_context is used to execute the proxy in the block context | [
30522,
13366,
4654,
8586,
1035,
1999,
1035,
24540,
1035,
6123,
1006,
16233,
2140,
1010,
24540,
1035,
2828,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
3796,
1035,
6123,
1027,
9345,
2140,
1006,
1000,
2969,
1000,
1010,
3796,
1012,
8031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/user.rb | Aws::IAM.User.create_access_key_pair | def create_access_key_pair(options = {})
options = options.merge(user_name: @name)
resp = @client.create_access_key(options)
AccessKeyPair.new(
user_name: @name,
id: resp.data.access_key.access_key_id,
secret: resp.data.access_key.secret_access_key,
data: resp.data.acce... | ruby | def create_access_key_pair(options = {})
options = options.merge(user_name: @name)
resp = @client.create_access_key(options)
AccessKeyPair.new(
user_name: @name,
id: resp.data.access_key.access_key_id,
secret: resp.data.access_key.secret_access_key,
data: resp.data.acce... | [
"def",
"create_access_key_pair",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"create_access_key",
"(",
"options",
")",
"AccessKeyPair",
".",
"new",
"(",
"use... | @example Request syntax with placeholder values
user.create_access_key_pair()
@param [Hash] options ({})
@return [AccessKeyPair] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb#L409-L419 | train | Create an access key pair | [
30522,
13366,
3443,
1035,
3229,
1035,
3145,
1035,
3940,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
3229,
1035,
3145,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.begin_resume | def begin_resume(resource_group_name, server_name, custom_headers:nil)
response = begin_resume_async(resource_group_name, server_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_resume(resource_group_name, server_name, custom_headers:nil)
response = begin_resume_async(resource_group_name, server_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_resume",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_resume_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
... | Resumes 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... | [
"Resumes",
"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#L1705-L1708 | train | Resumes a managed cluster. | [
30522,
13366,
4088,
1035,
13746,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
13746,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
httprb/http | lib/http/headers.rb | HTTP.Headers.add | def add(name, value)
name = normalize_header name.to_s
Array(value).each { |v| @pile << [name, validate_value(v)] }
end | ruby | def add(name, value)
name = normalize_header name.to_s
Array(value).each { |v| @pile << [name, validate_value(v)] }
end | [
"def",
"add",
"(",
"name",
",",
"value",
")",
"name",
"=",
"normalize_header",
"name",
".",
"to_s",
"Array",
"(",
"value",
")",
".",
"each",
"{",
"|",
"v",
"|",
"@pile",
"<<",
"[",
"name",
",",
"validate_value",
"(",
"v",
")",
"]",
"}",
"end"
] | Appends header.
@param [#to_s] name header name
@param [Array<#to_s>, #to_s] value header value(s) to be appended
@return [void] | [
"Appends",
"header",
"."
] | f37a10ea4fab3ee411907ea2e4251ddf0ca33a93 | https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/headers.rb#L51-L54 | train | Add a new header to the header list | [
30522,
13366,
5587,
1006,
2171,
1010,
3643,
1007,
2171,
1027,
3671,
4697,
1035,
20346,
2171,
1012,
2000,
1035,
1055,
9140,
1006,
3643,
1007,
1012,
2169,
1063,
1064,
1058,
1064,
1030,
8632,
1026,
1026,
1031,
2171,
1010,
9398,
3686,
1035,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/service_endpoint_policies.rb | Azure::Network::Mgmt::V2018_07_01.ServiceEndpointPolicies.delete | def delete(resource_group_name, service_endpoint_policy_name, custom_headers:nil)
response = delete_async(resource_group_name, service_endpoint_policy_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, service_endpoint_policy_name, custom_headers:nil)
response = delete_async(resource_group_name, service_endpoint_policy_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Deletes the specified service endpoint policy.
@param resource_group_name [String] The name of the resource group.
@param service_endpoint_policy_name [String] The name of the service endpoint
policy.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"service",
"endpoint",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/service_endpoint_policies.rb#L33-L36 | train | Deletes the specified service endpoint policy. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2203,
8400,
1035,
3343,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.create_or_update_at_resource_level_with_http_info | def create_or_update_at_resource_level_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers:nil)
create_or_update_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, re... | ruby | def create_or_update_at_resource_level_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers:nil)
create_or_update_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, re... | [
"def",
"create_or_update_at_resource_level_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"lock_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
... | Create or update a management lock at the resource level or any level below
resource.
@param resource_group_name [String] The name of the resource group.
@param resource_provider_namespace [String] Resource identity.
@param parent_resource_path [String] Resource identity.
@param resource_type [String] Resource id... | [
"Create",
"or",
"update",
"a",
"management",
"lock",
"at",
"the",
"resource",
"level",
"or",
"any",
"level",
"below",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L358-L360 | train | Creates or updates a lock at resource level. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2012,
1035,
7692,
1035,
2504,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/available_resource_group_delegations.rb | Azure::Network::Mgmt::V2019_02_01.AvailableResourceGroupDelegations.list | def list(location, resource_group_name, custom_headers:nil)
first_page = list_as_lazy(location, resource_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list(location, resource_group_name, custom_headers:nil)
first_page = list_as_lazy(location, resource_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list",
"(",
"location",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_as_lazy",
"(",
"location",
",",
"resource_group_name",
",",
"custom_headers",
":custom_headers",
")",
"first_page",
".",
"get_all_items",
"en... | Gets all of the available subnet delegations for this resource group in this
region.
@param location [String] The location of the domain name.
@param resource_group_name [String] The name of the resource group.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP ... | [
"Gets",
"all",
"of",
"the",
"available",
"subnet",
"delegations",
"for",
"this",
"resource",
"group",
"in",
"this",
"region",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/available_resource_group_delegations.rb#L35-L38 | train | Gets all the available advisors. | [
30522,
13366,
2862,
1006,
3295,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2004,
1035,
13971,
1006,
3295,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.update_tag | def update_tag(project_id, tag_id, updated_tag, custom_headers:nil)
response = update_tag_async(project_id, tag_id, updated_tag, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_tag(project_id, tag_id, updated_tag, custom_headers:nil)
response = update_tag_async(project_id, tag_id, updated_tag, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_tag",
"(",
"project_id",
",",
"tag_id",
",",
"updated_tag",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_tag_async",
"(",
"project_id",
",",
"tag_id",
",",
"updated_tag",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Update a tag.
@param project_id The project id.
@param tag_id The id of the target tag.
@param updated_tag [Tag] The updated tag model.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Tag] operation results. | [
"Update",
"a",
"tag",
"."
] | 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#L4391-L4394 | train | Updates a tag in a project. | [
30522,
13366,
10651,
1035,
6415,
1006,
2622,
1035,
8909,
1010,
6415,
1035,
8909,
1010,
7172,
1035,
6415,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
6415,
1035,
2004,
6038,
2278,
1006,
2622,
1035,
8909,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.