repo stringclasses 235
values | path stringlengths 11 168 | func_name stringlengths 12 143 | original_string stringlengths 83 6.91k | language stringclasses 1
value | code stringlengths 83 6.91k | code_tokens listlengths 15 1.01k | docstring stringlengths 5 25.7k | docstring_tokens listlengths 1 427 | sha stringclasses 235
values | url stringlengths 99 268 | partition stringclasses 1
value | summary stringlengths 7 202 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb | Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_database_with_http_info | def list_by_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_dat... | ruby | def list_by_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_dat... | [
"def",
"list_by_database_with_http_info",
"(",
"location_name",
",",
"long_term_retention_server_name",
",",
"long_term_retention_database_name",
",",
"only_latest_per_database",
":",
"nil",
",",
"database_state",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by... | Lists all long term retention backups for a database.
@param location_name [String] The location of the database
@param long_term_retention_server_name [String] The name of the server
@param long_term_retention_database_name [String] The name of the database
@param only_latest_per_database [Boolean] Whether or not... | [
"Lists",
"all",
"long",
"term",
"retention",
"backups",
"for",
"a",
"database",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L206-L208 | train | Gets the list of documents in a database. | [
30522,
13366,
2862,
1035,
2011,
1035,
7809,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3295,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
8241,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
7809,
1035,
2171,
1010,
2069,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sumoheavy/jira-ruby | lib/jira/base.rb | JIRA.Base.save | def save(attrs, path = url)
begin
save_status = save!(attrs, path)
rescue JIRA::HTTPError => exception
begin
set_attrs_from_response(exception.response) # Merge error status generated by JIRA REST API
rescue JSON::ParserError => parse_exception
set_attrs('exceptio... | ruby | def save(attrs, path = url)
begin
save_status = save!(attrs, path)
rescue JIRA::HTTPError => exception
begin
set_attrs_from_response(exception.response) # Merge error status generated by JIRA REST API
rescue JSON::ParserError => parse_exception
set_attrs('exceptio... | [
"def",
"save",
"(",
"attrs",
",",
"path",
"=",
"url",
")",
"begin",
"save_status",
"=",
"save!",
"(",
"attrs",
",",
"path",
")",
"rescue",
"JIRA",
"::",
"HTTPError",
"=>",
"exception",
"begin",
"set_attrs_from_response",
"(",
"exception",
".",
"response",
... | Saves the specified resource attributes by sending either a POST or PUT
request to JIRA, depending on resource.new_record?
Accepts an attributes hash of the values to be saved. Will return false
if the request fails. | [
"Saves",
"the",
"specified",
"resource",
"attributes",
"by",
"sending",
"either",
"a",
"POST",
"or",
"PUT",
"request",
"to",
"JIRA",
"depending",
"on",
"resource",
".",
"new_record?"
] | 25e896f227ab81c528e9678708cb546d2f62f018 | https://github.com/sumoheavy/jira-ruby/blob/25e896f227ab81c528e9678708cb546d2f62f018/lib/jira/base.rb#L359-L376 | train | Save the attributes to the specified path. | [
30522,
13366,
3828,
1006,
2012,
16344,
2015,
1010,
4130,
1027,
24471,
2140,
1007,
4088,
3828,
1035,
3570,
1027,
3828,
999,
1006,
2012,
16344,
2015,
1010,
4130,
1007,
5343,
10147,
2527,
1024,
1024,
8299,
2121,
29165,
1027,
1028,
6453,
4088,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mojombo/chronic | lib/chronic/handlers.rb | Chronic.Handlers.handle_o_r_s_r | def handle_o_r_s_r(tokens, options)
outer_span = get_anchor([tokens[3]], options)
handle_orr(tokens[0..1], outer_span, options)
end | ruby | def handle_o_r_s_r(tokens, options)
outer_span = get_anchor([tokens[3]], options)
handle_orr(tokens[0..1], outer_span, options)
end | [
"def",
"handle_o_r_s_r",
"(",
"tokens",
",",
"options",
")",
"outer_span",
"=",
"get_anchor",
"(",
"[",
"tokens",
"[",
"3",
"]",
"]",
",",
"options",
")",
"handle_orr",
"(",
"tokens",
"[",
"0",
"..",
"1",
"]",
",",
"outer_span",
",",
"options",
")",
... | Handle ordinal/repeater/separator/repeater | [
"Handle",
"ordinal",
"/",
"repeater",
"/",
"separator",
"/",
"repeater"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L507-L510 | train | Handle the ORR and S_R tokens | [
30522,
13366,
5047,
1035,
1051,
1035,
1054,
1035,
1055,
1035,
1054,
1006,
19204,
2015,
1010,
7047,
1007,
6058,
1035,
8487,
1027,
2131,
1035,
8133,
1006,
1031,
19204,
2015,
1031,
1017,
1033,
1033,
1010,
7047,
1007,
5047,
1035,
26914,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb | Azure::Automation::Mgmt::V2015_10_31.NodeReports.list_by_node_with_http_info | def list_by_node_with_http_info(resource_group_name, automation_account_name, node_id, filter:nil, custom_headers:nil)
list_by_node_async(resource_group_name, automation_account_name, node_id, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_by_node_with_http_info(resource_group_name, automation_account_name, node_id, filter:nil, custom_headers:nil)
list_by_node_async(resource_group_name, automation_account_name, node_id, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_by_node_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"node_id",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by_node_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"n... | Retrieve the Dsc node report list by node id.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param node_id [String] The parameters supplied to the list operation.
@param filter [String] The filter to apply on the ope... | [
"Retrieve",
"the",
"Dsc",
"node",
"report",
"list",
"by",
"node",
"id",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb#L53-L55 | train | Gets the list of nodes under the specified automation account. | [
30522,
13366,
2862,
1035,
2011,
1035,
13045,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
13045,
1035,
8909,
1010,
11307,
1024,
9152,
2140,
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_compute/lib/2018-06-01/generated/azure_mgmt_compute/gallery_images.rb | Azure::Compute::Mgmt::V2018_06_01.GalleryImages.begin_create_or_update | def begin_create_or_update(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create_or_update(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"gallery_image_name",
",",
"gallery_image",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"gallery_name",
","... | Create or update a gallery Image Definition.
@param resource_group_name [String] The name of the resource group.
@param gallery_name [String] The name of the Shared Image Gallery in which
the Image Definition is to be created.
@param gallery_image_name [String] The name of the gallery Image Definition
to be creat... | [
"Create",
"or",
"update",
"a",
"gallery",
"Image",
"Definition",
"."
] | 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#L338-L341 | train | Creates or updates a gallery image. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3916,
1035,
2171,
1010,
3916,
1035,
3746,
1035,
2171,
1010,
3916,
1035,
3746,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.create_volume | def create_volume(options = {})
resp = @client.create_volume(options)
Volume.new(
id: resp.data.volume_id,
data: resp.data,
client: @client
)
end | ruby | def create_volume(options = {})
resp = @client.create_volume(options)
Volume.new(
id: resp.data.volume_id,
data: resp.data,
client: @client
)
end | [
"def",
"create_volume",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_volume",
"(",
"options",
")",
"Volume",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"volume_id",
",",
"data",
":",
"resp",
".",
"data",
",",
... | @example Request syntax with placeholder values
volume = ec2.create_volume({
availability_zone: "String", # required
encrypted: false,
iops: 1,
kms_key_id: "String",
size: 1,
snapshot_id: "String",
volume_type: "standard", # accepts standard, io1, gp2, sc1, st1
dry_run: false... | [
"@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#L961-L968 | train | Create a new volume | [
30522,
13366,
3443,
1035,
3872,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
3872,
1006,
7047,
1007,
3872,
1012,
2047,
1006,
8909,
1024,
24501,
2361,
1012,
2951,
1012,
3872,
1035,
8909,
1010,
2951,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_intent_with_http_info | def add_intent_with_http_info(app_id, version_id, intent_create_object, custom_headers:nil)
add_intent_async(app_id, version_id, intent_create_object, custom_headers:custom_headers).value!
end | ruby | def add_intent_with_http_info(app_id, version_id, intent_create_object, custom_headers:nil)
add_intent_async(app_id, version_id, intent_create_object, custom_headers:custom_headers).value!
end | [
"def",
"add_intent_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"intent_create_object",
",",
"custom_headers",
":",
"nil",
")",
"add_intent_async",
"(",
"app_id",
",",
"version_id",
",",
"intent_create_object",
",",
"custom_headers",
":custom_headers",
")",
... | Adds an intent to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param intent_create_object [ModelCreateObject] A model object containing the
name of the new intent.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be a... | [
"Adds",
"an",
"intent",
"to",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L53-L55 | train | Adds an intent to a version of the application. | [
30522,
13366,
5587,
1035,
7848,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
7848,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
5587,
1035,
7848,
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... |
plataformatec/simple_form | lib/simple_form/form_builder.rb | SimpleForm.FormBuilder.default_input_type | def default_input_type(attribute_name, column, options)
return options[:as].to_sym if options[:as]
custom_type = find_custom_type(attribute_name.to_s) and return custom_type
return :select if options[:collection]
input_type = column.try(:type)
case input_type
when :times... | ruby | def default_input_type(attribute_name, column, options)
return options[:as].to_sym if options[:as]
custom_type = find_custom_type(attribute_name.to_s) and return custom_type
return :select if options[:collection]
input_type = column.try(:type)
case input_type
when :times... | [
"def",
"default_input_type",
"(",
"attribute_name",
",",
"column",
",",
"options",
")",
"return",
"options",
"[",
":as",
"]",
".",
"to_sym",
"if",
"options",
"[",
":as",
"]",
"custom_type",
"=",
"find_custom_type",
"(",
"attribute_name",
".",
"to_s",
")",
"a... | Attempt to guess the better input type given the defined options. By
default always fallback to the user :as option, or to a :select when a
collection is given. | [
"Attempt",
"to",
"guess",
"the",
"better",
"input",
"type",
"given",
"the",
"defined",
"options",
".",
"By",
"default",
"always",
"fallback",
"to",
"the",
"user",
":",
"as",
"option",
"or",
"to",
"a",
":",
"select",
"when",
"a",
"collection",
"is",
"give... | 4dd9261ebb392e46a9beeefe8d83081e7c6e56b5 | https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L544-L567 | train | Returns the default input type for the given attribute. | [
30522,
13366,
12398,
1035,
7953,
1035,
2828,
1006,
17961,
1035,
2171,
1010,
5930,
1010,
7047,
1007,
2709,
7047,
1031,
1024,
2004,
1033,
1012,
2000,
1035,
25353,
2213,
2065,
7047,
1031,
1024,
2004,
1033,
7661,
1035,
2828,
1027,
2424,
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_resources_management/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb | Azure::ResourcesManagement::Mgmt::V2018_01_01_preview.ManagementGroups.begin_create_or_update | def begin_create_or_update(group_id, cache_control:'no-cache', custom_headers:nil)
response = begin_create_or_update_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create_or_update(group_id, cache_control:'no-cache', custom_headers:nil)
response = begin_create_or_update_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create_or_update",
"(",
"group_id",
",",
"cache_control",
":",
"'no-cache'",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"group_id",
",",
"cache_control",
":cache_control",
",",
"custom_headers",
":custom_h... | Create or update a management group.
If a management group is already created and a subsequent create request is
issued with different properties, the management group properties will be
updated.
@param group_id [String] Management Group ID.
@param cache_control [String] Indicates that the request shouldn't util... | [
"Create",
"or",
"update",
"a",
"management",
"group",
".",
"If",
"a",
"management",
"group",
"is",
"already",
"created",
"and",
"a",
"subsequent",
"create",
"request",
"is",
"issued",
"with",
"different",
"properties",
"the",
"management",
"group",
"properties",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L462-L465 | train | Creates or updates a group. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
2177,
1035,
8909,
1010,
17053,
1035,
2491,
1024,
1005,
2053,
1011,
17053,
1005,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3443,
1035,
2030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/decidim_form_helper.rb | Decidim.DecidimFormHelper.decidim_form_for | def decidim_form_for(record, options = {}, &block)
options[:data] ||= {}
options[:data].update(abide: true, "live-validate" => true, "validate-on-blur" => true)
options[:html] ||= {}
options[:html].update(novalidate: true)
output = ""
output += base_error_messages(record).to_s
... | ruby | def decidim_form_for(record, options = {}, &block)
options[:data] ||= {}
options[:data].update(abide: true, "live-validate" => true, "validate-on-blur" => true)
options[:html] ||= {}
options[:html].update(novalidate: true)
output = ""
output += base_error_messages(record).to_s
... | [
"def",
"decidim_form_for",
"(",
"record",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"options",
"[",
":data",
"]",
"||=",
"{",
"}",
"options",
"[",
":data",
"]",
".",
"update",
"(",
"abide",
":",
"true",
",",
"\"live-validate\"",
"=>",
"t... | A custom form for that injects client side validations with Abide.
record - The object to build the form for.
options - A Hash of options to pass to the form builder.
&block - The block to execute as content of the form.
Returns a String. | [
"A",
"custom",
"form",
"for",
"that",
"injects",
"client",
"side",
"validations",
"with",
"Abide",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/decidim_form_helper.rb#L13-L25 | train | Returns the form for the given record. | [
30522,
13366,
11703,
28173,
2213,
1035,
2433,
1035,
2005,
1006,
2501,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
7047,
1031,
1024,
2951,
1033,
1064,
1064,
1027,
1063,
1065,
7047,
1031,
1024,
2951,
1033,
1012,
10651,
1006,
11113,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/urlable.rb | JekyllAdmin.URLable.http_url | def http_url
return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile)
return if is_a?(Jekyll::Document) && !collection.write?
@http_url ||= Addressable::URI.new(
:scheme => scheme, :host => host, :port => port,
:path => path_with_base(JekyllAdmin.site.config["baseurl"], url)... | ruby | def http_url
return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile)
return if is_a?(Jekyll::Document) && !collection.write?
@http_url ||= Addressable::URI.new(
:scheme => scheme, :host => host, :port => port,
:path => path_with_base(JekyllAdmin.site.config["baseurl"], url)... | [
"def",
"http_url",
"return",
"if",
"is_a?",
"(",
"Jekyll",
"::",
"Collection",
")",
"||",
"is_a?",
"(",
"JekyllAdmin",
"::",
"DataFile",
")",
"return",
"if",
"is_a?",
"(",
"Jekyll",
"::",
"Document",
")",
"&&",
"!",
"collection",
".",
"write?",
"@http_url"... | Absolute URL to the HTTP(S) rendered/served representation of this resource | [
"Absolute",
"URL",
"to",
"the",
"HTTP",
"(",
"S",
")",
"rendered",
"/",
"served",
"representation",
"of",
"this",
"resource"
] | bc053b3b93faba679e8666091c42c47970e3bb5e | https://github.com/jekyll/jekyll-admin/blob/bc053b3b93faba679e8666091c42c47970e3bb5e/lib/jekyll-admin/urlable.rb#L7-L14 | train | Returns the HTTP URL for the current request. | [
30522,
13366,
8299,
1035,
24471,
2140,
2709,
2065,
2003,
1035,
1037,
1029,
1006,
15333,
4801,
3363,
1024,
1024,
3074,
1007,
1064,
1064,
2003,
1035,
1037,
1029,
1006,
15333,
4801,
4571,
22117,
2378,
1024,
1024,
2951,
8873,
2571,
1007,
2709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/rdoc/generators/puppet_generator.rb | Generators.PuppetGenerator.gen_sub_directories | def gen_sub_directories
super
File.makedirs(MODULE_DIR)
File.makedirs(NODE_DIR)
File.makedirs(PLUGIN_DIR)
rescue
$stderr.puts $ERROR_INFO.message
exit 1
end | ruby | def gen_sub_directories
super
File.makedirs(MODULE_DIR)
File.makedirs(NODE_DIR)
File.makedirs(PLUGIN_DIR)
rescue
$stderr.puts $ERROR_INFO.message
exit 1
end | [
"def",
"gen_sub_directories",
"super",
"File",
".",
"makedirs",
"(",
"MODULE_DIR",
")",
"File",
".",
"makedirs",
"(",
"NODE_DIR",
")",
"File",
".",
"makedirs",
"(",
"PLUGIN_DIR",
")",
"rescue",
"$stderr",
".",
"puts",
"$ERROR_INFO",
".",
"message",
"exit",
"... | generate all the subdirectories, modules, classes and files | [
"generate",
"all",
"the",
"subdirectories",
"modules",
"classes",
"and",
"files"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/rdoc/generators/puppet_generator.rb#L195-L203 | train | Create the directories for the current project. | [
30522,
13366,
8991,
1035,
4942,
1035,
2472,
3111,
3565,
5371,
1012,
2191,
4305,
2869,
1006,
11336,
1035,
16101,
1007,
5371,
1012,
2191,
4305,
2869,
30524,
2099,
1012,
8509,
1002,
7561,
1035,
18558,
1012,
4471,
6164,
1015,
2203,
102,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/options.rb | HamlLint.Options.parse | def parse(args)
@options = {}
OptionParser.new do |parser|
parser.banner = "Usage: #{APP_NAME} [options] [file1, file2, ...]"
add_linter_options parser
add_report_options parser
add_file_options parser
add_logger_options parser
add_info_options parser
... | ruby | def parse(args)
@options = {}
OptionParser.new do |parser|
parser.banner = "Usage: #{APP_NAME} [options] [file1, file2, ...]"
add_linter_options parser
add_report_options parser
add_file_options parser
add_logger_options parser
add_info_options parser
... | [
"def",
"parse",
"(",
"args",
")",
"@options",
"=",
"{",
"}",
"OptionParser",
".",
"new",
"do",
"|",
"parser",
"|",
"parser",
".",
"banner",
"=",
"\"Usage: #{APP_NAME} [options] [file1, file2, ...]\"",
"add_linter_options",
"parser",
"add_report_options",
"parser",
"... | Parses command line options into an options hash.
@param args [Array<String>] arguments passed via the command line
@return [Hash] parsed options | [
"Parses",
"command",
"line",
"options",
"into",
"an",
"options",
"hash",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/options.rb#L12-L31 | train | Parse command line arguments | [
30522,
13366,
11968,
3366,
1006,
12098,
5620,
1007,
1030,
7047,
1027,
1063,
1065,
5724,
19362,
8043,
1012,
2047,
2079,
1064,
11968,
8043,
1064,
11968,
8043,
1012,
9484,
1027,
1000,
8192,
1024,
1001,
1063,
10439,
1035,
2171,
1065,
1031,
7047... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/linter/rubocop.rb | HamlLint.Linter::RuboCop.extract_lints_from_offenses | def extract_lints_from_offenses(offenses, source_map)
dummy_node = Struct.new(:line)
offenses.reject { |offense| Array(config['ignored_cops']).include?(offense.cop_name) }
.each do |offense|
record_lint(dummy_node.new(source_map[offense.line]), offense.message,
off... | ruby | def extract_lints_from_offenses(offenses, source_map)
dummy_node = Struct.new(:line)
offenses.reject { |offense| Array(config['ignored_cops']).include?(offense.cop_name) }
.each do |offense|
record_lint(dummy_node.new(source_map[offense.line]), offense.message,
off... | [
"def",
"extract_lints_from_offenses",
"(",
"offenses",
",",
"source_map",
")",
"dummy_node",
"=",
"Struct",
".",
"new",
"(",
":line",
")",
"offenses",
".",
"reject",
"{",
"|",
"offense",
"|",
"Array",
"(",
"config",
"[",
"'ignored_cops'",
"]",
")",
".",
"i... | Aggregates RuboCop offenses and converts them to {HamlLint::Lint}s
suitable for reporting.
@param offenses [Array<RuboCop::Cop::Offense>]
@param source_map [Hash] | [
"Aggregates",
"RuboCop",
"offenses",
"and",
"converts",
"them",
"to",
"{",
"HamlLint",
"::",
"Lint",
"}",
"s",
"suitable",
"for",
"reporting",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter/rubocop.rb#L68-L76 | train | Extract lints from offenses | [
30522,
13366,
14817,
1035,
11409,
3215,
1035,
2013,
1035,
25173,
1006,
25173,
1010,
3120,
1035,
4949,
1007,
24369,
1035,
13045,
1027,
2358,
6820,
6593,
1012,
2047,
1006,
1024,
2240,
1007,
25173,
1012,
15454,
1063,
1064,
10048,
1064,
9140,
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_network/lib/2018-07-01/generated/azure_mgmt_network/route_filters.rb | Azure::Network::Mgmt::V2018_07_01.RouteFilters.create_or_update | def create_or_update(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"route_filter_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"route_filter_param... | Creates or updates a route filter in a specified resource group.
@param resource_group_name [String] The name of the resource group.
@param route_filter_name [String] The name of the route filter.
@param route_filter_parameters [RouteFilter] Parameters supplied to the
create or update route filter operation.
@par... | [
"Creates",
"or",
"updates",
"a",
"route",
"filter",
"in",
"a",
"specified",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filters.rb#L172-L175 | train | Creates or updates a route filter. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb | Azure::Scheduler::Mgmt::V2016_03_01.Jobs.list_job_history_with_http_info | def list_job_history_with_http_info(resource_group_name, job_collection_name, job_name, top:nil, skip:nil, filter:nil, custom_headers:nil)
list_job_history_async(resource_group_name, job_collection_name, job_name, top:top, skip:skip, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_job_history_with_http_info(resource_group_name, job_collection_name, job_name, top:nil, skip:nil, filter:nil, custom_headers:nil)
list_job_history_async(resource_group_name, job_collection_name, job_name, top:top, skip:skip, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_job_history_with_http_info",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"job_name",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_job_history_async",
"(",
... | Lists job history.
@param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param job_name [String] The job name.
@param top [Integer] the number of job history to request, in the of range of
[1..100].
@param skip [Integer] The (0-based) index of ... | [
"Lists",
"job",
"history",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb#L660-L662 | train | Gets the job history for a job. | [
30522,
13366,
2862,
1035,
3105,
1035,
2381,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
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/sprockets | lib/sprockets/transformers.rb | Sprockets.Transformers.expand_transform_accepts | def expand_transform_accepts(parsed_accepts)
accepts = []
parsed_accepts.each do |(type, q)|
accepts.push([type, q])
config[:inverted_transformers][type].each do |subtype|
accepts.push([subtype, q * 0.8])
end
end
accepts
end | ruby | def expand_transform_accepts(parsed_accepts)
accepts = []
parsed_accepts.each do |(type, q)|
accepts.push([type, q])
config[:inverted_transformers][type].each do |subtype|
accepts.push([subtype, q * 0.8])
end
end
accepts
end | [
"def",
"expand_transform_accepts",
"(",
"parsed_accepts",
")",
"accepts",
"=",
"[",
"]",
"parsed_accepts",
".",
"each",
"do",
"|",
"(",
"type",
",",
"q",
")",
"|",
"accepts",
".",
"push",
"(",
"[",
"type",
",",
"q",
"]",
")",
"config",
"[",
":inverted_... | Internal: Expand accept type list to include possible transformed types.
parsed_accepts - Array of accept q values
Examples
expand_transform_accepts([['application/javascript', 1.0]])
# => [['application/javascript', 1.0], ['text/coffeescript', 0.8]]
Returns an expanded Array of q values. | [
"Internal",
":",
"Expand",
"accept",
"type",
"list",
"to",
"include",
"possible",
"transformed",
"types",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/transformers.rb#L97-L106 | train | Expand the accept list | [
30522,
13366,
7818,
1035,
10938,
1035,
13385,
1006,
11968,
6924,
1035,
13385,
1007,
13385,
1027,
1031,
1033,
11968,
6924,
1035,
13385,
1012,
2169,
2079,
1064,
1006,
2828,
1010,
1053,
1007,
1064,
13385,
1012,
5245,
1006,
1031,
2828,
1010,
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... |
fastlane/fastlane | spaceship/lib/spaceship/tunes/tunes_client.rb | Spaceship.TunesClient.update_iap_family! | def update_iap_family!(app_id: nil, family_id: nil, data: nil)
with_tunes_retry do
r = request(:put) do |req|
req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/")
req.body = data.to_json
req.headers['Content-Type'] = 'application/json'
end
handle_itc_respons... | ruby | def update_iap_family!(app_id: nil, family_id: nil, data: nil)
with_tunes_retry do
r = request(:put) do |req|
req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/")
req.body = data.to_json
req.headers['Content-Type'] = 'application/json'
end
handle_itc_respons... | [
"def",
"update_iap_family!",
"(",
"app_id",
":",
"nil",
",",
"family_id",
":",
"nil",
",",
"data",
":",
"nil",
")",
"with_tunes_retry",
"do",
"r",
"=",
"request",
"(",
":put",
")",
"do",
"|",
"req",
"|",
"req",
".",
"url",
"(",
"\"ra/apps/#{app_id}/iaps/... | updates an In-App-Purchases-Family | [
"updates",
"an",
"In",
"-",
"App",
"-",
"Purchases",
"-",
"Family"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1227-L1236 | train | Update an existing IAP family | [
30522,
13366,
10651,
1035,
24264,
2361,
1035,
2155,
999,
1006,
10439,
1035,
8909,
1024,
9152,
2140,
1010,
2155,
1035,
8909,
1024,
9152,
2140,
1010,
2951,
1024,
9152,
2140,
1007,
2007,
1035,
13281,
1035,
2128,
11129,
2079,
1054,
1027,
5227,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/worksheet.rb | Axlsx.Worksheet.[] | def [](cell_def)
return rows[cell_def] if cell_def.is_a?(Integer)
parts = cell_def.split(':').map{ |part| name_to_cell part }
if parts.size == 1
parts.first
else
range(*parts)
end
end | ruby | def [](cell_def)
return rows[cell_def] if cell_def.is_a?(Integer)
parts = cell_def.split(':').map{ |part| name_to_cell part }
if parts.size == 1
parts.first
else
range(*parts)
end
end | [
"def",
"[]",
"(",
"cell_def",
")",
"return",
"rows",
"[",
"cell_def",
"]",
"if",
"cell_def",
".",
"is_a?",
"(",
"Integer",
")",
"parts",
"=",
"cell_def",
".",
"split",
"(",
"':'",
")",
".",
"map",
"{",
"|",
"part",
"|",
"name_to_cell",
"part",
"}",
... | Returns the cell or cells defined using excel style A1:B3 references.
@param [String|Integer] cell_def the string defining the cell or range of cells, or the rownumber
@return [Cell, Array] | [
"Returns",
"the",
"cell",
"or",
"cells",
"defined",
"using",
"excel",
"style",
"A1",
":",
"B3",
"references",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet.rb#L589-L597 | train | Get the index of a cell definition | [
30522,
13366,
1031,
1033,
1006,
3526,
1035,
13366,
1007,
2709,
10281,
1031,
3526,
1035,
13366,
1033,
2065,
3526,
1035,
13366,
1012,
2003,
1035,
1037,
1029,
1006,
16109,
1007,
3033,
1027,
3526,
1035,
13366,
1012,
3975,
1006,
1005,
1024,
1005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/p2s_vpn_gateways.rb | Azure::Network::Mgmt::V2018_12_01.P2sVpnGateways.delete | def delete(resource_group_name, gateway_name, custom_headers:nil)
response = delete_async(resource_group_name, gateway_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, gateway_name, custom_headers:nil)
response = delete_async(resource_group_name, gateway_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Deletes a virtual wan p2s vpn gateway.
@param resource_group_name [String] The resource group name of the
P2SVpnGateway.
@param gateway_name [String] The name of the gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"a",
"virtual",
"wan",
"p2s",
"vpn",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/p2s_vpn_gateways.rb#L225-L228 | train | Deletes a virtual network gateway. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11909,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb | Azure::Web::Mgmt::V2016_03_01.WebSiteManagementClient.list_skus | def list_skus(custom_headers:nil)
response = list_skus_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_skus(custom_headers:nil)
response = list_skus_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_skus",
"(",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_skus_async",
"(",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | List all SKUs.
List all SKUs.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [SkuInfos] operation results. | [
"List",
"all",
"SKUs",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb#L1137-L1140 | train | Gets the list of skus for the current environment. | [
30522,
13366,
2862,
1035,
15315,
2271,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
15315,
2271,
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... |
mongodb/mongoid | lib/mongoid/serializable.rb | Mongoid.Serializable.field_names | def field_names(options)
names = (as_attributes.keys + attribute_names).uniq.sort
only = Array.wrap(options[:only]).map(&:to_s)
except = Array.wrap(options[:except]).map(&:to_s)
except |= ['_type'] unless Mongoid.include_type_for_serialization
if !only.empty?
names &= only
... | ruby | def field_names(options)
names = (as_attributes.keys + attribute_names).uniq.sort
only = Array.wrap(options[:only]).map(&:to_s)
except = Array.wrap(options[:except]).map(&:to_s)
except |= ['_type'] unless Mongoid.include_type_for_serialization
if !only.empty?
names &= only
... | [
"def",
"field_names",
"(",
"options",
")",
"names",
"=",
"(",
"as_attributes",
".",
"keys",
"+",
"attribute_names",
")",
".",
"uniq",
".",
"sort",
"only",
"=",
"Array",
".",
"wrap",
"(",
"options",
"[",
":only",
"]",
")",
".",
"map",
"(",
":to_s",
")... | Get the names of all fields that will be serialized.
@api private
@example Get all the field names.
document.send(:field_names)
@return [ Array<String> ] The names of the fields.
@since 3.0.0 | [
"Get",
"the",
"names",
"of",
"all",
"fields",
"that",
"will",
"be",
"serialized",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/serializable.rb#L69-L82 | train | Returns the field names for this object. | [
30522,
13366,
2492,
1035,
3415,
1006,
7047,
1007,
3415,
1027,
1006,
2004,
1035,
12332,
1012,
6309,
1009,
17961,
1035,
3415,
1007,
1012,
4895,
18515,
1012,
4066,
2069,
1027,
9140,
1012,
10236,
1006,
7047,
1031,
1024,
2069,
1033,
1007,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
DataDog/dogstatsd-ruby | lib/datadog/statsd.rb | Datadog.Statsd.gauge | def gauge(stat, value, opts=EMPTY_OPTIONS)
opts = {:sample_rate => opts} if opts.is_a? Numeric
send_stats stat, value, GAUGE_TYPE, opts
end | ruby | def gauge(stat, value, opts=EMPTY_OPTIONS)
opts = {:sample_rate => opts} if opts.is_a? Numeric
send_stats stat, value, GAUGE_TYPE, opts
end | [
"def",
"gauge",
"(",
"stat",
",",
"value",
",",
"opts",
"=",
"EMPTY_OPTIONS",
")",
"opts",
"=",
"{",
":sample_rate",
"=>",
"opts",
"}",
"if",
"opts",
".",
"is_a?",
"Numeric",
"send_stats",
"stat",
",",
"value",
",",
"GAUGE_TYPE",
",",
"opts",
"end"
] | Sends an arbitary gauge value for the given stat to the statsd server.
This is useful for recording things like available disk space,
memory usage, and the like, which have different semantics than
counters.
@param [String] stat stat name.
@param [Numeric] value gauge value.
@param [Hash] opts the options to cr... | [
"Sends",
"an",
"arbitary",
"gauge",
"value",
"for",
"the",
"given",
"stat",
"to",
"the",
"statsd",
"server",
"."
] | 0ea2a4d011958ad0d092654cae950e64b6475077 | https://github.com/DataDog/dogstatsd-ruby/blob/0ea2a4d011958ad0d092654cae950e64b6475077/lib/datadog/statsd.rb#L294-L297 | train | Send a gauge statistic | [
30522,
13366,
7633,
1006,
28093,
1010,
3643,
1010,
23569,
2015,
1027,
4064,
1035,
7047,
1007,
23569,
2015,
1027,
1063,
1024,
7099,
1035,
3446,
1027,
1028,
23569,
2015,
1065,
2065,
23569,
2015,
1012,
2003,
1035,
1037,
1029,
16371,
25531,
460... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.restore_key | def restore_key(vault_base_url, key_bundle_backup, custom_headers:nil)
response = restore_key_async(vault_base_url, key_bundle_backup, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def restore_key(vault_base_url, key_bundle_backup, custom_headers:nil)
response = restore_key_async(vault_base_url, key_bundle_backup, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"restore_key",
"(",
"vault_base_url",
",",
"key_bundle_backup",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"restore_key_async",
"(",
"vault_base_url",
",",
"key_bundle_backup",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respons... | Restores a backed up key to a vault.
Imports a previously backed up key into Azure Key Vault, restoring the key,
its key identifier, attributes and access control policies. The RESTORE
operation may be used to import a previously backed up key. Individual
versions of a key cannot be restored. The key is restored i... | [
"Restores",
"a",
"backed",
"up",
"key",
"to",
"a",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L1183-L1186 | train | Restores the key from the backup vault. | [
30522,
13366,
9239,
1035,
3145,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
14012,
1035,
10200,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9239,
1035,
3145,
1035,
2004,
6038,
2278,
1006,
11632,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.begin_failover_with_http_info | def begin_failover_with_http_info(source_device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def begin_failover_with_http_info(source_device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_failover_with_http_info",
"(",
"source_device_name",
",",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_failover_async",
"(",
"source_device_name",
",",
"parameters",
",",
"resource_group_name",
... | Failovers a set of volume containers from a specified source device to a
target device.
@param source_device_name [String] The source device name on which failover
is performed.
@param parameters [FailoverRequest] FailoverRequest containing the source
device and the list of volume containers to be failed over.
@... | [
"Failovers",
"a",
"set",
"of",
"volume",
"containers",
"from",
"a",
"specified",
"source",
"device",
"to",
"a",
"target",
"device",
"."
] | 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/devices.rb#L1687-L1689 | train | Gets the next chunk of the image from the source device. | [
30522,
13366,
4088,
1035,
8246,
7840,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3120,
1035,
5080,
1035,
2171,
1010,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kmuto/review | lib/review/latexutils.rb | ReVIEW.LaTeXUtils.unescape | def unescape(str)
metachars_invert_re = Regexp.new(@metachars_invert.keys.collect { |key| Regexp.escape(key) }.join('|'))
str.gsub(metachars_invert_re) { |s| @metachars_invert[s] or raise "unknown trans char: #{s}" }
end | ruby | def unescape(str)
metachars_invert_re = Regexp.new(@metachars_invert.keys.collect { |key| Regexp.escape(key) }.join('|'))
str.gsub(metachars_invert_re) { |s| @metachars_invert[s] or raise "unknown trans char: #{s}" }
end | [
"def",
"unescape",
"(",
"str",
")",
"metachars_invert_re",
"=",
"Regexp",
".",
"new",
"(",
"@metachars_invert",
".",
"keys",
".",
"collect",
"{",
"|",
"key",
"|",
"Regexp",
".",
"escape",
"(",
"key",
")",
"}",
".",
"join",
"(",
"'|'",
")",
")",
"str"... | backward compatibility | [
"backward",
"compatibility"
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/review/latexutils.rb#L73-L76 | train | Unescapes the given string | [
30522,
13366,
16655,
15782,
5051,
1006,
2358,
2099,
1007,
18804,
7507,
2869,
1035,
1999,
16874,
1035,
2128,
1027,
19723,
10288,
2361,
1012,
2047,
1006,
1030,
18804,
7507,
2869,
1035,
1999,
16874,
1012,
6309,
1012,
8145,
1063,
1064,
3145,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.publish_iteration_with_http_info | def publish_iteration_with_http_info(project_id, iteration_id, publish_name, prediction_id, custom_headers:nil)
publish_iteration_async(project_id, iteration_id, publish_name, prediction_id, custom_headers:custom_headers).value!
end | ruby | def publish_iteration_with_http_info(project_id, iteration_id, publish_name, prediction_id, custom_headers:nil)
publish_iteration_async(project_id, iteration_id, publish_name, prediction_id, custom_headers:custom_headers).value!
end | [
"def",
"publish_iteration_with_http_info",
"(",
"project_id",
",",
"iteration_id",
",",
"publish_name",
",",
"prediction_id",
",",
"custom_headers",
":",
"nil",
")",
"publish_iteration_async",
"(",
"project_id",
",",
"iteration_id",
",",
"publish_name",
",",
"prediction... | Publish a specific iteration.
@param project_id The project id.
@param iteration_id The iteration id.
@param publish_name [String] The name to give the published iteration.
@param prediction_id [String] The id of the prediction resource to publish
to.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Publish",
"a",
"specific",
"iteration",
"."
] | 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#L3819-L3821 | train | Publishes a single iteration of a given project. | [
30522,
13366,
10172,
1035,
27758,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2622,
1035,
8909,
1010,
27758,
1035,
8909,
1010,
10172,
1035,
2171,
1010,
17547,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10172,
1035,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/mongoid | lib/mongoid/changeable.rb | Mongoid.Changeable.setters | def setters
mods = {}
changes.each_pair do |name, changes|
if changes
old, new = changes
field = fields[name]
key = atomic_attribute_name(name)
if field && field.resizable?
field.add_atomic_changes(self, name, key, mods, new, old)
else
... | ruby | def setters
mods = {}
changes.each_pair do |name, changes|
if changes
old, new = changes
field = fields[name]
key = atomic_attribute_name(name)
if field && field.resizable?
field.add_atomic_changes(self, name, key, mods, new, old)
else
... | [
"def",
"setters",
"mods",
"=",
"{",
"}",
"changes",
".",
"each_pair",
"do",
"|",
"name",
",",
"changes",
"|",
"if",
"changes",
"old",
",",
"new",
"=",
"changes",
"field",
"=",
"fields",
"[",
"name",
"]",
"key",
"=",
"atomic_attribute_name",
"(",
"name"... | Gets all the new values for each of the changed fields, to be passed to
a MongoDB $set modifier.
@example Get the setters for the atomic updates.
person = Person.new(:title => "Sir")
person.title = "Madam"
person.setters # returns { "title" => "Madam" }
@return [ Hash ] A +Hash+ of atomic setters.
@sinc... | [
"Gets",
"all",
"the",
"new",
"values",
"for",
"each",
"of",
"the",
"changed",
"fields",
"to",
"be",
"passed",
"to",
"a",
"MongoDB",
"$set",
"modifier",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/changeable.rb#L140-L155 | train | Set the atomic attributes of the object. | [
30522,
13366,
2275,
7747,
16913,
2015,
1027,
1063,
1065,
3431,
1012,
2169,
1035,
3940,
2079,
1064,
2171,
1010,
3431,
1064,
2065,
3431,
2214,
1010,
2047,
1027,
3431,
2492,
1027,
4249,
1031,
2171,
1033,
3145,
1027,
9593,
1035,
17961,
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_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_composite_entity | def add_composite_entity(app_id, version_id, composite_model_create_object, custom_headers:nil)
response = add_composite_entity_async(app_id, version_id, composite_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def add_composite_entity(app_id, version_id, composite_model_create_object, custom_headers:nil)
response = add_composite_entity_async(app_id, version_id, composite_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"add_composite_entity",
"(",
"app_id",
",",
"version_id",
",",
"composite_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_composite_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"composite_model_create_object",
",",
"cu... | Adds a composite entity extractor to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param composite_model_create_object [CompositeEntityModel] A model
containing the name and children of the new entity extractor.
@param custom_headers [Hash{String => St... | [
"Adds",
"a",
"composite",
"entity",
"extractor",
"to",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L738-L741 | train | Adds a composite entity to a version of the application. | [
30522,
13366,
5587,
1035,
12490,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
12490,
1035,
2944,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
5587,
1035,
12490,
1035,
9178,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_02_01.Redis.import_data_async | def import_data_async(resource_group_name, name, parameters, custom_headers:nil)
# Send request
promise = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_m... | ruby | def import_data_async(resource_group_name, name, parameters, custom_headers:nil)
# Send request
promise = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_m... | [
"def",
"import_data_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_import_data_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_header... | @param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param parameters [ImportRDBParameters] Parameters for Redis import
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@ret... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Redis",
"cache",
".",
"@param",
"parameters",
"[",
"ImportRDBParameters",
"]",
"Para... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb#L818-L832 | train | Import data into a resource group. | [
30522,
13366,
12324,
1035,
2951,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
12324,
1035,
2951,
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... |
jekyll/jekyll | lib/jekyll/excerpt.rb | Jekyll.Excerpt.sanctify_liquid_tags | def sanctify_liquid_tags(head)
modified = false
tag_names = head.scan(LIQUID_TAG_REGEX)
tag_names.flatten!
tag_names.reverse_each do |tag_name|
next unless liquid_block?(tag_name)
next if head =~ endtag_regex_stash(tag_name)
modified = true
head << "\n{% end#{ta... | ruby | def sanctify_liquid_tags(head)
modified = false
tag_names = head.scan(LIQUID_TAG_REGEX)
tag_names.flatten!
tag_names.reverse_each do |tag_name|
next unless liquid_block?(tag_name)
next if head =~ endtag_regex_stash(tag_name)
modified = true
head << "\n{% end#{ta... | [
"def",
"sanctify_liquid_tags",
"(",
"head",
")",
"modified",
"=",
"false",
"tag_names",
"=",
"head",
".",
"scan",
"(",
"LIQUID_TAG_REGEX",
")",
"tag_names",
".",
"flatten!",
"tag_names",
".",
"reverse_each",
"do",
"|",
"tag_name",
"|",
"next",
"unless",
"liqui... | append appropriate closing tag(s) (for each Liquid block), to the `head` if the
partitioning resulted in leaving the closing tag somewhere in the `tail` partition. | [
"append",
"appropriate",
"closing",
"tag",
"(",
"s",
")",
"(",
"for",
"each",
"Liquid",
"block",
")",
"to",
"the",
"head",
"if",
"the",
"partitioning",
"resulted",
"in",
"leaving",
"the",
"closing",
"tag",
"somewhere",
"in",
"the",
"tail",
"partition",
"."... | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/excerpt.rb#L152-L166 | train | sanctify liquid tags | [
30522,
13366,
2624,
6593,
8757,
1035,
6381,
1035,
22073,
1006,
2132,
1007,
6310,
1027,
6270,
6415,
1035,
3415,
1027,
2132,
1012,
13594,
1006,
6381,
1035,
6415,
1035,
19723,
10288,
1007,
6415,
1035,
3415,
1012,
4257,
6528,
999,
6415,
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... |
square/connect-ruby-sdk | lib/square_connect/api/v1_transactions_api.rb | SquareConnect.V1TransactionsApi.retrieve_order | def retrieve_order(location_id, order_id, opts = {})
data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts)
return data
end | ruby | def retrieve_order(location_id, order_id, opts = {})
data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts)
return data
end | [
"def",
"retrieve_order",
"(",
"location_id",
",",
"order_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_order_with_http_info",
"(",
"location_id",
",",
"order_id",
",",
"opts",
")",
"return",
"data",
"end"
] | RetrieveOrder
Provides comprehensive information for a single online store order, including the order's history.
@param location_id The ID of the order's associated location.
@param order_id The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
@param [H... | [
"RetrieveOrder",
"Provides",
"comprehensive",
"information",
"for",
"a",
"single",
"online",
"store",
"order",
"including",
"the",
"order",
"s",
"history",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L494-L497 | train | Retrieve an order Returns an order object | [
30522,
13366,
12850,
1035,
2344,
1006,
3295,
1035,
8909,
1010,
2344,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
12850,
1035,
2344,
1035,
2007,
1035,
8299,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb | Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.failover_allow_data_loss_async | def failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
# Send request
promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers)
promise =... | ruby | def failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
# Send request
promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers)
promise =... | [
"def",
"failover_allow_data_loss_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_failover_allow_data_loss_async",
"(",
"resource_group_name",
",... | @param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param disaster_recovery_configuration_name [String] The name of the disaster
recovery conf... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"that",
"contains",
"the",
"resource",
".",
"You",
"can",
"obtain",
"this",
"value",
"from",
"the",
"Azure",
"Resource",
"Manager",
"API",
"or",
"the",
"por... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L403-L417 | train | Allow data loss of a server to be lost. | [
30522,
13366,
8246,
7840,
1035,
3499,
1035,
2951,
1035,
3279,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7071,
1035,
7233,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
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... |
appium/ruby_lib | lib/appium_lib/android/common/helper.rb | Appium.Android.page | def page(opts = {})
class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts
puts get_android_inspect class_name
nil
end | ruby | def page(opts = {})
class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts
puts get_android_inspect class_name
nil
end | [
"def",
"page",
"(",
"opts",
"=",
"{",
"}",
")",
"class_name",
"=",
"opts",
".",
"is_a?",
"(",
"Hash",
")",
"?",
"opts",
".",
"fetch",
"(",
":class",
",",
"nil",
")",
":",
"opts",
"puts",
"get_android_inspect",
"class_name",
"nil",
"end"
] | Intended for use with console.
Inspects and prints the current page.
Will return XHTML for Web contexts because of a quirk with Nokogiri.
@option class [Symbol] the class name to filter on. case insensitive include match.
if nil (default) then all classes will be inspected
@return [void] | [
"Intended",
"for",
"use",
"with",
"console",
".",
"Inspects",
"and",
"prints",
"the",
"current",
"page",
".",
"Will",
"return",
"XHTML",
"for",
"Web",
"contexts",
"because",
"of",
"a",
"quirk",
"with",
"Nokogiri",
"."
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L121-L125 | train | Returns the page object | [
30522,
13366,
3931,
1006,
23569,
2015,
1027,
1063,
1065,
1007,
2465,
1035,
2171,
1027,
23569,
2015,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
1029,
23569,
2015,
1012,
18584,
1006,
1024,
2465,
1010,
9152,
2140,
1007,
1024,
23569,
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_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb | Azure::Monitor::Mgmt::V2016_03_01.AlertRuleIncidents.get_with_http_info | def get_with_http_info(resource_group_name, rule_name, incident_name, custom_headers:nil)
get_async(resource_group_name, rule_name, incident_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, rule_name, incident_name, custom_headers:nil)
get_async(resource_group_name, rule_name, incident_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"rule_name",
",",
"incident_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"rule_name",
",",
"incident_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Gets an incident associated to an alert rule
@param resource_group_name [String] The name of the resource group.
@param rule_name [String] The name of the rule.
@param incident_name [String] The name of the incident to retrieve.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be ... | [
"Gets",
"an",
"incident",
"associated",
"to",
"an",
"alert",
"rule"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb#L51-L53 | train | Gets the specified rule incident. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3627,
1035,
2171,
1010,
5043,
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... |
rocketjob/symmetric-encryption | lib/symmetric_encryption/header.rb | SymmetricEncryption.Header.parse | def parse(buffer, offset = 0)
return 0 if buffer.nil? || (buffer == '') || (buffer.length <= MAGIC_HEADER_SIZE + 2)
# Symmetric Encryption Header
#
# Consists of:
# 4 Bytes: Magic Header Prefix: @Enc
# 1 Byte: The version of the cipher used to encrypt the header.
# 1... | ruby | def parse(buffer, offset = 0)
return 0 if buffer.nil? || (buffer == '') || (buffer.length <= MAGIC_HEADER_SIZE + 2)
# Symmetric Encryption Header
#
# Consists of:
# 4 Bytes: Magic Header Prefix: @Enc
# 1 Byte: The version of the cipher used to encrypt the header.
# 1... | [
"def",
"parse",
"(",
"buffer",
",",
"offset",
"=",
"0",
")",
"return",
"0",
"if",
"buffer",
".",
"nil?",
"||",
"(",
"buffer",
"==",
"''",
")",
"||",
"(",
"buffer",
".",
"length",
"<=",
"MAGIC_HEADER_SIZE",
"+",
"2",
")",
"# Symmetric Encryption Header",
... | Returns [Integer] the offset within the buffer of the data after the header has been read.
Returns 0 if no header is present | [
"Returns",
"[",
"Integer",
"]",
"the",
"offset",
"within",
"the",
"buffer",
"of",
"the",
"data",
"after",
"the",
"header",
"has",
"been",
"read",
"."
] | 064ba8d57ffac44a3ed80f5e76fa1a54d660ff98 | https://github.com/rocketjob/symmetric-encryption/blob/064ba8d57ffac44a3ed80f5e76fa1a54d660ff98/lib/symmetric_encryption/header.rb#L124-L196 | train | Parse the Symmetric Encryption header | [
30522,
13366,
11968,
3366,
1006,
17698,
1010,
16396,
1027,
1014,
1007,
2709,
1014,
2065,
17698,
1012,
9152,
2140,
1029,
1064,
1064,
1006,
17698,
1027,
1027,
1005,
1005,
1007,
1064,
1064,
1006,
17698,
1012,
3091,
1026,
1027,
3894,
1035,
2034... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
seejohnrun/ice_cube | lib/ice_cube/schedule.rb | IceCube.Schedule.occurring_at? | def occurring_at?(time)
time = TimeUtil.match_zone(time, start_time) or raise ArgumentError, "Time required, got #{time.inspect}"
if duration > 0
return false if exception_time?(time)
occurs_between?(time - duration + 1, time)
else
occurs_at?(time)
end
end | ruby | def occurring_at?(time)
time = TimeUtil.match_zone(time, start_time) or raise ArgumentError, "Time required, got #{time.inspect}"
if duration > 0
return false if exception_time?(time)
occurs_between?(time - duration + 1, time)
else
occurs_at?(time)
end
end | [
"def",
"occurring_at?",
"(",
"time",
")",
"time",
"=",
"TimeUtil",
".",
"match_zone",
"(",
"time",
",",
"start_time",
")",
"or",
"raise",
"ArgumentError",
",",
"\"Time required, got #{time.inspect}\"",
"if",
"duration",
">",
"0",
"return",
"false",
"if",
"except... | Determine if the schedule is occurring at a given time | [
"Determine",
"if",
"the",
"schedule",
"is",
"occurring",
"at",
"a",
"given",
"time"
] | fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd | https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/schedule.rb#L243-L251 | train | Returns true if the exception occurs within the specified time. | [
30522,
13366,
10066,
1035,
2012,
1029,
1006,
2051,
1007,
2051,
1027,
2051,
21823,
2140,
1012,
2674,
1035,
4224,
1006,
2051,
1010,
2707,
1035,
2051,
1007,
2030,
5333,
6685,
2121,
29165,
1010,
1000,
2051,
3223,
1010,
2288,
1001,
1063,
2051,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/aws_info.rb | Jets.AwsInfo.account | def account
return '123456789' if test?
# ensure region set, required for sts.get_caller_identity.account to work
ENV['AWS_REGION'] ||= region
begin
sts.get_caller_identity.account
rescue Aws::Errors::MissingCredentialsError
puts "INFO: You're missing AWS credentials. Only ... | ruby | def account
return '123456789' if test?
# ensure region set, required for sts.get_caller_identity.account to work
ENV['AWS_REGION'] ||= region
begin
sts.get_caller_identity.account
rescue Aws::Errors::MissingCredentialsError
puts "INFO: You're missing AWS credentials. Only ... | [
"def",
"account",
"return",
"'123456789'",
"if",
"test?",
"# ensure region set, required for sts.get_caller_identity.account to work",
"ENV",
"[",
"'AWS_REGION'",
"]",
"||=",
"region",
"begin",
"sts",
".",
"get_caller_identity",
".",
"account",
"rescue",
"Aws",
"::",
"Err... | aws sts get-caller-identity | [
"aws",
"sts",
"get",
"-",
"caller",
"-",
"identity"
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/aws_info.rb#L50-L59 | train | account
| [
30522,
13366,
4070,
2709,
1005,
13138,
19961,
2575,
2581,
2620,
2683,
1005,
2065,
3231,
1029,
1001,
5676,
2555,
2275,
1010,
3223,
2005,
8541,
1012,
2131,
1035,
20587,
1035,
4767,
1012,
4070,
2000,
2147,
4372,
2615,
1031,
1005,
22091,
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... |
samvera/hyrax | app/controllers/concerns/hyrax/embargoes_controller_behavior.rb | Hyrax.EmbargoesControllerBehavior.destroy | def destroy
Hyrax::Actors::EmbargoActor.new(curation_concern).destroy
flash[:notice] = curation_concern.embargo_history.last
if curation_concern.work? && curation_concern.file_sets.present?
redirect_to confirm_permission_path
else
redirect_to edit_embargo_path
end
end | ruby | def destroy
Hyrax::Actors::EmbargoActor.new(curation_concern).destroy
flash[:notice] = curation_concern.embargo_history.last
if curation_concern.work? && curation_concern.file_sets.present?
redirect_to confirm_permission_path
else
redirect_to edit_embargo_path
end
end | [
"def",
"destroy",
"Hyrax",
"::",
"Actors",
"::",
"EmbargoActor",
".",
"new",
"(",
"curation_concern",
")",
".",
"destroy",
"flash",
"[",
":notice",
"]",
"=",
"curation_concern",
".",
"embargo_history",
".",
"last",
"if",
"curation_concern",
".",
"work?",
"&&",... | Removes a single embargo | [
"Removes",
"a",
"single",
"embargo"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb#L15-L23 | train | destroy_seq_index | [
30522,
13366,
6033,
1044,
19563,
2595,
1024,
1024,
5889,
1024,
1024,
7861,
8237,
3995,
18908,
2953,
1012,
2047,
1006,
12731,
8156,
1035,
5142,
1007,
1012,
6033,
5956,
1031,
1024,
5060,
1033,
1027,
12731,
8156,
1035,
5142,
1012,
7861,
8237,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Replications.update | def update(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication_name",
",",
"replication_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication... | Updates a replication 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 replication_name [String] The name of the replication.
... | [
"Updates",
"a",
"replication",
"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/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb#L233-L236 | train | Updates a replication. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
21647,
1035,
2171,
1010,
21647,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/elements/table.rb | Watir.Table.hashes | def hashes
all_rows = rows.locate
header_row = all_rows.first || raise(Error, 'no rows in table')
all_rows.entries[1..-1].map do |row|
cell_size_check(header_row, row)
Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))]
end
end | ruby | def hashes
all_rows = rows.locate
header_row = all_rows.first || raise(Error, 'no rows in table')
all_rows.entries[1..-1].map do |row|
cell_size_check(header_row, row)
Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))]
end
end | [
"def",
"hashes",
"all_rows",
"=",
"rows",
".",
"locate",
"header_row",
"=",
"all_rows",
".",
"first",
"||",
"raise",
"(",
"Error",
",",
"'no rows in table'",
")",
"all_rows",
".",
"entries",
"[",
"1",
"..",
"-",
"1",
"]",
".",
"map",
"do",
"|",
"row",
... | Represents table rows as hashes
@return [Array<Hash>] | [
"Represents",
"table",
"rows",
"as",
"hashes"
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/table.rb#L28-L36 | train | Returns a hash of the header and cells of the table. | [
30522,
13366,
23325,
2229,
2035,
1035,
10281,
1027,
10281,
1012,
12453,
20346,
1035,
5216,
1027,
2035,
1035,
10281,
1012,
2034,
1064,
1064,
5333,
1006,
7561,
1010,
1005,
2053,
10281,
1999,
2795,
1005,
1007,
2035,
1035,
10281,
1012,
10445,
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_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Runs.cancel | def cancel(resource_group_name, registry_name, run_id, custom_headers:nil)
response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value!
nil
end | ruby | def cancel(resource_group_name, registry_name, run_id, custom_headers:nil)
response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"cancel",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"custom_headers",
":custom_headers",
")",... | Cancel an existing run.
@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 run_id [String] The run ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wil... | [
"Cancel",
"an",
"existing",
"run",
"."
] | 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/runs.rb#L402-L405 | train | Cancels a run. | [
30522,
13366,
17542,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
2448,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
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... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.ImageList.method_missing | def method_missing(meth_id, *args, &block)
if @scene
@images[@scene].send(meth_id, *args, &block)
else
super
end
rescue NoMethodError
Kernel.raise NoMethodError, "undefined method `#{meth_id.id2name}' for #{self.class}"
rescue Exception
$ERROR_POSITION.delete_if { |... | ruby | def method_missing(meth_id, *args, &block)
if @scene
@images[@scene].send(meth_id, *args, &block)
else
super
end
rescue NoMethodError
Kernel.raise NoMethodError, "undefined method `#{meth_id.id2name}' for #{self.class}"
rescue Exception
$ERROR_POSITION.delete_if { |... | [
"def",
"method_missing",
"(",
"meth_id",
",",
"*",
"args",
",",
"&",
"block",
")",
"if",
"@scene",
"@images",
"[",
"@scene",
"]",
".",
"send",
"(",
"meth_id",
",",
"args",
",",
"block",
")",
"else",
"super",
"end",
"rescue",
"NoMethodError",
"Kernel",
... | The ImageList class supports the Magick::Image class methods by simply sending
the method to the current image. If the method isn't explicitly supported,
send it to the current image in the array. If there are no images, send
it up the line. Catch a NameError and emit a useful message. | [
"The",
"ImageList",
"class",
"supports",
"the",
"Magick",
"::",
"Image",
"class",
"methods",
"by",
"simply",
"sending",
"the",
"method",
"to",
"the",
"current",
"image",
".",
"If",
"the",
"method",
"isn",
"t",
"explicitly",
"supported",
"send",
"it",
"to",
... | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L1603-L1614 | train | This method is called by the object s methods. | [
30522,
13366,
4118,
1035,
4394,
1006,
2777,
2232,
1035,
8909,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
2065,
1030,
3496,
1030,
4871,
1031,
1030,
3496,
1033,
1012,
4604,
1006,
2777,
2232,
1035,
8909,
1010,
1008,
12098,
5620,
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_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb | Azure::SQL::Mgmt::V2014_04_01.Databases.list_by_server_with_http_info | def list_by_server_with_http_info(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil)
list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_by_server_with_http_info(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil)
list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_by_server_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"expand",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by_server_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"expand... | 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#L462-L464 | train | Gets the list of all the segmentation elements in a server. | [
30522,
13366,
2862,
1035,
2011,
1035,
8241,
1035,
2007,
1035,
8299,
1035,
18558,
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,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/resolve.rb | Sprockets.Resolve.resolve_under_paths | def resolve_under_paths(paths, logical_name, accepts)
deps = Set.new
return nil, nil, deps if accepts.empty?
# TODO: Allow new path resolves to be registered
@resolvers ||= [
method(:resolve_main_under_path),
method(:resolve_alts_under_path),
method(:resolv... | ruby | def resolve_under_paths(paths, logical_name, accepts)
deps = Set.new
return nil, nil, deps if accepts.empty?
# TODO: Allow new path resolves to be registered
@resolvers ||= [
method(:resolve_main_under_path),
method(:resolve_alts_under_path),
method(:resolv... | [
"def",
"resolve_under_paths",
"(",
"paths",
",",
"logical_name",
",",
"accepts",
")",
"deps",
"=",
"Set",
".",
"new",
"return",
"nil",
",",
"nil",
",",
"deps",
"if",
"accepts",
".",
"empty?",
"# TODO: Allow new path resolves to be registered",
"@resolvers",
"||=",... | Internal: Finds a file in a set of given paths
paths - Array of Strings.
logical_name - String. A filename without extension
e.g. "application" or "coffee/foo"
accepts - Array of array containing mime/version pairs
e.g. [["application/javascript", 1.0]]
Finds a file wit... | [
"Internal",
":",
"Finds",
"a",
"file",
"in",
"a",
"set",
"of",
"given",
"paths"
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/resolve.rb#L176-L203 | train | Resolve all paths under the given logical name | [
30522,
13366,
10663,
1035,
2104,
1035,
10425,
1006,
10425,
1010,
11177,
1035,
2171,
1010,
13385,
1007,
2139,
4523,
1027,
2275,
1012,
2047,
2709,
9152,
2140,
1010,
9152,
2140,
1010,
2139,
4523,
2065,
13385,
1012,
4064,
1029,
1001,
28681,
208... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.incr | def incr(key, amt=1, ttl=nil, default=nil)
raise ArgumentError, "Positive values only: #{amt}" if amt < 0
perform(:incr, key, amt.to_i, ttl_or_default(ttl), default)
end | ruby | def incr(key, amt=1, ttl=nil, default=nil)
raise ArgumentError, "Positive values only: #{amt}" if amt < 0
perform(:incr, key, amt.to_i, ttl_or_default(ttl), default)
end | [
"def",
"incr",
"(",
"key",
",",
"amt",
"=",
"1",
",",
"ttl",
"=",
"nil",
",",
"default",
"=",
"nil",
")",
"raise",
"ArgumentError",
",",
"\"Positive values only: #{amt}\"",
"if",
"amt",
"<",
"0",
"perform",
"(",
":incr",
",",
"key",
",",
"amt",
".",
... | Incr adds the given amount to the counter on the memcached server.
Amt must be a positive integer value.
If default is nil, the counter must already exist or the operation
will fail and will return nil. Otherwise this method will return
the new value for the counter.
Note that the ttl will only apply if the cou... | [
"Incr",
"adds",
"the",
"given",
"amount",
"to",
"the",
"counter",
"on",
"the",
"memcached",
"server",
".",
"Amt",
"must",
"be",
"a",
"positive",
"integer",
"value",
"."
] | 5755dbfd06e333a8239f976d4b10492b4555b726 | https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/client.rb#L183-L186 | train | Increments the value of a key in the cache. | [
30522,
13366,
4297,
2099,
1006,
3145,
1010,
2572,
2102,
1027,
1015,
1010,
23746,
2140,
1027,
9152,
2140,
1010,
12398,
1027,
9152,
2140,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
3893,
5300,
2069,
1024,
1001,
1063,
2572,
2102,
1065,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.delete_image_store_content_with_http_info | def delete_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil)
delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def delete_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil)
delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"delete_image_store_content_with_http_info",
"(",
"content_path",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"delete_image_store_content_async",
"(",
"content_path",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
... | Deletes existing image store content.
Deletes existing image store content being found within the given image store
relative path. This can be used to delete uploaded application packages once
they are provisioned.
@param content_path [String] Relative path to file or folder in the image
store from its root.
@p... | [
"Deletes",
"existing",
"image",
"store",
"content",
"."
] | 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#L19436-L19438 | train | Delete the content of an image store. | [
30522,
13366,
3972,
12870,
1035,
3746,
1035,
3573,
1035,
4180,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4180,
1035,
4130,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
3746,
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_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.create_regional_properties | def create_regional_properties(resource_group_name, web_service_name, region, custom_headers:nil)
response = create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_regional_properties(resource_group_name, web_service_name, region, custom_headers:nil)
response = create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_regional_properties",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"region",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_regional_properties_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"region",
",",
... | Creates an encrypted credentials parameter blob for the specified region. To
get the web service from a region other than the region in which it has been
created, you must first call Create Regional Web Services Properties to
create a copy of the encrypted credential parameter blob in that region. You
only need to ... | [
"Creates",
"an",
"encrypted",
"credentials",
"parameter",
"blob",
"for",
"the",
"specified",
"region",
".",
"To",
"get",
"the",
"web",
"service",
"from",
"a",
"region",
"other",
"than",
"the",
"region",
"in",
"which",
"it",
"has",
"been",
"created",
"you",
... | 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#L298-L301 | train | Creates a regional specification. | [
30522,
13366,
3443,
1035,
3164,
1035,
5144,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
2555,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
3164,
1035,
5144,
1035,
2004,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb | Aws::AutoScaling.AutoScalingGroup.detach_instances | def detach_instances(options = {})
batch = []
options = options.merge(auto_scaling_group_name: @name)
resp = @client.detach_instances(options)
resp.data.activities.each do |a|
batch << Activity.new(
id: a.activity_id,
data: a,
client: @client
)
... | ruby | def detach_instances(options = {})
batch = []
options = options.merge(auto_scaling_group_name: @name)
resp = @client.detach_instances(options)
resp.data.activities.each do |a|
batch << Activity.new(
id: a.activity_id,
data: a,
client: @client
)
... | [
"def",
"detach_instances",
"(",
"options",
"=",
"{",
"}",
")",
"batch",
"=",
"[",
"]",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"detach_instances",
"(",
"options",
")",
"resp",... | @example Request syntax with placeholder values
activity = auto_scaling_group.detach_instances({
instance_ids: ["XmlStringMaxLen19"],
should_decrement_desired_capacity: false, # required
})
@param [Hash] options ({})
@option options [Array<String>] :instance_ids
The IDs of the instances. You can s... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L420-L432 | train | Detaches all instances from the Auto Scaling group. | [
30522,
13366,
20010,
6776,
1035,
12107,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
1027,
1031,
1033,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeorgeKaraszi/ActiveRecordExtended | lib/active_record_extended/utilities.rb | ActiveRecordExtended.Utilities.wrap_with_array | def wrap_with_array(arel_or_rel_query, alias_name)
query = Arel::Nodes::Array.new(to_sql_array(arel_or_rel_query))
nested_alias_escape(query, alias_name)
end | ruby | def wrap_with_array(arel_or_rel_query, alias_name)
query = Arel::Nodes::Array.new(to_sql_array(arel_or_rel_query))
nested_alias_escape(query, alias_name)
end | [
"def",
"wrap_with_array",
"(",
"arel_or_rel_query",
",",
"alias_name",
")",
"query",
"=",
"Arel",
"::",
"Nodes",
"::",
"Array",
".",
"new",
"(",
"to_sql_array",
"(",
"arel_or_rel_query",
")",
")",
"nested_alias_escape",
"(",
"query",
",",
"alias_name",
")",
"e... | Wraps subquery into an Aliased ARRAY
Ex: `SELECT * FROM users` => (ARRAY(SELECT * FROM users)) AS "members" | [
"Wraps",
"subquery",
"into",
"an",
"Aliased",
"ARRAY",
"Ex",
":",
"SELECT",
"*",
"FROM",
"users",
"=",
">",
"(",
"ARRAY",
"(",
"SELECT",
"*",
"FROM",
"users",
"))",
"AS",
"members"
] | aca74eebb64b9957a2c8765bef6e43c7d5736fd8 | https://github.com/GeorgeKaraszi/ActiveRecordExtended/blob/aca74eebb64b9957a2c8765bef6e43c7d5736fd8/lib/active_record_extended/utilities.rb#L38-L41 | train | wrap the query in an array | [
30522,
13366,
10236,
1035,
2007,
1035,
9140,
1006,
2024,
2140,
1035,
2030,
1035,
2128,
2140,
1035,
23032,
1010,
14593,
1035,
2171,
1007,
23032,
1027,
2024,
2140,
1024,
1024,
14164,
1024,
1024,
9140,
1012,
2047,
1006,
2000,
1035,
29296,
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... |
meew0/discordrb | lib/discordrb/gateway.rb | Discordrb.Gateway.send_identify | def send_identify(token, properties, compress, large_threshold, shard_key = nil)
data = {
# Don't send a v anymore as it's entirely determined by the URL now
token: token,
properties: properties,
compress: compress,
large_threshold: large_threshold
}
# Don't in... | ruby | def send_identify(token, properties, compress, large_threshold, shard_key = nil)
data = {
# Don't send a v anymore as it's entirely determined by the URL now
token: token,
properties: properties,
compress: compress,
large_threshold: large_threshold
}
# Don't in... | [
"def",
"send_identify",
"(",
"token",
",",
"properties",
",",
"compress",
",",
"large_threshold",
",",
"shard_key",
"=",
"nil",
")",
"data",
"=",
"{",
"# Don't send a v anymore as it's entirely determined by the URL now",
"token",
":",
"token",
",",
"properties",
":",... | Sends an identify packet (op 2). This starts a new session on the current connection and tells Discord who we are.
This can only be done once a connection.
@param token [String] The token with which to authorise the session. If it belongs to a bot account, it must be
prefixed with "Bot ".
@param properties [Hash<... | [
"Sends",
"an",
"identify",
"packet",
"(",
"op",
"2",
")",
".",
"This",
"starts",
"a",
"new",
"session",
"on",
"the",
"current",
"connection",
"and",
"tells",
"Discord",
"who",
"we",
"are",
".",
"This",
"can",
"only",
"be",
"done",
"once",
"a",
"connect... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/gateway.rb#L296-L309 | train | Send an identify packet to Discord | [
30522,
13366,
4604,
1035,
6709,
1006,
19204,
1010,
5144,
1010,
4012,
20110,
1010,
2312,
1035,
11207,
1010,
21146,
4103,
1035,
3145,
1027,
9152,
2140,
1007,
2951,
1027,
1063,
1001,
2123,
1005,
1056,
4604,
1037,
1058,
4902,
2004,
2009,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/params_hash.rb | Github.ParamsHash.options | def options
opts = fetch('options', {})
headers = fetch('headers', {})
if value = accept
headers[:accept] = value
end
opts[:raw] = key?('raw') ? self['raw'] : false
opts[:headers] = headers unless headers.empty?
opts
end | ruby | def options
opts = fetch('options', {})
headers = fetch('headers', {})
if value = accept
headers[:accept] = value
end
opts[:raw] = key?('raw') ? self['raw'] : false
opts[:headers] = headers unless headers.empty?
opts
end | [
"def",
"options",
"opts",
"=",
"fetch",
"(",
"'options'",
",",
"{",
"}",
")",
"headers",
"=",
"fetch",
"(",
"'headers'",
",",
"{",
"}",
")",
"if",
"value",
"=",
"accept",
"headers",
"[",
":accept",
"]",
"=",
"value",
"end",
"opts",
"[",
":raw",
"]"... | Configuration options from request
@return [Hash]
@api public | [
"Configuration",
"options",
"from",
"request"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/params_hash.rb#L71-L80 | train | Returns the options array for this request. | [
30522,
13366,
7047,
23569,
2015,
1027,
18584,
1006,
1005,
7047,
1005,
1010,
1063,
1065,
1007,
20346,
2015,
1027,
18584,
1006,
1005,
20346,
2015,
1005,
1010,
1063,
1065,
1007,
2065,
3643,
1027,
5138,
20346,
2015,
1031,
1024,
5138,
1033,
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... |
mongodb/mongo-ruby-driver | lib/mongo/cluster.rb | Mongo.Cluster.update_cluster_time | def update_cluster_time(result)
if cluster_time_doc = result.cluster_time
@cluster_time_lock.synchronize do
if @cluster_time.nil?
@cluster_time = cluster_time_doc
elsif cluster_time_doc[CLUSTER_TIME] > @cluster_time[CLUSTER_TIME]
@cluster_time = cluster_time_doc... | ruby | def update_cluster_time(result)
if cluster_time_doc = result.cluster_time
@cluster_time_lock.synchronize do
if @cluster_time.nil?
@cluster_time = cluster_time_doc
elsif cluster_time_doc[CLUSTER_TIME] > @cluster_time[CLUSTER_TIME]
@cluster_time = cluster_time_doc... | [
"def",
"update_cluster_time",
"(",
"result",
")",
"if",
"cluster_time_doc",
"=",
"result",
".",
"cluster_time",
"@cluster_time_lock",
".",
"synchronize",
"do",
"if",
"@cluster_time",
".",
"nil?",
"@cluster_time",
"=",
"cluster_time_doc",
"elsif",
"cluster_time_doc",
"... | Update the max cluster time seen in a response.
@example Update the cluster time.
cluster.update_cluster_time(result)
@param [ Operation::Result ] result The operation result containing the cluster time.
@return [ Object ] The cluster time.
@since 2.5.0 | [
"Update",
"the",
"max",
"cluster",
"time",
"seen",
"in",
"a",
"response",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/cluster.rb#L559-L569 | train | Update the cluster time of the result | [
30522,
13366,
10651,
1035,
9324,
1035,
2051,
1006,
2765,
1007,
2065,
9324,
1035,
2051,
1035,
9986,
1027,
2765,
1012,
9324,
1035,
2051,
1030,
9324,
1035,
2051,
1035,
5843,
1012,
26351,
8093,
10698,
4371,
2079,
2065,
1030,
9324,
1035,
2051,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ufo | lib/ufo/template_scope.rb | Ufo.TemplateScope.substitute_variables! | def substitute_variables!(properties)
# transform values and substitute for special values
# https://stackoverflow.com/questions/34595142/process-nested-hash-to-convert-all-values-to-strings
#
# Examples:
# "{stack_name}.stag.boltops.com." => development-demo-web.stag.boltops.com.
... | ruby | def substitute_variables!(properties)
# transform values and substitute for special values
# https://stackoverflow.com/questions/34595142/process-nested-hash-to-convert-all-values-to-strings
#
# Examples:
# "{stack_name}.stag.boltops.com." => development-demo-web.stag.boltops.com.
... | [
"def",
"substitute_variables!",
"(",
"properties",
")",
"# transform values and substitute for special values",
"# https://stackoverflow.com/questions/34595142/process-nested-hash-to-convert-all-values-to-strings",
"#",
"# Examples:",
"# \"{stack_name}.stag.boltops.com.\" => development-demo-web... | Substitute special variables that cannot be baked into the template
because they are dynamically assigned. Only one special variable:
{stack_name} | [
"Substitute",
"special",
"variables",
"that",
"cannot",
"be",
"baked",
"into",
"the",
"template",
"because",
"they",
"are",
"dynamically",
"assigned",
".",
"Only",
"one",
"special",
"variable",
":"
] | 16ac3dad28edcab2693c0e7d89a1971aca65b8f9 | https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/template_scope.rb#L88-L103 | train | substitute variables in the properties hash | [
30522,
13366,
7681,
1035,
10857,
999,
1006,
5144,
1007,
1001,
10938,
5300,
1998,
7681,
2005,
2569,
5300,
1001,
16770,
1024,
1013,
1013,
9991,
7840,
12314,
1012,
4012,
1013,
3980,
1013,
23785,
2683,
22203,
20958,
1013,
2832,
1011,
9089,
2098... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/thread_pool.rb | Rake.ThreadPool.join | def join
@threads_mon.synchronize do
begin
stat :joining
@join_cond.wait unless @threads.empty?
stat :joined
rescue Exception => e
stat :joined
$stderr.puts e
$stderr.print "Queue contains #{@queue.size} items. " +
"Thread poo... | ruby | def join
@threads_mon.synchronize do
begin
stat :joining
@join_cond.wait unless @threads.empty?
stat :joined
rescue Exception => e
stat :joined
$stderr.puts e
$stderr.print "Queue contains #{@queue.size} items. " +
"Thread poo... | [
"def",
"join",
"@threads_mon",
".",
"synchronize",
"do",
"begin",
"stat",
":joining",
"@join_cond",
".",
"wait",
"unless",
"@threads",
".",
"empty?",
"stat",
":joined",
"rescue",
"Exception",
"=>",
"e",
"stat",
":joined",
"$stderr",
".",
"puts",
"e",
"$stderr"... | Waits until the queue of futures is empty and all threads have exited. | [
"Waits",
"until",
"the",
"queue",
"of",
"futures",
"is",
"empty",
"and",
"all",
"threads",
"have",
"exited",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/thread_pool.rb#L44-L65 | train | Join the queue and threads | [
30522,
13366,
3693,
1030,
16457,
1035,
12256,
1012,
26351,
8093,
10698,
4371,
2079,
4088,
28093,
1024,
5241,
1030,
3693,
1035,
9530,
2094,
1012,
3524,
4983,
1030,
16457,
1012,
4064,
1029,
28093,
1024,
2587,
5343,
6453,
1027,
1028,
1041,
280... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.execute_site_analysis | def execute_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
response = execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_... | ruby | def execute_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
response = execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_... | [
"def",
"execute_site_analysis",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
"analysis_name",
",",
"start_time",
":",
"nil",
",",
"end_time",
":",
"nil",
",",
"time_grain",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"re... | Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param diagnostic_category [String] Category Name
@param analysis_name [String] Analysis Resource Name
@param start_time [DateTime] Start Time
@pa... | [
"Execute",
"Analysis"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L918-L921 | train | Executes analysis on a site. | [
30522,
13366,
15389,
1035,
2609,
1035,
4106,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
16474,
1035,
4696,
1010,
4106,
1035,
2171,
1010,
2707,
1035,
2051,
1024,
9152,
2140,
30524,
4696,
1010,
4106,
1035,
2171,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_application_upgrade_with_http_info | def get_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil)
get_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil)
get_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_application_upgrade_with_http_info",
"(",
"application_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_application_upgrade_async",
"(",
"application_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
"... | Gets details for the latest upgrade performed on this application.
Returns information about the state of the latest application upgrade along
with details to aid debugging application health issues.
@param application_id [String] The identity of the application. This is
typically the full name of the application... | [
"Gets",
"details",
"for",
"the",
"latest",
"upgrade",
"performed",
"on",
"this",
"application",
"."
] | 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#L7883-L7885 | train | Gets the version of the specified application. | [
30522,
13366,
2131,
1035,
4646,
1035,
12200,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
4646,
1035,
12200,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.delete | def delete(resource_group_name, snapshot_name, custom_headers:nil)
response = delete_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, snapshot_name, custom_headers:nil)
response = delete_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Deletes a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is 80 charact... | [
"Deletes",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L232-L235 | train | Deletes a snapshot. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
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 | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.update_certificate_policy_with_http_info | def update_certificate_policy_with_http_info(vault_base_url, certificate_name, certificate_policy, custom_headers:nil)
update_certificate_policy_async(vault_base_url, certificate_name, certificate_policy, custom_headers:custom_headers).value!
end | ruby | def update_certificate_policy_with_http_info(vault_base_url, certificate_name, certificate_policy, custom_headers:nil)
update_certificate_policy_async(vault_base_url, certificate_name, certificate_policy, custom_headers:custom_headers).value!
end | [
"def",
"update_certificate_policy_with_http_info",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"certificate_policy",
",",
"custom_headers",
":",
"nil",
")",
"update_certificate_policy_async",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"certificate_policy",
... | Updates the policy for a certificate.
Set specified members in the certificate policy. Leave others as null. This
operation requires the certificates/update permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param certificate_name [String] The name of the cer... | [
"Updates",
"the",
"policy",
"for",
"a",
"certificate",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L5701-L5703 | train | Updates the policy of a specified certificate. | [
30522,
13366,
10651,
1035,
8196,
1035,
3343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
8196,
1035,
3343,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
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... |
rails/sprockets | lib/sprockets/source_map_utils.rb | Sprockets.SourceMapUtils.vlq_decode | def vlq_decode(str)
result = []
chars = str.split('')
while chars.any?
vlq = 0
shift = 0
continuation = true
while continuation
char = chars.shift
raise ArgumentError unless char
digit = BASE64_VALUES[char]
continuation = false if... | ruby | def vlq_decode(str)
result = []
chars = str.split('')
while chars.any?
vlq = 0
shift = 0
continuation = true
while continuation
char = chars.shift
raise ArgumentError unless char
digit = BASE64_VALUES[char]
continuation = false if... | [
"def",
"vlq_decode",
"(",
"str",
")",
"result",
"=",
"[",
"]",
"chars",
"=",
"str",
".",
"split",
"(",
"''",
")",
"while",
"chars",
".",
"any?",
"vlq",
"=",
"0",
"shift",
"=",
"0",
"continuation",
"=",
"true",
"while",
"continuation",
"char",
"=",
... | Public: Decode a VLQ string.
str - VLQ encoded String
Returns an Array of Integers. | [
"Public",
":",
"Decode",
"a",
"VLQ",
"string",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/source_map_utils.rb#L429-L448 | train | Decode a VLQ string | [
30522,
13366,
1058,
2140,
4160,
1035,
21933,
3207,
1006,
2358,
2099,
1007,
2765,
1027,
1031,
1033,
25869,
2015,
1027,
2358,
2099,
1012,
3975,
1006,
1005,
1005,
1007,
2096,
25869,
2015,
1012,
2151,
1029,
1058,
2140,
4160,
1027,
1014,
5670,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/type.rb | Puppet.Type.set_sensitive_parameters | def set_sensitive_parameters(sensitive_parameters)
sensitive_parameters.each do |name|
p = parameter(name)
if p.is_a?(Puppet::Property)
p.sensitive = true
elsif p.is_a?(Puppet::Parameter)
warning(_("Unable to mark '%{name}' as sensitive: %{name} is a parameter and not a property, a... | ruby | def set_sensitive_parameters(sensitive_parameters)
sensitive_parameters.each do |name|
p = parameter(name)
if p.is_a?(Puppet::Property)
p.sensitive = true
elsif p.is_a?(Puppet::Parameter)
warning(_("Unable to mark '%{name}' as sensitive: %{name} is a parameter and not a property, a... | [
"def",
"set_sensitive_parameters",
"(",
"sensitive_parameters",
")",
"sensitive_parameters",
".",
"each",
"do",
"|",
"name",
"|",
"p",
"=",
"parameter",
"(",
"name",
")",
"if",
"p",
".",
"is_a?",
"(",
"Puppet",
"::",
"Property",
")",
"p",
".",
"sensitive",
... | Mark parameters associated with this type as sensitive, based on the associated resource.
Currently, only instances of `Puppet::Property` can be easily marked for sensitive data handling
and information redaction is limited to redacting events generated while synchronizing
properties. While support for redaction wi... | [
"Mark",
"parameters",
"associated",
"with",
"this",
"type",
"as",
"sensitive",
"based",
"on",
"the",
"associated",
"resource",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/type.rb#L2439-L2460 | train | Sets the sensitive parameters for this object. | [
30522,
13366,
2275,
1035,
7591,
1035,
11709,
1006,
7591,
1035,
11709,
1007,
7591,
1035,
11709,
1012,
2169,
2079,
1064,
2171,
1064,
1052,
1027,
16381,
1006,
2171,
1007,
2065,
1052,
1012,
2003,
1035,
1037,
1029,
1006,
13997,
1024,
1024,
3200,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/clusters.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Clusters.patch_async | def patch_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
# Send request
promise = begin_patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deseriali... | ruby | def patch_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
# Send request
promise = begin_patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deseriali... | [
"def",
"patch_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_patch_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"parameters",
",",
"custom_he... | @param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param cluster_name [String] The name of the Event Hubs Cluster.
@param parameters [Cluster] The properties of the Event Hubs Cluster which
should be updated.
@param custom_headers [Hash{String => String}] A hash of custo... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"resource",
"group",
"within",
"the",
"Azure",
"subscription",
".",
"@param",
"cluster_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Event",
"Hubs",
"Cluster",
".",
"@param",
... | 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/clusters.rb#L379-L395 | train | Patch a cluster. | [
30522,
13366,
8983,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
8983,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncGroups.list_hub_schemas_next | def list_hub_schemas_next(next_page_link, custom_headers:nil)
response = list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_hub_schemas_next(next_page_link, custom_headers:nil)
response = list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_hub_schemas_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_hub_schemas_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"resp... | Gets a collection of hub database schemas.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [SyncFullSchemaPropertiesListResult] operation result... | [
"Gets",
"a",
"collection",
"of",
"hub",
"database",
"schemas",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb#L1512-L1515 | train | Gets the hub schemas for the hub. | [
30522,
13366,
2862,
1035,
9594,
1035,
8040,
28433,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
9594,
1035,
8040,
28433,
2015,
1035,
2279,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_vmsecurity_rules | def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_get_vmsecurity_rules",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_get_vmsecurity_rules_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"param... | Gets the configured and effective security group rules on the specified VM.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [SecurityGroupViewParameters] Parameters that define the VM
to check security group... | [
"Gets",
"the",
"configured",
"and",
"effective",
"security",
"group",
"rules",
"on",
"the",
"specified",
"VM",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L1518-L1521 | train | Gets the security rules for a virtual machine. | [
30522,
13366,
4088,
1035,
2131,
1035,
1058,
5244,
8586,
25137,
1035,
3513,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.power_off | def power_off(resource_group_name, vm_name, custom_headers:nil)
response = power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def power_off(resource_group_name, vm_name, custom_headers:nil)
response = power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"power_off",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"power_off_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"... | The operation to power off (stop) a virtual machine. The virtual machine can
be restarted with the same provisioned resources. You are still charged for
this virtual machine.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param custom_... | [
"The",
"operation",
"to",
"power",
"off",
"(",
"stop",
")",
"a",
"virtual",
"machine",
".",
"The",
"virtual",
"machine",
"can",
"be",
"restarted",
"with",
"the",
"same",
"provisioned",
"resources",
".",
"You",
"are",
"still",
"charged",
"for",
"this",
"vir... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L821-L824 | train | Power off the virtual machine. | [
30522,
13366,
2373,
1035,
2125,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2373,
1035,
2125,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
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_graph_rbac/lib/1.6/generated/azure_graph_rbac/groups.rb | Azure::GraphRbac::V1_6.Groups.is_member_of | def is_member_of(parameters, custom_headers:nil)
response = is_member_of_async(parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def is_member_of(parameters, custom_headers:nil)
response = is_member_of_async(parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"is_member_of",
"(",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"is_member_of_async",
"(",
"parameters",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
... | Checks whether the specified user, group, contact, or service principal is a
direct or transitive member of the specified group.
@param parameters [CheckGroupMembershipParameters] The check group membership
parameters.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to t... | [
"Checks",
"whether",
"the",
"specified",
"user",
"group",
"contact",
"or",
"service",
"principal",
"is",
"a",
"direct",
"or",
"transitive",
"member",
"of",
"the",
"specified",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_graph_rbac/lib/1.6/generated/azure_graph_rbac/groups.rb#L35-L38 | train | Returns the number of documents that are members of the specified resource group. | [
30522,
13366,
2003,
1035,
2266,
1035,
1997,
1006,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2003,
1035,
2266,
1035,
1997,
1035,
2004,
6038,
2278,
1006,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
braintree/braintree_ruby | lib/braintree/credit_card.rb | Braintree.CreditCard.update | def update(attributes)
warn "[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update"
result = @gateway.credit_card.update(token, attributes)
if result.success?
copy_instance_variables_from_object result.credit_card
end
result
end | ruby | def update(attributes)
warn "[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update"
result = @gateway.credit_card.update(token, attributes)
if result.success?
copy_instance_variables_from_object result.credit_card
end
result
end | [
"def",
"update",
"(",
"attributes",
")",
"warn",
"\"[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update\"",
"result",
"=",
"@gateway",
".",
"credit_card",
".",
"update",
"(",
"token",
",",
"attributes",
")",
"if",
"result",
".",
"success?... | Deprecated. Use Braintree::CreditCard.update | [
"Deprecated",
".",
"Use",
"Braintree",
"::",
"CreditCard",
".",
"update"
] | 6e56c7099ea55bcdc4073cbea60b2688cef69663 | https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/credit_card.rb#L218-L225 | train | Update an existing CreditCard | [
30522,
13366,
10651,
1006,
12332,
1007,
11582,
1000,
1031,
2139,
28139,
12921,
1033,
10651,
2004,
2019,
6013,
4118,
2003,
2139,
28139,
12921,
1012,
3531,
2224,
4923,
11522,
1012,
10651,
1000,
2765,
1027,
1030,
11909,
1012,
4923,
1035,
4003,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/dhcp_options.rb | Aws::EC2.DhcpOptions.delete | def delete(options = {})
options = options.merge(dhcp_options_id: @id)
resp = @client.delete_dhcp_options(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(dhcp_options_id: @id)
resp = @client.delete_dhcp_options(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"dhcp_options_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"delete_dhcp_options",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
dhcp_options.delete({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/dhcp_options.rb#L254-L258 | train | Delete a DHCP options | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
28144,
21906,
1035,
7047,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
28144,
21906,
1035,
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... |
rails/sprockets | lib/sprockets/manifest.rb | Sprockets.Manifest.clean | def clean(count = 2, age = 3600)
asset_versions = files.group_by { |_, attrs| attrs['logical_path'] }
asset_versions.each do |logical_path, versions|
current = assets[logical_path]
versions.reject { |path, _|
path == current
}.sort_by { |_, attrs|
# Sort by time... | ruby | def clean(count = 2, age = 3600)
asset_versions = files.group_by { |_, attrs| attrs['logical_path'] }
asset_versions.each do |logical_path, versions|
current = assets[logical_path]
versions.reject { |path, _|
path == current
}.sort_by { |_, attrs|
# Sort by time... | [
"def",
"clean",
"(",
"count",
"=",
"2",
",",
"age",
"=",
"3600",
")",
"asset_versions",
"=",
"files",
".",
"group_by",
"{",
"|",
"_",
",",
"attrs",
"|",
"attrs",
"[",
"'logical_path'",
"]",
"}",
"asset_versions",
".",
"each",
"do",
"|",
"logical_path",... | Cleanup old assets in the compile directory. By default it will
keep the latest version, 2 backups and any created within the past hour.
Examples
To force only 1 backup to be kept, set count=1 and age=0.
To only keep files created within the last 10 minutes, set count=0 and
age=600. | [
"Cleanup",
"old",
"assets",
"in",
"the",
"compile",
"directory",
".",
"By",
"default",
"it",
"will",
"keep",
"the",
"latest",
"version",
"2",
"backups",
"and",
"any",
"created",
"within",
"the",
"past",
"hour",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/manifest.rb#L245-L265 | train | Clean up the assets | [
30522,
13366,
4550,
1006,
4175,
1027,
1016,
1010,
2287,
1027,
9475,
2692,
1007,
11412,
1035,
4617,
1027,
6764,
1012,
2177,
1035,
2011,
1063,
1064,
1035,
1010,
2012,
16344,
2015,
1064,
2012,
16344,
2015,
1031,
1005,
11177,
1035,
4130,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
plataformatec/responders | lib/action_controller/responder.rb | ActionController.Responder.navigation_behavior | def navigation_behavior(error)
if get?
raise error
elsif has_errors? && default_action
render rendering_options
else
redirect_to navigation_location
end
end | ruby | def navigation_behavior(error)
if get?
raise error
elsif has_errors? && default_action
render rendering_options
else
redirect_to navigation_location
end
end | [
"def",
"navigation_behavior",
"(",
"error",
")",
"if",
"get?",
"raise",
"error",
"elsif",
"has_errors?",
"&&",
"default_action",
"render",
"rendering_options",
"else",
"redirect_to",
"navigation_location",
"end",
"end"
] | This is the common behavior for formats associated with browsing, like :html, :iphone and so forth. | [
"This",
"is",
"the",
"common",
"behavior",
"for",
"formats",
"associated",
"with",
"browsing",
"like",
":",
"html",
":",
"iphone",
"and",
"so",
"forth",
"."
] | a1a2706091d4ffcbbe387407ddfc5671a59ad842 | https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/action_controller/responder.rb#L199-L207 | train | This method is called when a user has requested a page to be redirected to. | [
30522,
13366,
9163,
1035,
5248,
1006,
7561,
1007,
2065,
2131,
1029,
5333,
7561,
3449,
5332,
2546,
2038,
1035,
10697,
1029,
1004,
1004,
12398,
1035,
2895,
17552,
14259,
1035,
7047,
2842,
2417,
7442,
6593,
1035,
2000,
9163,
1035,
3295,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/storage_accounts.rb | Azure::DataLakeAnalytics::Mgmt::V2016_11_01.StorageAccounts.list_by_account_as_lazy | def list_by_account_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil)
response = list_by_account_async(resource_group_name, account_name, filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:c... | ruby | def list_by_account_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil)
response = list_by_account_async(resource_group_name, account_name, filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:c... | [
"def",
"list_by_account_as_lazy",
"(",
"resource_group_name",
",",
"account_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"count",
":",
"nil",
",",
"custom_h... | Gets the first page of Azure Storage accounts, if any, linked to the
specified Data Lake Analytics account. The response includes a link to the
next page, if any.
@param resource_group_name [String] The name of the Azure resource group.
@param account_name [String] The name of the Data Lake Analytics account.
@pa... | [
"Gets",
"the",
"first",
"page",
"of",
"Azure",
"Storage",
"accounts",
"if",
"any",
"linked",
"to",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"account",
".",
"The",
"response",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/storage_accounts.rb#L1197-L1206 | train | Gets a list of all the image objects in an App Service Environment. | [
30522,
13366,
2862,
1035,
2011,
1035,
4070,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7276,
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... |
samvera/hyrax | app/models/concerns/hyrax/collection_behavior.rb | Hyrax.CollectionBehavior.add_member_objects | def add_member_objects(new_member_ids)
Array(new_member_ids).collect do |member_id|
member = ActiveFedora::Base.find(member_id)
message = Hyrax::MultipleMembershipChecker.new(item: member).check(collection_ids: id, include_current_members: true)
if message
member.errors.add(:coll... | ruby | def add_member_objects(new_member_ids)
Array(new_member_ids).collect do |member_id|
member = ActiveFedora::Base.find(member_id)
message = Hyrax::MultipleMembershipChecker.new(item: member).check(collection_ids: id, include_current_members: true)
if message
member.errors.add(:coll... | [
"def",
"add_member_objects",
"(",
"new_member_ids",
")",
"Array",
"(",
"new_member_ids",
")",
".",
"collect",
"do",
"|",
"member_id",
"|",
"member",
"=",
"ActiveFedora",
"::",
"Base",
".",
"find",
"(",
"member_id",
")",
"message",
"=",
"Hyrax",
"::",
"Multip... | Add member objects by adding this collection to the objects' member_of_collection association.
@param [Enumerable<String>] the ids of the new child collections and works collection ids
Valkyrie Version: Wings::CollectionBehavior#add_collections_and_works aliased to #add_member_objects
lib/wings/mod... | [
"Add",
"member",
"objects",
"by",
"adding",
"this",
"collection",
"to",
"the",
"objects",
"member_of_collection",
"association",
"."
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/models/concerns/hyrax/collection_behavior.rb#L64-L76 | train | Add a list of member objects to the collection | [
30522,
13366,
5587,
1035,
2266,
1035,
5200,
1006,
2047,
1035,
2266,
1035,
8909,
2015,
1007,
9140,
1006,
2047,
1035,
2266,
1035,
8909,
2015,
1007,
1012,
8145,
2079,
1064,
2266,
1035,
8909,
1064,
2266,
1027,
3161,
25031,
6525,
1024,
1024,
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_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_worker_usages_next | def list_web_worker_usages_next(next_page_link, custom_headers:nil)
response = list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_web_worker_usages_next(next_page_link, custom_headers:nil)
response = list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_web_worker_usages_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_web_worker_usages_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Get usage metrics for a worker pool of an App Service Environment.
Get usage metrics for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will ... | [
"Get",
"usage",
"metrics",
"for",
"a",
"worker",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7042-L7045 | train | Gets the list of web worker usages for a given App Service Environment. | [
30522,
13366,
2862,
1035,
4773,
1035,
7309,
1035,
8192,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
4773,
1035,
7309,
1035,
8192,
2015,
1035,
2279,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/module_tool/contents_description.rb | Puppet::ModuleTool.ContentsDescription.provider_doc | def provider_doc(type)
providers = []
type.providers.sort.each do |prov|
providers.push(:name => prov, :doc => type.provider(prov).doc)
end
providers
end | ruby | def provider_doc(type)
providers = []
type.providers.sort.each do |prov|
providers.push(:name => prov, :doc => type.provider(prov).doc)
end
providers
end | [
"def",
"provider_doc",
"(",
"type",
")",
"providers",
"=",
"[",
"]",
"type",
".",
"providers",
".",
"sort",
".",
"each",
"do",
"|",
"prov",
"|",
"providers",
".",
"push",
"(",
":name",
"=>",
"prov",
",",
":doc",
"=>",
"type",
".",
"provider",
"(",
... | Return an array of hashes representing this +type+'s providers, each
containing :name and :doc. | [
"Return",
"an",
"array",
"of",
"hashes",
"representing",
"this",
"+",
"type",
"+",
"s",
"providers",
"each",
"containing",
":",
"name",
"and",
":",
"doc",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/contents_description.rb#L78-L86 | train | Returns the doc of the provider doc for a given type | [
30522,
13366,
10802,
1035,
9986,
1006,
2828,
1007,
11670,
1027,
1031,
1033,
2828,
1012,
11670,
1012,
4066,
1012,
2169,
2079,
1064,
4013,
2615,
1064,
11670,
1012,
5245,
1006,
1024,
2171,
1027,
1028,
4013,
2615,
1010,
1024,
9986,
1027,
1028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.delete_image_tags | def delete_image_tags(project_id, image_ids, tag_ids, custom_headers:nil)
response = delete_image_tags_async(project_id, image_ids, tag_ids, custom_headers:custom_headers).value!
nil
end | ruby | def delete_image_tags(project_id, image_ids, tag_ids, custom_headers:nil)
response = delete_image_tags_async(project_id, image_ids, tag_ids, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_image_tags",
"(",
"project_id",
",",
"image_ids",
",",
"tag_ids",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_image_tags_async",
"(",
"project_id",
",",
"image_ids",
",",
"tag_ids",
",",
"custom_headers",
":custom_headers",
")",
... | Remove a set of tags from a set of images.
@param project_id The project id.
@param image_ids Image ids. Limited to 64 images.
@param tag_ids Tags to be deleted from the specified images. Limited to 20
tags.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP re... | [
"Remove",
"a",
"set",
"of",
"tags",
"from",
"a",
"set",
"of",
"images",
"."
] | 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#L647-L650 | train | Deletes the tags from an image. | [
30522,
13366,
3972,
12870,
1035,
3746,
1035,
22073,
1006,
2622,
1035,
8909,
1010,
3746,
1035,
8909,
2015,
1010,
6415,
1035,
8909,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
3746,
1035,
22073,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.batch_read_file | def batch_read_file(url, mode, custom_headers:nil)
response = batch_read_file_async(url, mode, custom_headers:custom_headers).value!
nil
end | ruby | def batch_read_file(url, mode, custom_headers:nil)
response = batch_read_file_async(url, mode, custom_headers:custom_headers).value!
nil
end | [
"def",
"batch_read_file",
"(",
"url",
",",
"mode",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"batch_read_file_async",
"(",
"url",
",",
"mode",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Use this interface to get the result of a Read operation, employing the
state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
text-heavy documents. When you use the Read File interface, the response
contains a field called "Operation-Location". The "Operation-Location" field
contains the URL... | [
"Use",
"this",
"interface",
"to",
"get",
"the",
"result",
"of",
"a",
"Read",
"operation",
"employing",
"the",
"state",
"-",
"of",
"-",
"the",
"-",
"art",
"Optical",
"Character",
"Recognition",
"(",
"OCR",
")",
"algorithms",
"optimized",
"for",
"text",
"-",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1590-L1593 | train | Read a file. | [
30522,
13366,
14108,
1035,
3191,
1035,
5371,
1006,
24471,
2140,
1010,
5549,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
14108,
1035,
3191,
1035,
5371,
1035,
2004,
6038,
2278,
1006,
24471,
2140,
1010,
5549,
1010,
7661,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.PolicyTrackedResources.list_query_results_for_resource_group | def list_query_results_for_resource_group(resource_group_name, query_options:nil, custom_headers:nil)
first_page = list_query_results_for_resource_group_as_lazy(resource_group_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_query_results_for_resource_group(resource_group_name, query_options:nil, custom_headers:nil)
first_page = list_query_results_for_resource_group_as_lazy(resource_group_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_query_results_for_resource_group",
"(",
"resource_group_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_query_results_for_resource_group_as_lazy",
"(",
"resource_group_name",
",",
"query_options",
":query_... | Queries policy tracked resources under the resource group.
@param resource_group_name [String] Resource group name.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [... | [
"Queries",
"policy",
"tracked",
"resources",
"under",
"the",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb#L230-L233 | train | Gets all the available advisor terms. | [
30522,
13366,
2862,
1035,
23032,
1035,
3463,
1035,
2005,
1035,
7692,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
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... |
hashicorp/vault-ruby | lib/vault/persistent.rb | Vault.PersistentHTTP.idempotent? | def idempotent? req
case req
when Net::HTTP::Delete, Net::HTTP::Get, Net::HTTP::Head,
Net::HTTP::Options, Net::HTTP::Put, Net::HTTP::Trace then
true
end
end | ruby | def idempotent? req
case req
when Net::HTTP::Delete, Net::HTTP::Get, Net::HTTP::Head,
Net::HTTP::Options, Net::HTTP::Put, Net::HTTP::Trace then
true
end
end | [
"def",
"idempotent?",
"req",
"case",
"req",
"when",
"Net",
"::",
"HTTP",
"::",
"Delete",
",",
"Net",
"::",
"HTTP",
"::",
"Get",
",",
"Net",
"::",
"HTTP",
"::",
"Head",
",",
"Net",
"::",
"HTTP",
"::",
"Options",
",",
"Net",
"::",
"HTTP",
"::",
"Put"... | Is +req+ idempotent according to RFC 2616? | [
"Is",
"+",
"req",
"+",
"idempotent",
"according",
"to",
"RFC",
"2616?"
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/persistent.rb#L729-L735 | train | Returns true if the request is idempotent. | [
30522,
13366,
8909,
6633,
11008,
4765,
1029,
2128,
4160,
2553,
2128,
4160,
2043,
5658,
1024,
1024,
8299,
1024,
1024,
3972,
12870,
1010,
5658,
1024,
1024,
8299,
1024,
1024,
2131,
1010,
5658,
1024,
1024,
8299,
1024,
1024,
2132,
1010,
5658,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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... |
randym/axlsx | lib/axlsx/stylesheet/styles.rb | Axlsx.Styles.to_xml_string | def to_xml_string(str = '')
str << ('<styleSheet xmlns="' << XML_NS << '">')
[:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key|
self.instance_values[key.to_s].to_xml_string(str) unless self.instance_values[key.to_s].nil?
end
str ... | ruby | def to_xml_string(str = '')
str << ('<styleSheet xmlns="' << XML_NS << '">')
[:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key|
self.instance_values[key.to_s].to_xml_string(str) unless self.instance_values[key.to_s].nil?
end
str ... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"(",
"'<styleSheet xmlns=\"'",
"<<",
"XML_NS",
"<<",
"'\">'",
")",
"[",
":numFmts",
",",
":fonts",
",",
":fills",
",",
":borders",
",",
":cellStyleXfs",
",",
":cellXfs",
",",
":cellStyles",
"... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/stylesheet/styles.rb#L364-L370 | train | Returns the XML string for this stylesheet. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1006,
30524,
2595,
10343,
1010,
1024,
3526,
2595,
10343,
1010,
1024,
4442,
27983,
2015,
1010,
1024,
1040,
2595,
10343,
1010,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/worksheet_drawing.rb | Axlsx.WorksheetDrawing.add_chart | def add_chart(chart_type, options)
@drawing ||= Drawing.new worksheet
drawing.add_chart(chart_type, options)
end | ruby | def add_chart(chart_type, options)
@drawing ||= Drawing.new worksheet
drawing.add_chart(chart_type, options)
end | [
"def",
"add_chart",
"(",
"chart_type",
",",
"options",
")",
"@drawing",
"||=",
"Drawing",
".",
"new",
"worksheet",
"drawing",
".",
"add_chart",
"(",
"chart_type",
",",
"options",
")",
"end"
] | adds a chart to the drawing object
@param [Class] chart_type The type of chart to add
@param [Hash] options Options to pass on to the drawing and chart
@see Worksheet#add_chart | [
"adds",
"a",
"chart",
"to",
"the",
"drawing",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet_drawing.rb#L25-L28 | train | Add a chart to the chart chart_type is a chart type. | [
30522,
13366,
5587,
1035,
3673,
1006,
3673,
1035,
2828,
1010,
7047,
1007,
1030,
5059,
1064,
1064,
1027,
5059,
1012,
2047,
2573,
21030,
2102,
5059,
1012,
5587,
1035,
3673,
1006,
3673,
1035,
2828,
1010,
7047,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_deployed_application_info_list | def get_deployed_application_info_list(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
response = get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token, max... | ruby | def get_deployed_application_info_list(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
response = get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token, max... | [
"def",
"get_deployed_application_info_list",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"include_health_state",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"ge... | Gets the list of applications deployed on a Service Fabric node.
Gets the list of applications deployed on a Service Fabric node. The results
do not include information about deployed system applications unless
explicitly queried for by ID. Results encompass deployed applications in
active, activating, and downloa... | [
"Gets",
"the",
"list",
"of",
"applications",
"deployed",
"on",
"a",
"Service",
"Fabric",
"node",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L8401-L8404 | train | Gets the list of applications deployed to a node. | [
30522,
13366,
2131,
1035,
7333,
1035,
4646,
1035,
18558,
1035,
2862,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
2421,
1035,
2740,
1035,
2110,
1024,
6270,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
4098,
1035,
3463,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_login_profile | def create_login_profile(options = {})
options = options.merge(user_name: @name)
resp = @client.create_login_profile(options)
LoginProfile.new(
user_name: resp.data.login_profile.user_name,
data: resp.data.login_profile,
client: @client
)
end | ruby | def create_login_profile(options = {})
options = options.merge(user_name: @name)
resp = @client.create_login_profile(options)
LoginProfile.new(
user_name: resp.data.login_profile.user_name,
data: resp.data.login_profile,
client: @client
)
end | [
"def",
"create_login_profile",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"create_login_profile",
"(",
"options",
")",
"LoginProfile",
".",
"new",
"(",
"use... | @example Request syntax with placeholder values
loginprofile = user.create_login_profile({
password: "passwordType", # required
password_reset_required: false,
})
@param [Hash] options ({})
@option options [required, String] :password
The new password for the user.
The [regex pattern][1] that ... | [
"@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#L447-L455 | train | Creates a login profile | [
30522,
13366,
3443,
1035,
8833,
2378,
1035,
6337,
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,
8833,
2378,
1035,
6337,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
abonas/kubeclient | lib/kubeclient/common.rb | Kubeclient.ClientMixin.define_entity_methods | def define_entity_methods
@entities.values.each do |entity|
# get all entities of a type e.g. get_nodes, get_pods, etc.
define_singleton_method("get_#{entity.method_names[1]}") do |options = {}|
get_entities(entity.entity_type, entity.resource_name, options)
end
# watch ... | ruby | def define_entity_methods
@entities.values.each do |entity|
# get all entities of a type e.g. get_nodes, get_pods, etc.
define_singleton_method("get_#{entity.method_names[1]}") do |options = {}|
get_entities(entity.entity_type, entity.resource_name, options)
end
# watch ... | [
"def",
"define_entity_methods",
"@entities",
".",
"values",
".",
"each",
"do",
"|",
"entity",
"|",
"# get all entities of a type e.g. get_nodes, get_pods, etc.",
"define_singleton_method",
"(",
"\"get_#{entity.method_names[1]}\"",
")",
"do",
"|",
"options",
"=",
"{",
"}",
... | rubocop:disable Metrics/BlockLength | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"BlockLength"
] | 3630f6c82532fba04f3e1a62d6b99c6cf2910451 | https://github.com/abonas/kubeclient/blob/3630f6c82532fba04f3e1a62d6b99c6cf2910451/lib/kubeclient/common.rb#L207-L257 | train | Define all the methods that are defined in the class | [
30522,
13366,
9375,
1035,
9178,
1035,
4725,
1030,
11422,
1012,
5300,
1012,
2169,
2079,
1064,
9178,
1064,
1001,
2131,
2035,
11422,
1997,
1037,
2828,
1041,
1012,
1043,
1012,
2131,
1035,
14164,
1010,
2131,
1035,
26723,
1010,
4385,
1012,
9375,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/utils.rb | Sprockets.Utils.module_include | def module_include(base, mod)
old_methods = {}
mod.instance_methods.each do |sym|
old_methods[sym] = base.instance_method(sym) if base.method_defined?(sym)
end
mod.instance_methods.each do |sym|
method = mod.instance_method(sym)
base.send(:define_method, sym, method)
... | ruby | def module_include(base, mod)
old_methods = {}
mod.instance_methods.each do |sym|
old_methods[sym] = base.instance_method(sym) if base.method_defined?(sym)
end
mod.instance_methods.each do |sym|
method = mod.instance_method(sym)
base.send(:define_method, sym, method)
... | [
"def",
"module_include",
"(",
"base",
",",
"mod",
")",
"old_methods",
"=",
"{",
"}",
"mod",
".",
"instance_methods",
".",
"each",
"do",
"|",
"sym",
"|",
"old_methods",
"[",
"sym",
"]",
"=",
"base",
".",
"instance_method",
"(",
"sym",
")",
"if",
"base",... | Internal: Inject into target module for the duration of the block.
mod - Module
Returns result of block. | [
"Internal",
":",
"Inject",
"into",
"target",
"module",
"for",
"the",
"duration",
"of",
"the",
"block",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/utils.rb#L126-L146 | train | Include the given module in the given base class. | [
30522,
13366,
11336,
1035,
2421,
1006,
2918,
1010,
16913,
1007,
2214,
1035,
4725,
1027,
1063,
1065,
16913,
1012,
6013,
1035,
4725,
1012,
2169,
2079,
1064,
25353,
2213,
1064,
2214,
1035,
4725,
1031,
25353,
2213,
1033,
1027,
2918,
1012,
6013,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
intridea/hashie | lib/hashie/mash.rb | Hashie.Mash.initializing_reader | def initializing_reader(key)
ck = convert_key(key)
regular_writer(ck, self.class.new) unless key?(ck)
regular_reader(ck)
end | ruby | def initializing_reader(key)
ck = convert_key(key)
regular_writer(ck, self.class.new) unless key?(ck)
regular_reader(ck)
end | [
"def",
"initializing_reader",
"(",
"key",
")",
"ck",
"=",
"convert_key",
"(",
"key",
")",
"regular_writer",
"(",
"ck",
",",
"self",
".",
"class",
".",
"new",
")",
"unless",
"key?",
"(",
"ck",
")",
"regular_reader",
"(",
"ck",
")",
"end"
] | This is the bang method reader, it will return a new Mash
if there isn't a value already assigned to the key requested. | [
"This",
"is",
"the",
"bang",
"method",
"reader",
"it",
"will",
"return",
"a",
"new",
"Mash",
"if",
"there",
"isn",
"t",
"a",
"value",
"already",
"assigned",
"to",
"the",
"key",
"requested",
"."
] | da9fd39a0e551e09c1441cb7453c969a4afbfd7f | https://github.com/intridea/hashie/blob/da9fd39a0e551e09c1441cb7453c969a4afbfd7f/lib/hashie/mash.rb#L166-L170 | train | Initialize the reader for the given key. | [
30522,
13366,
3988,
6026,
1035,
8068,
1006,
3145,
1007,
23616,
1027,
10463,
1035,
3145,
1006,
3145,
1007,
3180,
1035,
3213,
1006,
23616,
1010,
2969,
1012,
2465,
1012,
2047,
1007,
4983,
3145,
1029,
1006,
23616,
1007,
3180,
1035,
8068,
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... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/dns/powerdns.rb | Bosh::Director.PowerDns.update_ptr_record | def update_ptr_record(record_name, ip_address)
reverse_domain = reverse_domain(ip_address)
reverse_host = reverse_host(ip_address)
rdomain = Models::Dns::Domain.safe_find_or_create(name: reverse_domain, type: 'NATIVE')
Models::Dns::Record.find_or_create(
domain: rdomain,
name: ... | ruby | def update_ptr_record(record_name, ip_address)
reverse_domain = reverse_domain(ip_address)
reverse_host = reverse_host(ip_address)
rdomain = Models::Dns::Domain.safe_find_or_create(name: reverse_domain, type: 'NATIVE')
Models::Dns::Record.find_or_create(
domain: rdomain,
name: ... | [
"def",
"update_ptr_record",
"(",
"record_name",
",",
"ip_address",
")",
"reverse_domain",
"=",
"reverse_domain",
"(",
"ip_address",
")",
"reverse_host",
"=",
"reverse_host",
"(",
"ip_address",
")",
"rdomain",
"=",
"Models",
"::",
"Dns",
"::",
"Domain",
".",
"saf... | create/update DNS PTR records (for reverse lookups) | [
"create",
"/",
"update",
"DNS",
"PTR",
"records",
"(",
"for",
"reverse",
"lookups",
")"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/dns/powerdns.rb#L77-L106 | train | Update a record in the ptr record table | [
30522,
13366,
10651,
1035,
13866,
2099,
1035,
2501,
1006,
2501,
1035,
2171,
1010,
12997,
1035,
4769,
1007,
7901,
1035,
5884,
1027,
7901,
1035,
5884,
1006,
12997,
1035,
4769,
1007,
7901,
1035,
3677,
1027,
7901,
1035,
3677,
1006,
12997,
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_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb | Azure::DataLakeStore::Mgmt::V2015_10_01_preview.Account.create_or_update_firewall_rule | def create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers:nil)
response = create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers:nil)
response = create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update_firewall_rule",
"(",
"resource_group_name",
",",
"account_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_firewall_rule_async",
"(",
"resource_group_name",
",",
"account_name",
",",... | Creates or updates the specified firewall rule.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Store account.
@param account_name [String] The name of the Data Lake Store account to which
to add the firewall rule.
@param name [String] The name of the firewall ... | [
"Creates",
"or",
"updates",
"the",
"specified",
"firewall",
"rule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb#L336-L339 | train | Creates or updates a firewall rule. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2543,
9628,
1035,
3627,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
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... |
appsignal/rdkafka-ruby | lib/rdkafka/config.rb | Rdkafka.Config.consumer | def consumer
opaque = Opaque.new
config = native_config(opaque)
if @consumer_rebalance_listener
opaque.consumer_rebalance_listener = @consumer_rebalance_listener
Rdkafka::Bindings.rd_kafka_conf_set_rebalance_cb(config, Rdkafka::Bindings::RebalanceCallback)
end
kafka = nat... | ruby | def consumer
opaque = Opaque.new
config = native_config(opaque)
if @consumer_rebalance_listener
opaque.consumer_rebalance_listener = @consumer_rebalance_listener
Rdkafka::Bindings.rd_kafka_conf_set_rebalance_cb(config, Rdkafka::Bindings::RebalanceCallback)
end
kafka = nat... | [
"def",
"consumer",
"opaque",
"=",
"Opaque",
".",
"new",
"config",
"=",
"native_config",
"(",
"opaque",
")",
"if",
"@consumer_rebalance_listener",
"opaque",
".",
"consumer_rebalance_listener",
"=",
"@consumer_rebalance_listener",
"Rdkafka",
"::",
"Bindings",
".",
"rd_k... | Create a consumer with this configuration.
@raise [ConfigError] When the configuration contains invalid options
@raise [ClientCreationError] When the native client cannot be created
@return [Consumer] The created consumer | [
"Create",
"a",
"consumer",
"with",
"this",
"configuration",
"."
] | 87b3e0ddae5ea576847cb67228fcea06ec2a24d6 | https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/config.rb#L110-L126 | train | Return the consumer
| [
30522,
13366,
7325,
28670,
1027,
28670,
1012,
2047,
9530,
8873,
2290,
1027,
3128,
1035,
9530,
8873,
2290,
1006,
28670,
1007,
2065,
1030,
7325,
1035,
2128,
26657,
1035,
19373,
28670,
1012,
7325,
1035,
2128,
26657,
1035,
19373,
1027,
1030,
73... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
googleapis/google-cloud-ruby | google-cloud-firestore/lib/google-cloud-firestore.rb | Google.Cloud.firestore | def firestore scope: nil, timeout: nil, client_config: nil
Google::Cloud.firestore @project, @keyfile,
scope: scope, timeout: (timeout || @timeout),
client_config: client_config
end | ruby | def firestore scope: nil, timeout: nil, client_config: nil
Google::Cloud.firestore @project, @keyfile,
scope: scope, timeout: (timeout || @timeout),
client_config: client_config
end | [
"def",
"firestore",
"scope",
":",
"nil",
",",
"timeout",
":",
"nil",
",",
"client_config",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"firestore",
"@project",
",",
"@keyfile",
",",
"scope",
":",
"scope",
",",
"timeout",
":",
"(",
"timeout",
"||",
"@timeou... | Creates a new object for connecting to the Firestore service.
Each call creates a new connection.
For more information on connecting to Google Cloud see the
{file:AUTHENTICATION.md Authentication Guide}.
@param [String, Array<String>] scope The OAuth 2.0 scopes controlling the
set of resources and operations t... | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"Firestore",
"service",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-firestore/lib/google-cloud-firestore.rb#L63-L67 | train | Create a new Firestore instance. | [
30522,
13366,
8769,
19277,
9531,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
9152,
2140,
1010,
7396,
1035,
9530,
8873,
2290,
1024,
9152,
2140,
8224,
1024,
1024,
6112,
1012,
8769,
19277,
1030,
2622,
1010,
1030,
3145,
8873,
2571,
1010,
9531,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.get_multi_yielder | def get_multi_yielder(keys)
perform do
return {} if keys.empty?
ring.lock do
begin
groups = groups_for_keys(keys)
if unfound_keys = groups.delete(nil)
Dalli.logger.debug { "unable to get keys for #{unfound_keys.length} keys because no matching server... | ruby | def get_multi_yielder(keys)
perform do
return {} if keys.empty?
ring.lock do
begin
groups = groups_for_keys(keys)
if unfound_keys = groups.delete(nil)
Dalli.logger.debug { "unable to get keys for #{unfound_keys.length} keys because no matching server... | [
"def",
"get_multi_yielder",
"(",
"keys",
")",
"perform",
"do",
"return",
"{",
"}",
"if",
"keys",
".",
"empty?",
"ring",
".",
"lock",
"do",
"begin",
"groups",
"=",
"groups_for_keys",
"(",
"keys",
")",
"if",
"unfound_keys",
"=",
"groups",
".",
"delete",
"(... | Yields, one at a time, keys and their values+attributes. | [
"Yields",
"one",
"at",
"a",
"time",
"keys",
"and",
"their",
"values",
"+",
"attributes",
"."
] | 5755dbfd06e333a8239f976d4b10492b4555b726 | https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/client.rb#L415-L473 | train | yields a block of keys from the multi_get_requests method | [
30522,
13366,
2131,
1035,
4800,
1035,
10750,
2121,
1006,
6309,
1007,
4685,
2079,
2709,
1063,
1065,
2065,
6309,
1012,
4064,
1029,
3614,
1012,
5843,
2079,
4088,
2967,
1027,
2967,
1035,
2005,
1035,
6309,
1006,
6309,
1007,
2065,
4895,
14876,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octokit/octokit.rb | lib/octokit/client.rb | Octokit.Client.inspect | def inspect
inspected = super
# mask password
inspected.gsub! @password, '*******' if @password
inspected.gsub! @management_console_password, '*******' if @management_console_password
inspected.gsub! @bearer_token, '********' if @bearer_token
# Only show last 4 of token, secret
... | ruby | def inspect
inspected = super
# mask password
inspected.gsub! @password, '*******' if @password
inspected.gsub! @management_console_password, '*******' if @management_console_password
inspected.gsub! @bearer_token, '********' if @bearer_token
# Only show last 4 of token, secret
... | [
"def",
"inspect",
"inspected",
"=",
"super",
"# mask password",
"inspected",
".",
"gsub!",
"@password",
",",
"'*******'",
"if",
"@password",
"inspected",
".",
"gsub!",
"@management_console_password",
",",
"'*******'",
"if",
"@management_console_password",
"inspected",
"... | Text representation of the client, masking tokens and passwords
@return [String] | [
"Text",
"representation",
"of",
"the",
"client",
"masking",
"tokens",
"and",
"passwords"
] | ddf750601529a6a7da5fe5293d10031709b8605d | https://github.com/octokit/octokit.rb/blob/ddf750601529a6a7da5fe5293d10031709b8605d/lib/octokit/client.rb#L134-L146 | train | Returns the string representation of the object in the correct order. | [
30522,
13366,
22459,
20456,
1027,
3565,
1001,
7308,
20786,
20456,
1012,
28177,
12083,
999,
1030,
20786,
1010,
1005,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1005,
2065,
1030,
20786,
20456,
1012,
28177,
12083,
999,
1030,
2968,
1035,
10122,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb | Azure::Dns::Mgmt::V2017_09_01.RecordSets.list_by_dns_zone_with_http_info | def list_by_dns_zone_with_http_info(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil)
list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value!
end | ruby | def list_by_dns_zone_with_http_info(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil)
list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value!
end | [
"def",
"list_by_dns_zone_with_http_info",
"(",
"resource_group_name",
",",
"zone_name",
",",
"top",
":",
"nil",
",",
"recordsetnamesuffix",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by_dns_zone_async",
"(",
"resource_group_name",
",",
"zone_name",
",",... | Lists all record sets in a DNS zone.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param zone_name [String] The name of the DNS zone (without a terminating
dot).
@param top [Integer] The maximum number of record sets to return. If not
specified, returns up to ... | [
"Lists",
"all",
"record",
"sets",
"in",
"a",
"DNS",
"zone",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb#L750-L752 | train | Gets the list of records in a DNS zone. | [
30522,
13366,
2862,
1035,
2011,
1035,
1040,
3619,
1035,
4224,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4224,
1035,
2171,
1010,
2327,
1024,
9152,
2140,
1010,
2636,
3388,
18442,
6342,
26989,
2595,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_operations.rb | Azure::Batch::Mgmt::V2015_12_01.ApplicationOperations.update_with_http_info | def update_with_http_info(resource_group_name, account_name, application_id, parameters, custom_headers:nil)
update_async(resource_group_name, account_name, application_id, parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, account_name, application_id, parameters, custom_headers:nil)
update_async(resource_group_name, account_name, application_id, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"application_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"application_id",
",",
"parameters",
... | Updates settings for the specified application.
@param resource_group_name [String] The name of the resource group that
contains the Batch account.
@param account_name [String] The name of the Batch account.
@param application_id [String] The ID of the application.
@param parameters [UpdateApplicationParameters] ... | [
"Updates",
"settings",
"for",
"the",
"specified",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_operations.rb#L364-L366 | train | Updates an existing App Service Environment. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_node_info_list_with_http_info | def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_node_info_list_with_http_info",
"(",
"continuation_token",
":",
"nil",
",",
"node_status_filter",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_node_info_list_async",
"(",
"continuation_token",
":continuation_token",
","... | Gets the list of nodes in the Service Fabric cluster.
Gets the list of nodes in the Service Fabric cluster. The response includes
the name, status, id, health, uptime, and other details about the node.
@param continuation_token [String] The continuation token parameter is used
to obtain next set of results. A con... | [
"Gets",
"the",
"list",
"of",
"nodes",
"in",
"the",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L3263-L3265 | train | Gets the node info list. | [
30522,
13366,
2131,
1035,
13045,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
13045,
1035,
3570,
1035,
11307,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGatewayConnections.set_shared_key | def set_shared_key(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
response = set_shared_key_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def set_shared_key(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
response = set_shared_key_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"set_shared_key",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"set_shared_key_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
... | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual
network gateway connection shared key for passed virtual network gateway
connection in the specified resource group through Network resource provider.
@param resource_group_name [String] The name of the resource group.
@param virtual_netwo... | [
"The",
"Put",
"VirtualNetworkGatewayConnectionSharedKey",
"operation",
"sets",
"the",
"virtual",
"network",
"gateway",
"connection",
"shared",
"key",
"for",
"passed",
"virtual",
"network",
"gateway",
"connection",
"in",
"the",
"specified",
"resource",
"group",
"through"... | 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_gateway_connections.rb#L272-L275 | train | Sets the virtual network gateway connection shared key. | [
30522,
13366,
2275,
1035,
4207,
1035,
3145,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
4434,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2275,
1035,
4207,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_helpers/dc_definition_from_template_or_type_extract.rb | HQMF2.DataCriteriaTypeAndDefinitionExtraction.handle_specific_variable_ref | def handle_specific_variable_ref(reference_criteria)
# if there are no referenced children, then it's a variable representing
# a single data criteria, so just reference it
if reference_criteria.children_criteria.empty?
@children_criteria = [reference_criteria.id]
# otherwise pull all th... | ruby | def handle_specific_variable_ref(reference_criteria)
# if there are no referenced children, then it's a variable representing
# a single data criteria, so just reference it
if reference_criteria.children_criteria.empty?
@children_criteria = [reference_criteria.id]
# otherwise pull all th... | [
"def",
"handle_specific_variable_ref",
"(",
"reference_criteria",
")",
"# if there are no referenced children, then it's a variable representing",
"# a single data criteria, so just reference it",
"if",
"reference_criteria",
".",
"children_criteria",
".",
"empty?",
"@children_criteria",
... | Apply additional information to a specific occurrence's elements from the criteria it references. | [
"Apply",
"additional",
"information",
"to",
"a",
"specific",
"occurrence",
"s",
"elements",
"from",
"the",
"criteria",
"it",
"references",
"."
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb#L90-L106 | train | handle a specific variable reference | [
30522,
13366,
5047,
1035,
3563,
1035,
8023,
1035,
25416,
1006,
4431,
1035,
9181,
1007,
1001,
2065,
2045,
2024,
2053,
14964,
2336,
1010,
2059,
2009,
1005,
1055,
1037,
8023,
5052,
30524,
5300,
1027,
4431,
1035,
9181,
1012,
2492,
1035,
5300,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gjtorikian/html-proofer | lib/html-proofer/runner.rb | HTMLProofer.Runner.check_files | def check_files
@external_urls = {}
process_files.each do |item|
@external_urls.merge!(item[:external_urls])
@failures.concat(item[:failures])
end
# TODO: lazy. if we're checking only external links,
# we'll just trash all the failed tests. really, we should
# just ... | ruby | def check_files
@external_urls = {}
process_files.each do |item|
@external_urls.merge!(item[:external_urls])
@failures.concat(item[:failures])
end
# TODO: lazy. if we're checking only external links,
# we'll just trash all the failed tests. really, we should
# just ... | [
"def",
"check_files",
"@external_urls",
"=",
"{",
"}",
"process_files",
".",
"each",
"do",
"|",
"item",
"|",
"@external_urls",
".",
"merge!",
"(",
"item",
"[",
":external_urls",
"]",
")",
"@failures",
".",
"concat",
"(",
"item",
"[",
":failures",
"]",
")",... | Collects any external URLs found in a directory of files. Also collectes
every failed test from process_files.
Sends the external URLs to Typhoeus for batch processing. | [
"Collects",
"any",
"external",
"URLs",
"found",
"in",
"a",
"directory",
"of",
"files",
".",
"Also",
"collectes",
"every",
"failed",
"test",
"from",
"process_files",
".",
"Sends",
"the",
"external",
"URLs",
"to",
"Typhoeus",
"for",
"batch",
"processing",
"."
] | d00955d3b125b9a1649d056bb347ec30e935d847 | https://github.com/gjtorikian/html-proofer/blob/d00955d3b125b9a1649d056bb347ec30e935d847/lib/html-proofer/runner.rb#L65-L82 | train | Check the files in the archive. | [
30522,
13366,
4638,
1035,
6764,
1030,
6327,
1035,
24471,
4877,
1027,
1063,
1065,
2832,
1035,
6764,
1012,
2169,
2079,
1064,
8875,
1064,
1030,
6327,
1035,
24471,
4877,
1012,
13590,
999,
1006,
8875,
1031,
1024,
6327,
1035,
24471,
4877,
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... |
mojombo/chronic | lib/chronic/handlers.rb | Chronic.Handlers.handle_rqn_sy | def handle_rqn_sy(tokens, options)
year = tokens[1].get_tag(ScalarYear).type
quarter_tag = tokens[0].get_tag(RepeaterQuarterName)
quarter_tag.start = Chronic.construct(year)
quarter_tag.this(:none)
end | ruby | def handle_rqn_sy(tokens, options)
year = tokens[1].get_tag(ScalarYear).type
quarter_tag = tokens[0].get_tag(RepeaterQuarterName)
quarter_tag.start = Chronic.construct(year)
quarter_tag.this(:none)
end | [
"def",
"handle_rqn_sy",
"(",
"tokens",
",",
"options",
")",
"year",
"=",
"tokens",
"[",
"1",
"]",
".",
"get_tag",
"(",
"ScalarYear",
")",
".",
"type",
"quarter_tag",
"=",
"tokens",
"[",
"0",
"]",
".",
"get_tag",
"(",
"RepeaterQuarterName",
")",
"quarter_... | Handle repeater-quarter-name/scalar-year | [
"Handle",
"repeater",
"-",
"quarter",
"-",
"name",
"/",
"scalar",
"-",
"year"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L119-L124 | train | Handle the RQN sy token | [
30522,
13366,
5047,
1035,
28134,
2078,
1035,
25353,
1006,
19204,
2015,
1010,
7047,
1007,
2095,
1027,
19204,
2015,
1031,
1015,
1033,
1012,
2131,
1035,
6415,
1006,
26743,
2854,
14644,
1007,
1012,
2828,
4284,
1035,
6415,
1027,
19204,
2015,
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... |
hexorx/countries | lib/countries/country.rb | ISO3166.Country.local_names | def local_names
ISO3166.configuration.locales = (ISO3166.configuration.locales + languages.map(&:to_sym)).uniq
reload
@local_names ||= languages.map { |language| translations[language] }
end | ruby | def local_names
ISO3166.configuration.locales = (ISO3166.configuration.locales + languages.map(&:to_sym)).uniq
reload
@local_names ||= languages.map { |language| translations[language] }
end | [
"def",
"local_names",
"ISO3166",
".",
"configuration",
".",
"locales",
"=",
"(",
"ISO3166",
".",
"configuration",
".",
"locales",
"+",
"languages",
".",
"map",
"(",
":to_sym",
")",
")",
".",
"uniq",
"reload",
"@local_names",
"||=",
"languages",
".",
"map",
... | TODO: Looping through locale langs could be be very slow across multiple countries | [
"TODO",
":",
"Looping",
"through",
"locale",
"langs",
"could",
"be",
"be",
"very",
"slow",
"across",
"multiple",
"countries"
] | 105973bd905133130bde4d95406c6e710cae3d69 | https://github.com/hexorx/countries/blob/105973bd905133130bde4d95406c6e710cae3d69/lib/countries/country.rb#L93-L98 | train | Returns the local names of the language. | [
30522,
13366,
2334,
1035,
3415,
11163,
21486,
28756,
1012,
9563,
1012,
2334,
2229,
1027,
1006,
11163,
21486,
28756,
1012,
9563,
1012,
2334,
2229,
1009,
4155,
1012,
4949,
1006,
1004,
1024,
2000,
1035,
25353,
2213,
1007,
1007,
1012,
4895,
185... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.