repo stringclasses 237
values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1
value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237
values | url stringlengths 95 268 | partition stringclasses 1
value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fastlane/fastlane | supply/lib/supply/listing.rb | Supply.Listing.save | def save
@google_api.update_listing_for_language(language: language,
title: title,
short_description: short_description,
full_description: full_description,
... | ruby | def save
@google_api.update_listing_for_language(language: language,
title: title,
short_description: short_description,
full_description: full_description,
... | [
"def",
"save",
"@google_api",
".",
"update_listing_for_language",
"(",
"language",
":",
"language",
",",
"title",
":",
"title",
",",
"short_description",
":",
"short_description",
",",
"full_description",
":",
"full_description",
",",
"video",
":",
"video",
")",
"... | Initializes the listing to use the given api client, language, and fills it with the current listing if available
Updates the listing in the current edit | [
"Initializes",
"the",
"listing",
"to",
"use",
"the",
"given",
"api",
"client",
"language",
"and",
"fills",
"it",
"with",
"the",
"current",
"listing",
"if",
"available",
"Updates",
"the",
"listing",
"in",
"the",
"current",
"edit"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/listing.rb#L24-L30 | train | Save the
| [
30522,
13366,
3828,
1030,
8224,
1035,
17928,
1012,
10651,
1035,
10328,
1035,
2005,
1035,
2653,
1006,
2653,
1024,
2653,
1010,
2516,
1024,
2516,
1010,
2460,
1035,
6412,
1024,
2460,
1035,
6412,
1010,
2440,
1035,
6412,
1024,
2440,
1035,
6412,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/loggable.rb | Mongoid.Loggable.default_logger | def default_logger
logger = Logger.new($stdout)
logger.level = Mongoid::Config.log_level
logger
end | ruby | def default_logger
logger = Logger.new($stdout)
logger.level = Mongoid::Config.log_level
logger
end | [
"def",
"default_logger",
"logger",
"=",
"Logger",
".",
"new",
"(",
"$stdout",
")",
"logger",
".",
"level",
"=",
"Mongoid",
"::",
"Config",
".",
"log_level",
"logger",
"end"
] | Gets the default Mongoid logger - stdout.
@api private
@example Get the default logger.
Loggable.default_logger
@return [ Logger ] The default logger.
@since 3.0.0 | [
"Gets",
"the",
"default",
"Mongoid",
"logger",
"-",
"stdout",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/loggable.rb#L50-L54 | train | Returns a logger with the default level | [
30522,
13366,
12398,
1035,
8833,
4590,
8833,
4590,
1027,
8833,
4590,
1012,
2047,
1006,
1002,
2358,
26797,
2102,
1007,
8833,
4590,
1012,
2504,
1027,
12256,
3995,
3593,
1024,
1024,
9530,
8873,
2290,
1012,
8833,
1035,
2504,
8833,
4590,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/amendments_helper.rb | Decidim.AmendmentsHelper.emendation_field_value | def emendation_field_value(form, original, key)
return params[:amendment][:emendation_params][key] if params[:amendment].present?
present(form.object.send(original)).send(key)
end | ruby | def emendation_field_value(form, original, key)
return params[:amendment][:emendation_params][key] if params[:amendment].present?
present(form.object.send(original)).send(key)
end | [
"def",
"emendation_field_value",
"(",
"form",
",",
"original",
",",
"key",
")",
"return",
"params",
"[",
":amendment",
"]",
"[",
":emendation_params",
"]",
"[",
"key",
"]",
"if",
"params",
"[",
":amendment",
"]",
".",
"present?",
"present",
"(",
"form",
".... | Return the edited field value or presents the original attribute value in a form. | [
"Return",
"the",
"edited",
"field",
"value",
"or",
"presents",
"the",
"original",
"attribute",
"value",
"in",
"a",
"form",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/amendments_helper.rb#L116-L120 | train | Returns the value of the emendation field | [
30522,
13366,
7861,
10497,
3370,
1035,
2492,
1035,
3643,
1006,
2433,
1010,
2434,
1010,
3145,
1007,
2709,
11498,
5244,
1031,
1024,
7450,
1033,
1031,
1024,
7861,
10497,
3370,
1035,
11498,
5244,
1033,
1031,
3145,
1033,
2065,
11498,
5244,
30524... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_usages_with_http_info | def list_usages_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil)
list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_usages_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil)
list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_usages_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_usages_async",
"(",
"resource_group_name",
",",
"name",
",",
"filter",
":",
"filter",
",",
"custom_headers",
":cu... | Get global usage metrics of an App Service Environment.
Get global usage metrics of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param filter [String] Return only usages/metrics... | [
"Get",
"global",
"usage",
"metrics",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L2953-L2955 | train | Gets the list of all the available virtual network usages for a resource group. | [
30522,
13366,
2862,
1035,
8192,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
8192,
2015,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/itunes_transporter.rb | FastlaneCore.ItunesTransporter.load_password_for_transporter | def load_password_for_transporter
# 3 different sources for the password
# 1) ENV variable for application specific password
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`")
re... | ruby | def load_password_for_transporter
# 3 different sources for the password
# 1) ENV variable for application specific password
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`")
re... | [
"def",
"load_password_for_transporter",
"# 3 different sources for the password",
"# 1) ENV variable for application specific password",
"if",
"ENV",
"[",
"TWO_FACTOR_ENV_VARIABLE",
"]",
".",
"to_s",
".",
"length",
">",
"0",
"UI",
".",
"message",
"(",
"\"Fetching password for... | Returns the password to be used with the transporter | [
"Returns",
"the",
"password",
"to",
"be",
"used",
"with",
"the",
"transporter"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/itunes_transporter.rb#L457-L473 | train | load the password for the transporter | [
30522,
13366,
7170,
1035,
20786,
1035,
2005,
1035,
3665,
2121,
1001,
1017,
2367,
4216,
30524,
2005,
3665,
2121,
2013,
4044,
8023,
2315,
1036,
1001,
1063,
2048,
1035,
5387,
1035,
4372,
2615,
1035,
8023,
1065,
1036,
1000,
1007,
2709,
4372,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/racc | lib/racc/state.rb | Racc.States.walk_graph | def walk_graph(bitmap, graph)
index = Array.new(graph.size, nil)
traversed = Set.new
graph.nodes do |node|
next if traversed.include?(node)
traverse(node, traversed, index, [], bitmap, graph)
end
end | ruby | def walk_graph(bitmap, graph)
index = Array.new(graph.size, nil)
traversed = Set.new
graph.nodes do |node|
next if traversed.include?(node)
traverse(node, traversed, index, [], bitmap, graph)
end
end | [
"def",
"walk_graph",
"(",
"bitmap",
",",
"graph",
")",
"index",
"=",
"Array",
".",
"new",
"(",
"graph",
".",
"size",
",",
"nil",
")",
"traversed",
"=",
"Set",
".",
"new",
"graph",
".",
"nodes",
"do",
"|",
"node",
"|",
"next",
"if",
"traversed",
"."... | traverse a directed graph
each entry in 'bitmap' corresponds to a graph node
after the traversal, the bitmap for each node will be the union of its
original value, and ALL the values for all the nodes which are reachable
from it | [
"traverse",
"a",
"directed",
"graph",
"each",
"entry",
"in",
"bitmap",
"corresponds",
"to",
"a",
"graph",
"node",
"after",
"the",
"traversal",
"the",
"bitmap",
"for",
"each",
"node",
"will",
"be",
"the",
"union",
"of",
"its",
"original",
"value",
"and",
"A... | d3244edfa11dd6e86e43f570c6444d41c7e3552a | https://github.com/ruby/racc/blob/d3244edfa11dd6e86e43f570c6444d41c7e3552a/lib/racc/state.rb#L221-L229 | train | Walks the graph and returns the index of the first node in the graph. | [
30522,
13366,
3328,
1035,
10629,
1006,
2978,
2863,
2361,
1010,
10629,
1007,
5950,
1027,
9140,
1012,
2047,
1006,
10629,
1012,
2946,
1010,
9152,
2140,
1007,
27797,
1027,
2275,
1012,
2047,
10629,
1012,
14164,
2079,
1064,
13045,
1064,
2279,
206... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
deivid-rodriguez/pry-byebug | lib/byebug/processors/pry_processor.rb | Byebug.PryProcessor.resume_pry | def resume_pry
new_binding = frame._binding
run do
if defined?(@pry) && @pry
@pry.repl(new_binding)
else
@pry = Pry.start_without_pry_byebug(new_binding)
end
end
end | ruby | def resume_pry
new_binding = frame._binding
run do
if defined?(@pry) && @pry
@pry.repl(new_binding)
else
@pry = Pry.start_without_pry_byebug(new_binding)
end
end
end | [
"def",
"resume_pry",
"new_binding",
"=",
"frame",
".",
"_binding",
"run",
"do",
"if",
"defined?",
"(",
"@pry",
")",
"&&",
"@pry",
"@pry",
".",
"repl",
"(",
"new_binding",
")",
"else",
"@pry",
"=",
"Pry",
".",
"start_without_pry_byebug",
"(",
"new_binding",
... | Resume an existing Pry REPL at the paused point. | [
"Resume",
"an",
"existing",
"Pry",
"REPL",
"at",
"the",
"paused",
"point",
"."
] | d2923e7a1629c2b860a4ea66a71dec09a4a15763 | https://github.com/deivid-rodriguez/pry-byebug/blob/d2923e7a1629c2b860a4ea66a71dec09a4a15763/lib/byebug/processors/pry_processor.rb#L110-L120 | train | Resumes the pry
and the pry byebug. | [
30522,
13366,
13746,
1035,
29198,
2047,
1035,
8031,
1027,
4853,
1012,
1035,
8031,
2448,
2079,
2065,
4225,
1029,
1006,
1030,
29198,
1007,
1004,
1004,
1030,
29198,
1030,
29198,
1012,
16360,
2140,
1006,
2047,
1035,
8031,
1007,
2842,
1030,
2919... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
roo-rb/roo | lib/roo/open_office.rb | Roo.OpenOffice.celltype | def celltype(row, col, sheet = nil)
sheet ||= default_sheet
read_cells(sheet)
row, col = normalize(row, col)
@formula[sheet][[row, col]] ? :formula : @cell_type[sheet][[row, col]]
end | ruby | def celltype(row, col, sheet = nil)
sheet ||= default_sheet
read_cells(sheet)
row, col = normalize(row, col)
@formula[sheet][[row, col]] ? :formula : @cell_type[sheet][[row, col]]
end | [
"def",
"celltype",
"(",
"row",
",",
"col",
",",
"sheet",
"=",
"nil",
")",
"sheet",
"||=",
"default_sheet",
"read_cells",
"(",
"sheet",
")",
"row",
",",
"col",
"=",
"normalize",
"(",
"row",
",",
"col",
")",
"@formula",
"[",
"sheet",
"]",
"[",
"[",
"... | returns the type of a cell:
* :float
* :string
* :date
* :percentage
* :formula
* :time
* :datetime | [
"returns",
"the",
"type",
"of",
"a",
"cell",
":",
"*",
":",
"float",
"*",
":",
"string",
"*",
":",
"date",
"*",
":",
"percentage",
"*",
":",
"formula",
"*",
":",
"time",
"*",
":",
"datetime"
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/open_office.rb#L150-L155 | train | Returns the cell type for a cell | [
30522,
13366,
3526,
13874,
1006,
5216,
1010,
8902,
1010,
7123,
1027,
9152,
2140,
1007,
7123,
1064,
1064,
1027,
12398,
1035,
7123,
3191,
1035,
4442,
1006,
7123,
1007,
5216,
1010,
8902,
1027,
3671,
4697,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | lib/wings/models/concerns/collection_behavior.rb | Wings.CollectionBehavior.add_collections_and_works | def add_collections_and_works(new_member_ids, valkyrie: false)
### TODO: Change to do this through Valkyrie. Right now using existing AF method to get multi-membership check.
af_self = Wings::ActiveFedoraConverter.new(resource: self).convert
af_ids = valkyrie ? Wings::IdConverterService.convert_to_ac... | ruby | def add_collections_and_works(new_member_ids, valkyrie: false)
### TODO: Change to do this through Valkyrie. Right now using existing AF method to get multi-membership check.
af_self = Wings::ActiveFedoraConverter.new(resource: self).convert
af_ids = valkyrie ? Wings::IdConverterService.convert_to_ac... | [
"def",
"add_collections_and_works",
"(",
"new_member_ids",
",",
"valkyrie",
":",
"false",
")",
"### TODO: Change to do this through Valkyrie. Right now using existing AF method to get multi-membership check.",
"af_self",
"=",
"Wings",
"::",
"ActiveFedoraConverter",
".",
"new",
"("... | Add member objects by adding this collection to the objects' member_of_collection association.
@param [Enumerable<String> | Enumerable<Valkyrie::ID] the ids of the new child collections and works collection ids | [
"Add",
"member",
"objects",
"by",
"adding",
"this",
"collection",
"to",
"the",
"objects",
"member_of_collection",
"association",
"."
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/lib/wings/models/concerns/collection_behavior.rb#L14-L19 | train | Add a list of member objects to the collection | [
30522,
13366,
5587,
1035,
6407,
1035,
1998,
1035,
2573,
1006,
2047,
1035,
2266,
1035,
8909,
2015,
1010,
26696,
1024,
6270,
1007,
1001,
1001,
1001,
28681,
2080,
1024,
2689,
2000,
2079,
2023,
2083,
26696,
1012,
2157,
2085,
2478,
4493,
21358,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/box.rb | Vagrant.Box.automatic_update_check_allowed? | def automatic_update_check_allowed?
check_path = directory.join("box_update_check")
if check_path.exist?
last_check_span = Time.now.to_i - check_path.mtime.to_i
if last_check_span < BOX_UPDATE_CHECK_INTERVAL
@logger.info("box update check is under the interval threshold")
... | ruby | def automatic_update_check_allowed?
check_path = directory.join("box_update_check")
if check_path.exist?
last_check_span = Time.now.to_i - check_path.mtime.to_i
if last_check_span < BOX_UPDATE_CHECK_INTERVAL
@logger.info("box update check is under the interval threshold")
... | [
"def",
"automatic_update_check_allowed?",
"check_path",
"=",
"directory",
".",
"join",
"(",
"\"box_update_check\"",
")",
"if",
"check_path",
".",
"exist?",
"last_check_span",
"=",
"Time",
".",
"now",
".",
"to_i",
"-",
"check_path",
".",
"mtime",
".",
"to_i",
"if... | Check if a box update check is allowed. Uses a file
in the box data directory to track when the last auto
update check was performed and returns true if the
BOX_UPDATE_CHECK_INTERVAL has passed.
@return [Boolean] | [
"Check",
"if",
"a",
"box",
"update",
"check",
"is",
"allowed",
".",
"Uses",
"a",
"file",
"in",
"the",
"box",
"data",
"directory",
"to",
"track",
"when",
"the",
"last",
"auto",
"update",
"check",
"was",
"performed",
"and",
"returns",
"true",
"if",
"the",
... | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/box.rb#L181-L192 | train | check if box update check is allowed | [
30522,
13366,
6882,
1035,
10651,
1035,
4638,
1035,
3039,
1029,
4638,
1035,
4130,
1027,
14176,
1012,
3693,
1006,
1000,
3482,
1035,
10651,
1035,
4638,
1000,
1007,
2065,
4638,
1035,
4130,
1012,
4839,
1029,
2197,
1035,
4638,
1035,
8487,
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... |
rails/rails | actionpack/lib/action_controller/metal/rendering.rb | ActionController.Rendering._normalize_options | def _normalize_options(options)
_normalize_text(options)
if options[:html]
options[:html] = ERB::Util.html_escape(options[:html])
end
if options[:status]
options[:status] = Rack::Utils.status_code(options[:status])
end
super
end | ruby | def _normalize_options(options)
_normalize_text(options)
if options[:html]
options[:html] = ERB::Util.html_escape(options[:html])
end
if options[:status]
options[:status] = Rack::Utils.status_code(options[:status])
end
super
end | [
"def",
"_normalize_options",
"(",
"options",
")",
"_normalize_text",
"(",
"options",
")",
"if",
"options",
"[",
":html",
"]",
"options",
"[",
":html",
"]",
"=",
"ERB",
"::",
"Util",
".",
"html_escape",
"(",
"options",
"[",
":html",
"]",
")",
"end",
"if",... | Normalize both text and status options. | [
"Normalize",
"both",
"text",
"and",
"status",
"options",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/rendering.rb#L89-L101 | train | Normalize the options | [
30522,
13366,
1035,
3671,
4697,
1035,
7047,
1006,
7047,
1007,
1035,
3671,
4697,
1035,
3793,
1006,
7047,
1007,
2065,
7047,
1031,
1024,
16129,
1033,
7047,
1031,
1024,
16129,
1033,
1027,
9413,
2497,
1024,
1024,
21183,
4014,
1012,
16129,
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... |
tongueroo/ufo | lib/ufo/dsl.rb | Ufo.DSL.evaluate_template_definitions | def evaluate_template_definitions
source_code = IO.read(@template_definitions_path)
begin
instance_eval(source_code, @template_definitions_path)
rescue Exception => e
if e.class == SystemExit # allow exit to happen normally
raise
else
task_definition_error(e... | ruby | def evaluate_template_definitions
source_code = IO.read(@template_definitions_path)
begin
instance_eval(source_code, @template_definitions_path)
rescue Exception => e
if e.class == SystemExit # allow exit to happen normally
raise
else
task_definition_error(e... | [
"def",
"evaluate_template_definitions",
"source_code",
"=",
"IO",
".",
"read",
"(",
"@template_definitions_path",
")",
"begin",
"instance_eval",
"(",
"source_code",
",",
"@template_definitions_path",
")",
"rescue",
"Exception",
"=>",
"e",
"if",
"e",
".",
"class",
"=... | All we're doing at this point is saving blocks of code into memory
The instance_eval provides the task_definition and helper methods as they are part
of this class. | [
"All",
"we",
"re",
"doing",
"at",
"this",
"point",
"is",
"saving",
"blocks",
"of",
"code",
"into",
"memory",
"The",
"instance_eval",
"provides",
"the",
"task_definition",
"and",
"helper",
"methods",
"as",
"they",
"are",
"part",
"of",
"this",
"class",
"."
] | 16ac3dad28edcab2693c0e7d89a1971aca65b8f9 | https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/dsl.rb#L25-L38 | train | Evaluate the template definitions | [
30522,
13366,
16157,
1035,
23561,
1035,
15182,
3120,
1035,
3642,
1027,
22834,
1012,
3191,
1006,
1030,
23561,
1035,
15182,
1035,
4130,
1007,
4088,
6013,
1035,
9345,
2140,
1006,
3120,
1035,
3642,
1010,
1030,
23561,
1035,
15182,
1035,
4130,
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/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb | Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSetExtensions.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vmss_extension_name",
",",
"extension_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"vm_scale_set_... | The operation to create or update an extension.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set where the
extension should be create or updated.
@param vmss_extension_name [String] The name of the VM scale set extension.
@param ext... | [
"The",
"operation",
"to",
"create",
"or",
"update",
"an",
"extension",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb#L346-L348 | train | Creates or updates an extension. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
5244,
2015,
1035,
5331,
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... |
randym/axlsx | lib/axlsx/util/parser.rb | Axlsx.Parser.parse_float | def parse_float attr_name, xpath
v = parse_value xpath
v = v.to_f if v.respond_to?(:to_f)
send("#{attr_name}=", v)
end | ruby | def parse_float attr_name, xpath
v = parse_value xpath
v = v.to_f if v.respond_to?(:to_f)
send("#{attr_name}=", v)
end | [
"def",
"parse_float",
"attr_name",
",",
"xpath",
"v",
"=",
"parse_value",
"xpath",
"v",
"=",
"v",
".",
"to_f",
"if",
"v",
".",
"respond_to?",
"(",
":to_f",
")",
"send",
"(",
"\"#{attr_name}=\"",
",",
"v",
")",
"end"
] | parse, convert and assign node text to float | [
"parse",
"convert",
"and",
"assign",
"node",
"text",
"to",
"float"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/util/parser.rb#L30-L34 | train | Parse float value | [
30522,
13366,
11968,
3366,
1035,
14257,
2012,
16344,
1035,
2171,
1010,
26726,
8988,
1058,
1027,
11968,
3366,
1035,
3643,
26726,
8988,
1058,
1027,
1058,
1012,
2000,
1035,
1042,
2065,
1058,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.create_pattern_any_entity_role_with_http_info | def create_pattern_any_entity_role_with_http_info(app_id, version_id, entity_id, entity_role_create_object, custom_headers:nil)
create_pattern_any_entity_role_async(app_id, version_id, entity_id, entity_role_create_object, custom_headers:custom_headers).value!
end | ruby | def create_pattern_any_entity_role_with_http_info(app_id, version_id, entity_id, entity_role_create_object, custom_headers:nil)
create_pattern_any_entity_role_async(app_id, version_id, entity_id, entity_role_create_object, custom_headers:custom_headers).value!
end | [
"def",
"create_pattern_any_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"entity_role_create_object",
",",
"custom_headers",
":",
"nil",
")",
"create_pattern_any_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
... | Create a role for an Pattern.any entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity model ID.
@param entity_role_create_object [EntityRoleCreateObject] An entity role
object containing the name of role.
@param custom_he... | [
"Create",
"a",
"role",
"for",
"an",
"Pattern",
".",
"any",
"entity",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L7396-L7398 | train | Creates an entity role for a given entity in a version of the application. | [
30522,
13366,
3443,
1035,
5418,
1035,
2151,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
9178,
1035,
2535,
1035,
3443,
1035,
4874,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb | Azure::Search::Mgmt::V2015_08_19.Services.create_or_update | def create_or_update(resource_group_name, search_service_name, service, search_management_request_options:nil, custom_headers:nil)
response = create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options:search_management_request_options, custom_headers:custom_headers... | ruby | def create_or_update(resource_group_name, search_service_name, service, search_management_request_options:nil, custom_headers:nil)
response = create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options:search_management_request_options, custom_headers:custom_headers... | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"search_service_name",
",",
"service",
",",
"search_management_request_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"... | Creates or updates a Search service in the given resource group. If the
Search service already exists, all properties will be updated with the given
values.
@param resource_group_name [String] The name of the resource group within the
current subscription. You can obtain this value from the Azure Resource
Manager... | [
"Creates",
"or",
"updates",
"a",
"Search",
"service",
"in",
"the",
"given",
"resource",
"group",
".",
"If",
"the",
"Search",
"service",
"already",
"exists",
"all",
"properties",
"will",
"be",
"updated",
"with",
"the",
"given",
"values",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb#L48-L51 | train | Creates or updates a search service. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3945,
1035,
2326,
1035,
2171,
1010,
2326,
1010,
3945,
1035,
2968,
1035,
5227,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_keys | def get_keys(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_keys_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_keys(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_keys_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_keys",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_keys_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_headers",
")",
"fir... | List keys in the specified vault.
Retrieves a list of the keys in the Key Vault as JSON Web Key structures that
contain the public part of a stored key. The LIST operation is applicable to
all key types, however only the base key identifier, attributes, and tags are
provided in the response. Individual versions of... | [
"List",
"keys",
"in",
"the",
"specified",
"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#L923-L926 | train | Gets all the keys in a specified vault. | [
30522,
13366,
2131,
1035,
6309,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2131,
1035,
6309,
1035,
2004,
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... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.Draw.pattern | def pattern(name, x, y, width, height)
push('defs')
push("pattern #{name} #{x} #{y} #{width} #{height}")
push('graphic-context')
yield
ensure
pop('graphic-context')
pop('pattern')
pop('defs')
end | ruby | def pattern(name, x, y, width, height)
push('defs')
push("pattern #{name} #{x} #{y} #{width} #{height}")
push('graphic-context')
yield
ensure
pop('graphic-context')
pop('pattern')
pop('defs')
end | [
"def",
"pattern",
"(",
"name",
",",
"x",
",",
"y",
",",
"width",
",",
"height",
")",
"push",
"(",
"'defs'",
")",
"push",
"(",
"\"pattern #{name} #{x} #{y} #{width} #{height}\"",
")",
"push",
"(",
"'graphic-context'",
")",
"yield",
"ensure",
"pop",
"(",
"'gra... | Define a pattern. In the block, call primitive methods to
draw the pattern. Reference the pattern by using its name
as the argument to the 'fill' or 'stroke' methods | [
"Define",
"a",
"pattern",
".",
"In",
"the",
"block",
"call",
"primitive",
"methods",
"to",
"draw",
"the",
"pattern",
".",
"Reference",
"the",
"pattern",
"by",
"using",
"its",
"name",
"as",
"the",
"argument",
"to",
"the",
"fill",
"or",
"stroke",
"methods"
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L435-L444 | train | Creates a pattern with the given name. | [
30522,
13366,
5418,
1006,
2171,
1010,
1060,
1010,
1061,
1010,
9381,
1010,
4578,
1007,
5245,
1006,
1005,
13366,
2015,
1005,
1007,
5245,
1006,
1000,
5418,
1001,
1063,
2171,
1065,
1001,
1063,
1060,
1065,
1001,
1063,
1061,
1065,
1001,
1063,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_subscription | def list_deployments_at_subscription(remediation_name, query_options:nil, custom_headers:nil)
first_page = list_deployments_at_subscription_as_lazy(remediation_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_deployments_at_subscription(remediation_name, query_options:nil, custom_headers:nil)
first_page = list_deployments_at_subscription_as_lazy(remediation_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_deployments_at_subscription",
"(",
"remediation_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_deployments_at_subscription_as_lazy",
"(",
"remediation_name",
",",
"query_options",
":query_options",
",",... | Gets all deployments for a remediation at subscription scope.
@param remediation_name [String] The name of the remediation.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"subscription",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L621-L624 | train | Gets all deployments at subscription scope. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
15002,
1006,
2128,
16969,
3508,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
10813... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/template.rb | Liquid.Template.parse | def parse(source, options = {})
@options = options
@profiling = options[:profile]
@line_numbers = options[:line_numbers] || @profiling
parse_context = options.is_a?(ParseContext) ? options : ParseContext.new(options)
@root = Document.parse(tokenize(source), parse_context)
@warnings =... | ruby | def parse(source, options = {})
@options = options
@profiling = options[:profile]
@line_numbers = options[:line_numbers] || @profiling
parse_context = options.is_a?(ParseContext) ? options : ParseContext.new(options)
@root = Document.parse(tokenize(source), parse_context)
@warnings =... | [
"def",
"parse",
"(",
"source",
",",
"options",
"=",
"{",
"}",
")",
"@options",
"=",
"options",
"@profiling",
"=",
"options",
"[",
":profile",
"]",
"@line_numbers",
"=",
"options",
"[",
":line_numbers",
"]",
"||",
"@profiling",
"parse_context",
"=",
"options"... | Parse source code.
Returns self for easy chaining | [
"Parse",
"source",
"code",
".",
"Returns",
"self",
"for",
"easy",
"chaining"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/template.rb#L127-L135 | train | Parse the given source | [
30522,
13366,
11968,
3366,
1006,
3120,
1010,
7047,
1027,
1063,
1065,
1007,
1030,
7047,
1027,
7047,
1030,
11268,
16281,
1027,
7047,
1031,
1024,
6337,
1033,
1030,
2240,
1035,
3616,
1027,
7047,
1031,
1024,
2240,
1035,
3616,
1033,
1064,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/database_configurations.rb | ActiveRecord.DatabaseConfigurations.default_hash | def default_hash(env = ActiveRecord::ConnectionHandling::DEFAULT_ENV.call.to_s)
default = find_db_config(env)
default.config if default
end | ruby | def default_hash(env = ActiveRecord::ConnectionHandling::DEFAULT_ENV.call.to_s)
default = find_db_config(env)
default.config if default
end | [
"def",
"default_hash",
"(",
"env",
"=",
"ActiveRecord",
"::",
"ConnectionHandling",
"::",
"DEFAULT_ENV",
".",
"call",
".",
"to_s",
")",
"default",
"=",
"find_db_config",
"(",
"env",
")",
"default",
".",
"config",
"if",
"default",
"end"
] | Returns the config hash that corresponds with the environment
If the application has multiple databases +default_hash+ will
return the first config hash for the environment.
{ database: "my_db", adapter: "mysql2" } | [
"Returns",
"the",
"config",
"hash",
"that",
"corresponds",
"with",
"the",
"environment"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/database_configurations.rb#L60-L63 | train | Returns the default hash for the database | [
30522,
13366,
12398,
1035,
23325,
1006,
4372,
2615,
1027,
3161,
2890,
27108,
2094,
1024,
1024,
4434,
11774,
2989,
1024,
1024,
12398,
1035,
4372,
2615,
1012,
2655,
1012,
2000,
1035,
1055,
1007,
12398,
1027,
2424,
1035,
16962,
1035,
9530,
887... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/type.rb | Puppet.Type.event | def event(options = {})
Puppet::Transaction::Event.new({:resource => self, :file => file, :line => line, :tags => tags}.merge(options))
end | ruby | def event(options = {})
Puppet::Transaction::Event.new({:resource => self, :file => file, :line => line, :tags => tags}.merge(options))
end | [
"def",
"event",
"(",
"options",
"=",
"{",
"}",
")",
"Puppet",
"::",
"Transaction",
"::",
"Event",
".",
"new",
"(",
"{",
":resource",
"=>",
"self",
",",
":file",
"=>",
"file",
",",
":line",
"=>",
"line",
",",
":tags",
"=>",
"tags",
"}",
".",
"merge"... | Creates a transaction event.
Called by Transaction or by a property.
Merges the given options with the options `:resource`, `:file`, `:line`, and `:tags`, initialized from
values in this object. For possible options to pass (if any ????) see {Puppet::Transaction::Event}.
@todo Needs a better explanation "Why should... | [
"Creates",
"a",
"transaction",
"event",
".",
"Called",
"by",
"Transaction",
"or",
"by",
"a",
"property",
".",
"Merges",
"the",
"given",
"options",
"with",
"the",
"options",
":",
"resource",
":",
"file",
":",
"line",
"and",
":",
"tags",
"initialized",
"from... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/type.rb#L741-L743 | train | Creates a new transaction event. | [
30522,
13366,
2724,
1006,
7047,
1027,
1063,
1065,
1007,
13997,
1024,
1024,
12598,
1024,
1024,
2724,
1012,
2047,
1006,
1063,
1024,
7692,
1027,
1028,
2969,
1010,
1024,
5371,
1027,
1028,
5371,
1010,
1024,
2240,
1027,
1028,
2240,
1010,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/configuration.rb | HamlLint.Configuration.smart_merge | def smart_merge(parent, child)
parent.merge(child) do |_key, old, new|
case old
when Hash
smart_merge(old, new)
else
new
end
end
end | ruby | def smart_merge(parent, child)
parent.merge(child) do |_key, old, new|
case old
when Hash
smart_merge(old, new)
else
new
end
end
end | [
"def",
"smart_merge",
"(",
"parent",
",",
"child",
")",
"parent",
".",
"merge",
"(",
"child",
")",
"do",
"|",
"_key",
",",
"old",
",",
"new",
"|",
"case",
"old",
"when",
"Hash",
"smart_merge",
"(",
"old",
",",
"new",
")",
"else",
"new",
"end",
"end... | Merge two hashes such that nested hashes are merged rather than replaced.
@param parent [Hash]
@param child [Hash]
@return [Hash] | [
"Merge",
"two",
"hashes",
"such",
"that",
"nested",
"hashes",
"are",
"merged",
"rather",
"than",
"replaced",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/configuration.rb#L71-L80 | train | Merge two Hash objects into one | [
30522,
13366,
6047,
1035,
13590,
1006,
6687,
1010,
2775,
1007,
6687,
1012,
13590,
1006,
2775,
1007,
2079,
1064,
1035,
3145,
1010,
2214,
1010,
2047,
1064,
2553,
2214,
2043,
23325,
6047,
1035,
13590,
1006,
2214,
1010,
2047,
1007,
2842,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term.rb | Azure::CognitiveServices::ContentModerator::V1_0.ListManagementTerm.delete_all_terms | def delete_all_terms(list_id, language, custom_headers:nil)
response = delete_all_terms_async(list_id, language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_all_terms(list_id, language, custom_headers:nil)
response = delete_all_terms_async(list_id, language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_all_terms",
"(",
"list_id",
",",
"language",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_all_terms_async",
"(",
"list_id",
",",
"language",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | Deletes all terms from the list with list Id equal to the list Id passed.
@param list_id [String] List Id of the image list.
@param language [String] Language of the terms.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [String] operation r... | [
"Deletes",
"all",
"terms",
"from",
"the",
"list",
"with",
"list",
"Id",
"equal",
"to",
"the",
"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_term.rb#L331-L334 | train | Deletes all terms in a list. | [
30522,
13366,
3972,
12870,
1035,
2035,
1035,
3408,
1006,
2862,
1035,
8909,
1010,
2653,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2035,
1035,
3408,
1035,
2004,
6038,
2278,
1006,
2862,
1035,
8909,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Property.get_with_http_info | def get_with_http_info(resource_group_name, service_name, prop_id, custom_headers:nil)
get_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, service_name, prop_id, custom_headers:nil)
get_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"prop_id",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"prop_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"v... | Gets the details of the property specified by its identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param prop_id [String] Identifier of the property.
@param custom_headers [Hash{String => String}] A hash of custom ... | [
"Gets",
"the",
"details",
"of",
"the",
"property",
"specified",
"by",
"its",
"identifier",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb#L268-L270 | train | Gets the specified property. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17678,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/log_analytics.rb | Azure::Compute::Mgmt::V2018_04_01.LogAnalytics.begin_export_request_rate_by_interval | def begin_export_request_rate_by_interval(parameters, location, custom_headers:nil)
response = begin_export_request_rate_by_interval_async(parameters, location, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_export_request_rate_by_interval(parameters, location, custom_headers:nil)
response = begin_export_request_rate_by_interval_async(parameters, location, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_export_request_rate_by_interval",
"(",
"parameters",
",",
"location",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_export_request_rate_by_interval_async",
"(",
"parameters",
",",
"location",
",",
"custom_headers",
":custom_headers",
")",
"... | Export logs that show Api requests made by this subscription in the given
time window to show throttling activities.
@param parameters [RequestRateByIntervalInput] Parameters supplied to the
LogAnalytics getRequestRateByInterval Api.
@param location [String] The location upon which virtual-machine-sizes is
querie... | [
"Export",
"logs",
"that",
"show",
"Api",
"requests",
"made",
"by",
"this",
"subscription",
"in",
"the",
"given",
"time",
"window",
"to",
"show",
"throttling",
"activities",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/log_analytics.rb#L131-L134 | train | Export request rate by interval. | [
30522,
13366,
4088,
1035,
9167,
1035,
5227,
1035,
3446,
1035,
2011,
1035,
13483,
1006,
11709,
1010,
3295,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
9167,
1035,
5227,
1035,
3446,
1035,
2011,
1035,
13483,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_title | def extract_title
title = extract(:title).presence
return unless title
title = Array(title)
return title.map(&:downcase) if extract(:lowercase) == true
title
end | ruby | def extract_title
title = extract(:title).presence
return unless title
title = Array(title)
return title.map(&:downcase) if extract(:lowercase) == true
title
end | [
"def",
"extract_title",
"title",
"=",
"extract",
"(",
":title",
")",
".",
"presence",
"return",
"unless",
"title",
"title",
"=",
"Array",
"(",
"title",
")",
"return",
"title",
".",
"map",
"(",
":downcase",
")",
"if",
"extract",
"(",
":lowercase",
")",
"=... | Extracts page title as an array of segments without site title and separators.
@return [Array<String>] segments of page title. | [
"Extracts",
"page",
"title",
"as",
"an",
"array",
"of",
"segments",
"without",
"site",
"title",
"and",
"separators",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/meta_tags_collection.rb#L113-L121 | train | Extract the title from the document. | [
30522,
13366,
14817,
1035,
2516,
2516,
1027,
14817,
1006,
1024,
2516,
1007,
1012,
3739,
2709,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.update_with_http_info | def update_with_http_info(large_person_group_id, person_id, name:nil, user_data:nil, custom_headers:nil)
update_async(large_person_group_id, person_id, name:name, user_data:user_data, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(large_person_group_id, person_id, name:nil, user_data:nil, custom_headers:nil)
update_async(large_person_group_id, person_id, name:name, user_data:user_data, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"large_person_group_id",
",",
"person_id",
",",
"name",
":",
"nil",
",",
"user_data",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"large_person_group_id",
",",
"person_id",
",",
"name",
":",
"name... | Update name or userData of a person.
@param large_person_group_id [String] Id referencing a particular large
person group.
@param person_id Id referencing a particular person.
@param name [String] User defined name, maximum length is 128.
@param user_data [String] User specified data. Length should not exceed 16K... | [
"Update",
"name",
"or",
"userData",
"of",
"a",
"person",
"."
] | 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#L482-L484 | train | Updates a person s attributes in a large person group. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2312,
1035,
2711,
1035,
2177,
1035,
8909,
1010,
2711,
1035,
8909,
1010,
2171,
1024,
9152,
2140,
1010,
5310,
1035,
2951,
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... |
strongself/Generamba | lib/generamba/template/installer/template_installer_factory.rb | Generamba.TemplateInstallerFactory.installer_for_type | def installer_for_type(type)
case type
when TemplateDeclarationType::LOCAL_TEMPLATE
return Generamba::LocalInstaller.new
when TemplateDeclarationType::REMOTE_TEMPLATE
return Generamba::RemoteInstaller.new
when TemplateDeclarationType::CATALOG_TEMPLATE
return G... | ruby | def installer_for_type(type)
case type
when TemplateDeclarationType::LOCAL_TEMPLATE
return Generamba::LocalInstaller.new
when TemplateDeclarationType::REMOTE_TEMPLATE
return Generamba::RemoteInstaller.new
when TemplateDeclarationType::CATALOG_TEMPLATE
return G... | [
"def",
"installer_for_type",
"(",
"type",
")",
"case",
"type",
"when",
"TemplateDeclarationType",
"::",
"LOCAL_TEMPLATE",
"return",
"Generamba",
"::",
"LocalInstaller",
".",
"new",
"when",
"TemplateDeclarationType",
"::",
"REMOTE_TEMPLATE",
"return",
"Generamba",
"::",
... | Provides the appropriate strategy for a given template type | [
"Provides",
"the",
"appropriate",
"strategy",
"for",
"a",
"given",
"template",
"type"
] | 9ef343805f3a66f58bc36e120e822d5436a4da97 | https://github.com/strongself/Generamba/blob/9ef343805f3a66f58bc36e120e822d5436a4da97/lib/generamba/template/installer/template_installer_factory.rb#L9-L20 | train | Returns a new instance of the installer for the given type | [
30522,
13366,
16500,
2121,
1035,
2005,
1035,
2828,
1006,
2828,
1007,
2553,
2828,
2043,
23561,
3207,
20464,
25879,
3258,
13874,
1024,
1024,
2334,
1035,
23561,
2709,
11416,
11201,
1024,
1024,
2334,
7076,
9080,
3917,
1012,
2047,
2043,
23561,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_closed_list_entity_role_with_http_info | def delete_closed_list_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
delete_closed_list_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | ruby | def delete_closed_list_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
delete_closed_list_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_closed_list_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_closed_list_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id"... | Delete a role for a given list entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity ID.
@param role_id The entity role Id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the ... | [
"Delete",
"a",
"role",
"for",
"a",
"given",
"list",
"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#L9632-L9634 | train | Deletes a list entity role. | [
30522,
13366,
3972,
12870,
1035,
2701,
1035,
2862,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
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... |
fastlane/fastlane | fastlane/lib/fastlane/markdown_table_formatter.rb | Fastlane.MarkdownTableFormatter.parse | def parse
@table = []
rows = @doc.split(/\r?\n/)
rows.each do |row|
row_array = row.split("|")
row_array.each(&:strip!)
@table.push(row_array)
end
@table.delete_at(1) if @header # strip header separator
@table
end | ruby | def parse
@table = []
rows = @doc.split(/\r?\n/)
rows.each do |row|
row_array = row.split("|")
row_array.each(&:strip!)
@table.push(row_array)
end
@table.delete_at(1) if @header # strip header separator
@table
end | [
"def",
"parse",
"@table",
"=",
"[",
"]",
"rows",
"=",
"@doc",
".",
"split",
"(",
"/",
"\\r",
"\\n",
"/",
")",
"rows",
".",
"each",
"do",
"|",
"row",
"|",
"row_array",
"=",
"row",
".",
"split",
"(",
"\"|\"",
")",
"row_array",
".",
"each",
"(",
"... | taken from: https://github.com/benbalter/markdown-table-formatter
converts the markdown string into an array of arrays | [
"taken",
"from",
":",
"https",
":",
"//",
"github",
".",
"com",
"/",
"benbalter",
"/",
"markdown",
"-",
"table",
"-",
"formatter",
"converts",
"the",
"markdown",
"string",
"into",
"an",
"array",
"of",
"arrays"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/markdown_table_formatter.rb#L10-L20 | train | Parse the header and the header | [
30522,
13366,
11968,
3366,
1030,
2795,
1027,
1031,
1033,
10281,
1027,
1030,
9986,
1012,
3975,
1006,
1013,
1032,
1054,
1029,
1032,
1050,
1013,
1007,
10281,
1012,
2169,
2079,
1064,
5216,
1064,
5216,
1035,
9140,
1027,
5216,
1012,
3975,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/subnet.rb | Aws::EC2.Subnet.network_interfaces | def network_interfaces(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "subnet-id",
values: [@id]
}])
resp = @client.describe_network_interfaces(options)
resp.each_page do |page|
batch = []
... | ruby | def network_interfaces(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "subnet-id",
values: [@id]
}])
resp = @client.describe_network_interfaces(options)
resp.each_page do |page|
batch = []
... | [
"def",
"network_interfaces",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"filters",
":",
"[",
"{",
"name",
":",
"\"sub... | @example Request syntax with placeholder values
network_interfaces = subnet.network_interfaces({
filters: [
{
name: "String",
values: ["String"],
},
],
dry_run: false,
network_interface_ids: ["String"],
})
@param [Hash] options ({})
@option options [Array<Typ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/subnet.rb#L1242-L1262 | train | Returns a list of network interfaces for this subnet | [
30522,
13366,
2897,
1035,
19706,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
177... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_operational_insights/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb | Azure::OperationalInsights::Mgmt::V2015_11_01_preview.DataSources.delete_with_http_info | def delete_with_http_info(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
delete_async(resource_group_name, workspace_name, data_source_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
delete_async(resource_group_name, workspace_name, data_source_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"data_source_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"data_source_name",
",",
"custom_headers",
":custom_... | Deletes a data source instance.
@param resource_group_name [String] The name of the resource group to get.
The name is case insensitive.
@param workspace_name [String] Name of the Log Analytics Workspace that
contains the datasource.
@param data_source_name [String] Name of the datasource.
@param custom_headers ... | [
"Deletes",
"a",
"data",
"source",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb#L183-L185 | train | Deletes a data source from the specified HDInsight workspace. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
2951,
1035,
3120,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_secret.rb | Azure::ServiceFabric::V6_4_0_36.MeshSecret.create_or_update | def create_or_update(secret_resource_name, secret_resource_description, custom_headers:nil)
response = create_or_update_async(secret_resource_name, secret_resource_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(secret_resource_name, secret_resource_description, custom_headers:nil)
response = create_or_update_async(secret_resource_name, secret_resource_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"secret_resource_name",
",",
"secret_resource_description",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"secret_resource_name",
",",
"secret_resource_description",
",",
"custom_headers",
":custom_head... | Creates or updates a Secret resource.
Creates a Secret resource with the specified name, description and
properties. If Secret resource with the same name exists, then it is updated
with the specified description and properties. Once created, the kind and
contentType of a secret resource cannot be updated.
@para... | [
"Creates",
"or",
"updates",
"a",
"Secret",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_secret.rb#L41-L44 | train | Creates or updates a secret resource. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
3595,
1035,
30524,
1035,
7692,
1035,
6412,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
1012,
2303,
4983,
3433,
1012,
9152,
2140,
1029,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/commands/decidim/create_omniauth_registration.rb | Decidim.CreateOmniauthRegistration.call | def call
verify_oauth_signature!
begin
return broadcast(:ok, existing_identity.user) if existing_identity
return broadcast(:invalid) if form.invalid?
transaction do
create_or_find_user
@identity = create_identity
end
trigger_omniauth_registration... | ruby | def call
verify_oauth_signature!
begin
return broadcast(:ok, existing_identity.user) if existing_identity
return broadcast(:invalid) if form.invalid?
transaction do
create_or_find_user
@identity = create_identity
end
trigger_omniauth_registration... | [
"def",
"call",
"verify_oauth_signature!",
"begin",
"return",
"broadcast",
"(",
":ok",
",",
"existing_identity",
".",
"user",
")",
"if",
"existing_identity",
"return",
"broadcast",
"(",
":invalid",
")",
"if",
"form",
".",
"invalid?",
"transaction",
"do",
"create_or... | Public: Initializes the command.
form - A form object with the params.
Executes the command. Broadcasts these events:
- :ok when everything is valid.
- :invalid if the form wasn't valid and we couldn't proceed.
Returns nothing. | [
"Public",
":",
"Initializes",
"the",
"command",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/commands/decidim/create_omniauth_registration.rb#L20-L37 | train | Call the user object | [
30522,
13366,
2655,
20410,
1035,
1051,
4887,
2705,
1035,
8085,
999,
4088,
2709,
3743,
1006,
1024,
7929,
1010,
4493,
1035,
4767,
1012,
5310,
1007,
2065,
4493,
1035,
4767,
2709,
3743,
1006,
1024,
19528,
1007,
2065,
2433,
1012,
19528,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_service/lib/2017-08-31/generated/azure_mgmt_container_service/managed_clusters.rb | Azure::ContainerService::Mgmt::V2017_08_31.ManagedClusters.get_access_profiles | def get_access_profiles(resource_group_name, resource_name, role_name, custom_headers:nil)
response = get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_access_profiles(resource_group_name, resource_name, role_name, custom_headers:nil)
response = get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_access_profiles",
"(",
"resource_group_name",
",",
"resource_name",
",",
"role_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_access_profiles_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"role_name",
",",
"custom_heade... | Gets access profile of a managed cluster.
Use ManagedClusters_GetAccessProfile instead.
@param resource_group_name [String] The name of the resource group.
@param resource_name [String] The name of the managed cluster resource.
@param role_name [String] The name of the role for managed cluster
accessProfile reso... | [
"Gets",
"access",
"profile",
"of",
"a",
"managed",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2017-08-31/generated/azure_mgmt_container_service/managed_clusters.rb#L437-L440 | train | Gets the access profiles for the specified App Service Environment. | [
30522,
13366,
2131,
1035,
3229,
1035,
17879,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
2535,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3229,
1035,
17879,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_property_with_http_info | def delete_property_with_http_info(name_id, property_name, timeout:60, custom_headers:nil)
delete_property_async(name_id, property_name, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def delete_property_with_http_info(name_id, property_name, timeout:60, custom_headers:nil)
delete_property_async(name_id, property_name, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"delete_property_with_http_info",
"(",
"name_id",
",",
"property_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"delete_property_async",
"(",
"name_id",
",",
"property_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
... | Deletes the specified Service Fabric property.
Deletes the specified Service Fabric property under a given name. A property
must be created before it can be deleted.
@param name_id [String] The Service Fabric name, without the 'fabric:' URI
scheme.
@param property_name [String] Specifies the name of the property... | [
"Deletes",
"the",
"specified",
"Service",
"Fabric",
"property",
"."
] | 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#L26981-L26983 | train | Deletes a property from the specified App Service Environment. | [
30522,
13366,
3972,
12870,
1035,
3200,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2171,
1035,
8909,
1010,
3200,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
3200,
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... |
toptal/chewy | lib/chewy/journal.rb | Chewy.Journal.apply | def apply(since_time, retries: 10, **import_options)
stage = 1
since_time -= 1
count = 0
while stage <= retries
entries = Chewy::Stash::Journal.entries(since_time, only: @only).to_a.presence or break
count += entries.size
groups = reference_groups(entries)
ActiveS... | ruby | def apply(since_time, retries: 10, **import_options)
stage = 1
since_time -= 1
count = 0
while stage <= retries
entries = Chewy::Stash::Journal.entries(since_time, only: @only).to_a.presence or break
count += entries.size
groups = reference_groups(entries)
ActiveS... | [
"def",
"apply",
"(",
"since_time",
",",
"retries",
":",
"10",
",",
"**",
"import_options",
")",
"stage",
"=",
"1",
"since_time",
"-=",
"1",
"count",
"=",
"0",
"while",
"stage",
"<=",
"retries",
"entries",
"=",
"Chewy",
"::",
"Stash",
"::",
"Journal",
"... | @param only [Array<String, Chewy::Index, Chewy::Type>] indexes/types or even string references to perform actions on
Applies all changes that were done since the specified time to the
specified indexes/types.
@param since_time [Time, DateTime] timestamp from which changes will be applied
@param retries [Integer] m... | [
"@param",
"only",
"[",
"Array<String",
"Chewy",
"::",
"Index",
"Chewy",
"::",
"Type",
">",
"]",
"indexes",
"/",
"types",
"or",
"even",
"string",
"references",
"to",
"perform",
"actions",
"on",
"Applies",
"all",
"changes",
"that",
"were",
"done",
"since",
"... | cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b | https://github.com/toptal/chewy/blob/cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b/lib/chewy/journal.rb#L21-L37 | train | Apply the journal to the specified time. | [
30522,
13366,
6611,
1006,
2144,
1035,
2051,
1010,
2128,
21011,
1024,
2184,
1010,
1008,
1008,
12324,
1035,
7047,
1007,
2754,
1027,
1015,
2144,
1035,
2051,
1011,
1027,
1015,
4175,
1027,
1014,
2096,
2754,
1026,
1027,
2128,
21011,
10445,
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 | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_image_performances | def get_image_performances(project_id, iteration_id, tag_ids:nil, order_by:nil, take:50, skip:0, custom_headers:nil)
response = get_image_performances_async(project_id, iteration_id, tag_ids:tag_ids, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value!
response.body unless response... | ruby | def get_image_performances(project_id, iteration_id, tag_ids:nil, order_by:nil, take:50, skip:0, custom_headers:nil)
response = get_image_performances_async(project_id, iteration_id, tag_ids:tag_ids, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value!
response.body unless response... | [
"def",
"get_image_performances",
"(",
"project_id",
",",
"iteration_id",
",",
"tag_ids",
":",
"nil",
",",
"order_by",
":",
"nil",
",",
"take",
":",
"50",
",",
"skip",
":",
"0",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_image_performances_... | Get image with its prediction for a given project iteration.
This API supports batching and range selection. By default it will only
return first 50 images matching images.
Use the {take} and {skip} parameters to control how many images to return in
a given batch.
The filtering is on an and/or relationship. For e... | [
"Get",
"image",
"with",
"its",
"prediction",
"for",
"a",
"given",
"project",
"iteration",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L2552-L2555 | train | Gets the image performance for an iteration. | [
30522,
13366,
2131,
1035,
3746,
1035,
4616,
1006,
2622,
1035,
8909,
1010,
27758,
1035,
8909,
1010,
6415,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
2344,
1035,
2011,
1024,
9152,
2140,
1010,
2202,
1024,
2753,
1010,
13558,
1024,
1014,
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_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb | Azure::CognitiveServices::Face::V1_0.Face.group | def group(face_ids, custom_headers:nil)
response = group_async(face_ids, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def group(face_ids, custom_headers:nil)
response = group_async(face_ids, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"group",
"(",
"face_ids",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"group_async",
"(",
"face_ids",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | Divide candidate faces into groups based on face similarity.<br />
* The output is one or more disjointed face groups and a messyGroup. A face
group contains faces that have similar looking, often of the same person.
Face groups are ranked by group size, i.e. number of faces. Notice that faces
belonging to a same p... | [
"Divide",
"candidate",
"faces",
"into",
"groups",
"based",
"on",
"face",
"similarity",
".",
"<br",
"/",
">",
"*",
"The",
"output",
"is",
"one",
"or",
"more",
"disjointed",
"face",
"groups",
"and",
"a",
"messyGroup",
".",
"A",
"face",
"group",
"contains",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb#L308-L311 | train | Gets the list of faces in a given group. | [
30522,
13366,
2177,
1006,
2227,
1035,
8909,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2177,
1035,
2004,
6038,
2278,
1006,
2227,
1035,
8909,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb | Azure::Links::Mgmt::V2016_09_01.ResourceLinks.list_at_source_scope_as_lazy | def list_at_source_scope_as_lazy(scope, filter:nil, custom_headers:nil)
response = list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_at_source_scope_n... | ruby | def list_at_source_scope_as_lazy(scope, filter:nil, custom_headers:nil)
response = list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_at_source_scope_n... | [
"def",
"list_at_source_scope_as_lazy",
"(",
"scope",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_at_source_scope_async",
"(",
"scope",
",",
"filter",
":",
"filter",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Gets a list of resource links at and below the specified source scope.
@param scope [String] The fully qualified ID of the scope for getting the
resource links. For example, to list resource links at and under a resource
group, set the scope to
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myG... | [
"Gets",
"a",
"list",
"of",
"resource",
"links",
"at",
"and",
"below",
"the",
"specified",
"source",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb#L746-L755 | train | Gets the list of all the image objects in a source scope. | [
30522,
13366,
2862,
1035,
2012,
1035,
3120,
1035,
9531,
1035,
2004,
1035,
13971,
1006,
9531,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2012,
1035,
3120,
1035,
9531,
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... |
typhoeus/typhoeus | lib/typhoeus/request.rb | Typhoeus.Request.set_defaults | def set_defaults
default_user_agent = Config.user_agent || Typhoeus::USER_AGENT
options[:headers] = {'User-Agent' => default_user_agent}.merge(options[:headers] || {})
options[:headers]['Expect'] ||= ''
options[:verbose] = Typhoeus::Config.verbose if options[:verbose].nil? && !Typhoeus::Config.... | ruby | def set_defaults
default_user_agent = Config.user_agent || Typhoeus::USER_AGENT
options[:headers] = {'User-Agent' => default_user_agent}.merge(options[:headers] || {})
options[:headers]['Expect'] ||= ''
options[:verbose] = Typhoeus::Config.verbose if options[:verbose].nil? && !Typhoeus::Config.... | [
"def",
"set_defaults",
"default_user_agent",
"=",
"Config",
".",
"user_agent",
"||",
"Typhoeus",
"::",
"USER_AGENT",
"options",
"[",
":headers",
"]",
"=",
"{",
"'User-Agent'",
"=>",
"default_user_agent",
"}",
".",
"merge",
"(",
"options",
"[",
":headers",
"]",
... | Sets default header and verbose when turned on. | [
"Sets",
"default",
"header",
"and",
"verbose",
"when",
"turned",
"on",
"."
] | d072aaf6edcf46d54d6a6bce45286629bf4e5af6 | https://github.com/typhoeus/typhoeus/blob/d072aaf6edcf46d54d6a6bce45286629bf4e5af6/lib/typhoeus/request.rb#L211-L219 | train | Set default values for the HTTP headers | [
30522,
13366,
2275,
1035,
12398,
2015,
12398,
1035,
5310,
1035,
4005,
1027,
9530,
8873,
2290,
1012,
5310,
1035,
4005,
1064,
1064,
5939,
8458,
8913,
2271,
1024,
1024,
5310,
1035,
4005,
7047,
1031,
1024,
20346,
2015,
1033,
1027,
1063,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
resque/resque | lib/resque/worker.rb | Resque.Worker.reconnect | def reconnect
tries = 0
begin
data_store.reconnect
rescue Redis::BaseConnectionError
if (tries += 1) <= 3
log_with_severity :error, "Error reconnecting to Redis; retrying"
sleep(tries)
retry
else
log_with_severity :error, "Error reconnect... | ruby | def reconnect
tries = 0
begin
data_store.reconnect
rescue Redis::BaseConnectionError
if (tries += 1) <= 3
log_with_severity :error, "Error reconnecting to Redis; retrying"
sleep(tries)
retry
else
log_with_severity :error, "Error reconnect... | [
"def",
"reconnect",
"tries",
"=",
"0",
"begin",
"data_store",
".",
"reconnect",
"rescue",
"Redis",
"::",
"BaseConnectionError",
"if",
"(",
"tries",
"+=",
"1",
")",
"<=",
"3",
"log_with_severity",
":error",
",",
"\"Error reconnecting to Redis; retrying\"",
"sleep",
... | Reconnect to Redis to avoid sharing a connection with the parent,
retry up to 3 times with increasing delay before giving up. | [
"Reconnect",
"to",
"Redis",
"to",
"avoid",
"sharing",
"a",
"connection",
"with",
"the",
"parent",
"retry",
"up",
"to",
"3",
"times",
"with",
"increasing",
"delay",
"before",
"giving",
"up",
"."
] | adb633a0f6b98b1eb5a5a85bb36ebac9309978fd | https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/worker.rb#L338-L352 | train | Reconnect to Redis | [
30522,
13366,
28667,
18256,
6593,
5363,
1027,
1014,
4088,
2951,
1035,
3573,
1012,
28667,
18256,
6593,
5343,
2417,
2483,
1024,
1024,
2918,
8663,
2638,
30524,
1035,
2007,
1035,
18976,
1024,
7561,
1010,
1000,
7561,
28667,
18256,
11873,
2000,
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... |
hashicorp/vagrant | lib/vagrant/capability_host.rb | Vagrant.CapabilityHost.capability | def capability(cap_name, *args)
cap_mod = capability_module(cap_name.to_sym)
if !cap_mod
raise Errors::CapabilityNotFound,
cap: cap_name.to_s,
host: @cap_host_chain[0][0].to_s
end
cap_method = nil
begin
cap_method = cap_mod.method(cap_name)
rescu... | ruby | def capability(cap_name, *args)
cap_mod = capability_module(cap_name.to_sym)
if !cap_mod
raise Errors::CapabilityNotFound,
cap: cap_name.to_s,
host: @cap_host_chain[0][0].to_s
end
cap_method = nil
begin
cap_method = cap_mod.method(cap_name)
rescu... | [
"def",
"capability",
"(",
"cap_name",
",",
"*",
"args",
")",
"cap_mod",
"=",
"capability_module",
"(",
"cap_name",
".",
"to_sym",
")",
"if",
"!",
"cap_mod",
"raise",
"Errors",
"::",
"CapabilityNotFound",
",",
"cap",
":",
"cap_name",
".",
"to_s",
",",
"host... | Executes the capability with the given name, optionally passing more
arguments onwards to the capability. If the capability returns a value,
it will be returned.
@param [Symbol] cap_name Name of the capability | [
"Executes",
"the",
"capability",
"with",
"the",
"given",
"name",
"optionally",
"passing",
"more",
"arguments",
"onwards",
"to",
"the",
"capability",
".",
"If",
"the",
"capability",
"returns",
"a",
"value",
"it",
"will",
"be",
"returned",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/capability_host.rb#L91-L112 | train | Execute a capability method. | [
30522,
13366,
10673,
1006,
6178,
1035,
2171,
1010,
1008,
12098,
5620,
1007,
6178,
1035,
16913,
1027,
10673,
1035,
11336,
1006,
6178,
1035,
2171,
1012,
2000,
1035,
25353,
2213,
1007,
2065,
999,
6178,
1035,
16913,
5333,
10697,
1024,
1024,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_keys_as_lazy_with_http_info | def get_deleted_keys_as_lazy_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_keys_as_lazy_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | ruby | def get_deleted_keys_as_lazy_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_keys_as_lazy_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | [
"def",
"get_deleted_keys_as_lazy_with_http_info",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_deleted_keys_as_lazy_async",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_h... | Lists the deleted keys in the specified vault.
Retrieves a list of the keys in the Key Vault as JSON Web Key structures that
contain the public part of a deleted key. This operation includes
deletion-specific information. The Get Deleted Keys operation is applicable
for vaults enabled for soft-delete. While the op... | [
"Lists",
"the",
"deleted",
"keys",
"in",
"the",
"specified",
"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#L9712-L9714 | train | Gets the deleted keys from the specified vault. | [
30522,
13366,
2131,
1035,
17159,
1035,
6309,
1035,
2004,
1035,
13971,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
915... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/data_criteria_helpers/dc_base_extract.rb | HQMF2.DataCriteriaBaseExtractions.extract_negation | def extract_negation
negation = (attr_val('./*/@actionNegationInd').to_s.downcase == 'true')
negation_code_list_id = nil
if negation
res = @entry.at_xpath('./*/cda:outboundRelationship/*/cda:code[@code="410666004"]/../cda:value/@valueSet',
HQMF2::Document::NAMESPA... | ruby | def extract_negation
negation = (attr_val('./*/@actionNegationInd').to_s.downcase == 'true')
negation_code_list_id = nil
if negation
res = @entry.at_xpath('./*/cda:outboundRelationship/*/cda:code[@code="410666004"]/../cda:value/@valueSet',
HQMF2::Document::NAMESPA... | [
"def",
"extract_negation",
"negation",
"=",
"(",
"attr_val",
"(",
"'./*/@actionNegationInd'",
")",
".",
"to_s",
".",
"downcase",
"==",
"'true'",
")",
"negation_code_list_id",
"=",
"nil",
"if",
"negation",
"res",
"=",
"@entry",
".",
"at_xpath",
"(",
"'./*/cda:out... | Extract the negation (and the negation_code_list_id if appropriate) | [
"Extract",
"the",
"negation",
"(",
"and",
"the",
"negation_code_list_id",
"if",
"appropriate",
")"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria_helpers/dc_base_extract.rb#L69-L78 | train | Extract negation and negation_code_list_id from the entry | [
30522,
13366,
14817,
1035,
11265,
12540,
11265,
12540,
1027,
1006,
2012,
16344,
1035,
11748,
1006,
1005,
1012,
1013,
1008,
1013,
1030,
2895,
2638,
12540,
22254,
1005,
1007,
1012,
2000,
1035,
1055,
1012,
2091,
18382,
1027,
1027,
1005,
2995,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/type.rb | Puppet.Type.retrieve_resource | def retrieve_resource
resource = retrieve
resource = Resource.new(self.class, title, :parameters => resource) if resource.is_a? Hash
resource
end | ruby | def retrieve_resource
resource = retrieve
resource = Resource.new(self.class, title, :parameters => resource) if resource.is_a? Hash
resource
end | [
"def",
"retrieve_resource",
"resource",
"=",
"retrieve",
"resource",
"=",
"Resource",
".",
"new",
"(",
"self",
".",
"class",
",",
"title",
",",
":parameters",
"=>",
"resource",
")",
"if",
"resource",
".",
"is_a?",
"Hash",
"resource",
"end"
] | Retrieve the current state of the system as a Puppet::Resource. For
the base Puppet::Type this does the same thing as #retrieve, but
specific types are free to implement #retrieve as returning a hash,
and this will call #retrieve and convert the hash to a resource.
This is used when determining when syncing a resou... | [
"Retrieve",
"the",
"current",
"state",
"of",
"the",
"system",
"as",
"a",
"Puppet",
"::",
"Resource",
".",
"For",
"the",
"base",
"Puppet",
"::",
"Type",
"this",
"does",
"the",
"same",
"thing",
"as",
"#retrieve",
"but",
"specific",
"types",
"are",
"free",
... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/type.rb#L1104-L1108 | train | Retrieve the resource
| [
30522,
13366,
12850,
1035,
7692,
7692,
1027,
12850,
7692,
1027,
7692,
1012,
2047,
1006,
2969,
1012,
2465,
1010,
2516,
1010,
1024,
11709,
1027,
1028,
7692,
1007,
2065,
7692,
1012,
2003,
1035,
1037,
1029,
23325,
7692,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/open_id_connect_provider.rb | Azure::ApiManagement::Mgmt::V2018_01_01.OpenIdConnectProvider.update | def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil)
response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value!
nil
end | ruby | def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil)
response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value!
nil
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"parameters",
",",
"if_match",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"parame... | Updates the specific OpenID Connect Provider.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param opid [String] Identifier of the OpenID Connect Provider.
@param parameters [OpenidConnectProviderUpdateContract] Update param... | [
"Updates",
"the",
"specific",
"OpenID",
"Connect",
"Provider",
"."
] | 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/open_id_connect_provider.rb#L485-L488 | train | Updates an existing Advisor. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
6728,
3593,
1010,
11709,
1010,
2065,
1035,
2674,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb | Azure::Network::Mgmt::V2018_10_01.VpnSites.update_tags_async | def update_tags_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil)
# Send request
promise = begin_update_tags_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deseriali... | ruby | def update_tags_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil)
# Send request
promise = begin_update_tags_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deseriali... | [
"def",
"update_tags_async",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"vpn_site_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"vpn_site_... | @param resource_group_name [String] The resource group name of the VpnSite.
@param vpn_site_name [String] The name of the VpnSite being updated.
@param vpn_site_parameters [TagsObject] Parameters supplied to update VpnSite
tags.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be a... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
"of",
"the",
"VpnSite",
".",
"@param",
"vpn_site_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"VpnSite",
"being",
"updated",
".",
"@param",
"vpn_site_parameters",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb#L193-L209 | train | Updates vpn site tags. | [
30522,
13366,
10651,
1035,
22073,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/overcommit | lib/overcommit/configuration.rb | Overcommit.Configuration.verify_signatures? | def verify_signatures?
return false if ENV['OVERCOMMIT_NO_VERIFY']
return true if @hash['verify_signatures'] != false
result = Overcommit::Utils.execute(
%W[git config --local --get #{verify_signature_config_key}]
)
if result.status == 1 # Key doesn't exist
return true
... | ruby | def verify_signatures?
return false if ENV['OVERCOMMIT_NO_VERIFY']
return true if @hash['verify_signatures'] != false
result = Overcommit::Utils.execute(
%W[git config --local --get #{verify_signature_config_key}]
)
if result.status == 1 # Key doesn't exist
return true
... | [
"def",
"verify_signatures?",
"return",
"false",
"if",
"ENV",
"[",
"'OVERCOMMIT_NO_VERIFY'",
"]",
"return",
"true",
"if",
"@hash",
"[",
"'verify_signatures'",
"]",
"!=",
"false",
"result",
"=",
"Overcommit",
"::",
"Utils",
".",
"execute",
"(",
"%W[",
"git",
"co... | Returns whether this configuration should verify itself by checking the
stored configuration for the repo.
@return [true,false] | [
"Returns",
"whether",
"this",
"configuration",
"should",
"verify",
"itself",
"by",
"checking",
"the",
"stored",
"configuration",
"for",
"the",
"repo",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/configuration.rb#L213-L231 | train | Returns true if the signature is valid | [
30522,
13366,
20410,
1035,
16442,
1029,
2709,
6270,
2065,
4372,
2615,
1031,
1005,
2058,
9006,
22930,
1035,
2053,
1035,
20410,
1005,
1033,
2709,
30524,
2290,
1035,
3145,
1065,
1033,
1007,
2065,
2765,
1012,
3570,
1027,
1027,
1015,
1001,
3145,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.begin_remove | def begin_remove(resource_group_name, web_service_name, custom_headers:nil)
response = begin_remove_async(resource_group_name, web_service_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_remove(resource_group_name, web_service_name, custom_headers:nil)
response = begin_remove_async(resource_group_name, web_service_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_remove",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_remove_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Deletes the specified web service.
@param resource_group_name [String] Name of the resource group in which the
web service is located.
@param web_service_name [String] The name of the web service.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"web",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L862-L865 | train | Remove a Web Service. | [
30522,
13366,
4088,
1035,
6366,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
6366,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
intridea/hashie | lib/hashie/mash.rb | Hashie.Mash.initializing_reader | def initializing_reader(key)
ck = convert_key(key)
regular_writer(ck, self.class.new) unless key?(ck)
regular_reader(ck)
end | ruby | def initializing_reader(key)
ck = convert_key(key)
regular_writer(ck, self.class.new) unless key?(ck)
regular_reader(ck)
end | [
"def",
"initializing_reader",
"(",
"key",
")",
"ck",
"=",
"convert_key",
"(",
"key",
")",
"regular_writer",
"(",
"ck",
",",
"self",
".",
"class",
".",
"new",
")",
"unless",
"key?",
"(",
"ck",
")",
"regular_reader",
"(",
"ck",
")",
"end"
] | This is the bang method reader, it will return a new Mash
if there isn't a value already assigned to the key requested. | [
"This",
"is",
"the",
"bang",
"method",
"reader",
"it",
"will",
"return",
"a",
"new",
"Mash",
"if",
"there",
"isn",
"t",
"a",
"value",
"already",
"assigned",
"to",
"the",
"key",
"requested",
"."
] | da9fd39a0e551e09c1441cb7453c969a4afbfd7f | https://github.com/intridea/hashie/blob/da9fd39a0e551e09c1441cb7453c969a4afbfd7f/lib/hashie/mash.rb#L166-L170 | train | Initialize the reader for the given key. | [
30522,
13366,
3988,
6026,
1035,
8068,
1006,
3145,
1007,
23616,
1027,
10463,
1035,
3145,
1006,
3145,
1007,
3180,
1035,
3213,
1006,
23616,
1010,
2969,
1012,
2465,
1012,
2047,
1007,
4983,
3145,
1029,
1006,
23616,
1007,
3180,
1035,
8068,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb | Aws::EC2.NetworkAcl.delete_entry | def delete_entry(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.delete_network_acl_entry(options)
resp.data
end | ruby | def delete_entry(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.delete_network_acl_entry(options)
resp.data
end | [
"def",
"delete_entry",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"network_acl_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"delete_network_acl_entry",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
network_acl.delete_entry({
dry_run: false,
egress: false, # required
rule_number: 1, # required
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb#L340-L344 | train | Delete an existing entry | [
30522,
13366,
3972,
12870,
1035,
4443,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2897,
1035,
9353,
2140,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
2897,
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/bot.rb | Discordrb.Bot.update_status | def update_status(status, activity, url, since = 0, afk = false, activity_type = 0)
gateway_check
@activity = activity
@status = status
@streamurl = url
type = url ? 1 : activity_type
activity_obj = activity || url ? { 'name' => activity, 'url' => url, 'type' => type } : nil
... | ruby | def update_status(status, activity, url, since = 0, afk = false, activity_type = 0)
gateway_check
@activity = activity
@status = status
@streamurl = url
type = url ? 1 : activity_type
activity_obj = activity || url ? { 'name' => activity, 'url' => url, 'type' => type } : nil
... | [
"def",
"update_status",
"(",
"status",
",",
"activity",
",",
"url",
",",
"since",
"=",
"0",
",",
"afk",
"=",
"false",
",",
"activity_type",
"=",
"0",
")",
"gateway_check",
"@activity",
"=",
"activity",
"@status",
"=",
"status",
"@streamurl",
"=",
"url",
... | Updates presence status.
@param status [String] The status the bot should show up as. Can be `online`, `dnd`, `idle`, or `invisible`
@param activity [String, nil] The name of the activity to be played/watched/listened to/stream name on the stream.
@param url [String, nil] The Twitch URL to display as a stream. nil f... | [
"Updates",
"presence",
"status",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L503-L516 | train | Update the status of the game | [
30522,
13366,
10651,
1035,
3570,
1006,
3570,
1010,
4023,
1010,
24471,
2140,
1010,
2144,
1027,
30524,
2140,
1027,
24471,
2140,
2828,
1027,
24471,
2140,
1029,
1015,
1024,
4023,
1035,
2828,
4023,
1035,
27885,
3501,
1027,
4023,
1064,
1064,
2447... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/pdk | lib/pdk/util.rb | PDK.Util.make_tmpdir_name | def make_tmpdir_name(base)
t = Time.now.strftime('%Y%m%d')
name = "#{base}#{t}-#{Process.pid}-#{rand(0x100000000).to_s(36)}"
File.join(Dir.tmpdir, name)
end | ruby | def make_tmpdir_name(base)
t = Time.now.strftime('%Y%m%d')
name = "#{base}#{t}-#{Process.pid}-#{rand(0x100000000).to_s(36)}"
File.join(Dir.tmpdir, name)
end | [
"def",
"make_tmpdir_name",
"(",
"base",
")",
"t",
"=",
"Time",
".",
"now",
".",
"strftime",
"(",
"'%Y%m%d'",
")",
"name",
"=",
"\"#{base}#{t}-#{Process.pid}-#{rand(0x100000000).to_s(36)}\"",
"File",
".",
"join",
"(",
"Dir",
".",
"tmpdir",
",",
"name",
")",
"en... | Generate a name for a temporary directory.
@param base [String] A string to base the name generation off.
@return [String] The temporary directory path. | [
"Generate",
"a",
"name",
"for",
"a",
"temporary",
"directory",
"."
] | 0d864aff62ffef04b5104addf399d0476afd71e7 | https://github.com/puppetlabs/pdk/blob/0d864aff62ffef04b5104addf399d0476afd71e7/lib/pdk/util.rb#L46-L50 | train | Make a tmp directory name | [
30522,
13366,
2191,
1035,
1056,
8737,
4305,
2099,
1035,
2171,
1006,
2918,
1007,
1056,
1027,
2051,
1012,
2085,
1012,
2358,
12881,
7292,
1006,
1005,
1003,
1061,
1003,
1049,
1003,
1040,
1005,
1007,
2171,
1027,
1000,
1001,
1063,
2918,
1065,
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... |
hanami/hanami | lib/hanami/env.rb | Hanami.Env.load! | def load!(path)
return unless defined?(Dotenv::Parser)
contents = ::File.open(path, "rb:bom|utf-8", &:read)
parsed = Dotenv::Parser.call(contents)
parsed.each do |k, v|
next if @env.has_key?(k)
@env[k] = v
end
nil
end | ruby | def load!(path)
return unless defined?(Dotenv::Parser)
contents = ::File.open(path, "rb:bom|utf-8", &:read)
parsed = Dotenv::Parser.call(contents)
parsed.each do |k, v|
next if @env.has_key?(k)
@env[k] = v
end
nil
end | [
"def",
"load!",
"(",
"path",
")",
"return",
"unless",
"defined?",
"(",
"Dotenv",
"::",
"Parser",
")",
"contents",
"=",
"::",
"File",
".",
"open",
"(",
"path",
",",
"\"rb:bom|utf-8\"",
",",
":read",
")",
"parsed",
"=",
"Dotenv",
"::",
"Parser",
".",
"ca... | Loads a dotenv file and updates self
@param path [String, Pathname] the path to the dotenv file
@return void
@since 0.9.0
@api private | [
"Loads",
"a",
"dotenv",
"file",
"and",
"updates",
"self"
] | 8c6e5147e92ef869b25379448572da3698eacfdc | https://github.com/hanami/hanami/blob/8c6e5147e92ef869b25379448572da3698eacfdc/lib/hanami/env.rb#L55-L67 | train | Load a Dotenv file | [
30522,
13366,
7170,
999,
1006,
4130,
1007,
2709,
4983,
4225,
1029,
1006,
11089,
2368,
2615,
1024,
1024,
11968,
8043,
1007,
8417,
1027,
1024,
1024,
5371,
1012,
2330,
1006,
4130,
1010,
1000,
21144,
1024,
8945,
2213,
1064,
21183,
2546,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/fields/common_address_field.rb | Mail.CommonAddressField.addresses | def addresses
list = element.addresses.map { |a| a.address }
Mail::AddressContainer.new(self, list)
end | ruby | def addresses
list = element.addresses.map { |a| a.address }
Mail::AddressContainer.new(self, list)
end | [
"def",
"addresses",
"list",
"=",
"element",
".",
"addresses",
".",
"map",
"{",
"|",
"a",
"|",
"a",
".",
"address",
"}",
"Mail",
"::",
"AddressContainer",
".",
"new",
"(",
"self",
",",
"list",
")",
"end"
] | Returns the address string of all the addresses in the address list | [
"Returns",
"the",
"address",
"string",
"of",
"all",
"the",
"addresses",
"in",
"the",
"address",
"list"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/fields/common_address_field.rb#L46-L49 | train | Returns the addresses of the current Mail object. | [
30522,
13366,
11596,
2862,
1027,
5783,
1012,
11596,
1012,
4949,
1063,
1064,
1037,
1064,
1037,
1012,
4769,
1065,
5653,
1024,
1024,
4769,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/backend.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Backend.get_entity_tag_with_http_info | def get_entity_tag_with_http_info(resource_group_name, service_name, backendid, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, backendid, custom_headers:custom_headers).value!
end | ruby | def get_entity_tag_with_http_info(resource_group_name, service_name, backendid, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, backendid, custom_headers:custom_headers).value!
end | [
"def",
"get_entity_tag_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"backendid",
",",
"custom_headers",
":",
"nil",
")",
"get_entity_tag_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"backendid",
",",
"custom_headers",
":custom_he... | Gets the entity state (Etag) version of the backend specified by its
identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param backendid [String] Identifier of the Backend entity. Must be unique in
the current API Ma... | [
"Gets",
"the",
"entity",
"state",
"(",
"Etag",
")",
"version",
"of",
"the",
"backend",
"specified",
"by",
"its",
"identifier",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/backend.rb#L178-L180 | train | Gets the entity tag for the specified backend. | [
30522,
13366,
2131,
1035,
9178,
1035,
6415,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
2067,
10497,
3593,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
9178,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources_management/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb | Azure::ResourcesManagement::Mgmt::V2017_11_01_preview.ManagementGroups.delete | def delete(group_id, cache_control:'no-cache', custom_headers:nil)
response = delete_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
nil
end | ruby | def delete(group_id, cache_control:'no-cache', custom_headers:nil)
response = delete_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"group_id",
",",
"cache_control",
":",
"'no-cache'",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"group_id",
",",
"cache_control",
":cache_control",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!... | 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 b... | [
"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/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L493-L496 | train | Deletes the group. | [
30522,
13366,
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,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
2177,
1035,
8909,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb | Azure::SQL::Mgmt::V2014_04_01.ElasticPools.delete_with_http_info | def delete_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil)
delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil)
delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"elastic_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"elastic_pool_name",
",",
"custom_headers",
":custom_head... | Deletes the elastic pool.
@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 elastic_pool_name [String] The name of the elastic pool t... | [
"Deletes",
"the",
"elastic",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb#L163-L165 | train | Deletes the elastic pool. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
21274,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
2004,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_for_management_group_next | def list_for_management_group_next(next_page_link, custom_headers:nil)
response = list_for_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_for_management_group_next(next_page_link, custom_headers:nil)
response = list_for_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_for_management_group_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_for_management_group_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | Gets all remediations for the management group.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RemediationListResult] operation results. | [
"Gets",
"all",
"remediations",
"for",
"the",
"management",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L2445-L2448 | train | Gets the list of all the managed network interfaces. | [
30522,
13366,
2862,
1035,
2005,
1035,
2968,
1035,
2177,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2005,
1035,
2968,
1035,
2177,
1035,
2279,
1035,
2004,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
middleman/middleman | middleman-core/lib/middleman-core/application.rb | Middleman.Application.set | def set(key, value = nil, &block)
logger.warn "Warning: `set :#{key}` is deprecated. Use `config[:#{key}] =` instead."
value = block if block_given?
config[key] = value
end | ruby | def set(key, value = nil, &block)
logger.warn "Warning: `set :#{key}` is deprecated. Use `config[:#{key}] =` instead."
value = block if block_given?
config[key] = value
end | [
"def",
"set",
"(",
"key",
",",
"value",
"=",
"nil",
",",
"&",
"block",
")",
"logger",
".",
"warn",
"\"Warning: `set :#{key}` is deprecated. Use `config[:#{key}] =` instead.\"",
"value",
"=",
"block",
"if",
"block_given?",
"config",
"[",
"key",
"]",
"=",
"value",
... | Set attributes (global variables)
@deprecated Prefer accessing settings through "config".
@param [Symbol] key Name of the attribute
@param value Attribute value
@return [void] | [
"Set",
"attributes",
"(",
"global",
"variables",
")"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/application.rb#L442-L447 | train | Set a value for a given key. | [
30522,
13366,
2275,
1006,
3145,
1010,
3643,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
8833,
4590,
1012,
11582,
1000,
5432,
1024,
1036,
2275,
1024,
1001,
1063,
3145,
1065,
1036,
2003,
2139,
28139,
12921,
1012,
2224,
1036,
9530,
8873,
2290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
braintree/braintree_ruby | lib/braintree/transaction.rb | Braintree.Transaction.submit_for_settlement | def submit_for_settlement(amount = nil)
warn "[DEPRECATED] submit_for_settlement as an instance method is deprecated. Please use Transaction.submit_for_settlement"
result = @gateway.transaction.submit_for_settlement(id, amount)
if result.success?
copy_instance_variables_from_object result.tran... | ruby | def submit_for_settlement(amount = nil)
warn "[DEPRECATED] submit_for_settlement as an instance method is deprecated. Please use Transaction.submit_for_settlement"
result = @gateway.transaction.submit_for_settlement(id, amount)
if result.success?
copy_instance_variables_from_object result.tran... | [
"def",
"submit_for_settlement",
"(",
"amount",
"=",
"nil",
")",
"warn",
"\"[DEPRECATED] submit_for_settlement as an instance method is deprecated. Please use Transaction.submit_for_settlement\"",
"result",
"=",
"@gateway",
".",
"transaction",
".",
"submit_for_settlement",
"(",
"id"... | Deprecated. Use Braintree::Transaction.submit_for_settlement | [
"Deprecated",
".",
"Use",
"Braintree",
"::",
"Transaction",
".",
"submit_for_settlement"
] | 6e56c7099ea55bcdc4073cbea60b2688cef69663 | https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/transaction.rb#L353-L360 | train | Submit a settlement to the transaction. | [
30522,
13366,
12040,
1035,
2005,
1035,
4093,
1006,
3815,
1027,
9152,
2140,
1007,
11582,
1000,
1031,
2139,
28139,
12921,
1033,
12040,
1035,
2005,
1035,
4093,
2004,
2019,
6013,
4118,
2003,
2139,
28139,
12921,
1012,
3531,
2224,
12598,
1012,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb | Azure::Automation::Mgmt::V2015_10_31.DscCompilationJobOperations.get_stream | def get_stream(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers:nil)
response = get_stream_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_stream(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers:nil)
response = get_stream_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_stream",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"job_stream_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_stream_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
... | Retrieve the job stream identified by job stream id.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param job_id The job id.
@param job_stream_id [String] The job stream id.
@param custom_headers [Hash{String => Str... | [
"Retrieve",
"the",
"job",
"stream",
"identified",
"by",
"job",
"stream",
"id",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb#L346-L349 | train | Gets the sequence of documents in a job stream. | [
30522,
13366,
2131,
1035,
5460,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
3105,
1035,
5460,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/search.rb | Github.Client::Search.code | def code(*args)
params = arguments(args, required: [:q]).params
params['q'] ||= arguments.q
get_request('/search/code', params)
end | ruby | def code(*args)
params = arguments(args, required: [:q]).params
params['q'] ||= arguments.q
get_request('/search/code', params)
end | [
"def",
"code",
"(",
"*",
"args",
")",
"params",
"=",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":q",
"]",
")",
".",
"params",
"params",
"[",
"'q'",
"]",
"||=",
"arguments",
".",
"q",
"get_request",
"(",
"'/search/code'",
",",
"params",
")"... | Find file contents via various criteria.
(This method returns up to 100 results per page.)
@param [Hash] params
@option params [String] :q
The search terms. This can be any combination of the supported
issue search parameters.
@option params [String] :sort
Optional sort field. One of comments, created, or... | [
"Find",
"file",
"contents",
"via",
"various",
"criteria",
".",
"(",
"This",
"method",
"returns",
"up",
"to",
"100",
"results",
"per",
"page",
".",
")"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/search.rb#L126-L131 | train | Returns the code of a search | [
30522,
13366,
3642,
1006,
1008,
12098,
5620,
1007,
11498,
5244,
1027,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
1053,
1033,
1007,
1012,
11498,
5244,
11498,
5244,
1031,
1005,
1053,
1005,
1033,
1064,
1064,
1027,
9918,
1012,
1053,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | match/lib/match/nuke.rb | Match.Nuke.prepare_list | def prepare_list
UI.message("Fetching certificates and profiles...")
cert_type = Match.cert_type_sym(type)
prov_types = []
prov_types = [:development] if cert_type == :development
prov_types = [:appstore, :adhoc] if cert_type == :distribution
prov_types = [:enterprise] if cert_type ... | ruby | def prepare_list
UI.message("Fetching certificates and profiles...")
cert_type = Match.cert_type_sym(type)
prov_types = []
prov_types = [:development] if cert_type == :development
prov_types = [:appstore, :adhoc] if cert_type == :distribution
prov_types = [:enterprise] if cert_type ... | [
"def",
"prepare_list",
"UI",
".",
"message",
"(",
"\"Fetching certificates and profiles...\"",
")",
"cert_type",
"=",
"Match",
".",
"cert_type_sym",
"(",
"type",
")",
"prov_types",
"=",
"[",
"]",
"prov_types",
"=",
"[",
":development",
"]",
"if",
"cert_type",
"=... | Collect all the certs/profiles | [
"Collect",
"all",
"the",
"certs",
"/",
"profiles"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/match/lib/match/nuke.rb#L93-L129 | train | This method is used to fetch the certificates and profiles | [
30522,
13366,
7374,
1035,
2862,
21318,
1012,
4471,
1006,
1000,
18584,
2075,
17987,
1998,
17879,
1012,
1012,
1012,
1000,
1007,
8292,
5339,
1035,
2828,
1027,
2674,
1012,
8292,
5339,
1035,
2828,
1035,
25353,
2213,
1006,
2828,
1007,
4013,
2615,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
activerecord-hackery/ransack | lib/ransack/adapters/active_record/ransack/context.rb | Ransack.Context.bind_pair_for | def bind_pair_for(key)
@bind_pairs ||= {}
@bind_pairs[key] ||= begin
parent, attr_name = get_parent_and_attribute_name(key.to_s)
[parent, attr_name] if parent && attr_name
end
end | ruby | def bind_pair_for(key)
@bind_pairs ||= {}
@bind_pairs[key] ||= begin
parent, attr_name = get_parent_and_attribute_name(key.to_s)
[parent, attr_name] if parent && attr_name
end
end | [
"def",
"bind_pair_for",
"(",
"key",
")",
"@bind_pairs",
"||=",
"{",
"}",
"@bind_pairs",
"[",
"key",
"]",
"||=",
"begin",
"parent",
",",
"attr_name",
"=",
"get_parent_and_attribute_name",
"(",
"key",
".",
"to_s",
")",
"[",
"parent",
",",
"attr_name",
"]",
"... | << self | [
"<<",
"self"
] | d44bfe6fe21ab374ceea9d060267d0d38b09ef28 | https://github.com/activerecord-hackery/ransack/blob/d44bfe6fe21ab374ceea9d060267d0d38b09ef28/lib/ransack/adapters/active_record/ransack/context.rb#L41-L48 | train | Returns the bind_pairs for the given key. | [
30522,
13366,
14187,
1035,
3940,
1035,
2005,
1006,
3145,
1007,
1030,
14187,
1035,
7689,
1064,
1064,
1027,
1063,
1065,
1030,
14187,
1035,
7689,
1031,
3145,
1033,
1064,
1064,
1027,
4088,
6687,
1010,
2012,
16344,
1035,
2171,
1027,
2131,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
phusion/passenger | src/ruby_supportlib/phusion_passenger/message_channel.rb | PhusionPassenger.MessageChannel.read_scalar | def read_scalar(buffer = new_buffer, max_size = nil)
if !@io.read(4, buffer)
return nil
end
while buffer.size < 4
tmp = @io.read(4 - buffer.size)
if tmp.empty?
return nil
else
buffer << tmp
end
end
size = buffer.unpack(UINT32_PAC... | ruby | def read_scalar(buffer = new_buffer, max_size = nil)
if !@io.read(4, buffer)
return nil
end
while buffer.size < 4
tmp = @io.read(4 - buffer.size)
if tmp.empty?
return nil
else
buffer << tmp
end
end
size = buffer.unpack(UINT32_PAC... | [
"def",
"read_scalar",
"(",
"buffer",
"=",
"new_buffer",
",",
"max_size",
"=",
"nil",
")",
"if",
"!",
"@io",
".",
"read",
"(",
"4",
",",
"buffer",
")",
"return",
"nil",
"end",
"while",
"buffer",
".",
"size",
"<",
"4",
"tmp",
"=",
"@io",
".",
"read",... | Read a scalar message from the underlying IO object. Returns the
read message, or nil on end-of-stream.
Might raise SystemCallError, IOError or SocketError when something
goes wrong.
The +buffer+ argument specifies a buffer in which #read_scalar
stores the read data. It is good practice to reuse existing buffers... | [
"Read",
"a",
"scalar",
"message",
"from",
"the",
"underlying",
"IO",
"object",
".",
"Returns",
"the",
"read",
"message",
"or",
"nil",
"on",
"end",
"-",
"of",
"-",
"stream",
"."
] | 970964b53e0ba86959acdf40f06c99b0c4a128ca | https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/message_channel.rb#L177-L216 | train | Read a scalar message from the stream. | [
30522,
13366,
3191,
1035,
26743,
2099,
1006,
17698,
1027,
2047,
1035,
17698,
1010,
4098,
1035,
2946,
1027,
9152,
2140,
1007,
2065,
999,
1030,
22834,
1012,
3191,
1006,
1018,
1010,
17698,
1007,
2709,
9152,
2140,
2203,
2096,
17698,
1012,
2946,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/filter.rb | GraphQL.Filter.call | def call(member, ctx)
(@only ? @only.call(member, ctx) : true) &&
(@except ? !@except.call(member, ctx) : true)
end | ruby | def call(member, ctx)
(@only ? @only.call(member, ctx) : true) &&
(@except ? !@except.call(member, ctx) : true)
end | [
"def",
"call",
"(",
"member",
",",
"ctx",
")",
"(",
"@only",
"?",
"@only",
".",
"call",
"(",
"member",
",",
"ctx",
")",
":",
"true",
")",
"&&",
"(",
"@except",
"?",
"!",
"@except",
".",
"call",
"(",
"member",
",",
"ctx",
")",
":",
"true",
")",
... | Returns true if `member, ctx` passes this filter | [
"Returns",
"true",
"if",
"member",
"ctx",
"passes",
"this",
"filter"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/filter.rb#L11-L14 | train | Returns true if the member is in the list of the list of the list of members that are in the list of the list. | [
30522,
13366,
2655,
1006,
2266,
1010,
14931,
2595,
1007,
1006,
1030,
2069,
1029,
1030,
2069,
1012,
2655,
1006,
2266,
1010,
14931,
2595,
1007,
1024,
2995,
1007,
1004,
1004,
1006,
1030,
3272,
1029,
999,
1030,
3272,
1012,
2655,
1006,
2266,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/subnet.rb | Aws::EC2.Subnet.delete | def delete(options = {})
options = options.merge(subnet_id: @id)
resp = @client.delete_subnet(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(subnet_id: @id)
resp = @client.delete_subnet(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"subnet_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"delete_subnet",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
subnet.delete({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have the re... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/subnet.rb#L790-L794 | train | Delete a subnet | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
4942,
7159,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
4942,
7159,
1006,
7047,
1007,
24501,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/layout_helper.rb | Decidim.LayoutHelper.favicon | def favicon
return if current_organization.favicon.blank?
safe_join(Decidim::OrganizationFaviconUploader::SIZES.map do |version, size|
favicon_link_tag(current_organization.favicon.send(version).url, sizes: "#{size}x#{size}")
end)
end | ruby | def favicon
return if current_organization.favicon.blank?
safe_join(Decidim::OrganizationFaviconUploader::SIZES.map do |version, size|
favicon_link_tag(current_organization.favicon.send(version).url, sizes: "#{size}x#{size}")
end)
end | [
"def",
"favicon",
"return",
"if",
"current_organization",
".",
"favicon",
".",
"blank?",
"safe_join",
"(",
"Decidim",
"::",
"OrganizationFaviconUploader",
"::",
"SIZES",
".",
"map",
"do",
"|",
"version",
",",
"size",
"|",
"favicon_link_tag",
"(",
"current_organiza... | Public: Generates a set of meta tags that generate the different favicon
versions for an organization.
Returns a safe String with the versions. | [
"Public",
":",
"Generates",
"a",
"set",
"of",
"meta",
"tags",
"that",
"generate",
"the",
"different",
"favicon",
"versions",
"for",
"an",
"organization",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/layout_helper.rb#L10-L16 | train | Returns the favicon_link_tag for the current organization | [
30522,
13366,
6904,
7903,
2239,
2709,
2065,
2783,
1035,
3029,
1012,
6904,
7903,
2239,
1012,
8744,
1029,
3647,
1035,
3693,
1006,
11703,
28173,
2213,
1024,
1024,
3029,
7011,
7903,
2239,
6279,
11066,
2121,
1024,
1024,
10826,
1012,
4949,
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... |
puppetlabs/bolt | spec/lib/bolt_spec/file_cache.rb | BoltSpec.FileCache.mock_file_cache | def mock_file_cache(moduledir)
mock_cache = MockFileCache.new(moduledir)
allow(::BoltServer::FileCache).to receive(:new).and_return(mock_cache)
end | ruby | def mock_file_cache(moduledir)
mock_cache = MockFileCache.new(moduledir)
allow(::BoltServer::FileCache).to receive(:new).and_return(mock_cache)
end | [
"def",
"mock_file_cache",
"(",
"moduledir",
")",
"mock_cache",
"=",
"MockFileCache",
".",
"new",
"(",
"moduledir",
")",
"allow",
"(",
"::",
"BoltServer",
"::",
"FileCache",
")",
".",
"to",
"receive",
"(",
":new",
")",
".",
"and_return",
"(",
"mock_cache",
... | TODO: support more than just the sample module | [
"TODO",
":",
"support",
"more",
"than",
"just",
"the",
"sample",
"module"
] | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/spec/lib/bolt_spec/file_cache.rb#L28-L31 | train | Mocks the file cache | [
30522,
13366,
12934,
1035,
5371,
1035,
17053,
1006,
11336,
4305,
2099,
1007,
12934,
1035,
17053,
1027,
12934,
8873,
2571,
3540,
5403,
1012,
2047,
1006,
11336,
4305,
2099,
1007,
3499,
1006,
1024,
1024,
19947,
2121,
6299,
1024,
1024,
5371,
35... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
minimagick/minimagick | lib/mini_magick/tool.rb | MiniMagick.Tool.executable | def executable
exe = [name]
exe.unshift "magick" if MiniMagick.imagemagick7? && name != "magick"
exe.unshift "gm" if MiniMagick.graphicsmagick?
exe.unshift File.join(MiniMagick.cli_path, exe.shift) if MiniMagick.cli_path
Array(MiniMagick.cli_prefix).reverse_each { |p| exe.unshift p } if Mi... | ruby | def executable
exe = [name]
exe.unshift "magick" if MiniMagick.imagemagick7? && name != "magick"
exe.unshift "gm" if MiniMagick.graphicsmagick?
exe.unshift File.join(MiniMagick.cli_path, exe.shift) if MiniMagick.cli_path
Array(MiniMagick.cli_prefix).reverse_each { |p| exe.unshift p } if Mi... | [
"def",
"executable",
"exe",
"=",
"[",
"name",
"]",
"exe",
".",
"unshift",
"\"magick\"",
"if",
"MiniMagick",
".",
"imagemagick7?",
"&&",
"name",
"!=",
"\"magick\"",
"exe",
".",
"unshift",
"\"gm\"",
"if",
"MiniMagick",
".",
"graphicsmagick?",
"exe",
".",
"unsh... | The executable used for this tool. Respects
{MiniMagick::Configuration#cli}, {MiniMagick::Configuration#cli_path},
and {MiniMagick::Configuration#cli_prefix}.
@return [Array<String>]
@example
MiniMagick.configure { |config| config.cli = :graphicsmagick }
identify = MiniMagick::Tool::Identify.new
identify... | [
"The",
"executable",
"used",
"for",
"this",
"tool",
".",
"Respects",
"{",
"MiniMagick",
"::",
"Configuration#cli",
"}",
"{",
"MiniMagick",
"::",
"Configuration#cli_path",
"}",
"and",
"{",
"MiniMagick",
"::",
"Configuration#cli_prefix",
"}",
"."
] | d484786f35e91f107836d3c86aca61d50a35820b | https://github.com/minimagick/minimagick/blob/d484786f35e91f107836d3c86aca61d50a35820b/lib/mini_magick/tool.rb#L131-L138 | train | Returns the executable for this image. | [
30522,
13366,
4654,
8586,
23056,
4654,
2063,
1027,
1031,
2171,
1033,
4654,
2063,
1012,
4895,
6182,
6199,
1000,
3894,
2243,
1000,
2065,
7163,
2863,
12863,
2243,
1012,
3746,
2863,
12863,
2243,
2581,
1029,
1004,
1004,
2171,
999,
1027,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/fields/parameter_hash.rb | Mail.ParameterHash.[] | def [](key_name)
key_pattern = Regexp.escape(key_name.to_s)
pairs = []
exact = nil
each do |k,v|
if k =~ /^#{key_pattern}(\*|$)/i
if $1 == Constants::ASTERISK
pairs << [k, v]
else
exact = k
end
end
end
if pairs.e... | ruby | def [](key_name)
key_pattern = Regexp.escape(key_name.to_s)
pairs = []
exact = nil
each do |k,v|
if k =~ /^#{key_pattern}(\*|$)/i
if $1 == Constants::ASTERISK
pairs << [k, v]
else
exact = k
end
end
end
if pairs.e... | [
"def",
"[]",
"(",
"key_name",
")",
"key_pattern",
"=",
"Regexp",
".",
"escape",
"(",
"key_name",
".",
"to_s",
")",
"pairs",
"=",
"[",
"]",
"exact",
"=",
"nil",
"each",
"do",
"|",
"k",
",",
"v",
"|",
"if",
"k",
"=~",
"/",
"#{",
"key_pattern",
"}",... | :nodoc: | [
":",
"nodoc",
":"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/fields/parameter_hash.rb#L16-L43 | train | Returns the value pair for the given key name. | [
30522,
13366,
1031,
1033,
1006,
3145,
1035,
2171,
1007,
3145,
1035,
5418,
1027,
19723,
10288,
2361,
1012,
4019,
1006,
3145,
1035,
2171,
1012,
2000,
1035,
1055,
1007,
7689,
1027,
1031,
1033,
6635,
1027,
9152,
2140,
2169,
2079,
1064,
1047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/nested_attributes.rb | ActiveRecord.NestedAttributes.check_record_limit! | def check_record_limit!(limit, attributes_collection)
if limit
limit = \
case limit
when Symbol
send(limit)
when Proc
limit.call
else
limit
end
if limit && attributes_collection.size > limi... | ruby | def check_record_limit!(limit, attributes_collection)
if limit
limit = \
case limit
when Symbol
send(limit)
when Proc
limit.call
else
limit
end
if limit && attributes_collection.size > limi... | [
"def",
"check_record_limit!",
"(",
"limit",
",",
"attributes_collection",
")",
"if",
"limit",
"limit",
"=",
"case",
"limit",
"when",
"Symbol",
"send",
"(",
"limit",
")",
"when",
"Proc",
"limit",
".",
"call",
"else",
"limit",
"end",
"if",
"limit",
"&&",
"at... | Takes in a limit and checks if the attributes_collection has too many
records. It accepts limit in the form of symbol, proc, or
number-like object (anything that can be compared with an integer).
Raises TooManyRecords error if the attributes_collection is
larger than the limit. | [
"Takes",
"in",
"a",
"limit",
"and",
"checks",
"if",
"the",
"attributes_collection",
"has",
"too",
"many",
"records",
".",
"It",
"accepts",
"limit",
"in",
"the",
"form",
"of",
"symbol",
"proc",
"or",
"number",
"-",
"like",
"object",
"(",
"anything",
"that",... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/nested_attributes.rb#L532-L548 | train | Check the record limit | [
30522,
13366,
4638,
1035,
2501,
1035,
5787,
999,
1006,
5787,
1010,
12332,
1035,
3074,
1007,
2065,
5787,
5787,
1027,
1032,
2553,
5787,
2043,
6454,
4604,
1006,
5787,
1007,
2043,
4013,
2278,
5787,
1012,
2655,
2842,
5787,
2203,
2065,
5787,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_service_info | def get_service_info(application_id, service_id, timeout:60, custom_headers:nil)
response = get_service_info_async(application_id, service_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_service_info(application_id, service_id, timeout:60, custom_headers:nil)
response = get_service_info_async(application_id, service_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_service_info",
"(",
"application_id",
",",
"service_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_service_info_async",
"(",
"application_id",
",",
"service_id",
",",
"timeout",
":",
"timeout",
",",
"cus... | Gets the information about the specific service belonging to the Service
Fabric application.
Returns the information about the specified service belonging to the
specified Service Fabric application.
@param application_id [String] The identity of the application. This is
typically the full name of the applicatio... | [
"Gets",
"the",
"information",
"about",
"the",
"specific",
"service",
"belonging",
"to",
"the",
"Service",
"Fabric",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L9845-L9848 | train | Gets the information about the service. | [
30522,
13366,
2131,
1035,
2326,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
2326,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2326,
1035,
18558,
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... |
drapergem/draper | lib/draper/factory.rb | Draper.Factory.decorate | def decorate(object, options = {})
return nil if object.nil?
Worker.new(decorator_class, object).call(options.reverse_merge(default_options))
end | ruby | def decorate(object, options = {})
return nil if object.nil?
Worker.new(decorator_class, object).call(options.reverse_merge(default_options))
end | [
"def",
"decorate",
"(",
"object",
",",
"options",
"=",
"{",
"}",
")",
"return",
"nil",
"if",
"object",
".",
"nil?",
"Worker",
".",
"new",
"(",
"decorator_class",
",",
"object",
")",
".",
"call",
"(",
"options",
".",
"reverse_merge",
"(",
"default_options... | Creates a decorator factory.
@option options [Decorator, CollectionDecorator] :with (nil)
decorator class to use. If nil, it is inferred from the object
passed to {#decorate}.
@option options [Hash, #call] context
extra data to be stored in created decorators. If a proc is given, it
will be called each t... | [
"Creates",
"a",
"decorator",
"factory",
"."
] | d44c86f1e560afc0cf0dad4ae09bfaa3f10a1759 | https://github.com/drapergem/draper/blob/d44c86f1e560afc0cf0dad4ae09bfaa3f10a1759/lib/draper/factory.rb#L29-L32 | train | Decorates an object with the decorated object. | [
30522,
13366,
29460,
1006,
4874,
1010,
7047,
1027,
1063,
1065,
1007,
2709,
9152,
2140,
2065,
4874,
1012,
9152,
2140,
1029,
7309,
1012,
2047,
1006,
25545,
8844,
1035,
2465,
1010,
4874,
1007,
1012,
2655,
1006,
7047,
1012,
7901,
1035,
13590,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/drawing/str_data.rb | Axlsx.StrData.to_xml_string | def to_xml_string(str = "")
str << ('<c:' << @tag_name.to_s << '>')
str << ('<c:ptCount val="' << @pt.size.to_s << '"/>')
@pt.each_with_index do |value, index|
value.to_xml_string index, str
end
str << ('</c:' << @tag_name.to_s << '>')
end | ruby | def to_xml_string(str = "")
str << ('<c:' << @tag_name.to_s << '>')
str << ('<c:ptCount val="' << @pt.size.to_s << '"/>')
@pt.each_with_index do |value, index|
value.to_xml_string index, str
end
str << ('</c:' << @tag_name.to_s << '>')
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"\"\"",
")",
"str",
"<<",
"(",
"'<c:'",
"<<",
"@tag_name",
".",
"to_s",
"<<",
"'>'",
")",
"str",
"<<",
"(",
"'<c:ptCount val=\"'",
"<<",
"@pt",
".",
"size",
".",
"to_s",
"<<",
"'\"/>'",
")",
"@pt",
".",
"each_... | serialize the object | [
"serialize",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/str_data.rb#L31-L38 | train | Returns the XML string representation of this object. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1000,
1000,
1007,
2358,
2099,
1026,
1026,
1006,
1005,
1026,
1039,
1024,
1005,
1026,
1026,
1030,
6415,
1035,
2171,
1012,
2000,
1035,
1055,
1026,
1026,
1005,
1028,
1005,
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... |
mikel/mail | lib/mail/message.rb | Mail.Message.part | def part(params = {})
new_part = Part.new(params)
yield new_part if block_given?
add_part(new_part)
end | ruby | def part(params = {})
new_part = Part.new(params)
yield new_part if block_given?
add_part(new_part)
end | [
"def",
"part",
"(",
"params",
"=",
"{",
"}",
")",
"new_part",
"=",
"Part",
".",
"new",
"(",
"params",
")",
"yield",
"new_part",
"if",
"block_given?",
"add_part",
"(",
"new_part",
")",
"end"
] | Allows you to add a part in block form to an existing mail message object
Example:
mail = Mail.new do
part :content_type => "multipart/alternative", :content_disposition => "inline" do |p|
p.part :content_type => "text/plain", :body => "test text\nline #2"
p.part :content_type => "text/html", :body... | [
"Allows",
"you",
"to",
"add",
"a",
"part",
"in",
"block",
"form",
"to",
"an",
"existing",
"mail",
"message",
"object"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/message.rb#L1720-L1724 | train | Create a new Part object. | [
30522,
13366,
2112,
1006,
11498,
5244,
1027,
1063,
1065,
1007,
2047,
1035,
2112,
1027,
2112,
1012,
2047,
1006,
11498,
5244,
1007,
10750,
2047,
1035,
2112,
2065,
3796,
1035,
2445,
1029,
5587,
1035,
2112,
1006,
2047,
1035,
2112,
1007,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/scss-lint | lib/scss_lint/cli.rb | SCSSLint.CLI.run | def run(args)
options = SCSSLint::Options.new.parse(args)
act_on_options(options)
rescue StandardError => e
handle_runtime_exception(e, options)
end | ruby | def run(args)
options = SCSSLint::Options.new.parse(args)
act_on_options(options)
rescue StandardError => e
handle_runtime_exception(e, options)
end | [
"def",
"run",
"(",
"args",
")",
"options",
"=",
"SCSSLint",
"::",
"Options",
".",
"new",
".",
"parse",
"(",
"args",
")",
"act_on_options",
"(",
"options",
")",
"rescue",
"StandardError",
"=>",
"e",
"handle_runtime_exception",
"(",
"e",
",",
"options",
")",... | Create a CLI that outputs to the specified logger.
@param logger [SCSSLint::Logger] | [
"Create",
"a",
"CLI",
"that",
"outputs",
"to",
"the",
"specified",
"logger",
"."
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/cli.rb#L31-L36 | train | Run the command | [
30522,
13366,
2448,
1006,
12098,
5620,
1007,
7047,
1027,
8040,
4757,
4115,
2102,
1024,
1024,
7047,
1012,
2047,
1012,
11968,
3366,
1006,
12098,
5620,
1007,
2552,
1035,
2006,
1035,
7047,
1006,
7047,
1007,
5343,
3115,
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... |
Azure/azure-sdk-for-ruby | data/azure_event_grid/lib/2018-01-01/generated/azure_event_grid/event_grid_client.rb | Azure::EventGrid::V2018_01_01.EventGridClient.publish_events | def publish_events(topic_hostname, events, custom_headers:nil)
response = publish_events_async(topic_hostname, events, custom_headers:custom_headers).value!
nil
end | ruby | def publish_events(topic_hostname, events, custom_headers:nil)
response = publish_events_async(topic_hostname, events, custom_headers:custom_headers).value!
nil
end | [
"def",
"publish_events",
"(",
"topic_hostname",
",",
"events",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"publish_events_async",
"(",
"topic_hostname",
",",
"events",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Publishes a batch of events to an Azure Event Grid topic.
@param topic_hostname [String] The host name of the topic, e.g.
topic1.westus2-1.eventgrid.azure.net
@param events [Array<EventGridEvent>] An array of events to be published to
Event Grid.
@param custom_headers [Hash{String => String}] A hash of custom hea... | [
"Publishes",
"a",
"batch",
"of",
"events",
"to",
"an",
"Azure",
"Event",
"Grid",
"topic",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_event_grid/lib/2018-01-01/generated/azure_event_grid/event_grid_client.rb#L123-L126 | train | Publishes the specified events to the specified topic. | [
30522,
13366,
10172,
1035,
2824,
1006,
8476,
1035,
3677,
18442,
1010,
2824,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10172,
1035,
2824,
1035,
2004,
6038,
2278,
1006,
8476,
1035,
3677,
18442,
1010,
2824,
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... |
square/connect-ruby-sdk | lib/square_connect/api/v1_employees_api.rb | SquareConnect.V1EmployeesApi.list_timecard_events | def list_timecard_events(timecard_id, opts = {})
data, _status_code, _headers = list_timecard_events_with_http_info(timecard_id, opts)
return data
end | ruby | def list_timecard_events(timecard_id, opts = {})
data, _status_code, _headers = list_timecard_events_with_http_info(timecard_id, opts)
return data
end | [
"def",
"list_timecard_events",
"(",
"timecard_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"list_timecard_events_with_http_info",
"(",
"timecard_id",
",",
"opts",
")",
"return",
"data",
"end"
] | ListTimecardEvents
Provides summary information for all events associated with a particular timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
@param timecard_id The ID of the timecard to list events for.... | [
"ListTimecardEvents",
"Provides",
"summary",
"information",
"for",
"all",
"events",
"associated",
"with",
"a",
"particular",
"timecard",
".",
"<aside",
">",
"Only",
"approved",
"accounts",
"can",
"manage",
"their",
"employees",
"with",
"Square",
".",
"Unapproved",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L459-L462 | train | Returns a list of timecard events | [
30522,
13366,
2862,
1035,
2051,
11522,
1035,
2824,
1006,
2051,
11522,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
2862,
1035,
2051,
11522,
1035,
2824,
1035,
2007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.list_by_location_as_lazy | def list_by_location_as_lazy(location, custom_headers:nil)
response = list_by_location_async(location, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_location_next_async(next_page_link, custom_... | ruby | def list_by_location_as_lazy(location, custom_headers:nil)
response = list_by_location_async(location, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_location_next_async(next_page_link, custom_... | [
"def",
"list_by_location_as_lazy",
"(",
"location",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_location_async",
"(",
"location",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"unless",
"response",
".",
"nil?",
"page",
"=",
"r... | Gets all the virtual machines under the specified subscription for the
specified location.
@param location [String] The location for which virtual machines under the
subscription are queried.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return ... | [
"Gets",
"all",
"the",
"virtual",
"machines",
"under",
"the",
"specified",
"subscription",
"for",
"the",
"specified",
"location",
"."
] | 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#L2780-L2789 | train | Gets the list of a service domain components. | [
30522,
13366,
2862,
1035,
2011,
1035,
3295,
1035,
2004,
1035,
13971,
1006,
3295,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
3295,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/login_profile.rb | Aws::IAM.LoginProfile.update | def update(options = {})
options = options.merge(user_name: @user_name)
resp = @client.update_login_profile(options)
resp.data
end | ruby | def update(options = {})
options = options.merge(user_name: @user_name)
resp = @client.update_login_profile(options)
resp.data
end | [
"def",
"update",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@user_name",
")",
"resp",
"=",
"@client",
".",
"update_login_profile",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
login_profile.update({
password: "passwordType",
password_reset_required: false,
})
@param [Hash] options ({})
@option options [String] :password
The new password for the specified IAM user.
The [regex pattern][1] used to validate this parameter ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/login_profile.rb#L258-L262 | train | Update the login profile | [
30522,
13366,
10651,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
5310,
1035,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
10651,
1035,
8833,
2378,
1035,
6337,
1006,
7047,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
floere/phony | lib/phony/country.rb | Phony.Country.format | def format national_number, options = {}
type = options[:format] || @format
space = options[:spaces] || @space || @@default_space
local_space = options[:local_spaces] || @local_space || space || @@default_local_space
parentheses = options[:parentheses... | ruby | def format national_number, options = {}
type = options[:format] || @format
space = options[:spaces] || @space || @@default_space
local_space = options[:local_spaces] || @local_space || space || @@default_local_space
parentheses = options[:parentheses... | [
"def",
"format",
"national_number",
",",
"options",
"=",
"{",
"}",
"type",
"=",
"options",
"[",
":format",
"]",
"||",
"@format",
"space",
"=",
"options",
"[",
":spaces",
"]",
"||",
"@space",
"||",
"@@default_space",
"local_space",
"=",
"options",
"[",
":lo... | Format the number, given the national part of it. | [
"Format",
"the",
"number",
"given",
"the",
"national",
"part",
"of",
"it",
"."
] | 9ca50743499cf478a25fdb927bcdacd29d2c90c7 | https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country.rb#L77-L90 | train | Format the national number using the format option. | [
30522,
13366,
4289,
2120,
1035,
2193,
1010,
7047,
1027,
1063,
1065,
2828,
1027,
7047,
1031,
1024,
4289,
1033,
1064,
1064,
1030,
4289,
2686,
1027,
7047,
1031,
1024,
7258,
1033,
1064,
1064,
1030,
2686,
1064,
1064,
1030,
1030,
12398,
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... |
square/connect-ruby-sdk | lib/square_connect/models/list_customers_request.rb | SquareConnect.ListCustomersRequest.sort_order= | def sort_order=(sort_order)
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
unless validator.valid?(sort_order)
fail ArgumentError, "invalid value for 'sort_order', must be one of #{validator.allowable_values}."
end
@sort_order = sort_order
end | ruby | def sort_order=(sort_order)
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
unless validator.valid?(sort_order)
fail ArgumentError, "invalid value for 'sort_order', must be one of #{validator.allowable_values}."
end
@sort_order = sort_order
end | [
"def",
"sort_order",
"=",
"(",
"sort_order",
")",
"validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"DESC\"",
",",
"\"ASC\"",
"]",
")",
"unless",
"validator",
".",
"valid?",
"(",
"sort_order",
")",
"fail",
"ArgumentError",
... | Custom attribute writer method checking allowed values (enum).
@param [Object] sort_order 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/list_customers_request.rb#L115-L121 | train | Sets the sort order of the query. | [
30522,
13366,
4066,
1035,
2344,
1027,
1006,
4066,
1035,
2344,
1007,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
4078,
2278,
1000,
1010,
1000,
2004,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_analyses_next | def list_site_analyses_next(next_page_link, custom_headers:nil)
response = list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_site_analyses_next(next_page_link, custom_headers:nil)
response = list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_site_analyses_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_site_analyses_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"... | Get Site Analyses
Get Site Analyses
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [DiagnosticAnalysisCollection] operation results. | [
"Get",
"Site",
"Analyses"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L2816-L2819 | train | Gets the site analyses for a site. | [
30522,
13366,
2862,
1035,
2609,
1035,
16478,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2609,
1035,
16478,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
daddyz/phonelib | lib/phonelib/phone.rb | Phonelib.Phone.local_number | def local_number
return national unless possible?
format_match, format_string = formatting_data
if format_string =~ /^.*[0-9]+.*\$1/ && format_match
format_string.gsub(/^.*\$2/, '$2')
.gsub(/\$\d/) { |el| format_match[el[1].to_i] }
else
national
end
end | ruby | def local_number
return national unless possible?
format_match, format_string = formatting_data
if format_string =~ /^.*[0-9]+.*\$1/ && format_match
format_string.gsub(/^.*\$2/, '$2')
.gsub(/\$\d/) { |el| format_match[el[1].to_i] }
else
national
end
end | [
"def",
"local_number",
"return",
"national",
"unless",
"possible?",
"format_match",
",",
"format_string",
"=",
"formatting_data",
"if",
"format_string",
"=~",
"/",
"\\$",
"/",
"&&",
"format_match",
"format_string",
".",
"gsub",
"(",
"/",
"\\$",
"/",
",",
"'$2'",... | returns local number
@return [String] local number | [
"returns",
"local",
"number"
] | aa0023eab7c896b71275bf342bc7f49735cbdbbf | https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone.rb#L140-L150 | train | Returns the number of the local number. | [
30522,
13366,
2334,
1035,
2193,
2709,
2120,
4983,
2825,
1029,
4289,
1035,
2674,
1010,
4289,
1035,
5164,
1027,
4289,
3436,
1035,
2951,
2065,
4289,
1035,
5164,
1027,
1066,
1013,
1034,
1012,
1008,
1031,
1014,
1011,
1023,
1033,
1009,
1012,
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... |
cypriss/mutations | lib/mutations/command.rb | Mutations.Command.add_error | def add_error(key, kind, message = nil)
raise ArgumentError.new("Invalid kind") unless kind.is_a?(Symbol)
@errors ||= ErrorHash.new
@errors.tap do |errs|
path = key.to_s.split(".")
last = path.pop
inner = path.inject(errs) do |cur_errors,part|
cur_errors[part.to_sym]... | ruby | def add_error(key, kind, message = nil)
raise ArgumentError.new("Invalid kind") unless kind.is_a?(Symbol)
@errors ||= ErrorHash.new
@errors.tap do |errs|
path = key.to_s.split(".")
last = path.pop
inner = path.inject(errs) do |cur_errors,part|
cur_errors[part.to_sym]... | [
"def",
"add_error",
"(",
"key",
",",
"kind",
",",
"message",
"=",
"nil",
")",
"raise",
"ArgumentError",
".",
"new",
"(",
"\"Invalid kind\"",
")",
"unless",
"kind",
".",
"is_a?",
"(",
"Symbol",
")",
"@errors",
"||=",
"ErrorHash",
".",
"new",
"@errors",
".... | add_error("name", :too_short)
add_error("colors.foreground", :not_a_color) # => to create errors = {colors: {foreground: :not_a_color}}
or, supply a custom message:
add_error("name", :too_short, "The name 'blahblahblah' is too short!") | [
"add_error",
"(",
"name",
":",
"too_short",
")",
"add_error",
"(",
"colors",
".",
"foreground",
":",
"not_a_color",
")",
"#",
"=",
">",
"to",
"create",
"errors",
"=",
"{",
"colors",
":",
"{",
"foreground",
":",
":",
"not_a_color",
"}}",
"or",
"supply",
... | c9948325648d0ea85420963829d1a4d6b4f17bd9 | https://github.com/cypriss/mutations/blob/c9948325648d0ea85420963829d1a4d6b4f17bd9/lib/mutations/command.rb#L112-L124 | train | Add an error to the error hash | [
30522,
13366,
5587,
1035,
7561,
1006,
3145,
1010,
2785,
1010,
4471,
1027,
9152,
2140,
1007,
5333,
6685,
2121,
29165,
1012,
2047,
1006,
1000,
19528,
2785,
1000,
1007,
4983,
2785,
1012,
2003,
1035,
1037,
1029,
1006,
6454,
1007,
1030,
10697,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/path_utils.rb | Sprockets.PathUtils.split_subpath | def split_subpath(path, subpath)
return "" if path == subpath
path = File.join(path, ''.freeze)
if subpath.start_with?(path)
subpath[path.length..-1]
else
nil
end
end | ruby | def split_subpath(path, subpath)
return "" if path == subpath
path = File.join(path, ''.freeze)
if subpath.start_with?(path)
subpath[path.length..-1]
else
nil
end
end | [
"def",
"split_subpath",
"(",
"path",
",",
"subpath",
")",
"return",
"\"\"",
"if",
"path",
"==",
"subpath",
"path",
"=",
"File",
".",
"join",
"(",
"path",
",",
"''",
".",
"freeze",
")",
"if",
"subpath",
".",
"start_with?",
"(",
"path",
")",
"subpath",
... | Internal: Get relative path for root path and subpath.
path - String path
subpath - String subpath of path
Returns relative String path if subpath is a subpath of path, or nil if
subpath is outside of path. | [
"Internal",
":",
"Get",
"relative",
"path",
"for",
"root",
"path",
"and",
"subpath",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/path_utils.rb#L162-L170 | train | Split the subpath into the parts of the path. | [
30522,
13366,
3975,
1035,
4942,
15069,
1006,
4130,
1010,
4942,
15069,
1007,
2709,
1000,
1000,
2065,
4130,
1027,
1027,
4942,
15069,
4130,
1027,
5371,
1012,
3693,
1006,
4130,
1010,
1005,
1005,
1012,
13184,
1007,
2065,
4942,
15069,
1012,
2707,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_for_subscription_as_lazy | def list_for_subscription_as_lazy(query_options:nil, custom_headers:nil)
response = list_for_subscription_async(query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_for_subs... | ruby | def list_for_subscription_as_lazy(query_options:nil, custom_headers:nil)
response = list_for_subscription_async(query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_for_subs... | [
"def",
"list_for_subscription_as_lazy",
"(",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_for_subscription_async",
"(",
"query_options",
":query_options",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"unles... | Gets all remediations for the subscription.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RemediationListResult] which provide lazy access to pages of the
respons... | [
"Gets",
"all",
"remediations",
"for",
"the",
"subscription",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L3128-L3137 | train | Gets the list of all the available CDNs. | [
30522,
13366,
2862,
1035,
2005,
1035,
15002,
1035,
2004,
1035,
13971,
1006,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2005,
1035,
15002,
1035,
2004,
6038,
2278,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
httprb/http | lib/http/client.rb | HTTP.Client.build_request | def build_request(verb, uri, opts = {}) # rubocop:disable Style/OptionHash
opts = @default_options.merge(opts)
uri = make_request_uri(uri, opts)
headers = make_request_headers(opts)
body = make_request_body(opts, headers)
req = HTTP::Request.new(
:verb => verb,... | ruby | def build_request(verb, uri, opts = {}) # rubocop:disable Style/OptionHash
opts = @default_options.merge(opts)
uri = make_request_uri(uri, opts)
headers = make_request_headers(opts)
body = make_request_body(opts, headers)
req = HTTP::Request.new(
:verb => verb,... | [
"def",
"build_request",
"(",
"verb",
",",
"uri",
",",
"opts",
"=",
"{",
"}",
")",
"# rubocop:disable Style/OptionHash",
"opts",
"=",
"@default_options",
".",
"merge",
"(",
"opts",
")",
"uri",
"=",
"make_request_uri",
"(",
"uri",
",",
"opts",
")",
"headers",
... | Prepare an HTTP request | [
"Prepare",
"an",
"HTTP",
"request"
] | f37a10ea4fab3ee411907ea2e4251ddf0ca33a93 | https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/client.rb#L40-L58 | train | Build a request object | [
30522,
13366,
3857,
1035,
5227,
1006,
12034,
1010,
24471,
2072,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
1001,
14548,
24163,
2361,
1024,
4487,
19150,
2806,
1013,
5724,
14949,
2232,
23569,
2015,
1027,
1030,
12398,
1035,
7047,
1012,
13590,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/kpi.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Kpi.reprocess_with_http_info | def reprocess_with_http_info(resource_group_name, hub_name, kpi_name, custom_headers:nil)
reprocess_async(resource_group_name, hub_name, kpi_name, custom_headers:custom_headers).value!
end | ruby | def reprocess_with_http_info(resource_group_name, hub_name, kpi_name, custom_headers:nil)
reprocess_async(resource_group_name, hub_name, kpi_name, custom_headers:custom_headers).value!
end | [
"def",
"reprocess_with_http_info",
"(",
"resource_group_name",
",",
"hub_name",
",",
"kpi_name",
",",
"custom_headers",
":",
"nil",
")",
"reprocess_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"kpi_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Reprocesses the Kpi values of the specified KPI.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param kpi_name [String] The name of the KPI.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP re... | [
"Reprocesses",
"the",
"Kpi",
"values",
"of",
"the",
"specified",
"KPI",
"."
] | 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/kpi.rb#L237-L239 | train | Reprocesses the specified KPI in a hub. | [
30522,
13366,
16360,
3217,
9623,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
30524,
2140,
1007,
16360,
3217,
9623,
2015,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.WebhookOperations.generate_uri | def generate_uri(resource_group_name, automation_account_name, custom_headers:nil)
response = generate_uri_async(resource_group_name, automation_account_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def generate_uri(resource_group_name, automation_account_name, custom_headers:nil)
response = generate_uri_async(resource_group_name, automation_account_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"generate_uri",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"generate_uri_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Generates a Uri for use in creating a webhook.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [... | [
"Generates",
"a",
"Uri",
"for",
"use",
"in",
"creating",
"a",
"webhook",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb#L34-L37 | train | Generates a URI for a given automation account. | [
30522,
13366,
9699,
1035,
24471,
2072,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9699,
1035,
24471,
2072,
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... |
strongself/Generamba | lib/generamba/template/helpers/catalog_downloader.rb | Generamba.CatalogDownloader.update_all_catalogs_and_return_filepaths | def update_all_catalogs_and_return_filepaths
does_rambafile_exist = Dir[RAMBAFILE_NAME].count > 0
if does_rambafile_exist
rambafile = YAML.load_file(RAMBAFILE_NAME)
catalogs = rambafile[CATALOGS_KEY]
end
terminator = CatalogTerminator.new
terminator.remove_all_catalogs
... | ruby | def update_all_catalogs_and_return_filepaths
does_rambafile_exist = Dir[RAMBAFILE_NAME].count > 0
if does_rambafile_exist
rambafile = YAML.load_file(RAMBAFILE_NAME)
catalogs = rambafile[CATALOGS_KEY]
end
terminator = CatalogTerminator.new
terminator.remove_all_catalogs
... | [
"def",
"update_all_catalogs_and_return_filepaths",
"does_rambafile_exist",
"=",
"Dir",
"[",
"RAMBAFILE_NAME",
"]",
".",
"count",
">",
"0",
"if",
"does_rambafile_exist",
"rambafile",
"=",
"YAML",
".",
"load_file",
"(",
"RAMBAFILE_NAME",
")",
"catalogs",
"=",
"rambafile... | Updates all of the template catalogs and returns their filepaths.
If there is a Rambafile in the current directory, it also updates all of the catalogs specified there.
@return [Array] An array of filepaths to downloaded catalogs | [
"Updates",
"all",
"of",
"the",
"template",
"catalogs",
"and",
"returns",
"their",
"filepaths",
".",
"If",
"there",
"is",
"a",
"Rambafile",
"in",
"the",
"current",
"directory",
"it",
"also",
"updates",
"all",
"of",
"the",
"catalogs",
"specified",
"there",
"."... | 9ef343805f3a66f58bc36e120e822d5436a4da97 | https://github.com/strongself/Generamba/blob/9ef343805f3a66f58bc36e120e822d5436a4da97/lib/generamba/template/helpers/catalog_downloader.rb#L12-L33 | train | Update all the catalogs and return the file paths of the generated catalog. | [
30522,
13366,
10651,
1035,
2035,
1035,
12105,
2015,
1035,
1998,
1035,
2709,
1035,
5371,
15069,
2015,
2515,
1035,
8223,
3676,
8873,
2571,
1035,
4839,
1027,
16101,
1031,
8223,
3676,
8873,
2571,
1035,
2171,
1033,
1012,
4175,
1028,
1014,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb | Azure::Consumption::Mgmt::V2018_06_30.UsageDetails.list_by_enrollment_account_next | def list_by_enrollment_account_next(next_page_link, custom_headers:nil)
response = list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_enrollment_account_next(next_page_link, custom_headers:nil)
response = list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_enrollment_account_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_enrollment_account_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",... | Lists the usage details by enrollmentAccountId for a scope by current billing
period. Usage details are available via this API only for May 1, 2014 or
later.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Lists",
"the",
"usage",
"details",
"by",
"enrollmentAccountId",
"for",
"a",
"scope",
"by",
"current",
"billing",
"period",
".",
"Usage",
"details",
"are",
"available",
"via",
"this",
"API",
"only",
"for",
"May",
"1",
"2014",
"or",
"later",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb#L1793-L1796 | train | Gets the list of all the enrollment accounts in a subscription. | [
30522,
13366,
2862,
1035,
2011,
1035,
10316,
1035,
4070,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
10316,
1035,
4070,
1035,
2279,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/octo_fetcher.rb | GitHubChangelogGenerator.OctoFetcher.fetch_closed_pull_requests | def fetch_closed_pull_requests
pull_requests = []
options = { state: "closed" }
page_i = 0
count_pages = calculate_pages(@client, "pull_requests", options)
iterate_pages(@client, "pull_requests", options) do |new_pr|
page_i += PER_PAGE_NUMBER
log_string = "Fetching m... | ruby | def fetch_closed_pull_requests
pull_requests = []
options = { state: "closed" }
page_i = 0
count_pages = calculate_pages(@client, "pull_requests", options)
iterate_pages(@client, "pull_requests", options) do |new_pr|
page_i += PER_PAGE_NUMBER
log_string = "Fetching m... | [
"def",
"fetch_closed_pull_requests",
"pull_requests",
"=",
"[",
"]",
"options",
"=",
"{",
"state",
":",
"\"closed\"",
"}",
"page_i",
"=",
"0",
"count_pages",
"=",
"calculate_pages",
"(",
"@client",
",",
"\"pull_requests\"",
",",
"options",
")",
"iterate_pages",
... | Fetch all pull requests. We need them to detect :merged_at parameter
@return [Array <Hash>] all pull requests | [
"Fetch",
"all",
"pull",
"requests",
".",
"We",
"need",
"them",
"to",
"detect",
":",
"merged_at",
"parameter"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/octo_fetcher.rb#L164-L181 | train | Fetch all pull requests that are closed | [
30522,
13366,
18584,
1035,
2701,
1035,
4139,
1035,
11186,
4139,
1035,
11186,
1027,
1031,
1033,
7047,
1027,
1063,
2110,
1024,
1000,
2701,
1000,
1065,
3931,
1035,
1045,
1027,
1014,
4175,
1035,
5530,
1027,
18422,
1035,
5530,
1006,
1030,
7396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/transformations.rb | Azure::StreamAnalytics::Mgmt::V2016_03_01.Transformations.update_with_http_info | def update_with_http_info(transformation, resource_group_name, job_name, transformation_name, if_match:nil, custom_headers:nil)
update_async(transformation, resource_group_name, job_name, transformation_name, if_match:if_match, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(transformation, resource_group_name, job_name, transformation_name, if_match:nil, custom_headers:nil)
update_async(transformation, resource_group_name, job_name, transformation_name, if_match:if_match, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"transformation",
",",
"resource_group_name",
",",
"job_name",
",",
"transformation_name",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"transformation",
",",
"resource_group_name",
",",... | Updates an existing transformation under an existing streaming job. This can
be used to partially update (ie. update one or two properties) a
transformation without affecting the rest the job or transformation
definition.
@param transformation [Transformation] A Transformation object. The
properties specified her... | [
"Updates",
"an",
"existing",
"transformation",
"under",
"an",
"existing",
"streaming",
"job",
".",
"This",
"can",
"be",
"used",
"to",
"partially",
"update",
"(",
"ie",
".",
"update",
"one",
"or",
"two",
"properties",
")",
"a",
"transformation",
"without",
"a... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/transformations.rb#L231-L233 | train | Updates a given Dsc transformation. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8651,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
8651,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_image_tags | def create_image_tags(project_id, batch, custom_headers:nil)
response = create_image_tags_async(project_id, batch, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_image_tags(project_id, batch, custom_headers:nil)
response = create_image_tags_async(project_id, batch, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_image_tags",
"(",
"project_id",
",",
"batch",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_image_tags_async",
"(",
"project_id",
",",
"batch",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",... | Associate a set of images with a set of tags.
@param project_id The project id.
@param batch [ImageTagCreateBatch] Batch of image tags. Limited to 128 tags
per batch.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ImageTagCreateSummary] o... | [
"Associate",
"a",
"set",
"of",
"images",
"with",
"a",
"set",
"of",
"tags",
"."
] | 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#L544-L547 | train | Creates an image tags for the specified project. | [
30522,
13366,
3443,
1035,
3746,
1035,
22073,
1006,
2622,
1035,
8909,
1010,
14108,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
3746,
1035,
22073,
1035,
2004,
6038,
2278,
1006,
2622,
1035,
8909,
1010,
14108,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/models/hyrax/operation.rb | Hyrax.Operation.rollup_status | def rollup_status
with_lock do
# We don't need all of the status of the children, just need to see
# if there is at least one PENDING, PERFORMING, or FAILURE.
# however, we can't use distinct with order by (from acts_as_nested_set)
# with postgres or you get the following error:
... | ruby | def rollup_status
with_lock do
# We don't need all of the status of the children, just need to see
# if there is at least one PENDING, PERFORMING, or FAILURE.
# however, we can't use distinct with order by (from acts_as_nested_set)
# with postgres or you get the following error:
... | [
"def",
"rollup_status",
"with_lock",
"do",
"# We don't need all of the status of the children, just need to see",
"# if there is at least one PENDING, PERFORMING, or FAILURE.",
"# however, we can't use distinct with order by (from acts_as_nested_set)",
"# with postgres or you get the following error:"... | If this is a batch job (has children), check to see if all the children are complete
@see #fail! when none of the children are in a PENDING nor PERFORMING state but at least one is in a FAILURE state
@see #success! none of the children are in a PENDING, PERFORMING, nor FAILURE state | [
"If",
"this",
"is",
"a",
"batch",
"job",
"(",
"has",
"children",
")",
"check",
"to",
"see",
"if",
"all",
"the",
"children",
"are",
"complete"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/models/hyrax/operation.rb#L28-L42 | train | rollup the status of the children | [
30522,
13366,
4897,
6279,
1035,
3570,
2007,
1035,
5843,
2079,
1001,
2057,
2123,
1005,
1056,
2342,
2035,
1997,
1996,
3570,
1997,
1996,
2336,
1010,
2074,
2342,
2000,
2156,
1001,
2065,
2045,
2003,
2012,
2560,
2028,
14223,
1010,
4488,
1010,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.