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_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_images.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineImages.get | def get(location, publisher_name, offer, skus, version, custom_headers:nil)
response = get_async(location, publisher_name, offer, skus, version, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get(location, publisher_name, offer, skus, version, custom_headers:nil)
response = get_async(location, publisher_name, offer, skus, version, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get",
"(",
"location",
",",
"publisher_name",
",",
"offer",
",",
"skus",
",",
"version",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_async",
"(",
"location",
",",
"publisher_name",
",",
"offer",
",",
"skus",
",",
"version",
",",
... | Gets a virtual machine image.
@param location [String] The name of a supported Azure region.
@param publisher_name [String] A valid image publisher.
@param offer [String] A valid image publisher offer.
@param skus [String] A valid image SKU.
@param version [String] A valid image SKU version.
@param custom_header... | [
"Gets",
"a",
"virtual",
"machine",
"image",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_images.rb#L37-L40 | train | Gets the specified product s terms. | [
30522,
13366,
2131,
1006,
3295,
1010,
6674,
1035,
2171,
1010,
3749,
1010,
15315,
2271,
1010,
2544,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
6674,
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_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_composite_entity | def update_composite_entity(app_id, version_id, c_entity_id, composite_model_update_object, custom_headers:nil)
response = update_composite_entity_async(app_id, version_id, c_entity_id, composite_model_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_composite_entity(app_id, version_id, c_entity_id, composite_model_update_object, custom_headers:nil)
response = update_composite_entity_async(app_id, version_id, c_entity_id, composite_model_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_composite_entity",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"composite_model_update_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_composite_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
... | Updates a composite entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param c_entity_id The composite entity extractor ID.
@param composite_model_update_object [CompositeEntityModel] A model object
containing the new entity extractor name and chi... | [
"Updates",
"a",
"composite",
"entity",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L2830-L2833 | train | Updates a composite entity. | [
30522,
13366,
10651,
1035,
12490,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1039,
1035,
9178,
1035,
8909,
1010,
12490,
1035,
2944,
1035,
10651,
1035,
4874,
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-iam/lib/aws-sdk-iam/group.rb | Aws::IAM.Group.update | def update(options = {})
options = options.merge(group_name: @name)
resp = @client.update_group(options)
Group.new(
name: options[:new_group_name],
client: @client
)
end | ruby | def update(options = {})
options = options.merge(group_name: @name)
resp = @client.update_group(options)
Group.new(
name: options[:new_group_name],
client: @client
)
end | [
"def",
"update",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"update_group",
"(",
"options",
")",
"Group",
".",
"new",
"(",
"name",
":",
"options",
"[... | @example Request syntax with placeholder values
group = group.update({
new_path: "pathType",
new_group_name: "groupNameType",
})
@param [Hash] options ({})
@option options [String] :new_path
New path for the IAM group. Only include this if changing the group's
path.
This parameter allows (t... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/group.rb#L431-L438 | train | Update the group | [
30522,
13366,
10651,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
10651,
1035,
2177,
1006,
7047,
1007,
2177,
1012,
2047,
1006,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/meta_tags_collection.rb | MetaTags.MetaTagsCollection.extract_separator | def extract_separator
if meta_tags[:separator] == false
# Special case: if separator is hidden, do not display suffix/prefix
prefix = separator = suffix = ''
else
prefix = extract_separator_section(:prefix, ' ')
separator = extract_separator_section(:separator, '|')
... | ruby | def extract_separator
if meta_tags[:separator] == false
# Special case: if separator is hidden, do not display suffix/prefix
prefix = separator = suffix = ''
else
prefix = extract_separator_section(:prefix, ' ')
separator = extract_separator_section(:separator, '|')
... | [
"def",
"extract_separator",
"if",
"meta_tags",
"[",
":separator",
"]",
"==",
"false",
"# Special case: if separator is hidden, do not display suffix/prefix",
"prefix",
"=",
"separator",
"=",
"suffix",
"=",
"''",
"else",
"prefix",
"=",
"extract_separator_section",
"(",
":p... | Extracts title separator as a string.
@return [String] page title separator. | [
"Extracts",
"title",
"separator",
"as",
"a",
"string",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/meta_tags_collection.rb#L127-L139 | train | Extract the separator from the current page. | [
30522,
13366,
14817,
1035,
19802,
25879,
2953,
2065,
18804,
1035,
22073,
1031,
1024,
19802,
25879,
2953,
1033,
1027,
1027,
6270,
1001,
2569,
2553,
1024,
2065,
19802,
25879,
2953,
2003,
5023,
1010,
2079,
2025,
4653,
16809,
1013,
17576,
17576,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_operations | def list_operations(resource_group_name, name, custom_headers:nil)
response = list_operations_async(resource_group_name, name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_operations(resource_group_name, name, custom_headers:nil)
response = list_operations_async(resource_group_name, name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_operations",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_operations_async",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".... | List all currently running operations on the App Service Environment.
List all currently running operations on the App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param custom_headers... | [
"List",
"all",
"currently",
"running",
"operations",
"on",
"the",
"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#L2362-L2365 | train | Gets the list of operations for a resource group. | [
30522,
13366,
2862,
1035,
3136,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
3136,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
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... |
sds/haml-lint | lib/haml_lint/utils.rb | HamlLint.Utils.with_environment | def with_environment(env)
old_env = {}
env.each do |var, value|
old_env[var] = ENV[var.to_s]
ENV[var.to_s] = value
end
yield
ensure
old_env.each { |var, value| ENV[var.to_s] = value }
end | ruby | def with_environment(env)
old_env = {}
env.each do |var, value|
old_env[var] = ENV[var.to_s]
ENV[var.to_s] = value
end
yield
ensure
old_env.each { |var, value| ENV[var.to_s] = value }
end | [
"def",
"with_environment",
"(",
"env",
")",
"old_env",
"=",
"{",
"}",
"env",
".",
"each",
"do",
"|",
"var",
",",
"value",
"|",
"old_env",
"[",
"var",
"]",
"=",
"ENV",
"[",
"var",
".",
"to_s",
"]",
"ENV",
"[",
"var",
".",
"to_s",
"]",
"=",
"valu... | Calls a block of code with a modified set of environment variables,
restoring them once the code has executed.
@param env [Hash] environment variables to set | [
"Calls",
"a",
"block",
"of",
"code",
"with",
"a",
"modified",
"set",
"of",
"environment",
"variables",
"restoring",
"them",
"once",
"the",
"code",
"has",
"executed",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/utils.rb#L143-L153 | train | Yields the given block with the given environment. | [
30522,
13366,
2007,
1035,
4044,
1006,
4372,
2615,
1007,
2214,
1035,
4372,
2615,
1027,
1063,
1065,
4372,
2615,
1012,
2169,
2079,
1064,
13075,
1010,
3643,
1064,
2214,
1035,
4372,
2615,
1031,
13075,
1033,
1027,
4372,
2615,
1031,
13075,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisruntime/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb | Azure::CognitiveServices::LuisRuntime::V3_0_preview.PredictionOperations.get_slot_prediction | def get_slot_prediction(app_id, slot_name, prediction_request, verbose:nil, show_all_intents:nil, log:nil, custom_headers:nil)
response = get_slot_prediction_async(app_id, slot_name, prediction_request, verbose:verbose, show_all_intents:show_all_intents, log:log, custom_headers:custom_headers).value!
respon... | ruby | def get_slot_prediction(app_id, slot_name, prediction_request, verbose:nil, show_all_intents:nil, log:nil, custom_headers:nil)
response = get_slot_prediction_async(app_id, slot_name, prediction_request, verbose:verbose, show_all_intents:show_all_intents, log:log, custom_headers:custom_headers).value!
respon... | [
"def",
"get_slot_prediction",
"(",
"app_id",
",",
"slot_name",
",",
"prediction_request",
",",
"verbose",
":",
"nil",
",",
"show_all_intents",
":",
"nil",
",",
"log",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_slot_prediction_async... | Gets the predictions for an application slot.
@param app_id The application ID.
@param slot_name [String] The application slot name.
@param prediction_request [PredictionRequest] The prediction request
parameters.
@param verbose [Boolean] Indicates whether to get extra metadata for the
entities predictions or no... | [
"Gets",
"the",
"predictions",
"for",
"an",
"application",
"slot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisruntime/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb#L162-L165 | train | Get the prediction for a given slot. | [
30522,
13366,
2131,
1035,
10453,
1035,
17547,
1006,
10439,
1035,
8909,
1010,
10453,
1035,
2171,
1010,
17547,
1035,
5227,
1010,
12034,
9232,
1024,
9152,
2140,
1010,
2265,
1035,
2035,
1035,
7848,
2015,
1024,
9152,
2140,
1010,
8833,
1024,
9152... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/linguist | lib/linguist/blob_helper.rb | Linguist.BlobHelper.include_in_language_stats? | def include_in_language_stats?
!vendored? &&
!documentation? &&
!generated? &&
language && ( defined?(detectable?) && !detectable?.nil? ?
detectable? :
DETECTABLE_TYPES.include?(language.type)
)
end | ruby | def include_in_language_stats?
!vendored? &&
!documentation? &&
!generated? &&
language && ( defined?(detectable?) && !detectable?.nil? ?
detectable? :
DETECTABLE_TYPES.include?(language.type)
)
end | [
"def",
"include_in_language_stats?",
"!",
"vendored?",
"&&",
"!",
"documentation?",
"&&",
"!",
"generated?",
"&&",
"language",
"&&",
"(",
"defined?",
"(",
"detectable?",
")",
"&&",
"!",
"detectable?",
".",
"nil?",
"?",
"detectable?",
":",
"DETECTABLE_TYPES",
"."... | Internal: Should this blob be included in repository language statistics? | [
"Internal",
":",
"Should",
"this",
"blob",
"be",
"included",
"in",
"repository",
"language",
"statistics?"
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/blob_helper.rb#L382-L390 | train | Returns true if the language stats are in the language stats. | [
30522,
13366,
2421,
1035,
1999,
1035,
2653,
1035,
26319,
1029,
999,
21431,
2098,
1029,
1004,
1004,
999,
12653,
1029,
1004,
1004,
999,
7013,
1029,
1004,
1004,
2653,
1004,
1004,
1006,
4225,
1029,
1006,
11487,
3085,
1029,
1007,
1004,
1004,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_dispatch/http/request.rb | ActionDispatch.Request.body | def body
if raw_post = get_header("RAW_POST_DATA")
raw_post = raw_post.dup.force_encoding(Encoding::BINARY)
StringIO.new(raw_post)
else
body_stream
end
end | ruby | def body
if raw_post = get_header("RAW_POST_DATA")
raw_post = raw_post.dup.force_encoding(Encoding::BINARY)
StringIO.new(raw_post)
else
body_stream
end
end | [
"def",
"body",
"if",
"raw_post",
"=",
"get_header",
"(",
"\"RAW_POST_DATA\"",
")",
"raw_post",
"=",
"raw_post",
".",
"dup",
".",
"force_encoding",
"(",
"Encoding",
"::",
"BINARY",
")",
"StringIO",
".",
"new",
"(",
"raw_post",
")",
"else",
"body_stream",
"end... | The request body is an IO input stream. If the RAW_POST_DATA environment
variable is already set, wrap it in a StringIO. | [
"The",
"request",
"body",
"is",
"an",
"IO",
"input",
"stream",
".",
"If",
"the",
"RAW_POST_DATA",
"environment",
"variable",
"is",
"already",
"set",
"wrap",
"it",
"in",
"a",
"StringIO",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_dispatch/http/request.rb#L322-L329 | train | Get the body of the request. | [
30522,
13366,
2303,
2065,
6315,
1035,
2695,
1027,
2131,
1035,
20346,
1006,
1000,
6315,
1035,
2695,
1035,
2951,
1000,
1007,
6315,
1035,
2695,
1027,
6315,
1035,
2695,
1012,
4241,
2361,
1012,
2486,
1035,
17181,
1006,
17181,
1024,
1024,
12441,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_4_0_36.ServiceFabricClientAPIs.start_rollback_compose_deployment_upgrade | def start_rollback_compose_deployment_upgrade(deployment_name, timeout:60, custom_headers:nil)
response = start_rollback_compose_deployment_upgrade_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def start_rollback_compose_deployment_upgrade(deployment_name, timeout:60, custom_headers:nil)
response = start_rollback_compose_deployment_upgrade_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"start_rollback_compose_deployment_upgrade",
"(",
"deployment_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"start_rollback_compose_deployment_upgrade_async",
"(",
"deployment_name",
",",
"timeout",
":",
"timeout",
",",
... | Starts rolling back a compose deployment upgrade in the Service Fabric
cluster.
Rollback a service fabric compose deployment upgrade.
@param deployment_name [String] The identity of the deployment.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the tim... | [
"Starts",
"rolling",
"back",
"a",
"compose",
"deployment",
"upgrade",
"in",
"the",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb#L18607-L18610 | train | Start a rollback compose deployment upgrade. | [
30522,
13366,
2707,
1035,
4897,
5963,
1035,
17202,
1035,
10813,
1035,
12200,
1006,
10813,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2707,
1035,
4897,
5963,
1035,
17202,
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... |
watir/watir | lib/watir/element_collection.rb | Watir.ElementCollection.to_a | def to_a
hash = {}
@to_a ||=
elements_with_tags.map.with_index do |(el, tag_name), idx|
selector = @selector.dup
selector[:index] = idx unless idx.zero?
element = element_class.new(@query_scope, selector)
if [HTMLElement, Input].include? element.class
... | ruby | def to_a
hash = {}
@to_a ||=
elements_with_tags.map.with_index do |(el, tag_name), idx|
selector = @selector.dup
selector[:index] = idx unless idx.zero?
element = element_class.new(@query_scope, selector)
if [HTMLElement, Input].include? element.class
... | [
"def",
"to_a",
"hash",
"=",
"{",
"}",
"@to_a",
"||=",
"elements_with_tags",
".",
"map",
".",
"with_index",
"do",
"|",
"(",
"el",
",",
"tag_name",
")",
",",
"idx",
"|",
"selector",
"=",
"@selector",
".",
"dup",
"selector",
"[",
":index",
"]",
"=",
"id... | This collection as an Array.
@return [Array<Watir::Element>] | [
"This",
"collection",
"as",
"an",
"Array",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/element_collection.rb#L94-L107 | train | Returns a new object with the elements that are tagged with this element. | [
30522,
13366,
2000,
1035,
1037,
23325,
1027,
1063,
1065,
1030,
2000,
1035,
1037,
1064,
1064,
1027,
3787,
1035,
2007,
1035,
22073,
1012,
4949,
1012,
2007,
1035,
5950,
2079,
1064,
1006,
3449,
1010,
6415,
1035,
2171,
1007,
1010,
8909,
2595,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachines.perform_maintenance | def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"perform_maintenance",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"perform_maintenance_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"r... | The operation to perform maintenance on a 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_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Operatio... | [
"The",
"operation",
"to",
"perform",
"maintenance",
"on",
"a",
"virtual",
"machine",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb#L1222-L1225 | train | Perform maintenance of a virtual machine. | [
30522,
13366,
4685,
1035,
6032,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4685,
1035,
6032,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.decrypt_with_http_info | def decrypt_with_http_info(vault_base_url, key_name, key_version, algorithm, value, custom_headers:nil)
decrypt_async(vault_base_url, key_name, key_version, algorithm, value, custom_headers:custom_headers).value!
end | ruby | def decrypt_with_http_info(vault_base_url, key_name, key_version, algorithm, value, custom_headers:nil)
decrypt_async(vault_base_url, key_name, key_version, algorithm, value, custom_headers:custom_headers).value!
end | [
"def",
"decrypt_with_http_info",
"(",
"vault_base_url",
",",
"key_name",
",",
"key_version",
",",
"algorithm",
",",
"value",
",",
"custom_headers",
":",
"nil",
")",
"decrypt_async",
"(",
"vault_base_url",
",",
"key_name",
",",
"key_version",
",",
"algorithm",
",",... | Decrypts a single block of encrypted data.
The DECRYPT operation decrypts a well-formed block of ciphertext using the
target encryption key and specified algorithm. This operation is the reverse
of the ENCRYPT operation; only a single block of data may be decrypted, the
size of this block is dependent on the targe... | [
"Decrypts",
"a",
"single",
"block",
"of",
"encrypted",
"data",
"."
] | 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#L1515-L1517 | train | Decrypts the specified key. | [
30522,
13366,
11703,
2854,
13876,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
3145,
1035,
2544,
1010,
9896,
1010,
3643,
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... |
sensu/sensu | lib/sensu/daemon.rb | Sensu.Daemon.write_pid | def write_pid(file)
begin
File.open(file, "w") do |pid_file|
pid_file.puts(Process.pid)
end
rescue
@logger.fatal("could not write to pid file", :pid_file => file)
@logger.fatal("SENSU NOT RUNNING!")
exit 2
end
end | ruby | def write_pid(file)
begin
File.open(file, "w") do |pid_file|
pid_file.puts(Process.pid)
end
rescue
@logger.fatal("could not write to pid file", :pid_file => file)
@logger.fatal("SENSU NOT RUNNING!")
exit 2
end
end | [
"def",
"write_pid",
"(",
"file",
")",
"begin",
"File",
".",
"open",
"(",
"file",
",",
"\"w\"",
")",
"do",
"|",
"pid_file",
"|",
"pid_file",
".",
"puts",
"(",
"Process",
".",
"pid",
")",
"end",
"rescue",
"@logger",
".",
"fatal",
"(",
"\"could not write ... | Write the current process ID (PID) to a file (PID file). This
method will cause the Sensu service to exit (2) if the PID file
cannot be written to.
@param file [String] to write the current PID to. | [
"Write",
"the",
"current",
"process",
"ID",
"(",
"PID",
")",
"to",
"a",
"file",
"(",
"PID",
"file",
")",
".",
"This",
"method",
"will",
"cause",
"the",
"Sensu",
"service",
"to",
"exit",
"(",
"2",
")",
"if",
"the",
"PID",
"file",
"cannot",
"be",
"wr... | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/daemon.rb#L359-L369 | train | Write the PID file to a file | [
30522,
13366,
4339,
1035,
14255,
2094,
1006,
5371,
1007,
4088,
5371,
1012,
2330,
1006,
5371,
1010,
1000,
1059,
1000,
1007,
2079,
1064,
14255,
2094,
1035,
5371,
1064,
14255,
2094,
1035,
5371,
1012,
8509,
1006,
2832,
1012,
14255,
2094,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_compose_deployment_status | def get_compose_deployment_status(deployment_name, timeout:60, custom_headers:nil)
response = get_compose_deployment_status_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_compose_deployment_status(deployment_name, timeout:60, custom_headers:nil)
response = get_compose_deployment_status_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_compose_deployment_status",
"(",
"deployment_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_compose_deployment_status_async",
"(",
"deployment_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":... | Gets information about a Service Fabric compose deployment.
Returns the status of the compose deployment that was created or in the
process of being created in the Service Fabric cluster and whose name matches
the one specified as the parameter. The response includes the name, status
and other details about the de... | [
"Gets",
"information",
"about",
"a",
"Service",
"Fabric",
"compose",
"deployment",
"."
] | 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#L17827-L17830 | train | Gets the status of a Compose Deployment. | [
30522,
13366,
2131,
1035,
17202,
1035,
30524,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
1012,
2303,
4983,
3433,
1012,
9152,
2140,
1029,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2016_06_27_preview.Registries.check_name_availability | def check_name_availability(registry_name_check_request, custom_headers:nil)
response = check_name_availability_async(registry_name_check_request, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def check_name_availability(registry_name_check_request, custom_headers:nil)
response = check_name_availability_async(registry_name_check_request, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"check_name_availability",
"(",
"registry_name_check_request",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"check_name_availability_async",
"(",
"registry_name_check_request",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",... | Checks whether the container registry name is available for use. The name
must contain only alphanumeric characters, be globally unique, and between 5
and 60 characters in length.
@param registry_name_check_request [RegistryNameCheckRequest] The object
containing information for the availability request.
@param c... | [
"Checks",
"whether",
"the",
"container",
"registry",
"name",
"is",
"available",
"for",
"use",
".",
"The",
"name",
"must",
"contain",
"only",
"alphanumeric",
"characters",
"be",
"globally",
"unique",
"and",
"between",
"5",
"and",
"60",
"characters",
"in",
"leng... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb#L36-L39 | train | Check the name availability of the specified container registry. | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1006,
15584,
1035,
2171,
1035,
4638,
1035,
5227,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4638,
1035,
2171,
1035,
11343,
1035,
2004,
6038,
2278,
1006,
15584,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/worksheet.rb | Axlsx.Worksheet.row_style | def row_style(index, style, options={})
offset = options.delete(:col_offset) || 0
cells = cols[(offset..-1)].map { |column| column[index] }.flatten.compact
cells.each { |cell| cell.style = style }
end | ruby | def row_style(index, style, options={})
offset = options.delete(:col_offset) || 0
cells = cols[(offset..-1)].map { |column| column[index] }.flatten.compact
cells.each { |cell| cell.style = style }
end | [
"def",
"row_style",
"(",
"index",
",",
"style",
",",
"options",
"=",
"{",
"}",
")",
"offset",
"=",
"options",
".",
"delete",
"(",
":col_offset",
")",
"||",
"0",
"cells",
"=",
"cols",
"[",
"(",
"offset",
"..",
"-",
"1",
")",
"]",
".",
"map",
"{",
... | Set the style for cells in a specific row
@param [Integer] index or range of indexes in the table
@param [Integer] style the cellXfs index
@param [Hash] options the options used when applying the style
@option [Integer] :col_offset only cells after this column will be updated.
@note You can also specify the style ... | [
"Set",
"the",
"style",
"for",
"cells",
"in",
"a",
"specific",
"row"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet.rb#L545-L549 | train | Set the style of a row | [
30522,
13366,
5216,
1035,
2806,
1006,
5950,
1010,
2806,
1010,
7047,
1027,
1063,
1065,
1007,
16396,
1027,
7047,
1012,
3972,
12870,
1006,
1024,
8902,
1035,
16396,
1007,
1064,
1064,
1014,
4442,
1027,
8902,
2015,
1031,
1006,
16396,
1012,
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... |
square/connect-ruby-sdk | lib/square_connect/api/labor_api.rb | SquareConnect.LaborApi.update_workweek_config | def update_workweek_config(id, body, opts = {})
data, _status_code, _headers = update_workweek_config_with_http_info(id, body, opts)
return data
end | ruby | def update_workweek_config(id, body, opts = {})
data, _status_code, _headers = update_workweek_config_with_http_info(id, body, opts)
return data
end | [
"def",
"update_workweek_config",
"(",
"id",
",",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"update_workweek_config_with_http_info",
"(",
"id",
",",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | UpdateWorkweekConfig
Updates a `WorkweekConfig`.
@param id UUID for the `WorkweekConfig` object being updated.
@param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
@param [Hash] opts the optional parameters
@return [UpdateWorkwee... | [
"UpdateWorkweekConfig",
"Updates",
"a",
"WorkweekConfig",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L761-L764 | train | Updates a Workweek Config | [
30522,
13366,
10651,
1035,
2147,
28075,
1035,
9530,
8873,
2290,
1006,
8909,
1010,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
10651,
1035,
2147,
28075,
1035,
9530,
8873... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/task.rb | Rake.Task.transform_comments | def transform_comments(separator, &block)
if @comments.empty?
nil
else
block ||= lambda { |c| c }
@comments.map(&block).join(separator)
end
end | ruby | def transform_comments(separator, &block)
if @comments.empty?
nil
else
block ||= lambda { |c| c }
@comments.map(&block).join(separator)
end
end | [
"def",
"transform_comments",
"(",
"separator",
",",
"&",
"block",
")",
"if",
"@comments",
".",
"empty?",
"nil",
"else",
"block",
"||=",
"lambda",
"{",
"|",
"c",
"|",
"c",
"}",
"@comments",
".",
"map",
"(",
"block",
")",
".",
"join",
"(",
"separator",
... | Transform the list of comments as specified by the block and
join with the separator. | [
"Transform",
"the",
"list",
"of",
"comments",
"as",
"specified",
"by",
"the",
"block",
"and",
"join",
"with",
"the",
"separator",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/task.rb#L319-L326 | train | Transform the comments to a string. | [
30522,
13366,
10938,
1035,
7928,
1006,
19802,
25879,
2953,
1010,
1004,
3796,
1007,
2065,
1030,
7928,
1012,
4064,
1029,
9152,
2140,
2842,
3796,
1064,
1064,
1027,
23375,
1063,
1064,
1039,
1064,
1039,
1065,
1030,
7928,
1012,
4949,
1006,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.create_or_update_async | def create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:custom_headers)
promise = promise.then do |re... | ruby | def create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:custom_headers)
promise = promise.then do |re... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"gallery_image_name",
",",
"gallery_image",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"g... | @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 created or updated. The allowed characters are alpha... | [
"@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",
"i... | 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#L62-L78 | train | Creates or updates a gallery image. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
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,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb | Azure::ResourcesManagement::Mgmt::V2018_03_01_preview.ManagementGroups.begin_delete | def begin_delete(group_id, cache_control:'no-cache', custom_headers:nil)
response = begin_delete_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_delete(group_id, cache_control:'no-cache', custom_headers:nil)
response = begin_delete_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_delete",
"(",
"group_id",
",",
"cache_control",
":",
"'no-cache'",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"group_id",
",",
"cache_control",
":cache_control",
",",
"custom_headers",
":custom_headers",
")",
".... | Delete management group. If a management group contains child resources, the
request will fail.
@param group_id [String] Management Group ID.
@param cache_control [String] Indicates that the request shouldn't utilize
any caches.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be... | [
"Delete",
"management",
"group",
".",
"If",
"a",
"management",
"group",
"contains",
"child",
"resources",
"the",
"request",
"will",
"fail",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L592-L595 | train | Deletes the group. | [
30522,
13366,
4088,
1035,
3972,
12870,
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,
3972,
12870,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_upgrade_orchestration_service_state | def get_upgrade_orchestration_service_state(timeout:60, custom_headers:nil)
response = get_upgrade_orchestration_service_state_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_upgrade_orchestration_service_state(timeout:60, custom_headers:nil)
response = get_upgrade_orchestration_service_state_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_upgrade_orchestration_service_state",
"(",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_upgrade_orchestration_service_state_async",
"(",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"va... | Get the service state of Service Fabric Upgrade Orchestration Service.
Get the service state of Service Fabric Upgrade Orchestration Service. This
API is internally used for support purposes.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time durat... | [
"Get",
"the",
"service",
"state",
"of",
"Service",
"Fabric",
"Upgrade",
"Orchestration",
"Service",
"."
] | 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#L2133-L2136 | train | Gets the state of the orchestration service. | [
30522,
13366,
2131,
1035,
12200,
1035,
4032,
3508,
1035,
2326,
1035,
2110,
1006,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
12200,
1035,
4032,
3508,
1035,
2326,
1035,
2110,
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_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.enable_service_backup_with_http_info | def enable_service_backup_with_http_info(service_id, enable_backup_description, timeout:60, custom_headers:nil)
enable_service_backup_async(service_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def enable_service_backup_with_http_info(service_id, enable_backup_description, timeout:60, custom_headers:nil)
enable_service_backup_async(service_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"enable_service_backup_with_http_info",
"(",
"service_id",
",",
"enable_backup_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"enable_service_backup_async",
"(",
"service_id",
",",
"enable_backup_description",
",",
"timeout",
":",
... | Enables periodic backup of stateful partitions under this Service Fabric
service.
Enables periodic backup of stateful partitions which are part of this Service
Fabric service. Each partition is backed up individually as per the specified
backup policy description. In case the application, which the service is part... | [
"Enables",
"periodic",
"backup",
"of",
"stateful",
"partitions",
"under",
"this",
"Service",
"Fabric",
"service",
"."
] | 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#L23867-L23869 | train | Enables backup of the specified service. | [
30522,
13366,
9585,
1035,
2326,
1035,
10200,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
9585,
1035,
10200,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
9585,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/touchable.rb | Mongoid.Touchable.define_touchable! | def define_touchable!(association)
name = association.name
method_name = define_relation_touch_method(name, association)
association.inverse_class.tap do |klass|
klass.after_save method_name
klass.after_destroy method_name
klass.after_touch method_name
end
end | ruby | def define_touchable!(association)
name = association.name
method_name = define_relation_touch_method(name, association)
association.inverse_class.tap do |klass|
klass.after_save method_name
klass.after_destroy method_name
klass.after_touch method_name
end
end | [
"def",
"define_touchable!",
"(",
"association",
")",
"name",
"=",
"association",
".",
"name",
"method_name",
"=",
"define_relation_touch_method",
"(",
"name",
",",
"association",
")",
"association",
".",
"inverse_class",
".",
"tap",
"do",
"|",
"klass",
"|",
"kla... | Add the association to the touchable associations if the touch option was
provided.
@example Add the touchable.
Model.define_touchable!(assoc)
@param [ Association ] association The association metadata.
@return [ Class ] The model class.
@since 3.0.0 | [
"Add",
"the",
"association",
"to",
"the",
"touchable",
"associations",
"if",
"the",
"touch",
"option",
"was",
"provided",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/touchable.rb#L55-L63 | train | Define the touchable method for the given association. | [
30522,
13366,
9375,
1035,
3543,
3085,
999,
1006,
2523,
1007,
2171,
1027,
2523,
1012,
2171,
4118,
1035,
2171,
1027,
9375,
1035,
7189,
1035,
3543,
1035,
4118,
1006,
2171,
1010,
2523,
1007,
2523,
1012,
19262,
1035,
2465,
1012,
11112,
2079,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_dispatch/http/request.rb | ActionDispatch.Request.raw_post | def raw_post
unless has_header? "RAW_POST_DATA"
raw_post_body = body
set_header("RAW_POST_DATA", raw_post_body.read(content_length))
raw_post_body.rewind if raw_post_body.respond_to?(:rewind)
end
get_header "RAW_POST_DATA"
end | ruby | def raw_post
unless has_header? "RAW_POST_DATA"
raw_post_body = body
set_header("RAW_POST_DATA", raw_post_body.read(content_length))
raw_post_body.rewind if raw_post_body.respond_to?(:rewind)
end
get_header "RAW_POST_DATA"
end | [
"def",
"raw_post",
"unless",
"has_header?",
"\"RAW_POST_DATA\"",
"raw_post_body",
"=",
"body",
"set_header",
"(",
"\"RAW_POST_DATA\"",
",",
"raw_post_body",
".",
"read",
"(",
"content_length",
")",
")",
"raw_post_body",
".",
"rewind",
"if",
"raw_post_body",
".",
"re... | Read the request \body. This is useful for web services that need to
work with raw requests directly. | [
"Read",
"the",
"request",
"\\",
"body",
".",
"This",
"is",
"useful",
"for",
"web",
"services",
"that",
"need",
"to",
"work",
"with",
"raw",
"requests",
"directly",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_dispatch/http/request.rb#L311-L318 | train | Get the raw post data | [
30522,
13366,
6315,
1035,
2695,
4983,
2038,
1035,
20346,
1029,
1000,
6315,
1035,
2695,
1035,
2951,
1000,
6315,
1035,
2695,
1035,
2303,
1027,
2303,
2275,
1035,
20346,
1006,
1000,
6315,
1035,
2695,
1035,
2951,
1000,
1010,
6315,
1035,
2695,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_postgresql/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/check_name_availability.rb | Azure::Postgresql::Mgmt::V2017_12_01_preview.CheckNameAvailability.execute | def execute(name_availability_request, custom_headers:nil)
response = execute_async(name_availability_request, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def execute(name_availability_request, custom_headers:nil)
response = execute_async(name_availability_request, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"execute",
"(",
"name_availability_request",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"execute_async",
"(",
"name_availability_request",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",... | Check the availability of name for resource
@param name_availability_request [NameAvailabilityRequest] The required
parameters for checking if resource name is available.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [NameAvailability] ope... | [
"Check",
"the",
"availability",
"of",
"name",
"for",
"resource"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_postgresql/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/check_name_availability.rb#L37-L40 | train | Executes a name availability request. | [
30522,
13366,
15389,
1006,
2171,
1035,
11343,
1035,
5227,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
15389,
1035,
2004,
6038,
2278,
1006,
2171,
1035,
11343,
1035,
5227,
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... |
jnunemaker/httparty | lib/httparty.rb | HTTParty.ClassMethods.format | def format(f = nil)
if f.nil?
default_options[:format]
else
parser(Parser) if parser.nil?
default_options[:format] = f
validate_format
end
end | ruby | def format(f = nil)
if f.nil?
default_options[:format]
else
parser(Parser) if parser.nil?
default_options[:format] = f
validate_format
end
end | [
"def",
"format",
"(",
"f",
"=",
"nil",
")",
"if",
"f",
".",
"nil?",
"default_options",
"[",
":format",
"]",
"else",
"parser",
"(",
"Parser",
")",
"if",
"parser",
".",
"nil?",
"default_options",
"[",
":format",
"]",
"=",
"f",
"validate_format",
"end",
"... | Allows setting the format with which to parse.
Must be one of the allowed formats ie: json, xml
class Foo
include HTTParty
format :json
end | [
"Allows",
"setting",
"the",
"format",
"with",
"which",
"to",
"parse",
".",
"Must",
"be",
"one",
"of",
"the",
"allowed",
"formats",
"ie",
":",
"json",
"xml"
] | b4099defba01231d2faaaa2660476f867e096bfb | https://github.com/jnunemaker/httparty/blob/b4099defba01231d2faaaa2660476f867e096bfb/lib/httparty.rb#L268-L276 | train | Returns the format of the input file. | [
30522,
13366,
4289,
1006,
1042,
1027,
9152,
2140,
1007,
2065,
1042,
1012,
9152,
2140,
1029,
12398,
1035,
7047,
1031,
1024,
4289,
1033,
2842,
11968,
8043,
1006,
11968,
8043,
1007,
2065,
11968,
8043,
1012,
9152,
2140,
1029,
12398,
1035,
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... |
rails/rails | activerecord/lib/active_record/persistence.rb | ActiveRecord.Persistence._create_record | def _create_record(attribute_names = self.attribute_names)
attribute_names = attributes_for_create(attribute_names)
new_id = self.class._insert_record(
attributes_with_values(attribute_names)
)
self.id ||= new_id if @primary_key
@new_record = false
yield(self) if block_gi... | ruby | def _create_record(attribute_names = self.attribute_names)
attribute_names = attributes_for_create(attribute_names)
new_id = self.class._insert_record(
attributes_with_values(attribute_names)
)
self.id ||= new_id if @primary_key
@new_record = false
yield(self) if block_gi... | [
"def",
"_create_record",
"(",
"attribute_names",
"=",
"self",
".",
"attribute_names",
")",
"attribute_names",
"=",
"attributes_for_create",
"(",
"attribute_names",
")",
"new_id",
"=",
"self",
".",
"class",
".",
"_insert_record",
"(",
"attributes_with_values",
"(",
"... | Creates a record with values matching those of the instance attributes
and returns its id. | [
"Creates",
"a",
"record",
"with",
"values",
"matching",
"those",
"of",
"the",
"instance",
"attributes",
"and",
"returns",
"its",
"id",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/persistence.rb#L925-L939 | train | Creates a new record in the database. | [
30522,
13366,
1035,
3443,
1035,
2501,
1006,
17961,
1035,
3415,
1027,
2969,
1012,
17961,
1035,
3415,
1007,
17961,
1035,
3415,
1027,
12332,
1035,
2005,
1035,
3443,
1006,
17961,
1035,
3415,
1007,
2047,
1035,
8909,
1027,
2969,
1012,
2465,
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... |
ankane/ahoy | lib/ahoy/database_store.rb | Ahoy.DatabaseStore.visit_or_create | def visit_or_create(started_at: nil)
ahoy.track_visit(started_at: started_at) if !visit && Ahoy.server_side_visits
visit
end | ruby | def visit_or_create(started_at: nil)
ahoy.track_visit(started_at: started_at) if !visit && Ahoy.server_side_visits
visit
end | [
"def",
"visit_or_create",
"(",
"started_at",
":",
"nil",
")",
"ahoy",
".",
"track_visit",
"(",
"started_at",
":",
"started_at",
")",
"if",
"!",
"visit",
"&&",
"Ahoy",
".",
"server_side_visits",
"visit",
"end"
] | if we don't have a visit, let's try to create one first | [
"if",
"we",
"don",
"t",
"have",
"a",
"visit",
"let",
"s",
"try",
"to",
"create",
"one",
"first"
] | 514e4f9aed4ff87be791e4d8b73b0f2788233ba8 | https://github.com/ankane/ahoy/blob/514e4f9aed4ff87be791e4d8b73b0f2788233ba8/lib/ahoy/database_store.rb#L62-L65 | train | visit or create a visit | [
30522,
13366,
3942,
1035,
2030,
1035,
3443,
1006,
2318,
1035,
2012,
1024,
9152,
2140,
1007,
6289,
6977,
1012,
2650,
1035,
3942,
1006,
2318,
1035,
2012,
1024,
2318,
1035,
2012,
1007,
2065,
999,
3942,
1004,
1004,
6289,
6977,
1012,
8241,
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... |
jekyll/jekyll-feed | lib/jekyll-feed/generator.rb | JekyllFeed.Generator.make_page | def make_page(file_path, collection: "posts", category: nil)
PageWithoutAFile.new(@site, __dir__, "", file_path).tap do |file|
file.content = feed_template
file.data.merge!(
"layout" => nil,
"sitemap" => false,
"xsl" => file_exists?("feed.xslt.xml"),
... | ruby | def make_page(file_path, collection: "posts", category: nil)
PageWithoutAFile.new(@site, __dir__, "", file_path).tap do |file|
file.content = feed_template
file.data.merge!(
"layout" => nil,
"sitemap" => false,
"xsl" => file_exists?("feed.xslt.xml"),
... | [
"def",
"make_page",
"(",
"file_path",
",",
"collection",
":",
"\"posts\"",
",",
"category",
":",
"nil",
")",
"PageWithoutAFile",
".",
"new",
"(",
"@site",
",",
"__dir__",
",",
"\"\"",
",",
"file_path",
")",
".",
"tap",
"do",
"|",
"file",
"|",
"file",
"... | Generates contents for a file | [
"Generates",
"contents",
"for",
"a",
"file"
] | 6885a7637e40a663667ea4f6399d203b95c2c434 | https://github.com/jekyll/jekyll-feed/blob/6885a7637e40a663667ea4f6399d203b95c2c434/lib/jekyll-feed/generator.rb#L88-L100 | train | Creates a new PageWithoutAFile object for the given file_path. | [
30522,
13366,
2191,
1035,
3931,
1006,
5371,
1035,
4130,
1010,
3074,
1024,
1000,
8466,
1000,
1010,
4696,
1024,
9152,
2140,
1007,
3931,
24415,
5833,
10354,
9463,
1012,
2047,
1006,
1030,
2609,
1010,
1035,
1035,
16101,
1035,
1035,
1010,
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 | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb | Azure::Labservices::Mgmt::V2018_10_15.Labs.update_with_http_info | def update_with_http_info(resource_group_name, lab_account_name, lab_name, lab, custom_headers:nil)
update_async(resource_group_name, lab_account_name, lab_name, lab, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, lab_account_name, lab_name, lab, custom_headers:nil)
update_async(resource_group_name, lab_account_name, lab_name, lab, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"lab",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"lab",
",",
"custom_h... | Modify properties of labs.
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param lab_name [String] The name of the lab.
@param lab [LabFragment] Represents a lab.
@param custom_headers [Hash{String => String}] A hash of custom head... | [
"Modify",
"properties",
"of",
"labs",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb#L425-L427 | train | Updates a lab s index. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
6845,
1035,
2171,
1010,
6845,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
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... |
rails/sprockets | lib/sprockets/manifest.rb | Sprockets.Manifest.remove | def remove(filename)
path = File.join(dir, filename)
gzip = "#{path}.gz"
logical_path = files[filename]['logical_path']
if assets[logical_path] == filename
assets.delete(logical_path)
end
files.delete(filename)
FileUtils.rm(path) if File.exist?(path)
FileUtils.r... | ruby | def remove(filename)
path = File.join(dir, filename)
gzip = "#{path}.gz"
logical_path = files[filename]['logical_path']
if assets[logical_path] == filename
assets.delete(logical_path)
end
files.delete(filename)
FileUtils.rm(path) if File.exist?(path)
FileUtils.r... | [
"def",
"remove",
"(",
"filename",
")",
"path",
"=",
"File",
".",
"join",
"(",
"dir",
",",
"filename",
")",
"gzip",
"=",
"\"#{path}.gz\"",
"logical_path",
"=",
"files",
"[",
"filename",
"]",
"[",
"'logical_path'",
"]",
"if",
"assets",
"[",
"logical_path",
... | Removes file from directory and from manifest. `filename` must
be the name with any directory path.
manifest.remove("application-2e8e9a7c6b0aafa0c9bdeec90ea30213.js") | [
"Removes",
"file",
"from",
"directory",
"and",
"from",
"manifest",
".",
"filename",
"must",
"be",
"the",
"name",
"with",
"any",
"directory",
"path",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/manifest.rb#L215-L233 | train | Remove a file from the cache | [
30522,
13366,
6366,
1006,
5371,
18442,
1007,
4130,
1027,
5371,
1012,
3693,
1006,
16101,
1010,
5371,
18442,
1007,
1043,
5831,
2361,
1027,
1000,
1001,
1063,
4130,
1065,
1012,
1043,
2480,
1000,
11177,
1035,
4130,
1027,
6764,
1031,
5371,
18442,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.list_sas_tokens_with_http_info | def list_sas_tokens_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers:nil)
list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers:custom_headers).value!
end | ruby | def list_sas_tokens_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers:nil)
list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers:custom_headers).value!
end | [
"def",
"list_sas_tokens_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"storage_account_name",
",",
"container_name",
",",
"custom_headers",
":",
"nil",
")",
"list_sas_tokens_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"storage_acco... | Gets the SAS token associated with the specified Data Lake Analytics and
Azure Storage account and container combination.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics account.
@param account_name [String] The name of the Data Lake Analytics account ... | [
"Gets",
"the",
"SAS",
"token",
"associated",
"with",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"and",
"Azure",
"Storage",
"account",
"and",
"container",
"combination",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L713-L715 | train | Gets the SAS tokens for the specified container. | [
30522,
13366,
2862,
1035,
21871,
1035,
19204,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb | Azure::CognitiveServices::Face::V1_0.LargePersonGroupPerson.add_face_from_stream | def add_face_from_stream(large_person_group_id, person_id, image, user_data:nil, target_face:nil, custom_headers:nil)
response = add_face_from_stream_async(large_person_group_id, person_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
response.body unless respon... | ruby | def add_face_from_stream(large_person_group_id, person_id, image, user_data:nil, target_face:nil, custom_headers:nil)
response = add_face_from_stream_async(large_person_group_id, person_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
response.body unless respon... | [
"def",
"add_face_from_stream",
"(",
"large_person_group_id",
",",
"person_id",
",",
"image",
",",
"user_data",
":",
"nil",
",",
"target_face",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_face_from_stream_async",
"(",
"large_person_group... | Add a representative face to a person for identification. The input face is
specified as an image with a targetFace rectangle.
@param large_person_group_id [String] Id referencing a particular large
person group.
@param person_id Id referencing a particular person.
@param image An image stream.
@param user_data ... | [
"Add",
"a",
"representative",
"face",
"to",
"a",
"person",
"for",
"identification",
".",
"The",
"input",
"face",
"is",
"specified",
"as",
"an",
"image",
"with",
"a",
"targetFace",
"rectangle",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb#L1029-L1032 | train | Adds a face to a person. | [
30522,
13366,
5587,
1035,
2227,
1035,
2013,
1035,
5460,
1006,
2312,
1035,
2711,
1035,
2177,
1035,
8909,
1010,
2711,
1035,
8909,
1010,
3746,
1010,
5310,
1035,
2951,
1024,
9152,
2140,
1010,
4539,
1035,
2227,
1024,
9152,
2140,
1010,
7661,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/images.rb | Azure::Compute::Mgmt::V2018_04_01.Images.delete | def delete(resource_group_name, image_name, custom_headers:nil)
response = delete_async(resource_group_name, image_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, image_name, custom_headers:nil)
response = delete_async(resource_group_name, image_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"image_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"image_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Deletes an Image.
@param resource_group_name [String] The name of the resource group.
@param image_name [String] The name of the image.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"an",
"Image",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/images.rb#L122-L125 | train | Deletes an image. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3746,
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,
3746,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.list_namespaces | def list_namespaces(resource_group_name, cluster_name, custom_headers:nil)
response = list_namespaces_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_namespaces(resource_group_name, cluster_name, custom_headers:nil)
response = list_namespaces_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_namespaces",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_namespaces_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster.
@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 custom_headers [Hash{String => String}] A hash of custom headers that
will be ... | [
"List",
"all",
"Event",
"Hubs",
"Namespace",
"IDs",
"in",
"an",
"Event",
"Hubs",
"Dedicated",
"Cluster",
"."
] | 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#L448-L451 | train | Gets the list of namespaces in the specified cluster. | [
30522,
13366,
2862,
1035,
3415,
15327,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
3415,
15327,
2015,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_processor.rb | GitHubChangelogGenerator.Generator.exclude_issues_by_labels | def exclude_issues_by_labels(issues)
return issues if !options[:exclude_labels] || options[:exclude_labels].empty?
issues.reject do |issue|
labels = issue["labels"].map { |l| l["name"] }
(labels & options[:exclude_labels]).any?
end
end | ruby | def exclude_issues_by_labels(issues)
return issues if !options[:exclude_labels] || options[:exclude_labels].empty?
issues.reject do |issue|
labels = issue["labels"].map { |l| l["name"] }
(labels & options[:exclude_labels]).any?
end
end | [
"def",
"exclude_issues_by_labels",
"(",
"issues",
")",
"return",
"issues",
"if",
"!",
"options",
"[",
":exclude_labels",
"]",
"||",
"options",
"[",
":exclude_labels",
"]",
".",
"empty?",
"issues",
".",
"reject",
"do",
"|",
"issue",
"|",
"labels",
"=",
"issue... | delete all issues with labels from options[:exclude_labels] array
@param [Array] issues
@return [Array] filtered array | [
"delete",
"all",
"issues",
"with",
"labels",
"from",
"options",
"[",
":",
"exclude_labels",
"]",
"array"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_processor.rb#L8-L15 | train | exclude issues by labels | [
30522,
13366,
23329,
1035,
3314,
1035,
2011,
1035,
10873,
1006,
3314,
1007,
2709,
3314,
2065,
999,
7047,
1031,
1024,
23329,
1035,
10873,
1033,
1064,
1064,
7047,
1031,
1024,
23329,
1035,
10873,
1033,
1012,
4064,
1029,
3314,
1012,
15454,
2079... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mhenrixon/sidekiq-unique-jobs | lib/sidekiq_unique_jobs/digests.rb | SidekiqUniqueJobs.Digests.page | def page(pattern: SCAN_PATTERN, cursor: 0, page_size: 100)
redis do |conn|
total_size, digests = conn.multi do
conn.scard(UNIQUE_SET)
conn.sscan(UNIQUE_SET, cursor, match: pattern, count: page_size)
end
[total_size, digests[0], digests[1]]
end
end | ruby | def page(pattern: SCAN_PATTERN, cursor: 0, page_size: 100)
redis do |conn|
total_size, digests = conn.multi do
conn.scard(UNIQUE_SET)
conn.sscan(UNIQUE_SET, cursor, match: pattern, count: page_size)
end
[total_size, digests[0], digests[1]]
end
end | [
"def",
"page",
"(",
"pattern",
":",
"SCAN_PATTERN",
",",
"cursor",
":",
"0",
",",
"page_size",
":",
"100",
")",
"redis",
"do",
"|",
"conn",
"|",
"total_size",
",",
"digests",
"=",
"conn",
".",
"multi",
"do",
"conn",
".",
"scard",
"(",
"UNIQUE_SET",
"... | Paginate unique digests
@param [String] pattern a pattern to match with
@param [Integer] cursor the maximum number to match
@param [Integer] page_size the current cursor position
@return [Array<String>] with unique digests | [
"Paginate",
"unique",
"digests"
] | 2944b97c720528f53962ccfd17d43ac939a77f46 | https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/digests.rb#L32-L41 | train | Get the page of the result set | [
30522,
13366,
3931,
1006,
5418,
1024,
13594,
1035,
5418,
1010,
12731,
25301,
2099,
1024,
1014,
1010,
3931,
1035,
2946,
1024,
2531,
1007,
2417,
2483,
2079,
1064,
9530,
2078,
1064,
2561,
1035,
2946,
1010,
17886,
2015,
1027,
9530,
2078,
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... |
typhoeus/typhoeus | lib/typhoeus/request.rb | Typhoeus.Request.fuzzy_hash_eql? | def fuzzy_hash_eql?(left, right)
return true if (left == right)
(left.count == right.count) && left.inject(true) do |res, kvp|
res && (kvp[1] == right[kvp[0]])
end
end | ruby | def fuzzy_hash_eql?(left, right)
return true if (left == right)
(left.count == right.count) && left.inject(true) do |res, kvp|
res && (kvp[1] == right[kvp[0]])
end
end | [
"def",
"fuzzy_hash_eql?",
"(",
"left",
",",
"right",
")",
"return",
"true",
"if",
"(",
"left",
"==",
"right",
")",
"(",
"left",
".",
"count",
"==",
"right",
".",
"count",
")",
"&&",
"left",
".",
"inject",
"(",
"true",
")",
"do",
"|",
"res",
",",
... | Checks if two hashes are equal or not, discarding
first-level hash order.
@param [ Hash ] left
@param [ Hash ] right hash to check for equality
@return [ Boolean ] Returns true if hashes have
same values for same keys and same length,
even if the keys are given in a different order. | [
"Checks",
"if",
"two",
"hashes",
"are",
"equal",
"or",
"not",
"discarding",
"first",
"-",
"level",
"hash",
"order",
"."
] | d072aaf6edcf46d54d6a6bce45286629bf4e5af6 | https://github.com/typhoeus/typhoeus/blob/d072aaf6edcf46d54d6a6bce45286629bf4e5af6/lib/typhoeus/request.rb#L191-L197 | train | Returns true if the two hashes are equal | [
30522,
13366,
18001,
1035,
23325,
1035,
1041,
4160,
2140,
1029,
1006,
2187,
1010,
2157,
1007,
2709,
2995,
2065,
1006,
2187,
1027,
1027,
2157,
1007,
1006,
2187,
1012,
4175,
1027,
1027,
2157,
1012,
4175,
1007,
1004,
1004,
2187,
1012,
1999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/v1_item.rb | SquareConnect.V1Item.visibility= | def visibility=(visibility)
validator = EnumAttributeValidator.new('String', ["PUBLIC", "PRIVATE"])
unless validator.valid?(visibility)
fail ArgumentError, "invalid value for 'visibility', must be one of #{validator.allowable_values}."
end
@visibility = visibility
end | ruby | def visibility=(visibility)
validator = EnumAttributeValidator.new('String', ["PUBLIC", "PRIVATE"])
unless validator.valid?(visibility)
fail ArgumentError, "invalid value for 'visibility', must be one of #{validator.allowable_values}."
end
@visibility = visibility
end | [
"def",
"visibility",
"=",
"(",
"visibility",
")",
"validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"PUBLIC\"",
",",
"\"PRIVATE\"",
"]",
")",
"unless",
"validator",
".",
"valid?",
"(",
"visibility",
")",
"fail",
"ArgumentErro... | Custom attribute writer method checking allowed values (enum).
@param [Object] visibility Object to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"checking",
"allowed",
"values",
"(",
"enum",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_item.rb#L259-L265 | train | Set the visibility of the resource. | [
30522,
13366,
16476,
1027,
1006,
16476,
1007,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
2270,
1000,
1010,
1000,
2797,
1000,
1033,
1007,
4983,
9398,
8844,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lostisland/faraday | spec/support/helper_methods.rb | Faraday.HelperMethods.parse_multipart | def parse_multipart(boundary, body)
reader = MultipartParser::Reader.new(boundary)
result = { errors: [], parts: [] }
def result.part(name)
hash = self[:parts].detect { |h| h[:part].name == name }
[hash[:part], hash[:body].join]
end
reader.on_part do |part|
result[... | ruby | def parse_multipart(boundary, body)
reader = MultipartParser::Reader.new(boundary)
result = { errors: [], parts: [] }
def result.part(name)
hash = self[:parts].detect { |h| h[:part].name == name }
[hash[:part], hash[:body].join]
end
reader.on_part do |part|
result[... | [
"def",
"parse_multipart",
"(",
"boundary",
",",
"body",
")",
"reader",
"=",
"MultipartParser",
"::",
"Reader",
".",
"new",
"(",
"boundary",
")",
"result",
"=",
"{",
"errors",
":",
"[",
"]",
",",
"parts",
":",
"[",
"]",
"}",
"def",
"result",
".",
"par... | parse a multipart MIME message, returning a hash of any multipart errors | [
"parse",
"a",
"multipart",
"MIME",
"message",
"returning",
"a",
"hash",
"of",
"any",
"multipart",
"errors"
] | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/spec/support/helper_methods.rb#L100-L122 | train | Parse a multipart message | [
30522,
13366,
11968,
3366,
1035,
4800,
19362,
2102,
1006,
6192,
1010,
2303,
1007,
8068,
1027,
4800,
19362,
25856,
11650,
2121,
1024,
1024,
8068,
1012,
2047,
1006,
6192,
1007,
2765,
1027,
1063,
10697,
1024,
1031,
1033,
1010,
3033,
1024,
1031... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/configurable.rb | Vault.Configurable.options | def options
Hash[*Vault::Configurable.keys.map do |key|
[key, instance_variable_get(:"@#{key}")]
end.flatten]
end | ruby | def options
Hash[*Vault::Configurable.keys.map do |key|
[key, instance_variable_get(:"@#{key}")]
end.flatten]
end | [
"def",
"options",
"Hash",
"[",
"Vault",
"::",
"Configurable",
".",
"keys",
".",
"map",
"do",
"|",
"key",
"|",
"[",
"key",
",",
"instance_variable_get",
"(",
":\"",
"#{",
"key",
"}",
"\"",
")",
"]",
"end",
".",
"flatten",
"]",
"end"
] | The list of options for this configurable.
@return [Hash<Symbol, Object>] | [
"The",
"list",
"of",
"options",
"for",
"this",
"configurable",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/configurable.rb#L42-L46 | train | Returns the options hash for the current request | [
30522,
13366,
7047,
23325,
1031,
1008,
11632,
1024,
1024,
9530,
8873,
27390,
3085,
1012,
6309,
1012,
4949,
2079,
1064,
3145,
1064,
1031,
3145,
1010,
6013,
1035,
8023,
1035,
2131,
1006,
1024,
1000,
1030,
1001,
1063,
3145,
1065,
1000,
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... |
sunspot/sunspot | sunspot/lib/sunspot/field.rb | Sunspot.Field.set_indexed_name | def set_indexed_name(options)
@indexed_name =
if options[:as]
options.delete(:as).to_s
else
name = options[:prefix] ? @name.to_s.sub(/^#{options[:prefix]}_/, '') : @name
"#{@type.indexed_name(name)}#{'m' if multiple? }#{'s' if @stored}#{'v' if more_like_this?}"
... | ruby | def set_indexed_name(options)
@indexed_name =
if options[:as]
options.delete(:as).to_s
else
name = options[:prefix] ? @name.to_s.sub(/^#{options[:prefix]}_/, '') : @name
"#{@type.indexed_name(name)}#{'m' if multiple? }#{'s' if @stored}#{'v' if more_like_this?}"
... | [
"def",
"set_indexed_name",
"(",
"options",
")",
"@indexed_name",
"=",
"if",
"options",
"[",
":as",
"]",
"options",
".",
"delete",
"(",
":as",
")",
".",
"to_s",
"else",
"name",
"=",
"options",
"[",
":prefix",
"]",
"?",
"@name",
".",
"to_s",
".",
"sub",
... | Determine the indexed name. If the :as option is given use that, otherwise
create the value based on the indexed_name of the type with additional
suffixes for multiple, stored, and more_like_this.
==== Returns
String: The field's indexed name | [
"Determine",
"the",
"indexed",
"name",
".",
"If",
"the",
":",
"as",
"option",
"is",
"given",
"use",
"that",
"otherwise",
"create",
"the",
"value",
"based",
"on",
"the",
"indexed_name",
"of",
"the",
"type",
"with",
"additional",
"suffixes",
"for",
"multiple",... | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/field.rb#L134-L142 | train | set the indexed name | [
30522,
13366,
2275,
1035,
25331,
1035,
2171,
1006,
7047,
1007,
1030,
25331,
1035,
2171,
1027,
2065,
7047,
1031,
1024,
2004,
1033,
7047,
1012,
3972,
12870,
1006,
1024,
2004,
1007,
1012,
2000,
1035,
1055,
2842,
2171,
1027,
7047,
1031,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/commands/rate_limiter.rb | Discordrb::Commands.RateLimiter.rate_limited? | def rate_limited?(key, thing, increment: 1)
# Check whether the bucket actually exists
return false unless @buckets && @buckets[key]
@buckets[key].rate_limited?(thing, increment: increment)
end | ruby | def rate_limited?(key, thing, increment: 1)
# Check whether the bucket actually exists
return false unless @buckets && @buckets[key]
@buckets[key].rate_limited?(thing, increment: increment)
end | [
"def",
"rate_limited?",
"(",
"key",
",",
"thing",
",",
"increment",
":",
"1",
")",
"# Check whether the bucket actually exists",
"return",
"false",
"unless",
"@buckets",
"&&",
"@buckets",
"[",
"key",
"]",
"@buckets",
"[",
"key",
"]",
".",
"rate_limited?",
"(",
... | Performs a rate limit request.
@param key [Symbol] Which bucket to perform the request for.
@param thing [#resolve_id, Integer, Symbol] What should be rate-limited.
@param increment (see Bucket#rate_limited?)
@see Bucket#rate_limited?
@return [Integer, false] How much time to wait or false if the request succeeded... | [
"Performs",
"a",
"rate",
"limit",
"request",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/commands/rate_limiter.rb#L112-L117 | train | Check if the bucket is rate limited | [
30522,
13366,
3446,
1035,
3132,
1029,
1006,
3145,
1010,
2518,
1010,
4297,
28578,
4765,
1024,
1015,
1007,
1001,
4638,
3251,
1996,
13610,
2941,
6526,
2709,
6270,
4983,
1030,
13610,
2015,
1004,
1004,
1030,
13610,
2015,
1031,
3145,
1033,
1030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_entitysearch/lib/1.0/generated/azure_cognitiveservices_entitysearch/entities_operations.rb | Azure::CognitiveServices::EntitySearch::V1_0.EntitiesOperations.search_with_http_info | def search_with_http_info(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:'en-us', response_filter:nil, response_format:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
search_async(query, accept_language:accept_language, pragma:p... | ruby | def search_with_http_info(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:'en-us', response_filter:nil, response_format:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
search_async(query, accept_language:accept_language, pragma:p... | [
"def",
"search_with_http_info",
"(",
"query",
",",
"accept_language",
":",
"nil",
",",
"pragma",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"country_code",
":",
... | The Entity Search API lets you send a search query to Bing and get back
search results that include entities and places. Place results include
restaurants, hotel, or other local businesses. For places, the query can
specify the name of the local business or it can ask for a list (for example,
restaurants near me). ... | [
"The",
"Entity",
"Search",
"API",
"lets",
"you",
"send",
"a",
"search",
"query",
"to",
"Bing",
"and",
"get",
"back",
"search",
"results",
"that",
"include",
"entities",
"and",
"places",
".",
"Place",
"results",
"include",
"restaurants",
"hotel",
"or",
"other... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_entitysearch/lib/1.0/generated/azure_cognitiveservices_entitysearch/entities_operations.rb#L353-L355 | train | Search for a collection of documents. | [
30522,
13366,
3945,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
23032,
1010,
5138,
1035,
2653,
1024,
9152,
2140,
1010,
10975,
8490,
2863,
1024,
9152,
2140,
1010,
5310,
1035,
4005,
1024,
9152,
2140,
1010,
7396,
1035,
8909,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
attr-encrypted/attr_encrypted | lib/attr_encrypted.rb | AttrEncrypted.InstanceMethods.decrypt | def decrypt(attribute, encrypted_value)
encrypted_attributes[attribute.to_sym][:operation] = :decrypting
encrypted_attributes[attribute.to_sym][:value_present] = self.class.not_empty?(encrypted_value)
self.class.decrypt(attribute, encrypted_value, evaluated_attr_encrypted_options_for(attribute))
e... | ruby | def decrypt(attribute, encrypted_value)
encrypted_attributes[attribute.to_sym][:operation] = :decrypting
encrypted_attributes[attribute.to_sym][:value_present] = self.class.not_empty?(encrypted_value)
self.class.decrypt(attribute, encrypted_value, evaluated_attr_encrypted_options_for(attribute))
e... | [
"def",
"decrypt",
"(",
"attribute",
",",
"encrypted_value",
")",
"encrypted_attributes",
"[",
"attribute",
".",
"to_sym",
"]",
"[",
":operation",
"]",
"=",
":decrypting",
"encrypted_attributes",
"[",
"attribute",
".",
"to_sym",
"]",
"[",
":value_present",
"]",
"... | Decrypts a value for the attribute specified using options evaluated in the current object's scope
Example
class User
attr_accessor :secret_key
attr_encrypted :email, key: :secret_key
def initialize(secret_key)
self.secret_key = secret_key
end
end
@user = User.new('some-secret-key')
@... | [
"Decrypts",
"a",
"value",
"for",
"the",
"attribute",
"specified",
"using",
"options",
"evaluated",
"in",
"the",
"current",
"object",
"s",
"scope"
] | 11df93aef14c661dd0c03169d382a0412f93124e | https://github.com/attr-encrypted/attr_encrypted/blob/11df93aef14c661dd0c03169d382a0412f93124e/lib/attr_encrypted.rb#L328-L332 | train | Decrypts the value of an attribute. | [
30522,
13366,
11703,
2854,
13876,
1006,
17961,
1010,
4372,
26775,
22571,
3064,
1035,
3643,
1007,
4372,
26775,
22571,
3064,
1035,
12332,
1031,
17961,
1012,
2000,
1035,
25353,
2213,
1033,
1031,
1024,
3169,
1033,
1027,
1024,
11703,
2854,
13876,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.begin_refresh_hub_schema | def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
response = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
response = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_refresh_hub_schema",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"sync_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_refresh_hub_schema_async",
"(",
"resource_group_name",
",",
"server_name",
",",... | Refreshes a hub database schema.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the database on... | [
"Refreshes",
"a",
"hub",
"database",
"schema",
"."
] | 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#L982-L985 | train | Refresh hub schema. | [
30522,
13366,
4088,
1035,
25416,
21898,
1035,
9594,
1035,
8040,
28433,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
etewiah/property_web_builder | app/models/pwb/page.rb | Pwb.Page.set_fragment_html | def set_fragment_html(page_part_key, locale, new_fragment_html)
# content_key = slug + "_" + page_part_key
# save in content model associated with page
page_fragment_content = contents.find_or_create_by(page_part_key: page_part_key)
content_html_col = "raw_" + locale + "="
# above is the c... | ruby | def set_fragment_html(page_part_key, locale, new_fragment_html)
# content_key = slug + "_" + page_part_key
# save in content model associated with page
page_fragment_content = contents.find_or_create_by(page_part_key: page_part_key)
content_html_col = "raw_" + locale + "="
# above is the c... | [
"def",
"set_fragment_html",
"(",
"page_part_key",
",",
"locale",
",",
"new_fragment_html",
")",
"# content_key = slug + \"_\" + page_part_key",
"# save in content model associated with page",
"page_fragment_content",
"=",
"contents",
".",
"find_or_create_by",
"(",
"page_part_key",
... | currently only used in
/pwb/spec/controllers/pwb/welcome_controller_spec.rb | [
"currently",
"only",
"used",
"in",
"/",
"pwb",
"/",
"spec",
"/",
"controllers",
"/",
"pwb",
"/",
"welcome_controller_spec",
".",
"rb"
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/models/pwb/page.rb#L95-L106 | train | set fragment html for page_part_key | [
30522,
13366,
2275,
1035,
15778,
1035,
16129,
1006,
3931,
1035,
2112,
1035,
3145,
1010,
2334,
2063,
1010,
2047,
1035,
15778,
1035,
16129,
1007,
1001,
4180,
1035,
3145,
1027,
23667,
1009,
1000,
1035,
1000,
1009,
3931,
1035,
2112,
1035,
3145,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
backup/backup | vagrant/spec/support/example_helpers.rb | BackupSpec.ExampleHelpers.update_local_sync_files | def update_local_sync_files
FileUtils.mkdir_p File.join(LOCAL_SYNC_PATH, 'dir_a/dir_d')
%w{ dir_a/one.file
dir_b/one.new
dir_a/dir_d/two.new }.each do |path|
File.open(File.join(LOCAL_SYNC_PATH, path), 'w') do |file|
file.puts 'foobar'
end
end
FileUt... | ruby | def update_local_sync_files
FileUtils.mkdir_p File.join(LOCAL_SYNC_PATH, 'dir_a/dir_d')
%w{ dir_a/one.file
dir_b/one.new
dir_a/dir_d/two.new }.each do |path|
File.open(File.join(LOCAL_SYNC_PATH, path), 'w') do |file|
file.puts 'foobar'
end
end
FileUt... | [
"def",
"update_local_sync_files",
"FileUtils",
".",
"mkdir_p",
"File",
".",
"join",
"(",
"LOCAL_SYNC_PATH",
",",
"'dir_a/dir_d'",
")",
"%w{",
"dir_a/one.file",
"dir_b/one.new",
"dir_a/dir_d/two.new",
"}",
".",
"each",
"do",
"|",
"path",
"|",
"File",
".",
"open",
... | Added/Updated Files are MD5: 14758f1afd44c09b7992073ccf00b43d
├── dir_a
│ ├── dir_d (add)
│ │ └── two.new (add)
│ └── one.file (update)
└── dir_b
├── dir_c
│ └── three.file
├── bad\377file
├── one.new (add)
└── two.file (remove) | [
"Added",
"/",
"Updated",
"Files",
"are",
"MD5",
":",
"14758f1afd44c09b7992073ccf00b43d"
] | 64370f925e859f858766b674717a3dbee0de7a26 | https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/vagrant/spec/support/example_helpers.rb#L187-L197 | train | Update local sync files | [
30522,
13366,
10651,
1035,
2334,
1035,
26351,
1035,
6764,
5371,
21823,
4877,
1012,
12395,
4305,
2099,
1035,
1052,
5371,
1012,
3693,
1006,
2334,
1035,
26351,
1035,
4130,
1010,
1005,
16101,
1035,
1037,
1013,
16101,
1035,
1040,
1005,
1007,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.import_key_with_http_info | def import_key_with_http_info(vault_base_url, key_name, key, hsm:nil, key_attributes:nil, tags:nil, custom_headers:nil)
import_key_async(vault_base_url, key_name, key, hsm:hsm, key_attributes:key_attributes, tags:tags, custom_headers:custom_headers).value!
end | ruby | def import_key_with_http_info(vault_base_url, key_name, key, hsm:nil, key_attributes:nil, tags:nil, custom_headers:nil)
import_key_async(vault_base_url, key_name, key, hsm:hsm, key_attributes:key_attributes, tags:tags, custom_headers:custom_headers).value!
end | [
"def",
"import_key_with_http_info",
"(",
"vault_base_url",
",",
"key_name",
",",
"key",
",",
"hsm",
":",
"nil",
",",
"key_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"import_key_async",
"(",
"vault_base_url",
",",
... | Imports an externally created key, stores it, and returns key parameters and
attributes to the client.
The import key operation may be used to import any key type into an Azure Key
Vault. If the named key already exists, Azure Key Vault creates a new version
of the key. This operation requires the keys/import perm... | [
"Imports",
"an",
"externally",
"created",
"key",
"stores",
"it",
"and",
"returns",
"key",
"parameters",
"and",
"attributes",
"to",
"the",
"client",
"."
] | 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#L329-L331 | train | Import a key into a key specification. | [
30522,
13366,
12324,
1035,
3145,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
3145,
1010,
26236,
2213,
1024,
9152,
2140,
1010,
3145,
1035,
12332,
1024,
9152,
2140,
1010,
2207... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.render_noindex | def render_noindex(tags)
meta_tags.extract_noindex.each do |name, content|
tags << Tag.new(:meta, name: name, content: content) if content.present?
end
end | ruby | def render_noindex(tags)
meta_tags.extract_noindex.each do |name, content|
tags << Tag.new(:meta, name: name, content: content) if content.present?
end
end | [
"def",
"render_noindex",
"(",
"tags",
")",
"meta_tags",
".",
"extract_noindex",
".",
"each",
"do",
"|",
"name",
",",
"content",
"|",
"tags",
"<<",
"Tag",
".",
"new",
"(",
":meta",
",",
"name",
":",
"name",
",",
"content",
":",
"content",
")",
"if",
"... | Renders noindex and nofollow meta tags.
@param [Array<Tag>] tags a buffer object to store tag in. | [
"Renders",
"noindex",
"and",
"nofollow",
"meta",
"tags",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L99-L103 | train | Render the noindex tags | [
30522,
13366,
17552,
1035,
2053,
22254,
10288,
1006,
22073,
1007,
18804,
1035,
22073,
1012,
14817,
1035,
2053,
22254,
10288,
1012,
2169,
2079,
1064,
2171,
1010,
4180,
1064,
22073,
1026,
1026,
6415,
1012,
2047,
1006,
1024,
18804,
1010,
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... |
haml/haml | lib/haml/helpers.rb | Haml.Helpers.haml_internal_concat | def haml_internal_concat(text = "", newline = true, indent = true)
if haml_buffer.tabulation == 0
haml_buffer.buffer << "#{text}#{"\n" if newline}"
else
haml_buffer.buffer << %[#{haml_indent if indent}#{text.to_s.gsub("\n", "\n#{haml_indent}")}#{"\n" if newline}]
end
end | ruby | def haml_internal_concat(text = "", newline = true, indent = true)
if haml_buffer.tabulation == 0
haml_buffer.buffer << "#{text}#{"\n" if newline}"
else
haml_buffer.buffer << %[#{haml_indent if indent}#{text.to_s.gsub("\n", "\n#{haml_indent}")}#{"\n" if newline}]
end
end | [
"def",
"haml_internal_concat",
"(",
"text",
"=",
"\"\"",
",",
"newline",
"=",
"true",
",",
"indent",
"=",
"true",
")",
"if",
"haml_buffer",
".",
"tabulation",
"==",
"0",
"haml_buffer",
".",
"buffer",
"<<",
"\"#{text}#{\"\\n\" if newline}\"",
"else",
"haml_buffer... | Internal method to write directly to the buffer with control of
whether the first line should be indented, and if there should be a
final newline.
Lines added will have the proper indentation. This can be controlled
for the first line.
Used by #haml_concat and #haml_tag.
@param text [#to_s] The text to output
... | [
"Internal",
"method",
"to",
"write",
"directly",
"to",
"the",
"buffer",
"with",
"control",
"of",
"whether",
"the",
"first",
"line",
"should",
"be",
"indented",
"and",
"if",
"there",
"should",
"be",
"a",
"final",
"newline",
"."
] | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/helpers.rb#L412-L418 | train | Concatenates the given text to the current buffer. | [
30522,
13366,
10654,
2140,
1035,
4722,
1035,
9530,
11266,
1006,
3793,
1027,
1000,
1000,
1010,
2047,
4179,
1027,
2995,
1010,
27427,
4765,
1027,
2995,
1007,
2065,
10654,
2140,
1035,
17698,
1012,
21628,
9513,
1027,
1027,
1014,
10654,
2140,
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... |
sinatra/sinatra | lib/sinatra/base.rb | Sinatra.Helpers.time_for | def time_for(value)
if value.is_a? Numeric
Time.at value
elsif value.respond_to? :to_s
Time.parse value.to_s
else
value.to_time
end
rescue ArgumentError => boom
raise boom
rescue Exception
raise ArgumentError, "unable to convert #{value.inspect} to a T... | ruby | def time_for(value)
if value.is_a? Numeric
Time.at value
elsif value.respond_to? :to_s
Time.parse value.to_s
else
value.to_time
end
rescue ArgumentError => boom
raise boom
rescue Exception
raise ArgumentError, "unable to convert #{value.inspect} to a T... | [
"def",
"time_for",
"(",
"value",
")",
"if",
"value",
".",
"is_a?",
"Numeric",
"Time",
".",
"at",
"value",
"elsif",
"value",
".",
"respond_to?",
":to_s",
"Time",
".",
"parse",
"value",
".",
"to_s",
"else",
"value",
".",
"to_time",
"end",
"rescue",
"Argume... | Generates a Time object from the given value.
Used by #expires and #last_modified. | [
"Generates",
"a",
"Time",
"object",
"from",
"the",
"given",
"value",
".",
"Used",
"by",
"#expires",
"and",
"#last_modified",
"."
] | 1aa64f9858edc3f93cc8d46e26f724c1ae103b1c | https://github.com/sinatra/sinatra/blob/1aa64f9858edc3f93cc8d46e26f724c1ae103b1c/lib/sinatra/base.rb#L620-L632 | train | Returns a time object for the given value. | [
30522,
13366,
2051,
1035,
2005,
1006,
3643,
1007,
2065,
3643,
1012,
2003,
1035,
1037,
1029,
16371,
25531,
2051,
1012,
2012,
3643,
3449,
5332,
2546,
3643,
1012,
6869,
1035,
2000,
1029,
1024,
2000,
1035,
1055,
2051,
1012,
11968,
3366,
3643,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb | Azure::CognitiveServices::ContentModerator::V1_0.ListManagementImage.add_image_file_input_with_http_info | def add_image_file_input_with_http_info(list_id, image_stream, tag:nil, label:nil, custom_headers:nil)
add_image_file_input_async(list_id, image_stream, tag:tag, label:label, custom_headers:custom_headers).value!
end | ruby | def add_image_file_input_with_http_info(list_id, image_stream, tag:nil, label:nil, custom_headers:nil)
add_image_file_input_async(list_id, image_stream, tag:tag, label:label, custom_headers:custom_headers).value!
end | [
"def",
"add_image_file_input_with_http_info",
"(",
"list_id",
",",
"image_stream",
",",
"tag",
":",
"nil",
",",
"label",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"add_image_file_input_async",
"(",
"list_id",
",",
"image_stream",
",",
"tag",
":",
"tag"... | Add an image to the list with list Id equal to list Id passed.
@param list_id [String] List Id of the image list.
@param image_stream The image file.
@param tag [Integer] Tag for the image.
@param label [String] The image label.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be... | [
"Add",
"an",
"image",
"to",
"the",
"list",
"with",
"list",
"Id",
"equal",
"to",
"list",
"Id",
"passed",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb#L546-L548 | train | Adds an image file input to the list. | [
30522,
13366,
5587,
1035,
3746,
1035,
5371,
1035,
7953,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2862,
1035,
8909,
1010,
3746,
1035,
5460,
1010,
6415,
1024,
9152,
2140,
1010,
3830,
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... |
decidim/decidim | decidim-core/app/queries/decidim/metric_manage.rb | Decidim.MetricManage.retrieve_participatory_spaces | def retrieve_participatory_spaces
Decidim.participatory_space_manifests.map do |space_manifest|
next unless space_manifest.name == :participatory_processes # Temporal limitation
space_manifest.participatory_spaces.call(@organization)
end.flatten.compact
end | ruby | def retrieve_participatory_spaces
Decidim.participatory_space_manifests.map do |space_manifest|
next unless space_manifest.name == :participatory_processes # Temporal limitation
space_manifest.participatory_spaces.call(@organization)
end.flatten.compact
end | [
"def",
"retrieve_participatory_spaces",
"Decidim",
".",
"participatory_space_manifests",
".",
"map",
"do",
"|",
"space_manifest",
"|",
"next",
"unless",
"space_manifest",
".",
"name",
"==",
":participatory_processes",
"# Temporal limitation",
"space_manifest",
".",
"partici... | Search for all Participatory Space manifests and then all records available
Limited to ParticipatoryProcesses only | [
"Search",
"for",
"all",
"Participatory",
"Space",
"manifests",
"and",
"then",
"all",
"records",
"available",
"Limited",
"to",
"ParticipatoryProcesses",
"only"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/queries/decidim/metric_manage.rb#L61-L66 | train | Retrieve the participatory spaces from the organization | [
30522,
13366,
12850,
1035,
2112,
28775,
4502,
7062,
1035,
7258,
11703,
28173,
2213,
1012,
2112,
28775,
4502,
7062,
1035,
2686,
1035,
19676,
2015,
1012,
4949,
2079,
1064,
2686,
1035,
19676,
1064,
2279,
4983,
2686,
1035,
19676,
1012,
2171,
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... |
googleapis/google-cloud-ruby | google-cloud-trace/lib/google-cloud-trace.rb | Google.Cloud.trace | def trace scope: nil, timeout: nil, client_config: nil
Google::Cloud.trace @project, @keyfile, scope: scope,
timeout: (timeout || @timeout),
client_config: client_config
end | ruby | def trace scope: nil, timeout: nil, client_config: nil
Google::Cloud.trace @project, @keyfile, scope: scope,
timeout: (timeout || @timeout),
client_config: client_config
end | [
"def",
"trace",
"scope",
":",
"nil",
",",
"timeout",
":",
"nil",
",",
"client_config",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"trace",
"@project",
",",
"@keyfile",
",",
"scope",
":",
"scope",
",",
"timeout",
":",
"(",
"timeout",
"||",
"@timeout",
")... | Creates a new object for connecting to the Stackdriver Trace 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 oper... | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"Stackdriver",
"Trace",
"service",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-trace/lib/google-cloud-trace.rb#L60-L64 | train | trace the current task | [
30522,
13366,
7637,
9531,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
9152,
2140,
1010,
7396,
1035,
9530,
8873,
2290,
1024,
9152,
2140,
8224,
1024,
1024,
6112,
1012,
7637,
1030,
2622,
1010,
1030,
3145,
8873,
2571,
1010,
9531,
1024,
9531,
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... |
RailsEventStore/rails_event_store | ruby_event_store/lib/ruby_event_store/event.rb | RubyEventStore.Event.to_h | def to_h
{
event_id: event_id,
metadata: metadata.to_h,
data: data,
type: type,
}
end | ruby | def to_h
{
event_id: event_id,
metadata: metadata.to_h,
data: data,
type: type,
}
end | [
"def",
"to_h",
"{",
"event_id",
":",
"event_id",
",",
"metadata",
":",
"metadata",
".",
"to_h",
",",
"data",
":",
"data",
",",
"type",
":",
"type",
",",
"}",
"end"
] | Returns a hash representation of the event.
Metadata is converted to hash as well
@return [Hash] with :event_id, :metadata, :data, :type keys | [
"Returns",
"a",
"hash",
"representation",
"of",
"the",
"event",
"."
] | 3ee4f3148499794154ee6fec74ccf6d4670d85ac | https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/event.rb#L40-L47 | train | Convert to a H
| [
30522,
13366,
2000,
1035,
1044,
1063,
2724,
1035,
8909,
1024,
2724,
1035,
8909,
1010,
27425,
1024,
27425,
1012,
2000,
1035,
1044,
1010,
2951,
1024,
2951,
1010,
2828,
1024,
2828,
1010,
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,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.get_build_info_for_review | def get_build_info_for_review(app_id: nil, train: nil, build_number: nil, platform: 'ios')
url = "ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/testInformation"
r = request(:get) do |req|
req.url(url)
req.headers['Content-Type'] = 'application/json'
end... | ruby | def get_build_info_for_review(app_id: nil, train: nil, build_number: nil, platform: 'ios')
url = "ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/testInformation"
r = request(:get) do |req|
req.url(url)
req.headers['Content-Type'] = 'application/json'
end... | [
"def",
"get_build_info_for_review",
"(",
"app_id",
":",
"nil",
",",
"train",
":",
"nil",
",",
"build_number",
":",
"nil",
",",
"platform",
":",
"'ios'",
")",
"url",
"=",
"\"ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/testInformation\"",
... | rubocop:enable Metrics/ParameterLists | [
"rubocop",
":",
"enable",
"Metrics",
"/",
"ParameterLists"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1079-L1088 | train | Get build information for review | [
30522,
13366,
2131,
1035,
3857,
1035,
18558,
1035,
2005,
1035,
3319,
1006,
10439,
1035,
8909,
1024,
9152,
2140,
1010,
3345,
1024,
9152,
2140,
1010,
3857,
1035,
2193,
1024,
9152,
2140,
1010,
4132,
1024,
1005,
16380,
1005,
1007,
24471,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Interactions.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, hub_name, interaction_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, hub_name, interaction_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, hub_name, interaction_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, hub_name, interaction_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"hub_name",
",",
"interaction_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"interaction_na... | Creates an interaction or updates an existing interaction within a hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param interaction_name [String] The name of the interaction.
@param parameters [InteractionResourceFormat] Parameters supplied t... | [
"Creates",
"an",
"interaction",
"or",
"updates",
"an",
"existing",
"interaction",
"within",
"a",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb#L402-L404 | train | Creates or updates an interaction in the hub. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
8290,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appium/ruby_lib | lib/appium_lib/common/helper.rb | Appium.Common.px_to_window_rel | def px_to_window_rel(opts = {}, driver = $driver)
w = driver.window_size
x = opts.fetch :x, 0
y = opts.fetch :y, 0
OpenStruct.new(x: "#{x.to_f} / #{w.width.to_f}",
y: "#{y.to_f} / #{w.height.to_f}")
end | ruby | def px_to_window_rel(opts = {}, driver = $driver)
w = driver.window_size
x = opts.fetch :x, 0
y = opts.fetch :y, 0
OpenStruct.new(x: "#{x.to_f} / #{w.width.to_f}",
y: "#{y.to_f} / #{w.height.to_f}")
end | [
"def",
"px_to_window_rel",
"(",
"opts",
"=",
"{",
"}",
",",
"driver",
"=",
"$driver",
")",
"w",
"=",
"driver",
".",
"window_size",
"x",
"=",
"opts",
".",
"fetch",
":x",
",",
"0",
"y",
"=",
"opts",
".",
"fetch",
":y",
",",
"0",
"OpenStruct",
".",
... | Converts pixel values to window relative values
@example
px_to_window_rel x: 50, y: 150 #=> #<OpenStruct x="50.0 / 375.0", y="150.0 / 667.0"> | [
"Converts",
"pixel",
"values",
"to",
"window",
"relative",
"values"
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/helper.rb#L164-L171 | train | Convert window coordinates to relative coordinates | [
30522,
13366,
1052,
2595,
1035,
2000,
1035,
3332,
1035,
2128,
2140,
1006,
23569,
2015,
1027,
1063,
1065,
1010,
4062,
1027,
1002,
4062,
1007,
1059,
1027,
4062,
30524,
1012,
18584,
1024,
1060,
1010,
1014,
1061,
1027,
23569,
2015,
1012,
18584,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chef/ohai | lib/ohai/system.rb | Ohai.System.reset_system | def reset_system
@data = Mash.new
@provides_map = ProvidesMap.new
configure_ohai
configure_logging if @cli
@loader = Ohai::Loader.new(self)
@runner = Ohai::Runner.new(self, true)
Ohai::Hints.refresh_hints
# Remove the previously defined plugins
recursive_remove_... | ruby | def reset_system
@data = Mash.new
@provides_map = ProvidesMap.new
configure_ohai
configure_logging if @cli
@loader = Ohai::Loader.new(self)
@runner = Ohai::Runner.new(self, true)
Ohai::Hints.refresh_hints
# Remove the previously defined plugins
recursive_remove_... | [
"def",
"reset_system",
"@data",
"=",
"Mash",
".",
"new",
"@provides_map",
"=",
"ProvidesMap",
".",
"new",
"configure_ohai",
"configure_logging",
"if",
"@cli",
"@loader",
"=",
"Ohai",
"::",
"Loader",
".",
"new",
"(",
"self",
")",
"@runner",
"=",
"Ohai",
"::",... | the cli flag is used to determine if we're being constructed by
something like chef-client (which doesn't set this flag) and
which sets up its own loggers, or if we're coming from Ohai::Application
and therefore need to configure Ohai's own logger.
clears the current collected data, clears the provides map for plug... | [
"the",
"cli",
"flag",
"is",
"used",
"to",
"determine",
"if",
"we",
"re",
"being",
"constructed",
"by",
"something",
"like",
"chef",
"-",
"client",
"(",
"which",
"doesn",
"t",
"set",
"this",
"flag",
")",
"and",
"which",
"sets",
"up",
"its",
"own",
"logg... | 8d66449940f04237586b2f928231c6b26e2cc19a | https://github.com/chef/ohai/blob/8d66449940f04237586b2f928231c6b26e2cc19a/lib/ohai/system.rb#L62-L76 | train | Reset the system object | [
30522,
13366,
25141,
1035,
2291,
1030,
2951,
1027,
16137,
2232,
1012,
2047,
1030,
3640,
1035,
4949,
1027,
3640,
2863,
2361,
1012,
2047,
9530,
8873,
27390,
2063,
1035,
2821,
4886,
9530,
8873,
27390,
2063,
1035,
15899,
2065,
1030,
18856,
2072... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachineScaleSetVMs.begin_reimage_all_with_http_info | def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
end | ruby | def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
end | [
"def",
"begin_reimage_all_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"instance_id",
",",
"custom_headers",
":",
"nil",
")",
"begin_reimage_all_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"instance_id",
",",
"custom_hea... | Allows you to re-image all the disks ( including data disks ) in the a VM
scale set instance. This operation is only supported for managed disks.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param instance_id [String] The insta... | [
"Allows",
"you",
"to",
"re",
"-",
"image",
"all",
"the",
"disks",
"(",
"including",
"data",
"disks",
")",
"in",
"the",
"a",
"VM",
"scale",
"set",
"instance",
".",
"This",
"operation",
"is",
"only",
"supported",
"for",
"managed",
"disks",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L898-L900 | train | Reimage all virtual machines in a VM scale set. | [
30522,
13366,
4088,
1035,
24964,
26860,
1035,
2035,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
6013,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/channel.rb | Discordrb.Channel.remove_recipient | def remove_recipient(recipient)
raise 'Tried to remove recipient from a non-group channel' unless group?
raise ArgumentError, 'Tried to remove a non-recipient from a group' unless recipient.is_a?(Recipient)
@recipients.delete(recipient)
end | ruby | def remove_recipient(recipient)
raise 'Tried to remove recipient from a non-group channel' unless group?
raise ArgumentError, 'Tried to remove a non-recipient from a group' unless recipient.is_a?(Recipient)
@recipients.delete(recipient)
end | [
"def",
"remove_recipient",
"(",
"recipient",
")",
"raise",
"'Tried to remove recipient from a non-group channel'",
"unless",
"group?",
"raise",
"ArgumentError",
",",
"'Tried to remove a non-recipient from a group'",
"unless",
"recipient",
".",
"is_a?",
"(",
"Recipient",
")",
... | Removes a recipient from a group channel.
@param recipient [Recipient] the recipient to remove from the group
@raise [ArgumentError] if tried to remove a non-recipient
@note For internal use only
@!visibility private | [
"Removes",
"a",
"recipient",
"from",
"a",
"group",
"channel",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L740-L745 | train | Remove a recipient from this channel | [
30522,
13366,
6366,
1035,
7799,
1006,
7799,
1007,
5333,
1005,
2699,
2000,
6366,
7799,
2013,
1037,
2512,
1011,
2177,
3149,
1005,
4983,
2177,
1029,
5333,
6685,
2121,
29165,
1010,
1005,
2699,
2000,
6366,
1037,
2512,
1011,
7799,
2013,
1037,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.delete_certificate_operation | def delete_certificate_operation(vault_base_url, certificate_name, custom_headers:nil)
response = delete_certificate_operation_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_certificate_operation(vault_base_url, certificate_name, custom_headers:nil)
response = delete_certificate_operation_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_certificate_operation",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_certificate_operation_async",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":custom_headers",
")... | Deletes the creation operation for a specific certificate.
Deletes the creation operation for a specified certificate that is in the
process of being created. The certificate is no longer created. This
operation requires the certificates/update permission.
@param vault_base_url [String] The vault name, for exampl... | [
"Deletes",
"the",
"creation",
"operation",
"for",
"a",
"specific",
"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#L6279-L6282 | train | Deletes the specified certificate operation. | [
30522,
13366,
3972,
12870,
1035,
8196,
1035,
3169,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
8196,
1035,
3169,
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... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/deployment_plan/assembler.rb | Bosh::Director.DeploymentPlan::Assembler.bind_jobs | def bind_jobs
@deployment_plan.releases.each do |release|
release.bind_jobs
end
@deployment_plan.instance_groups.each(&:validate_package_names_do_not_collide!)
@deployment_plan.instance_groups.each(&:validate_exported_from_matches_stemcell!)
end | ruby | def bind_jobs
@deployment_plan.releases.each do |release|
release.bind_jobs
end
@deployment_plan.instance_groups.each(&:validate_package_names_do_not_collide!)
@deployment_plan.instance_groups.each(&:validate_exported_from_matches_stemcell!)
end | [
"def",
"bind_jobs",
"@deployment_plan",
".",
"releases",
".",
"each",
"do",
"|",
"release",
"|",
"release",
".",
"bind_jobs",
"end",
"@deployment_plan",
".",
"instance_groups",
".",
"each",
"(",
":validate_package_names_do_not_collide!",
")",
"@deployment_plan",
".",
... | Binds template models for each release spec in the deployment plan
@return [void] | [
"Binds",
"template",
"models",
"for",
"each",
"release",
"spec",
"in",
"the",
"deployment",
"plan"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/deployment_plan/assembler.rb#L190-L197 | train | Bind jobs to the resources in the deployment plan. | [
30522,
13366,
14187,
1035,
5841,
1030,
10813,
1035,
2933,
1012,
7085,
1012,
2169,
2079,
1064,
2713,
1064,
2713,
1012,
14187,
1035,
5841,
2203,
1030,
10813,
1035,
2933,
1012,
6013,
1035,
2967,
1012,
2169,
1006,
1004,
1024,
9398,
3686,
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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Tag.detach_from_api_with_http_info | def detach_from_api_with_http_info(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:nil)
detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:custom_headers).value!
end | ruby | def detach_from_api_with_http_info(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:nil)
detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:custom_headers).value!
end | [
"def",
"detach_from_api_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",",
"tag_id",
",",
"if_match",
",",
"custom_headers",
":",
"nil",
")",
"detach_from_api_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",... | Detach the tag from the Api.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param api_id [String] API revision identifier. Must be unique in the current
API Management service instance. Non-current revision has ;rev=n as a s... | [
"Detach",
"the",
"tag",
"from",
"the",
"Api",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb#L1231-L1233 | train | Detaches the specified image from the API. | [
30522,
13366,
20010,
6776,
1035,
2013,
1035,
17928,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17928,
1035,
8909,
1010,
6415,
1035,
8909,
1010,
2065,
1035,
2674,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/channel.rb | Discordrb.Channel.update_from | def update_from(other)
@topic = other.topic
@name = other.name
@position = other.position
@topic = other.topic
@recipients = other.recipients
@bitrate = other.bitrate
@user_limit = other.user_limit
@permission_overwrites = other.permission_overwrites
@nsfw = other.n... | ruby | def update_from(other)
@topic = other.topic
@name = other.name
@position = other.position
@topic = other.topic
@recipients = other.recipients
@bitrate = other.bitrate
@user_limit = other.user_limit
@permission_overwrites = other.permission_overwrites
@nsfw = other.n... | [
"def",
"update_from",
"(",
"other",
")",
"@topic",
"=",
"other",
".",
"topic",
"@name",
"=",
"other",
".",
"name",
"@position",
"=",
"other",
".",
"position",
"@topic",
"=",
"other",
".",
"topic",
"@recipients",
"=",
"other",
".",
"recipients",
"@bitrate",... | Updates the cached data from another channel.
@note For internal use only
@!visibility private | [
"Updates",
"the",
"cached",
"data",
"from",
"another",
"channel",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L491-L503 | train | Update the object from another object | [
30522,
13366,
10651,
1035,
2013,
1006,
2060,
1007,
1030,
8476,
1027,
2060,
1012,
8476,
1030,
2171,
1027,
2060,
1012,
2171,
1030,
2597,
1027,
2060,
1012,
2597,
1030,
8476,
1027,
2060,
1012,
8476,
1030,
15991,
1027,
2060,
1012,
15991,
1030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cucumber/aruba | lib/aruba/initializer.rb | Aruba.Initializer.call | def call(test_framework)
begin
initializers.find { |i| i.match? test_framework }.start [], {}
rescue ArgumentError => e
$stderr.puts e.message
exit 0
end
Initializers::CommonInitializer.start [], {}
end | ruby | def call(test_framework)
begin
initializers.find { |i| i.match? test_framework }.start [], {}
rescue ArgumentError => e
$stderr.puts e.message
exit 0
end
Initializers::CommonInitializer.start [], {}
end | [
"def",
"call",
"(",
"test_framework",
")",
"begin",
"initializers",
".",
"find",
"{",
"|",
"i",
"|",
"i",
".",
"match?",
"test_framework",
"}",
".",
"start",
"[",
"]",
",",
"{",
"}",
"rescue",
"ArgumentError",
"=>",
"e",
"$stderr",
".",
"puts",
"e",
... | Create files etc. | [
"Create",
"files",
"etc",
"."
] | add17615322f575588aef1fccce875396cdf36e9 | https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/initializer.rb#L201-L210 | train | Calls the initializers for the given test framework. | [
30522,
13366,
2655,
1006,
3231,
1035,
7705,
1007,
4088,
3988,
17629,
2015,
1012,
2424,
1063,
1064,
1045,
1064,
1045,
1012,
2674,
1029,
3231,
1035,
7705,
1065,
1012,
2707,
1031,
1033,
1010,
1063,
1065,
5343,
6685,
2121,
29165,
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... |
jekyll/jekyll | lib/jekyll/renderer.rb | Jekyll.Renderer.assign_pages! | def assign_pages!
payload["page"] = document.to_liquid
payload["paginator"] = (document.pager.to_liquid if document.respond_to?(:pager))
end | ruby | def assign_pages!
payload["page"] = document.to_liquid
payload["paginator"] = (document.pager.to_liquid if document.respond_to?(:pager))
end | [
"def",
"assign_pages!",
"payload",
"[",
"\"page\"",
"]",
"=",
"document",
".",
"to_liquid",
"payload",
"[",
"\"paginator\"",
"]",
"=",
"(",
"document",
".",
"pager",
".",
"to_liquid",
"if",
"document",
".",
"respond_to?",
"(",
":pager",
")",
")",
"end"
] | Set page content to payload and assign pager if document has one.
Returns nothing | [
"Set",
"page",
"content",
"to",
"payload",
"and",
"assign",
"pager",
"if",
"document",
"has",
"one",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/renderer.rb#L216-L219 | train | Assign pages to the payload | [
30522,
13366,
23911,
1035,
5530,
999,
18093,
1031,
1000,
3931,
1000,
1033,
1027,
6254,
1012,
2000,
1035,
6381,
18093,
1031,
1000,
6643,
20876,
4263,
1000,
1033,
1027,
1006,
6254,
1012,
3931,
2099,
1012,
2000,
1035,
6381,
2065,
6254,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_lifecycle.rb | Aws::S3.BucketLifecycle.delete | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_lifecycle(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_lifecycle(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
")",
"resp",
"=",
"@client",
".",
"delete_bucket_lifecycle",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
bucket_lifecycle.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_lifecycle.rb#L176-L180 | train | Delete the lifecycle of this bucket | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
13610,
1035,
2166,
23490,
1006,
7047,
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... |
decidim/decidim | decidim-core/lib/decidim/participatory_space_manifest.rb | Decidim.ParticipatorySpaceManifest.context | def context(name = :public, &block)
name = name.to_sym
@contexts ||= {}
if block
context = ParticipatorySpaceContextManifest.new
context.instance_eval(&block)
@contexts[name] = context
end
@contexts.fetch(name)
end | ruby | def context(name = :public, &block)
name = name.to_sym
@contexts ||= {}
if block
context = ParticipatorySpaceContextManifest.new
context.instance_eval(&block)
@contexts[name] = context
end
@contexts.fetch(name)
end | [
"def",
"context",
"(",
"name",
"=",
":public",
",",
"&",
"block",
")",
"name",
"=",
"name",
".",
"to_sym",
"@contexts",
"||=",
"{",
"}",
"if",
"block",
"context",
"=",
"ParticipatorySpaceContextManifest",
".",
"new",
"context",
".",
"instance_eval",
"(",
"... | A context used to set the layout and behavior of a participatory space. Full documentation can
be found looking at the `ParticipatorySpaceContextManifest` class.
Example:
context(:public) do |context|
context.layout "layouts/decidim/some_layout"
end
context(:public).layout
# => "layouts/... | [
"A",
"context",
"used",
"to",
"set",
"the",
"layout",
"and",
"behavior",
"of",
"a",
"participatory",
"space",
".",
"Full",
"documentation",
"can",
"be",
"found",
"looking",
"at",
"the",
"ParticipatorySpaceContextManifest",
"class",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/participatory_space_manifest.rb#L62-L73 | train | Returns the context for the given name. | [
30522,
13366,
6123,
1006,
2171,
1027,
1024,
2270,
1010,
1004,
3796,
1007,
2171,
1027,
2171,
1012,
2000,
1035,
25353,
2213,
1030,
18046,
1064,
1064,
1027,
1063,
1065,
2065,
3796,
6123,
1027,
2112,
28775,
4502,
7062,
23058,
8663,
18209,
20799... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.work | def work(argv)
@options = DEFAULT_OPTIONS.dup
parser.parse!(argv)
return show("OneGadget Version #{OneGadget::VERSION}") if @options[:version]
return info_build_id(@options[:info]) if @options[:info]
libc_file = argv.pop
build_id = @options[:build_id]
level = @options[:level]
... | ruby | def work(argv)
@options = DEFAULT_OPTIONS.dup
parser.parse!(argv)
return show("OneGadget Version #{OneGadget::VERSION}") if @options[:version]
return info_build_id(@options[:info]) if @options[:info]
libc_file = argv.pop
build_id = @options[:build_id]
level = @options[:level]
... | [
"def",
"work",
"(",
"argv",
")",
"@options",
"=",
"DEFAULT_OPTIONS",
".",
"dup",
"parser",
".",
"parse!",
"(",
"argv",
")",
"return",
"show",
"(",
"\"OneGadget Version #{OneGadget::VERSION}\"",
")",
"if",
"@options",
"[",
":version",
"]",
"return",
"info_build_i... | Main method of CLI.
@param [Array<String>] argv
Command line arguments.
@return [Boolean]
Whether the command execute successfully.
@example
CLI.work(%w[--help])
# usage message
#=> true
CLI.work(%w[--version])
# version message
#=> true
@example
CLI.work([])
# usage message
#=> fal... | [
"Main",
"method",
"of",
"CLI",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L39-L57 | train | This method is called by the command - line interface. | [
30522,
13366,
2147,
1006,
12098,
2290,
2615,
1007,
1030,
7047,
1027,
12398,
1035,
7047,
1012,
4241,
2361,
11968,
8043,
1012,
11968,
3366,
999,
1006,
12098,
2290,
2615,
1007,
2709,
2265,
1006,
1000,
2028,
3654,
24291,
2544,
1001,
1063,
2028,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
boazsegev/combine_pdf | lib/combine_pdf/renderer.rb | CombinePDF.Renderer.create_deep_copy | def create_deep_copy(object)
if object.is_a?(Array)
return object.map { |e| create_deep_copy e }
elsif object.is_a?(Hash)
return {}.tap { |out| object.each { |k, v| out[create_deep_copy(k)] = create_deep_copy(v) unless k == :Parent } }
elsif object.is_a?(String)
return object.d... | ruby | def create_deep_copy(object)
if object.is_a?(Array)
return object.map { |e| create_deep_copy e }
elsif object.is_a?(Hash)
return {}.tap { |out| object.each { |k, v| out[create_deep_copy(k)] = create_deep_copy(v) unless k == :Parent } }
elsif object.is_a?(String)
return object.d... | [
"def",
"create_deep_copy",
"(",
"object",
")",
"if",
"object",
".",
"is_a?",
"(",
"Array",
")",
"return",
"object",
".",
"map",
"{",
"|",
"e",
"|",
"create_deep_copy",
"e",
"}",
"elsif",
"object",
".",
"is_a?",
"(",
"Hash",
")",
"return",
"{",
"}",
"... | Ruby normally assigns pointes.
noramlly:
a = [1,2,3] # => [1,2,3]
b = a # => [1,2,3]
a << 4 # => [1,2,3,4]
b # => [1,2,3,4]
This method makes sure that the memory is copied instead of a pointer assigned.
this works using recursion, so that arrays and hashes within arrays and hashes are also copied and no... | [
"Ruby",
"normally",
"assigns",
"pointes",
".",
"noramlly",
":",
"a",
"=",
"[",
"1",
"2",
"3",
"]",
"#",
"=",
">",
"[",
"1",
"2",
"3",
"]",
"b",
"=",
"a",
"#",
"=",
">",
"[",
"1",
"2",
"3",
"]",
"a",
"<<",
"4",
"#",
"=",
">",
"[",
"1",
... | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/renderer.rb#L156-L166 | train | Create a deep copy of the given object. | [
30522,
13366,
3443,
1035,
2784,
1035,
6100,
1006,
4874,
1007,
2065,
4874,
1012,
2003,
1035,
1037,
1029,
1006,
9140,
1007,
2709,
4874,
1012,
4949,
1063,
1064,
1041,
1064,
3443,
1035,
2784,
1035,
6100,
1041,
1065,
3449,
5332,
2546,
4874,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.resend_request_emails | def resend_request_emails(resource_group_name, certificate_order_name, name_identifier, custom_headers:nil)
response = resend_request_emails_async(resource_group_name, certificate_order_name, name_identifier, custom_headers:custom_headers).value!
nil
end | ruby | def resend_request_emails(resource_group_name, certificate_order_name, name_identifier, custom_headers:nil)
response = resend_request_emails_async(resource_group_name, certificate_order_name, name_identifier, custom_headers:custom_headers).value!
nil
end | [
"def",
"resend_request_emails",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"name_identifier",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"resend_request_emails_async",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"name_i... | Verify domain ownership for this certificate order.
Verify domain ownership for this certificate order.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param certificate_order_name [String] Name of the certificate order.
@param name_identifier [NameIdentifier] Email... | [
"Verify",
"domain",
"ownership",
"for",
"this",
"certificate",
"order",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L1498-L1501 | train | Resend the emails for a certificate order. | [
30522,
13366,
24501,
10497,
1035,
5227,
1035,
22028,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8196,
1035,
2344,
1035,
2171,
1010,
2171,
1035,
8909,
4765,
18095,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
24501,
1049... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.BuildTasks.update | def update(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_task_name",
",",
"build_task_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_task_na... | Updates a build task 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 build_task_name [String] The name of the container registry build
task.
@param b... | [
"Updates",
"a",
"build",
"task",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb#L350-L353 | train | Updates a build task. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
4708,
1035,
2171,
1010,
3857,
1035,
4708,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/additional_recipient_receivable_refund.rb | SquareConnect.AdditionalRecipientReceivableRefund.receivable_id= | def receivable_id=(receivable_id)
if receivable_id.nil?
fail ArgumentError, "receivable_id cannot be nil"
end
if receivable_id.to_s.length < 1
fail ArgumentError, "invalid value for 'receivable_id', the character length must be great than or equal to 1."
end
@receivable_i... | ruby | def receivable_id=(receivable_id)
if receivable_id.nil?
fail ArgumentError, "receivable_id cannot be nil"
end
if receivable_id.to_s.length < 1
fail ArgumentError, "invalid value for 'receivable_id', the character length must be great than or equal to 1."
end
@receivable_i... | [
"def",
"receivable_id",
"=",
"(",
"receivable_id",
")",
"if",
"receivable_id",
".",
"nil?",
"fail",
"ArgumentError",
",",
"\"receivable_id cannot be nil\"",
"end",
"if",
"receivable_id",
".",
"to_s",
".",
"length",
"<",
"1",
"fail",
"ArgumentError",
",",
"\"invali... | Custom attribute writer method with validation
@param [Object] receivable_id Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/additional_recipient_receivable_refund.rb#L166-L176 | train | Sets the receiver ID of the receiver. | [
30522,
13366,
28667,
7416,
12423,
1035,
8909,
1027,
1006,
28667,
7416,
12423,
1035,
8909,
1007,
2065,
28667,
7416,
12423,
1035,
8909,
1012,
9152,
2140,
1029,
8246,
6685,
2121,
29165,
1010,
1000,
28667,
7416,
12423,
1035,
8909,
3685,
2022,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/package.rb | Axlsx.Package.zip_entry_for_part | def zip_entry_for_part(part)
timestamp = Zip::DOSTime.at(@core.created.to_i)
Zip::Entry.new("", part[:entry], "", "", 0, 0, Zip::Entry::DEFLATED, 0, timestamp)
end | ruby | def zip_entry_for_part(part)
timestamp = Zip::DOSTime.at(@core.created.to_i)
Zip::Entry.new("", part[:entry], "", "", 0, 0, Zip::Entry::DEFLATED, 0, timestamp)
end | [
"def",
"zip_entry_for_part",
"(",
"part",
")",
"timestamp",
"=",
"Zip",
"::",
"DOSTime",
".",
"at",
"(",
"@core",
".",
"created",
".",
"to_i",
")",
"Zip",
"::",
"Entry",
".",
"new",
"(",
"\"\"",
",",
"part",
"[",
":entry",
"]",
",",
"\"\"",
",",
"\... | Generate a Entry for the given package part.
The important part here is to explicitly set the timestamp for the zip entry: Serializing axlsx packages
with identical contents should result in identical zip files – however, the timestamp of a zip entry
defaults to the time of serialization and therefore the zip file c... | [
"Generate",
"a",
"Entry",
"for",
"the",
"given",
"package",
"part",
".",
"The",
"important",
"part",
"here",
"is",
"to",
"explicitly",
"set",
"the",
"timestamp",
"for",
"the",
"zip",
"entry",
":",
"Serializing",
"axlsx",
"packages",
"with",
"identical",
"con... | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L187-L190 | train | Returns the entry for a given part | [
30522,
13366,
14101,
1035,
4443,
1035,
2005,
1035,
2112,
1006,
2112,
1007,
2335,
15464,
2361,
1027,
14101,
1024,
1024,
9998,
7292,
1012,
2012,
1006,
1030,
4563,
1012,
2580,
1012,
2000,
1035,
1045,
1007,
14101,
1024,
1024,
4443,
1012,
2047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/factory.rb | Mongoid.Factory.from_db | def from_db(klass, attributes = nil, criteria = nil, selected_fields = nil)
if criteria
selected_fields ||= criteria.options[:fields]
end
type = (attributes || {})[TYPE]
if type.blank?
obj = klass.instantiate(attributes, selected_fields)
if criteria && criteria.associatio... | ruby | def from_db(klass, attributes = nil, criteria = nil, selected_fields = nil)
if criteria
selected_fields ||= criteria.options[:fields]
end
type = (attributes || {})[TYPE]
if type.blank?
obj = klass.instantiate(attributes, selected_fields)
if criteria && criteria.associatio... | [
"def",
"from_db",
"(",
"klass",
",",
"attributes",
"=",
"nil",
",",
"criteria",
"=",
"nil",
",",
"selected_fields",
"=",
"nil",
")",
"if",
"criteria",
"selected_fields",
"||=",
"criteria",
".",
"options",
"[",
":fields",
"]",
"end",
"type",
"=",
"(",
"at... | Builds a new +Document+ from the supplied attributes loaded from the
database.
If a criteria object is given, it is used in two ways:
1. If the criteria has a list of fields specified via #only,
only those fields are populated in the returned document.
2. If the criteria has a referencing association (i.e., th... | [
"Builds",
"a",
"new",
"+",
"Document",
"+",
"from",
"the",
"supplied",
"attributes",
"loaded",
"from",
"the",
"database",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/factory.rb#L52-L80 | train | Instantiate a document from the database | [
30522,
13366,
2013,
1035,
16962,
1006,
1047,
27102,
1010,
12332,
1027,
9152,
2140,
1010,
9181,
1027,
9152,
2140,
1010,
3479,
1035,
4249,
1027,
9152,
2140,
1007,
2065,
9181,
3479,
1035,
4249,
1064,
1064,
1027,
9181,
1012,
7047,
1031,
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... |
fastlane/fastlane | match/lib/match/runner.rb | Match.Runner.prefixed_working_directory | def prefixed_working_directory(working_directory)
if self.storage_mode == "git"
return working_directory
elsif self.storage_mode == "google_cloud"
# We fall back to "*", which means certificates and profiles
# from all teams that use this bucket would be installed. This is not ideal,... | ruby | def prefixed_working_directory(working_directory)
if self.storage_mode == "git"
return working_directory
elsif self.storage_mode == "google_cloud"
# We fall back to "*", which means certificates and profiles
# from all teams that use this bucket would be installed. This is not ideal,... | [
"def",
"prefixed_working_directory",
"(",
"working_directory",
")",
"if",
"self",
".",
"storage_mode",
"==",
"\"git\"",
"return",
"working_directory",
"elsif",
"self",
".",
"storage_mode",
"==",
"\"google_cloud\"",
"# We fall back to \"*\", which means certificates and profiles... | Used when creating a new certificate or profile | [
"Used",
"when",
"creating",
"a",
"new",
"certificate",
"or",
"profile"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/match/lib/match/runner.rb#L127-L146 | train | Returns the path to the working directory that is prefixed with the current directory. | [
30522,
13366,
17576,
2098,
1035,
2551,
1035,
14176,
1006,
2551,
1035,
14176,
1007,
2065,
2969,
1012,
5527,
1035,
5549,
1027,
1027,
1000,
21025,
2102,
1000,
2709,
2551,
1035,
14176,
3449,
5332,
2546,
2969,
1012,
5527,
1035,
5549,
1027,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncGroups.cancel_sync_with_http_info | def cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value!
end | ruby | def cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value!
end | [
"def",
"cancel_sync_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"sync_group_name",
",",
"custom_headers",
":",
"nil",
")",
"cancel_sync_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"sy... | Cancels a sync group synchronization.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the databa... | [
"Cancels",
"a",
"sync",
"group",
"synchronization",
"."
] | 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#L436-L438 | train | Cancels a sync group. | [
30522,
13366,
17542,
1035,
26351,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
backup/backup | lib/backup/model.rb | Backup.Model.split_into_chunks_of | def split_into_chunks_of(chunk_size, suffix_length = 3)
if chunk_size.is_a?(Integer) && suffix_length.is_a?(Integer)
@splitter = Splitter.new(self, chunk_size, suffix_length)
else
raise Error, <<-EOS
Invalid arguments for #split_into_chunks_of()
+chunk_size+ (and optional... | ruby | def split_into_chunks_of(chunk_size, suffix_length = 3)
if chunk_size.is_a?(Integer) && suffix_length.is_a?(Integer)
@splitter = Splitter.new(self, chunk_size, suffix_length)
else
raise Error, <<-EOS
Invalid arguments for #split_into_chunks_of()
+chunk_size+ (and optional... | [
"def",
"split_into_chunks_of",
"(",
"chunk_size",
",",
"suffix_length",
"=",
"3",
")",
"if",
"chunk_size",
".",
"is_a?",
"(",
"Integer",
")",
"&&",
"suffix_length",
".",
"is_a?",
"(",
"Integer",
")",
"@splitter",
"=",
"Splitter",
".",
"new",
"(",
"self",
"... | Adds a Splitter to split the final backup package into multiple files.
+chunk_size+ is specified in MiB and must be given as an Integer.
+suffix_length+ controls the number of characters used in the suffix
(and the maximum number of chunks possible).
ie. 1 (-a, -b), 2 (-aa, -ab), 3 (-aaa, -aab) | [
"Adds",
"a",
"Splitter",
"to",
"split",
"the",
"final",
"backup",
"package",
"into",
"multiple",
"files",
"."
] | 64370f925e859f858766b674717a3dbee0de7a26 | https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/lib/backup/model.rb#L188-L197 | train | Split the image into chunks of + chunk_size + and + suffix_length +. | [
30522,
13366,
3975,
1035,
2046,
1035,
24839,
1035,
1997,
1006,
20000,
1035,
2946,
1010,
16809,
1035,
3091,
1027,
1017,
1007,
2065,
20000,
1035,
2946,
1012,
2003,
1035,
1037,
1029,
1006,
16109,
1007,
1004,
1004,
16809,
1035,
3091,
1012,
2003... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/field_list.rb | Mail.FieldList.insert_field | def insert_field(field)
lo, hi = 0, size
while lo < hi
mid = (lo + hi).div(2)
if field < self[mid]
hi = mid
else
lo = mid + 1
end
end
insert lo, field
end | ruby | def insert_field(field)
lo, hi = 0, size
while lo < hi
mid = (lo + hi).div(2)
if field < self[mid]
hi = mid
else
lo = mid + 1
end
end
insert lo, field
end | [
"def",
"insert_field",
"(",
"field",
")",
"lo",
",",
"hi",
"=",
"0",
",",
"size",
"while",
"lo",
"<",
"hi",
"mid",
"=",
"(",
"lo",
"+",
"hi",
")",
".",
"div",
"(",
"2",
")",
"if",
"field",
"<",
"self",
"[",
"mid",
"]",
"hi",
"=",
"mid",
"el... | Insert the field in sorted order.
Heavily based on bisect.insort from Python, which is:
Copyright (C) 2001-2013 Python Software Foundation.
Licensed under <http://docs.python.org/license.html>
From <http://hg.python.org/cpython/file/2.7/Lib/bisect.py> | [
"Insert",
"the",
"field",
"in",
"sorted",
"order",
"."
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/field_list.rb#L53-L65 | train | Insert a field into the array. | [
30522,
13366,
19274,
1035,
2492,
1006,
2492,
1007,
8840,
1010,
7632,
1027,
1014,
1010,
2946,
2096,
8840,
1026,
7632,
3054,
1027,
1006,
8840,
1009,
7632,
1007,
1012,
4487,
2615,
1006,
1016,
1007,
2065,
2492,
1026,
2969,
1031,
3054,
1033,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | frameit/lib/frameit/editor.rb | Frameit.Editor.font | def font(key)
single_font = fetch_config[key.to_s]['font']
return single_font if single_font
fonts = fetch_config[key.to_s]['fonts']
if fonts
fonts.each do |font|
if font['supported']
font['supported'].each do |language|
if screenshot.path.include?(la... | ruby | def font(key)
single_font = fetch_config[key.to_s]['font']
return single_font if single_font
fonts = fetch_config[key.to_s]['fonts']
if fonts
fonts.each do |font|
if font['supported']
font['supported'].each do |language|
if screenshot.path.include?(la... | [
"def",
"font",
"(",
"key",
")",
"single_font",
"=",
"fetch_config",
"[",
"key",
".",
"to_s",
"]",
"[",
"'font'",
"]",
"return",
"single_font",
"if",
"single_font",
"fonts",
"=",
"fetch_config",
"[",
"key",
".",
"to_s",
"]",
"[",
"'fonts'",
"]",
"if",
"... | The font we want to use | [
"The",
"font",
"we",
"want",
"to",
"use"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L538-L561 | train | Returns the font for the given key | [
30522,
13366,
15489,
1006,
3145,
1007,
2309,
1035,
15489,
1027,
18584,
1035,
9530,
8873,
2290,
1031,
3145,
1012,
2000,
1035,
1055,
1033,
1031,
1005,
15489,
1005,
1033,
2709,
2309,
1035,
15489,
2065,
2309,
1035,
15489,
15489,
2015,
1027,
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... |
piotrmurach/github | lib/github_api/client/repos/statuses.rb | Github.Client::Repos::Statuses.create | def create(*args)
arguments(args, required: [:user, :repo, :sha]) do
permit VALID_STATUS_PARAM_NAMES, recursive: false
assert_required REQUIRED_PARAMS
end
post_request("/repos/#{arguments.user}/#{arguments.repo}/statuses/#{arguments.sha}", arguments.params)
end | ruby | def create(*args)
arguments(args, required: [:user, :repo, :sha]) do
permit VALID_STATUS_PARAM_NAMES, recursive: false
assert_required REQUIRED_PARAMS
end
post_request("/repos/#{arguments.user}/#{arguments.repo}/statuses/#{arguments.sha}", arguments.params)
end | [
"def",
"create",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":sha",
"]",
")",
"do",
"permit",
"VALID_STATUS_PARAM_NAMES",
",",
"recursive",
":",
"false",
"assert_required",
"REQUIRED_PARAMS",
"end"... | Create a status
@param [Hash] params
@input params [String] :state
Required. The state of the status. Can be one of pending,
success, error, or failure.
@input params [String] :target_url
The target URL to associate with this status. This URL will
be linked from the GitHub UI to allow users to easily se... | [
"Create",
"a",
"status"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/statuses.rb#L82-L89 | train | Create a status | [
30522,
13366,
3443,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
21146,
1033,
1007,
2079,
9146,
9398,
1035,
3570,
1035,
11498,
2213,
1035,
3415,
1010,
28667... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lostisland/faraday | lib/faraday/autoload.rb | Faraday.AutoloadHelper.all_loaded_constants | def all_loaded_constants
constants
.map { |c| const_get(c) }
.select { |a| a.respond_to?(:loaded?) && a.loaded? }
end | ruby | def all_loaded_constants
constants
.map { |c| const_get(c) }
.select { |a| a.respond_to?(:loaded?) && a.loaded? }
end | [
"def",
"all_loaded_constants",
"constants",
".",
"map",
"{",
"|",
"c",
"|",
"const_get",
"(",
"c",
")",
"}",
".",
"select",
"{",
"|",
"a",
"|",
"a",
".",
"respond_to?",
"(",
":loaded?",
")",
"&&",
"a",
".",
"loaded?",
"}",
"end"
] | Filters the module's contents with those that have been already
autoloaded.
@return [Array<Class, Module>] | [
"Filters",
"the",
"module",
"s",
"contents",
"with",
"those",
"that",
"have",
"been",
"already",
"autoloaded",
"."
] | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/autoload.rb#L49-L53 | train | Returns all the constants that are loaded in the current context. | [
30522,
13366,
2035,
1035,
8209,
1035,
5377,
2015,
5377,
2015,
30524,
1065,
1012,
7276,
1063,
1064,
1037,
1064,
1037,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
8209,
1029,
1007,
1004,
1004,
1037,
1012,
8209,
1029,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
stripe/stripe-ruby | lib/stripe/stripe_object.rb | Stripe.StripeObject.initialize_from | def initialize_from(values, opts, partial = false)
@opts = Util.normalize_opts(opts)
# the `#send` is here so that we can keep this method private
@original_values = self.class.send(:deep_copy, values)
removed = partial ? Set.new : Set.new(@values.keys - values.keys)
added = Set.new(valu... | ruby | def initialize_from(values, opts, partial = false)
@opts = Util.normalize_opts(opts)
# the `#send` is here so that we can keep this method private
@original_values = self.class.send(:deep_copy, values)
removed = partial ? Set.new : Set.new(@values.keys - values.keys)
added = Set.new(valu... | [
"def",
"initialize_from",
"(",
"values",
",",
"opts",
",",
"partial",
"=",
"false",
")",
"@opts",
"=",
"Util",
".",
"normalize_opts",
"(",
"opts",
")",
"# the `#send` is here so that we can keep this method private",
"@original_values",
"=",
"self",
".",
"class",
".... | Re-initializes the object based on a hash of values (usually one that's
come back from an API call). Adds or removes value accessors as necessary
and updates the state of internal data.
Protected on purpose! Please do not expose.
==== Options
* +:values:+ Hash used to update accessors and values.
* +:opts:+ Op... | [
"Re",
"-",
"initializes",
"the",
"object",
"based",
"on",
"a",
"hash",
"of",
"values",
"(",
"usually",
"one",
"that",
"s",
"come",
"back",
"from",
"an",
"API",
"call",
")",
".",
"Adds",
"or",
"removes",
"value",
"accessors",
"as",
"necessary",
"and",
"... | 322a8c60be8a9b9ac8aad8857864680a32176935 | https://github.com/stripe/stripe-ruby/blob/322a8c60be8a9b9ac8aad8857864680a32176935/lib/stripe/stripe_object.rb#L413-L442 | train | Initialize the object from the given hash of values. | [
30522,
13366,
3988,
4697,
1035,
2013,
1006,
5300,
1010,
23569,
2015,
1010,
7704,
1027,
6270,
1007,
1030,
23569,
2015,
1027,
21183,
4014,
1012,
3671,
4697,
1035,
23569,
2015,
1006,
23569,
2015,
1007,
1001,
1996,
1036,
1001,
4604,
1036,
2003,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_logs | def list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil)
first_page = list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token... | ruby | def list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil)
first_page = list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token... | [
"def",
"list_logs",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"sync_group_name",
",",
"start_time",
",",
"end_time",
",",
"type",
",",
"continuation_token",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"... | Gets a collection of sync group logs.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the databa... | [
"Gets",
"a",
"collection",
"of",
"sync",
"group",
"logs",
"."
] | 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#L295-L298 | train | Gets all the logs for a sync group. | [
30522,
13366,
2862,
1035,
15664,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
2707,
1035,
2051,
1010,
2203,
1035,
2051,
1010,
2828,
1010,
13633,
1035,
19204,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_cluster_manifest | def get_cluster_manifest(timeout:60, custom_headers:nil)
response = get_cluster_manifest_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_cluster_manifest(timeout:60, custom_headers:nil)
response = get_cluster_manifest_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_cluster_manifest",
"(",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_cluster_manifest_async",
"(",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | Get the Service Fabric cluster manifest.
Get the Service Fabric cluster manifest. The cluster manifest contains
properties of the cluster that include different node types on the cluster,
security configurations, fault and upgrade domain topologies, etc.
These properties are specified as part of the ClusterConfig... | [
"Get",
"the",
"Service",
"Fabric",
"cluster",
"manifest",
"."
] | 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#L135-L138 | train | Gets the cluster manifest. | [
30522,
13366,
2131,
1035,
9324,
1035,
19676,
1006,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9324,
1035,
19676,
1035,
2004,
6038,
2278,
1006,
2051,
5833,
1024,
2051,
5833,
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.get_secret_with_http_info | def get_secret_with_http_info(vault_base_url, secret_name, secret_version, custom_headers:nil)
get_secret_async(vault_base_url, secret_name, secret_version, custom_headers:custom_headers).value!
end | ruby | def get_secret_with_http_info(vault_base_url, secret_name, secret_version, custom_headers:nil)
get_secret_async(vault_base_url, secret_name, secret_version, custom_headers:custom_headers).value!
end | [
"def",
"get_secret_with_http_info",
"(",
"vault_base_url",
",",
"secret_name",
",",
"secret_version",
",",
"custom_headers",
":",
"nil",
")",
"get_secret_async",
"(",
"vault_base_url",
",",
"secret_name",
",",
"secret_version",
",",
"custom_headers",
":custom_headers",
... | Get a specified secret from a given key vault.
The GET operation is applicable to any secret stored in Azure Key Vault. This
operation requires the secrets/get permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param secret_name [String] The name of the secre... | [
"Get",
"a",
"specified",
"secret",
"from",
"a",
"given",
"key",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L3067-L3069 | train | Gets the specified secret. | [
30522,
13366,
2131,
1035,
3595,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3595,
1035,
2171,
1010,
3595,
1035,
2544,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
3595,
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... |
commander-rb/commander | lib/commander/user_interaction.rb | Commander.UI.say_ok | def say_ok(*args)
args.each do |arg|
say HighLine.default_instance.color(arg, :green)
end
end | ruby | def say_ok(*args)
args.each do |arg|
say HighLine.default_instance.color(arg, :green)
end
end | [
"def",
"say_ok",
"(",
"*",
"args",
")",
"args",
".",
"each",
"do",
"|",
"arg",
"|",
"say",
"HighLine",
".",
"default_instance",
".",
"color",
"(",
"arg",
",",
":green",
")",
"end",
"end"
] | 'Say' something using the OK color (green).
=== Examples
say_ok 'Everything is fine'
say_ok 'It is ok', 'This is ok too' | [
"Say",
"something",
"using",
"the",
"OK",
"color",
"(",
"green",
")",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L67-L71 | train | Prints a message for all the arguments | [
30522,
13366,
2360,
1035,
7929,
1006,
1008,
12098,
5620,
1007,
12098,
5620,
1012,
2169,
2079,
1064,
12098,
2290,
1064,
2360,
2152,
4179,
1012,
12398,
1035,
6013,
1012,
3609,
1006,
12098,
2290,
1010,
1024,
2665,
1007,
2203,
2203,
102,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby2d/ruby2d | lib/ruby2d/window.rb | Ruby2D.Window.update_callback | def update_callback
@update_proc.call
# Accept and eval commands if in console mode
if @console
if STDIN.ready?
cmd = STDIN.gets
begin
res = eval(cmd, TOPLEVEL_BINDING)
STDOUT.puts "=> #{res.inspect}"
STDOUT.flush
rescue Syntax... | ruby | def update_callback
@update_proc.call
# Accept and eval commands if in console mode
if @console
if STDIN.ready?
cmd = STDIN.gets
begin
res = eval(cmd, TOPLEVEL_BINDING)
STDOUT.puts "=> #{res.inspect}"
STDOUT.flush
rescue Syntax... | [
"def",
"update_callback",
"@update_proc",
".",
"call",
"# Accept and eval commands if in console mode",
"if",
"@console",
"if",
"STDIN",
".",
"ready?",
"cmd",
"=",
"STDIN",
".",
"gets",
"begin",
"res",
"=",
"eval",
"(",
"cmd",
",",
"TOPLEVEL_BINDING",
")",
"STDOUT... | Update callback method, called by the native and web extentions | [
"Update",
"callback",
"method",
"called",
"by",
"the",
"native",
"and",
"web",
"extentions"
] | 43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4 | https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/window.rb#L367-L388 | train | Update the callback function | [
30522,
13366,
10651,
1035,
2655,
5963,
1030,
10651,
1035,
4013,
2278,
1012,
2655,
1001,
5138,
1998,
9345,
2140,
10954,
2065,
1999,
10122,
5549,
2065,
1030,
10122,
2065,
2358,
8718,
1012,
3201,
1029,
4642,
2094,
1027,
2358,
8718,
1012,
4152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/workbook.rb | Axlsx.Workbook.relationships | def relationships
r = Relationships.new
@worksheets.each do |sheet|
r << Relationship.new(sheet, WORKSHEET_R, WORKSHEET_PN % (r.size+1))
end
pivot_tables.each_with_index do |pivot_table, index|
r << Relationship.new(pivot_table.cache_definition, PIVOT_TABLE_CACHE_DEFINITION_R, PI... | ruby | def relationships
r = Relationships.new
@worksheets.each do |sheet|
r << Relationship.new(sheet, WORKSHEET_R, WORKSHEET_PN % (r.size+1))
end
pivot_tables.each_with_index do |pivot_table, index|
r << Relationship.new(pivot_table.cache_definition, PIVOT_TABLE_CACHE_DEFINITION_R, PI... | [
"def",
"relationships",
"r",
"=",
"Relationships",
".",
"new",
"@worksheets",
".",
"each",
"do",
"|",
"sheet",
"|",
"r",
"<<",
"Relationship",
".",
"new",
"(",
"sheet",
",",
"WORKSHEET_R",
",",
"WORKSHEET_PN",
"%",
"(",
"r",
".",
"size",
"+",
"1",
")",... | The workbook relationships. This is managed automatically by the workbook
@return [Relationships] | [
"The",
"workbook",
"relationships",
".",
"This",
"is",
"managed",
"automatically",
"by",
"the",
"workbook"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/workbook.rb#L301-L314 | train | Returns a new Relationship object for this object. | [
30522,
13366,
6550,
1054,
1027,
6550,
1012,
2047,
1030,
2573,
21030,
3215,
1012,
2169,
2079,
1064,
7123,
1064,
1054,
1026,
1026,
3276,
1012,
2047,
1006,
7123,
1010,
2573,
21030,
2102,
1035,
1054,
1010,
2573,
21030,
2102,
1035,
1052,
2078,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb | Azure::Batch::Mgmt::V2017_09_01.CertificateOperations.list_by_batch_account | def list_by_batch_account(resource_group_name, account_name, maxresults:nil, select:nil, filter:nil, custom_headers:nil)
first_page = list_by_batch_account_as_lazy(resource_group_name, account_name, maxresults:maxresults, select:select, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
... | ruby | def list_by_batch_account(resource_group_name, account_name, maxresults:nil, select:nil, filter:nil, custom_headers:nil)
first_page = list_by_batch_account_as_lazy(resource_group_name, account_name, maxresults:maxresults, select:select, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
... | [
"def",
"list_by_batch_account",
"(",
"resource_group_name",
",",
"account_name",
",",
"maxresults",
":",
"nil",
",",
"select",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_batch_account_as_lazy",
"(",
... | Lists all of the certificates in the specified account.
@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 maxresults [Integer] The maximum number of items to return in the
response.
@param select ... | [
"Lists",
"all",
"of",
"the",
"certificates",
"in",
"the",
"specified",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb#L43-L46 | train | Gets all the segmentation products in an account. | [
30522,
13366,
2862,
1035,
2011,
1035,
14108,
1035,
4070,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7276,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.create_images_from_data | def create_images_from_data(project_id, image_data, tag_ids:nil, custom_headers:nil)
response = create_images_from_data_async(project_id, image_data, tag_ids:tag_ids, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_images_from_data(project_id, image_data, tag_ids:nil, custom_headers:nil)
response = create_images_from_data_async(project_id, image_data, tag_ids:tag_ids, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_images_from_data",
"(",
"project_id",
",",
"image_data",
",",
"tag_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_images_from_data_async",
"(",
"project_id",
",",
"image_data",
",",
"tag_ids",
":tag_ids",
",",
"cu... | Add the provided images to the set of training images.
This API accepts body content as multipart/form-data and
application/octet-stream. When using multipart
multiple image files can be sent at once, with a maximum of 64 files
@param project_id The project id.
@param image_data Binary image data. Supported form... | [
"Add",
"the",
"provided",
"images",
"to",
"the",
"set",
"of",
"training",
"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#L1377-L1380 | train | Creates a list of images from the image data. | [
30522,
13366,
3443,
1035,
4871,
1035,
2013,
1035,
2951,
1006,
2622,
1035,
8909,
1010,
3746,
1035,
2951,
1010,
6415,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
4871,
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... |
sinatra/sinatra | lib/sinatra/base.rb | Sinatra.Base.invoke | def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
body res
end
nil # avoi... | ruby | def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
body res
end
nil # avoi... | [
"def",
"invoke",
"res",
"=",
"catch",
"(",
":halt",
")",
"{",
"yield",
"}",
"res",
"=",
"[",
"res",
"]",
"if",
"Integer",
"===",
"res",
"or",
"String",
"===",
"res",
"if",
"Array",
"===",
"res",
"and",
"Integer",
"===",
"res",
".",
"first",
"res",
... | Run the block with 'throw :halt' support and apply result to the response. | [
"Run",
"the",
"block",
"with",
"throw",
":",
"halt",
"support",
"and",
"apply",
"result",
"to",
"the",
"response",
"."
] | 1aa64f9858edc3f93cc8d46e26f724c1ae103b1c | https://github.com/sinatra/sinatra/blob/1aa64f9858edc3f93cc8d46e26f724c1ae103b1c/lib/sinatra/base.rb#L1075-L1088 | train | Invoke the block with the response tuple | [
30522,
13366,
1999,
6767,
3489,
24501,
1027,
4608,
1006,
1024,
9190,
1007,
1063,
10750,
1065,
24501,
1027,
1031,
24501,
1033,
2065,
16109,
1027,
1027,
1027,
24501,
2030,
5164,
1027,
1027,
1027,
24501,
2065,
9140,
1027,
1027,
1027,
24501,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_tag | def delete_tag(project_id, tag_id, custom_headers:nil)
response = delete_tag_async(project_id, tag_id, custom_headers:custom_headers).value!
nil
end | ruby | def delete_tag(project_id, tag_id, custom_headers:nil)
response = delete_tag_async(project_id, tag_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_tag",
"(",
"project_id",
",",
"tag_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_tag_async",
"(",
"project_id",
",",
"tag_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Delete a tag from the project.
@param project_id The project id.
@param tag_id Id of the tag to be deleted.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Delete",
"a",
"tag",
"from",
"the",
"project",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L4307-L4310 | train | Deletes a tag from the project. | [
30522,
13366,
3972,
12870,
1035,
6415,
1006,
2622,
1035,
8909,
1010,
6415,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
6415,
1035,
2004,
6038,
2278,
1006,
2622,
1035,
8909,
1010,
6415,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/logger_silence.rb | ActiveSupport.LoggerSilence.silence | def silence(temporary_level = Logger::ERROR)
if silencer
begin
old_local_level = local_level
self.local_level = temporary_level
yield self
ensure
self.local_level = old_local_level
end
else
yield self
end
... | ruby | def silence(temporary_level = Logger::ERROR)
if silencer
begin
old_local_level = local_level
self.local_level = temporary_level
yield self
ensure
self.local_level = old_local_level
end
else
yield self
end
... | [
"def",
"silence",
"(",
"temporary_level",
"=",
"Logger",
"::",
"ERROR",
")",
"if",
"silencer",
"begin",
"old_local_level",
"=",
"local_level",
"self",
".",
"local_level",
"=",
"temporary_level",
"yield",
"self",
"ensure",
"self",
".",
"local_level",
"=",
"old_lo... | Silences the logger for the duration of the block. | [
"Silences",
"the",
"logger",
"for",
"the",
"duration",
"of",
"the",
"block",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/logger_silence.rb#L30-L43 | train | silencer the current logger | [
30522,
13366,
4223,
1006,
5741,
1035,
2504,
1027,
8833,
4590,
1024,
1024,
7561,
1007,
2065,
4223,
2099,
4088,
2214,
1035,
2334,
1035,
2504,
1027,
2334,
1035,
2504,
2969,
1012,
2334,
1035,
2504,
1027,
5741,
1035,
2504,
10750,
2969,
5676,
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... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/job_runner.rb | Bosh::Director.JobRunner.setup_task_logging_for_db | def setup_task_logging_for_db
Config.event_log = EventLog::Log.new(TaskDBWriter.new(:event_output, @task.id))
Config.result = TaskDBWriter.new(:result_output, @task.id)
end | ruby | def setup_task_logging_for_db
Config.event_log = EventLog::Log.new(TaskDBWriter.new(:event_output, @task.id))
Config.result = TaskDBWriter.new(:result_output, @task.id)
end | [
"def",
"setup_task_logging_for_db",
"Config",
".",
"event_log",
"=",
"EventLog",
"::",
"Log",
".",
"new",
"(",
"TaskDBWriter",
".",
"new",
"(",
":event_output",
",",
"@task",
".",
"id",
")",
")",
"Config",
".",
"result",
"=",
"TaskDBWriter",
".",
"new",
"(... | Sets up job logging.
@return [void] | [
"Sets",
"up",
"job",
"logging",
"."
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/job_runner.rb#L72-L75 | train | Setup logging for the task | [
30522,
13366,
16437,
1035,
4708,
30524,
1007,
9530,
8873,
2290,
1012,
2765,
1027,
4708,
18939,
15994,
1012,
2047,
1006,
1024,
2765,
1035,
6434,
1010,
1030,
4708,
1012,
8909,
1007,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.update | def update(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:nil)
response = update_async(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:nil)
response = update_async(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"update_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
... | Update protection container mapping.
The operation to update protection container mapping.
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param mapping_name [String] Protection container mapping name.
@param update_input [UpdateProtectionContainerMa... | [
"Update",
"protection",
"container",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb#L335-L338 | train | Updates a protection container mapping. | [
30522,
13366,
10651,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
12375,
1035,
30524,
10651,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
1012,
2303,
4983,
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... |
jekyll/jekyll | lib/jekyll/frontmatter_defaults.rb | Jekyll.FrontmatterDefaults.valid_sets | def valid_sets
sets = @site.config["defaults"]
return [] unless sets.is_a?(Array)
sets.map do |set|
if valid?(set)
ensure_time!(update_deprecated_types(set))
else
Jekyll.logger.warn "Defaults:", "An invalid front-matter default set was found:"
Jekyll.logg... | ruby | def valid_sets
sets = @site.config["defaults"]
return [] unless sets.is_a?(Array)
sets.map do |set|
if valid?(set)
ensure_time!(update_deprecated_types(set))
else
Jekyll.logger.warn "Defaults:", "An invalid front-matter default set was found:"
Jekyll.logg... | [
"def",
"valid_sets",
"sets",
"=",
"@site",
".",
"config",
"[",
"\"defaults\"",
"]",
"return",
"[",
"]",
"unless",
"sets",
".",
"is_a?",
"(",
"Array",
")",
"sets",
".",
"map",
"do",
"|",
"set",
"|",
"if",
"valid?",
"(",
"set",
")",
"ensure_time!",
"("... | Returns a list of valid sets
This is not cached to allow plugins to modify the configuration
and have their changes take effect
Returns an array of hashes | [
"Returns",
"a",
"list",
"of",
"valid",
"sets"
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/frontmatter_defaults.rb#L218-L231 | train | Returns an array of valid front - matter defaults | [
30522,
13366,
9398,
1035,
4520,
4520,
1027,
1030,
2609,
1012,
9530,
8873,
2290,
1031,
1000,
12398,
2015,
1000,
1033,
2709,
1031,
1033,
4983,
4520,
1012,
2003,
1035,
1037,
1029,
1006,
9140,
1007,
4520,
1012,
4949,
2079,
1064,
2275,
1064,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.