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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisruntime/lib/2.0/generated/azure_cognitiveservices_luisruntime/prediction.rb | Azure::CognitiveServices::LuisRuntime::V2_0.Prediction.resolve_with_http_info | def resolve_with_http_info(app_id, query, timezone_offset:nil, verbose:nil, staging:nil, spell_check:nil, bing_spell_check_subscription_key:nil, log:nil, custom_headers:nil)
resolve_async(app_id, query, timezone_offset:timezone_offset, verbose:verbose, staging:staging, spell_check:spell_check, bing_spell_check_su... | ruby | def resolve_with_http_info(app_id, query, timezone_offset:nil, verbose:nil, staging:nil, spell_check:nil, bing_spell_check_subscription_key:nil, log:nil, custom_headers:nil)
resolve_async(app_id, query, timezone_offset:timezone_offset, verbose:verbose, staging:staging, spell_check:spell_check, bing_spell_check_su... | [
"def",
"resolve_with_http_info",
"(",
"app_id",
",",
"query",
",",
"timezone_offset",
":",
"nil",
",",
"verbose",
":",
"nil",
",",
"staging",
":",
"nil",
",",
"spell_check",
":",
"nil",
",",
"bing_spell_check_subscription_key",
":",
"nil",
",",
"log",
":",
"... | Gets predictions for a given utterance, in the form of intents and entities.
The current maximum query size is 500 characters.
@param app_id The LUIS application ID (Guid).
@param query [String] The utterance to predict.
@param timezone_offset [Float] The timezone offset for the location of the
request.
@param v... | [
"Gets",
"predictions",
"for",
"a",
"given",
"utterance",
"in",
"the",
"form",
"of",
"intents",
"and",
"entities",
".",
"The",
"current",
"maximum",
"query",
"size",
"is",
"500",
"characters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisruntime/lib/2.0/generated/azure_cognitiveservices_luisruntime/prediction.rb#L69-L71 | train | Resolve an App Id Query to a list of documents. | [
30522,
13366,
10663,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
23032,
1010,
2051,
15975,
1035,
16396,
1024,
9152,
2140,
1010,
12034,
9232,
1024,
9152,
2140,
1010,
15308,
1024,
9152,
2140,
1010,
6297,
1035,
4638,
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_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/role_definitions.rb | Azure::Authorization::Mgmt::V2015_07_01.RoleDefinitions.create_or_update_with_http_info | def create_or_update_with_http_info(scope, role_definition_id, role_definition, custom_headers:nil)
create_or_update_async(scope, role_definition_id, role_definition, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(scope, role_definition_id, role_definition, custom_headers:nil)
create_or_update_async(scope, role_definition_id, role_definition, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"scope",
",",
"role_definition_id",
",",
"role_definition",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"scope",
",",
"role_definition_id",
",",
"role_definition",
",",
"custom_headers",
":custom_he... | Creates or updates a role definition.
@param scope [String] The scope of the role definition.
@param role_definition_id [String] The ID of the role definition.
@param role_definition [RoleDefinition] The values for the role definition.
@param custom_headers [Hash{String => String}] A hash of custom headers that
w... | [
"Creates",
"or",
"updates",
"a",
"role",
"definition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/role_definitions.rb#L239-L241 | train | Creates or updates a role definition. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
9531,
1010,
2535,
1035,
6210,
1035,
8909,
1010,
2535,
1035,
6210,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2030,
1035,
10651,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
petergoldstein/dalli | lib/dalli/client.rb | Dalli.Client.add | def add(key, value, ttl=nil, options=nil)
perform(:add, key, value, ttl_or_default(ttl), options)
end | ruby | def add(key, value, ttl=nil, options=nil)
perform(:add, key, value, ttl_or_default(ttl), options)
end | [
"def",
"add",
"(",
"key",
",",
"value",
",",
"ttl",
"=",
"nil",
",",
"options",
"=",
"nil",
")",
"perform",
"(",
":add",
",",
"key",
",",
"value",
",",
"ttl_or_default",
"(",
"ttl",
")",
",",
"options",
")",
"end"
] | Conditionally add a key/value pair, if the key does not already exist
on the server. Returns truthy if the operation succeeded. | [
"Conditionally",
"add",
"a",
"key",
"/",
"value",
"pair",
"if",
"the",
"key",
"does",
"not",
"already",
"exist",
"on",
"the",
"server",
".",
"Returns",
"truthy",
"if",
"the",
"operation",
"succeeded",
"."
] | 5755dbfd06e333a8239f976d4b10492b4555b726 | https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/client.rb#L136-L138 | train | Add a value to the cache. | [
30522,
13366,
5587,
1006,
3145,
1010,
3643,
1010,
23746,
2140,
1027,
9152,
2140,
1010,
7047,
1027,
9152,
2140,
1007,
4685,
1006,
1024,
5587,
1010,
3145,
1010,
3643,
1010,
23746,
2140,
1035,
2030,
1035,
12398,
1006,
23746,
2140,
1007,
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 | runtime/ms_rest/lib/ms_rest/deserialization_error.rb | MsRest.DeserializationError.to_json | def to_json(*a)
{exception_message: exception_message, message: @msg, stacktrace: exception_stacktrace, result: result}.to_json(*a)
end | ruby | def to_json(*a)
{exception_message: exception_message, message: @msg, stacktrace: exception_stacktrace, result: result}.to_json(*a)
end | [
"def",
"to_json",
"(",
"*",
"a",
")",
"{",
"exception_message",
":",
"exception_message",
",",
"message",
":",
"@msg",
",",
"stacktrace",
":",
"exception_stacktrace",
",",
"result",
":",
"result",
"}",
".",
"to_json",
"(",
"a",
")",
"end"
] | Creates and initialize new instance of the DeserializationError class.
@param [String] message message the human readable description of error.
@param [String] exception_message the inner exception stacktrace.
@param [String] exception_stacktrace the inner exception stacktrace.
@param [MsRest::HttpOperationResponse... | [
"Creates",
"and",
"initialize",
"new",
"instance",
"of",
"the",
"DeserializationError",
"class",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/runtime/ms_rest/lib/ms_rest/deserialization_error.rb#L34-L36 | train | Returns a JSON representation of the exception. | [
30522,
13366,
2000,
1035,
1046,
3385,
1006,
1008,
1037,
1007,
1063,
6453,
1035,
4471,
1024,
6453,
1035,
4471,
1010,
4471,
1024,
1030,
5796,
2290,
1010,
9991,
6494,
3401,
1024,
6453,
1035,
9991,
6494,
3401,
1010,
2765,
1024,
2765,
1065,
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... |
ffaker/ffaker | lib/ffaker/name_gr.rb | FFaker.NameGR.full_name | def full_name(gender = :any)
case gender
when :any then rand(0..1) == 0 ? male_full_name : female_full_name
when :male then male_full_name
when :female then female_full_name
else raise ArgumentError, 'Invalid gender, must be one of :any, :male, :female'
end
end | ruby | def full_name(gender = :any)
case gender
when :any then rand(0..1) == 0 ? male_full_name : female_full_name
when :male then male_full_name
when :female then female_full_name
else raise ArgumentError, 'Invalid gender, must be one of :any, :male, :female'
end
end | [
"def",
"full_name",
"(",
"gender",
"=",
":any",
")",
"case",
"gender",
"when",
":any",
"then",
"rand",
"(",
"0",
"..",
"1",
")",
"==",
"0",
"?",
"male_full_name",
":",
"female_full_name",
"when",
":male",
"then",
"male_full_name",
"when",
":female",
"then"... | Random full name (male or female). Arguments :male, :female, :any | [
"Random",
"full",
"name",
"(",
"male",
"or",
"female",
")",
".",
"Arguments",
":",
"male",
":",
"female",
":",
"any"
] | 9570ac54874fec66a99b9c86401fb878f1e3e951 | https://github.com/ffaker/ffaker/blob/9570ac54874fec66a99b9c86401fb878f1e3e951/lib/ffaker/name_gr.rb#L10-L17 | train | Returns the full name of the given gender. | [
30522,
13366,
2440,
1035,
2171,
1006,
5907,
1027,
1024,
2151,
1007,
2553,
5907,
2043,
1024,
2151,
2059,
14566,
1006,
1014,
1012,
1012,
1015,
1007,
1027,
1027,
1014,
1029,
3287,
1035,
2440,
1035,
2171,
1024,
2931,
1035,
2440,
30524,
2028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb | Azure::EventGrid::Mgmt::V2018_01_01.EventSubscriptions.delete | def delete(scope, event_subscription_name, custom_headers:nil)
response = delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(scope, event_subscription_name, custom_headers:nil)
response = delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"scope",
",",
"event_subscription_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"scope",
",",
"event_subscription_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Delete an event subscription
Delete an existing event subscription
@param scope [String] The scope of the event subscription. The scope can be a
subscription, or a resource group, or a top level resource belonging to a
resource provider namespace, or an EventGrid topic. For example, use
'/subscriptions/{subscrip... | [
"Delete",
"an",
"event",
"subscription"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb#L241-L244 | train | Deletes an event subscription. | [
30522,
13366,
3972,
12870,
1006,
9531,
1010,
2724,
1035,
15002,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
9531,
1010,
2724,
1035,
15002,
1035,
2171,
1010,
7661,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.cancel_repair_task | def cancel_repair_task(repair_task_cancel_description, custom_headers:nil)
response = cancel_repair_task_async(repair_task_cancel_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def cancel_repair_task(repair_task_cancel_description, custom_headers:nil)
response = cancel_repair_task_async(repair_task_cancel_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"cancel_repair_task",
"(",
"repair_task_cancel_description",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_repair_task_async",
"(",
"repair_task_cancel_description",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"... | Requests the cancellation of the given repair task.
This API supports the Service Fabric platform; it is not meant to be used
directly from your code.
@param repair_task_cancel_description [RepairTaskCancelDescription] Describes
the repair task to be cancelled.
@param custom_headers [Hash{String => String}] A ha... | [
"Requests",
"the",
"cancellation",
"of",
"the",
"given",
"repair",
"task",
"."
] | 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#L13776-L13779 | train | Cancels a repair task. | [
30522,
13366,
17542,
1035,
7192,
1035,
4708,
1006,
7192,
1035,
4708,
1035,
17542,
1035,
6412,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
1035,
7192,
1035,
4708,
1035,
2004,
6038,
2278,
1006,
7192,
1035,
4708,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/batch_action.rb | Vagrant.BatchAction.run | def run
par = false
if @allow_parallel
par = true
@logger.info("Enabling parallelization by default.")
end
if par
@actions.each do |machine, _, _|
if !machine.provider_options[:parallel]
@logger.info("Disabling parallelization because provider does... | ruby | def run
par = false
if @allow_parallel
par = true
@logger.info("Enabling parallelization by default.")
end
if par
@actions.each do |machine, _, _|
if !machine.provider_options[:parallel]
@logger.info("Disabling parallelization because provider does... | [
"def",
"run",
"par",
"=",
"false",
"if",
"@allow_parallel",
"par",
"=",
"true",
"@logger",
".",
"info",
"(",
"\"Enabling parallelization by default.\"",
")",
"end",
"if",
"par",
"@actions",
".",
"each",
"do",
"|",
"machine",
",",
"_",
",",
"_",
"|",
"if",
... | Run all the queued up actions, parallelizing if possible.
This will parallelize if and only if the provider of every machine
supports parallelization and parallelization is possible from
initialization of the class. | [
"Run",
"all",
"the",
"queued",
"up",
"actions",
"parallelizing",
"if",
"possible",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/batch_action.rb#L39-L163 | train | Run the batch action | [
30522,
13366,
2448,
11968,
1027,
6270,
2065,
1030,
3499,
1035,
5903,
11968,
1027,
2995,
1030,
8833,
4590,
1012,
18558,
1006,
1000,
12067,
5903,
3989,
2011,
12398,
1012,
1000,
1007,
2203,
2065,
11968,
1030,
4506,
1012,
2169,
2079,
1064,
3698... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/transactions_api.rb | SquareConnect.TransactionsApi.list_refunds | def list_refunds(location_id, opts = {})
data, _status_code, _headers = list_refunds_with_http_info(location_id, opts)
return data
end | ruby | def list_refunds(location_id, opts = {})
data, _status_code, _headers = list_refunds_with_http_info(location_id, opts)
return data
end | [
"def",
"list_refunds",
"(",
"location_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"list_refunds_with_http_info",
"(",
"location_id",
",",
"opts",
")",
"return",
"data",
"end"
] | ListRefunds
Lists refunds for one of a business's locations. In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications. Refunds with a `status` of `PENDING` are not currently included in this endpoint... | [
"ListRefunds",
"Lists",
"refunds",
"for",
"one",
"of",
"a",
"business",
"s",
"locations",
".",
"In",
"addition",
"to",
"full",
"or",
"partial",
"tender",
"refunds",
"processed",
"through",
"Square",
"APIs",
"refunds",
"may",
"result",
"from",
"itemized",
"retu... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/transactions_api.rb#L210-L213 | train | Returns a list of all refunds for a location | [
30522,
13366,
2862,
1035,
25416,
26698,
1006,
3295,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
2862,
1035,
25416,
26698,
1035,
2007,
1035,
8299,
1035,
18558,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionview/lib/action_view/template/resolver.rb | ActionView.Resolver.find_all | def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
locals = locals.map(&:to_s).sort!.freeze
cached(key, [name, prefix, partial], details, locals) do
_find_all(name, prefix, partial, details, key, locals)
end
end | ruby | def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
locals = locals.map(&:to_s).sort!.freeze
cached(key, [name, prefix, partial], details, locals) do
_find_all(name, prefix, partial, details, key, locals)
end
end | [
"def",
"find_all",
"(",
"name",
",",
"prefix",
"=",
"nil",
",",
"partial",
"=",
"false",
",",
"details",
"=",
"{",
"}",
",",
"key",
"=",
"nil",
",",
"locals",
"=",
"[",
"]",
")",
"locals",
"=",
"locals",
".",
"map",
"(",
":to_s",
")",
".",
"sor... | Normalizes the arguments and passes it on to find_templates. | [
"Normalizes",
"the",
"arguments",
"and",
"passes",
"it",
"on",
"to",
"find_templates",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/template/resolver.rb#L117-L123 | train | Find all resources | [
30522,
13366,
2424,
1035,
2035,
1006,
2171,
1010,
17576,
1027,
9152,
2140,
1010,
7704,
1027,
6270,
1010,
4751,
1027,
1063,
1065,
1010,
3145,
1027,
9152,
2140,
1010,
10575,
1027,
1031,
1033,
1007,
10575,
1027,
10575,
1012,
4949,
1006,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/data_criteria_helpers/dc_post_processing.rb | HQMF2.DataCriteriaPostProcessing.extract_code_list_path_and_result_value | def extract_code_list_path_and_result_value
if @template_ids.empty? && @specific_occurrence
template = @entry.document.at_xpath(
"//cda:id[@root='#{@source_data_criteria_root}' and @extension='#{@source_data_criteria_extension}']/../cda:templateId/cda:item/@root")
if template
m... | ruby | def extract_code_list_path_and_result_value
if @template_ids.empty? && @specific_occurrence
template = @entry.document.at_xpath(
"//cda:id[@root='#{@source_data_criteria_root}' and @extension='#{@source_data_criteria_extension}']/../cda:templateId/cda:item/@root")
if template
m... | [
"def",
"extract_code_list_path_and_result_value",
"if",
"@template_ids",
".",
"empty?",
"&&",
"@specific_occurrence",
"template",
"=",
"@entry",
".",
"document",
".",
"at_xpath",
"(",
"\"//cda:id[@root='#{@source_data_criteria_root}' and @extension='#{@source_data_criteria_extension}... | Extract the code_list_xpath and the criteria's value from either the location related to the specific occurrence,
or from any of the template ids (if multiple exist) | [
"Extract",
"the",
"code_list_xpath",
"and",
"the",
"criteria",
"s",
"value",
"from",
"either",
"the",
"location",
"related",
"to",
"the",
"specific",
"occurrence",
"or",
"from",
"any",
"of",
"the",
"template",
"ids",
"(",
"if",
"multiple",
"exist",
")"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria_helpers/dc_post_processing.rb#L24-L38 | train | Extract the code list path and result value from the entry | [
30522,
13366,
14817,
1035,
3642,
1035,
2862,
1035,
4130,
1035,
1998,
1035,
2765,
1035,
3643,
2065,
1030,
23561,
1035,
8909,
2015,
1012,
4064,
1029,
1004,
1004,
1030,
3563,
1035,
14404,
23561,
1027,
1030,
4443,
1012,
6254,
1012,
2012,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/integration.rb | ActiveRecord.Integration.cache_version | def cache_version
return unless cache_versioning
if has_attribute?("updated_at")
timestamp = updated_at_before_type_cast
if can_use_fast_cache_version?(timestamp)
raw_timestamp_to_cache_version(timestamp)
elsif timestamp = updated_at
timestamp.utc.to_s(cache_time... | ruby | def cache_version
return unless cache_versioning
if has_attribute?("updated_at")
timestamp = updated_at_before_type_cast
if can_use_fast_cache_version?(timestamp)
raw_timestamp_to_cache_version(timestamp)
elsif timestamp = updated_at
timestamp.utc.to_s(cache_time... | [
"def",
"cache_version",
"return",
"unless",
"cache_versioning",
"if",
"has_attribute?",
"(",
"\"updated_at\"",
")",
"timestamp",
"=",
"updated_at_before_type_cast",
"if",
"can_use_fast_cache_version?",
"(",
"timestamp",
")",
"raw_timestamp_to_cache_version",
"(",
"timestamp",... | Returns a cache version that can be used together with the cache key to form
a recyclable caching scheme. By default, the #updated_at column is used for the
cache_version, but this method can be overwritten to return something else.
Note, this method will return nil if ActiveRecord::Base.cache_versioning is set to
... | [
"Returns",
"a",
"cache",
"version",
"that",
"can",
"be",
"used",
"together",
"with",
"the",
"cache",
"key",
"to",
"form",
"a",
"recyclable",
"caching",
"scheme",
".",
"By",
"default",
"the",
"#updated_at",
"column",
"is",
"used",
"for",
"the",
"cache_version... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/integration.rb#L97-L112 | train | Returns the cache version for this object. | [
30522,
13366,
17053,
1035,
2544,
2709,
4983,
17053,
1035,
2544,
2075,
2065,
2038,
1035,
17961,
1029,
1006,
1000,
7172,
1035,
2012,
1000,
1007,
2335,
15464,
2361,
1027,
7172,
1035,
2012,
1035,
2077,
1035,
2828,
1035,
3459,
2065,
2064,
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... |
lostisland/faraday | lib/faraday/options.rb | Faraday.Options.update | def update(obj)
obj.each do |key, value|
sub_options = self.class.options_for(key)
if sub_options
new_value = sub_options.from(value) if value
elsif value.is_a?(Hash)
new_value = value.dup
else
new_value = value
end
send("#{key}=", new... | ruby | def update(obj)
obj.each do |key, value|
sub_options = self.class.options_for(key)
if sub_options
new_value = sub_options.from(value) if value
elsif value.is_a?(Hash)
new_value = value.dup
else
new_value = value
end
send("#{key}=", new... | [
"def",
"update",
"(",
"obj",
")",
"obj",
".",
"each",
"do",
"|",
"key",
",",
"value",
"|",
"sub_options",
"=",
"self",
".",
"class",
".",
"options_for",
"(",
"key",
")",
"if",
"sub_options",
"new_value",
"=",
"sub_options",
".",
"from",
"(",
"value",
... | Public | [
"Public"
] | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/options.rb#L22-L36 | train | Update the object with the options from the given hash. | [
30522,
13366,
10651,
1006,
27885,
3501,
1007,
27885,
3501,
1012,
2169,
2079,
1064,
3145,
1010,
3643,
1064,
4942,
1035,
7047,
1027,
2969,
1012,
2465,
1012,
7047,
1035,
2005,
1006,
3145,
1007,
2065,
4942,
1035,
7047,
2047,
1035,
3643,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services/lib/2016-06-01/generated/azure_mgmt_recovery_services/registered_identities.rb | Azure::RecoveryServices::Mgmt::V2016_06_01.RegisteredIdentities.delete_with_http_info | def delete_with_http_info(resource_group_name, vault_name, identity_name, custom_headers:nil)
delete_async(resource_group_name, vault_name, identity_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, vault_name, identity_name, custom_headers:nil)
delete_async(resource_group_name, vault_name, identity_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"vault_name",
",",
"identity_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"identity_name",
",",
"custom_headers",
":custom_headers",
")... | Unregisters the given container from your Recovery Services vault.
@param resource_group_name [String] The name of the resource group where the
recovery services vault is present.
@param vault_name [String] The name of the recovery services vault.
@param identity_name [String] Name of the protection container to u... | [
"Unregisters",
"the",
"given",
"container",
"from",
"your",
"Recovery",
"Services",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services/lib/2016-06-01/generated/azure_mgmt_recovery_services/registered_identities.rb#L52-L54 | train | Deletes the specified index in the specified key vault. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11632,
1035,
2171,
1010,
4767,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.get_vmsecurity_rules | def get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_vmsecurity_rules",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_vmsecurity_rules_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",... | Gets the configured and effective security group rules on the specified VM.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [SecurityGroupViewParameters] Parameters that define the VM
to check security group... | [
"Gets",
"the",
"configured",
"and",
"effective",
"security",
"group",
"rules",
"on",
"the",
"specified",
"VM",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L759-L762 | train | Gets the security rules for the specified virtual machine. | [
30522,
13366,
2131,
1035,
1058,
5244,
8586,
25137,
1035,
3513,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
1058,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.create_async | def create_async(resource_group_name, name, parameters, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = la... | ruby | def create_async(resource_group_name, name, parameters, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = la... | [
"def",
"create_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":cu... | @param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics account.the account will be associated with.
@param name [String] The name of the Data Lake Analytics account to create.
@param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
create Data ... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Azure",
"resource",
"group",
"that",
"contains",
"the",
"Data",
"Lake",
"Analytics",
"account",
".",
"the",
"account",
"will",
"be",
"associated",
"with",
".",
"@param",
"name",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L1942-L1958 | train | Creates a Data Lake Analytics account. | [
30522,
13366,
3443,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
30524,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
phusion/passenger | src/ruby_supportlib/phusion_passenger/request_handler.rb | PhusionPassenger.RequestHandler.main_loop | def main_loop
debug("Entering request handler main loop")
reset_signal_handlers
begin
@graceful_termination_pipe = IO.pipe
@graceful_termination_pipe[0].close_on_exec!
@graceful_termination_pipe[1].close_on_exec!
@main_loop_thread_lock.synchronize do
@main_lo... | ruby | def main_loop
debug("Entering request handler main loop")
reset_signal_handlers
begin
@graceful_termination_pipe = IO.pipe
@graceful_termination_pipe[0].close_on_exec!
@graceful_termination_pipe[1].close_on_exec!
@main_loop_thread_lock.synchronize do
@main_lo... | [
"def",
"main_loop",
"debug",
"(",
"\"Entering request handler main loop\"",
")",
"reset_signal_handlers",
"begin",
"@graceful_termination_pipe",
"=",
"IO",
".",
"pipe",
"@graceful_termination_pipe",
"[",
"0",
"]",
".",
"close_on_exec!",
"@graceful_termination_pipe",
"[",
"1... | Enter the request handler's main loop. | [
"Enter",
"the",
"request",
"handler",
"s",
"main",
"loop",
"."
] | 970964b53e0ba86959acdf40f06c99b0c4a128ca | https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/request_handler.rb#L176-L233 | train | Main loop | [
30522,
13366,
2364,
1035,
7077,
2139,
8569,
2290,
1006,
1000,
5738,
5227,
28213,
2364,
7077,
1000,
1007,
25141,
1035,
4742,
1035,
28213,
2015,
4088,
1030,
19415,
1035,
18287,
1035,
8667,
1027,
22834,
1012,
8667,
1030,
19415,
1035,
18287,
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_deployed_application_info_with_http_info | def get_deployed_application_info_with_http_info(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil)
get_deployed_application_info_async(node_name, application_id, timeout:timeout, include_health_state:include_health_state, custom_headers:custom_headers).value!
end | ruby | def get_deployed_application_info_with_http_info(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil)
get_deployed_application_info_async(node_name, application_id, timeout:timeout, include_health_state:include_health_state, custom_headers:custom_headers).value!
end | [
"def",
"get_deployed_application_info_with_http_info",
"(",
"node_name",
",",
"application_id",
",",
"timeout",
":",
"60",
",",
"include_health_state",
":",
"false",
",",
"custom_headers",
":",
"nil",
")",
"get_deployed_application_info_async",
"(",
"node_name",
",",
"a... | Gets the information about an application deployed on a Service Fabric node.
Gets the information about an application deployed on a Service Fabric node.
This query returns system application information if the application ID
provided is for system application. Results encompass deployed applications
in active, ac... | [
"Gets",
"the",
"information",
"about",
"an",
"application",
"deployed",
"on",
"a",
"Service",
"Fabric",
"node",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L8616-L8618 | train | Gets the information about the deployment of the application. | [
30522,
13366,
2131,
1035,
7333,
1035,
4646,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
2421,
1035,
2740,
1035,
2110,
1024,
6270,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSets.convert_to_single_placement_group | def convert_to_single_placement_group(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
response = convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def convert_to_single_placement_group(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
response = convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"convert_to_single_placement_group",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"convert_to_single_placement_group_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
... | Converts SinglePlacementGroup property to false for a existing virtual
machine scale set.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the virtual machine scale set
to create or update.
@param parameters [VMScaleSetConvertToSinglePlacementGroupI... | [
"Converts",
"SinglePlacementGroup",
"property",
"to",
"false",
"for",
"a",
"existing",
"virtual",
"machine",
"scale",
"set",
"."
] | 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_sets.rb#L1260-L1263 | train | Convert a virtual machine to a single placement group. | [
30522,
13366,
10463,
1035,
2000,
1035,
2309,
1035,
11073,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_multi_role_metric_definitions_as_lazy | def list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers:nil)
response = list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_pa... | ruby | def list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers:nil)
response = list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_pa... | [
"def",
"list_multi_role_metric_definitions_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_multi_role_metric_definitions_async",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers"... | Get metric definitions for a multi-role pool of an App Service Environment.
Get metric definitions for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param cu... | [
"Get",
"metric",
"definitions",
"for",
"a",
"multi",
"-",
"role",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7637-L7646 | train | Gets a list of metric definitions for a resource group. | [
30522,
13366,
2862,
1035,
4800,
1035,
2535,
1035,
12046,
1035,
15182,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
4800,
1035,
2535,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb | Axlsx.AutoFilter.defined_name | def defined_name
return unless range
Axlsx.cell_range(range.split(':').collect { |name| worksheet.name_to_cell(name)})
end | ruby | def defined_name
return unless range
Axlsx.cell_range(range.split(':').collect { |name| worksheet.name_to_cell(name)})
end | [
"def",
"defined_name",
"return",
"unless",
"range",
"Axlsx",
".",
"cell_range",
"(",
"range",
".",
"split",
"(",
"':'",
")",
".",
"collect",
"{",
"|",
"name",
"|",
"worksheet",
".",
"name_to_cell",
"(",
"name",
")",
"}",
")",
"end"
] | the formula for the defined name required for this auto filter
This prepends the worksheet name to the absolute cell reference
e.g. A1:B2 -> 'Sheet1'!$A$1:$B$2
@return [String] | [
"the",
"formula",
"for",
"the",
"defined",
"name",
"required",
"for",
"this",
"auto",
"filter",
"This",
"prepends",
"the",
"worksheet",
"name",
"to",
"the",
"absolute",
"cell",
"reference",
"e",
".",
"g",
".",
"A1",
":",
"B2",
"-",
">",
"Sheet1",
"!$A$1"... | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb#L28-L31 | train | Returns the defined name of the cell in the worksheet. | [
30522,
13366,
4225,
1035,
2171,
2709,
4983,
2846,
22260,
4877,
2595,
1012,
3526,
1035,
2846,
1006,
2846,
1012,
3975,
1006,
1005,
1024,
1005,
1007,
1012,
8145,
1063,
1064,
2171,
1064,
2573,
21030,
2102,
1012,
2171,
1035,
2000,
1035,
3526,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
boazsegev/combine_pdf | lib/combine_pdf/page_methods.rb | CombinePDF.Page_Methods.reorder_rtl_content | def reorder_rtl_content(text)
rtl_characters = "\u05d0-\u05ea\u05f0-\u05f4\u0600-\u06ff\u0750-\u077f"
rtl_replaces = { '(' => ')', ')' => '(',
'[' => ']', ']' => '[',
'{' => '}', '}' => '{',
'<' => '>', '>' => '<' }
return text unles... | ruby | def reorder_rtl_content(text)
rtl_characters = "\u05d0-\u05ea\u05f0-\u05f4\u0600-\u06ff\u0750-\u077f"
rtl_replaces = { '(' => ')', ')' => '(',
'[' => ']', ']' => '[',
'{' => '}', '}' => '{',
'<' => '>', '>' => '<' }
return text unles... | [
"def",
"reorder_rtl_content",
"(",
"text",
")",
"rtl_characters",
"=",
"\"\\u05d0-\\u05ea\\u05f0-\\u05f4\\u0600-\\u06ff\\u0750-\\u077f\"",
"rtl_replaces",
"=",
"{",
"'('",
"=>",
"')'",
",",
"')'",
"=>",
"'('",
",",
"'['",
"=>",
"']'",
",",
"']'",
"=>",
"'['",
",",... | a very primitive text reordering algorithm... I was lazy...
...still, it works (I think). | [
"a",
"very",
"primitive",
"text",
"reordering",
"algorithm",
"...",
"I",
"was",
"lazy",
"...",
"...",
"still",
"it",
"works",
"(",
"I",
"think",
")",
"."
] | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/page_methods.rb#L807-L833 | train | Reorder RTL content | [
30522,
13366,
2128,
8551,
2121,
1035,
19387,
2140,
1035,
4180,
1006,
3793,
1007,
19387,
2140,
1035,
3494,
1027,
1000,
1032,
1057,
2692,
2629,
2094,
2692,
1011,
1032,
1057,
2692,
2629,
5243,
1032,
1057,
2692,
2629,
2546,
2692,
1011,
1032,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_certificates_next | def get_deleted_certificates_next(next_page_link, custom_headers:nil)
response = get_deleted_certificates_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_deleted_certificates_next(next_page_link, custom_headers:nil)
response = get_deleted_certificates_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_deleted_certificates_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_deleted_certificates_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"... | Lists the deleted certificates in the specified vault currently available for
recovery.
The GetDeletedCertificates operation retrieves the certificates in the
current vault which are in a deleted state and ready for recovery or purging.
This operation includes deletion-specific information. This operation
require... | [
"Lists",
"the",
"deleted",
"certificates",
"in",
"the",
"specified",
"vault",
"currently",
"available",
"for",
"recovery",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L9177-L9180 | train | Gets the deleted certificates. | [
30522,
13366,
2131,
1035,
17159,
1035,
17987,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
17159,
1035,
17987,
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... |
toptal/chewy | lib/chewy/query.rb | Chewy.Query.limit | def limit(value = nil, &block)
chain { criteria.update_request_options size: block || Integer(value) }
end | ruby | def limit(value = nil, &block)
chain { criteria.update_request_options size: block || Integer(value) }
end | [
"def",
"limit",
"(",
"value",
"=",
"nil",
",",
"&",
"block",
")",
"chain",
"{",
"criteria",
".",
"update_request_options",
"size",
":",
"block",
"||",
"Integer",
"(",
"value",
")",
"}",
"end"
] | Sets elasticsearch `size` search request param
Default value is set in the elasticsearch and is 10.
@example
UsersIndex.filter{ name == 'Johny' }.limit(100)
# => {body: {
query: {...},
size: 100
}} | [
"Sets",
"elasticsearch",
"size",
"search",
"request",
"param",
"Default",
"value",
"is",
"set",
"in",
"the",
"elasticsearch",
"and",
"is",
"10",
"."
] | cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b | https://github.com/toptal/chewy/blob/cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b/lib/chewy/query.rb#L303-L305 | train | Limit the number of documents to return. | [
30522,
13366,
5787,
1006,
3643,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
4677,
1063,
9181,
1012,
10651,
1035,
5227,
1035,
7047,
2946,
1024,
3796,
1064,
1064,
16109,
1006,
3643,
1007,
1065,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/core_ext/numeric/conversions.rb | ActiveSupport.NumericWithFormat.to_s | def to_s(format = nil, options = nil)
case format
when nil
super()
when Integer, String
super(format)
when :phone
ActiveSupport::NumberHelper.number_to_phone(self, options || {})
when :currency
ActiveSupport::NumberHelper.number_to_currency(self, options || ... | ruby | def to_s(format = nil, options = nil)
case format
when nil
super()
when Integer, String
super(format)
when :phone
ActiveSupport::NumberHelper.number_to_phone(self, options || {})
when :currency
ActiveSupport::NumberHelper.number_to_currency(self, options || ... | [
"def",
"to_s",
"(",
"format",
"=",
"nil",
",",
"options",
"=",
"nil",
")",
"case",
"format",
"when",
"nil",
"super",
"(",
")",
"when",
"Integer",
",",
"String",
"super",
"(",
"format",
")",
"when",
":phone",
"ActiveSupport",
"::",
"NumberHelper",
".",
... | Provides options for converting numbers into formatted strings.
Options are provided for phone numbers, currency, percentage,
precision, positional notation, file size and pretty printing.
==== Options
For details on which formats use which options, see ActiveSupport::NumberHelper
==== Examples
Phone Numbers... | [
"Provides",
"options",
"for",
"converting",
"numbers",
"into",
"formatted",
"strings",
".",
"Options",
"are",
"provided",
"for",
"phone",
"numbers",
"currency",
"percentage",
"precision",
"positional",
"notation",
"file",
"size",
"and",
"pretty",
"printing",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/core_ext/numeric/conversions.rb#L105-L130 | train | Convert the number to a string. | [
30522,
13366,
2000,
1035,
1055,
1006,
4289,
1027,
9152,
2140,
1010,
7047,
1027,
9152,
2140,
1007,
2553,
4289,
2043,
9152,
2140,
3565,
1006,
1007,
2043,
16109,
1010,
5164,
3565,
1006,
4289,
1007,
2043,
1024,
3042,
3161,
6342,
9397,
11589,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_next_hop_with_http_info | def begin_get_next_hop_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_get_next_hop_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_get_next_hop_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_get_next_hop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"cust... | Gets the next hop from the specified VM.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [NextHopParameters] Parameters that define the source and
destination endpoint.
@param custom_headers [Hash{String =>... | [
"Gets",
"the",
"next",
"hop",
"from",
"the",
"specified",
"VM",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L1419-L1421 | train | Gets the next hop for a specified resource group. | [
30522,
13366,
4088,
1035,
2131,
1035,
2279,
1035,
6154,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb | Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_database_as_lazy | def list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
response = list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per... | ruby | def list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
response = list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per... | [
"def",
"list_by_database_as_lazy",
"(",
"location_name",
",",
"long_term_retention_server_name",
",",
"long_term_retention_database_name",
",",
"only_latest_per_database",
":",
"nil",
",",
"database_state",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"... | Lists all long term retention backups for a database.
@param location_name [String] The location of the database
@param long_term_retention_server_name [String] The name of the server
@param long_term_retention_database_name [String] The name of the database
@param only_latest_per_database [Boolean] Whether or not... | [
"Lists",
"all",
"long",
"term",
"retention",
"backups",
"for",
"a",
"database",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L860-L869 | train | Gets a list of all the documents in a database. | [
30522,
13366,
2862,
1035,
2011,
1035,
7809,
1035,
2004,
1035,
13971,
1006,
3295,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
8241,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
7809,
1035,
2171,
1010,
2069,
1035,
6745,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kmuto/review | lib/review/latexbuilder.rb | ReVIEW.LATEXBuilder.inline_b | def inline_b(str)
if @book.config.check_version('2', exception: false)
macro('textbf', escape(str))
else
macro('reviewbold', escape(str))
end
end | ruby | def inline_b(str)
if @book.config.check_version('2', exception: false)
macro('textbf', escape(str))
else
macro('reviewbold', escape(str))
end
end | [
"def",
"inline_b",
"(",
"str",
")",
"if",
"@book",
".",
"config",
".",
"check_version",
"(",
"'2'",
",",
"exception",
":",
"false",
")",
"macro",
"(",
"'textbf'",
",",
"escape",
"(",
"str",
")",
")",
"else",
"macro",
"(",
"'reviewbold'",
",",
"escape",... | bold | [
"bold"
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/review/latexbuilder.rb#L1041-L1047 | train | inline_b | [
30522,
13366,
23881,
1035,
1038,
1006,
2358,
2099,
1007,
2065,
1030,
2338,
1012,
9530,
8873,
2290,
1012,
4638,
1035,
2544,
1006,
1005,
1016,
1005,
1010,
6453,
1024,
6270,
1007,
26632,
1006,
1005,
3793,
29292,
1005,
1010,
4019,
1006,
2358,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.begin_restart | def begin_restart(resource_group_name, vm_name, custom_headers:nil)
response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_restart(resource_group_name, vm_name, custom_headers:nil)
response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_restart",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_restart_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | The operation to restart a virtual machine.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [OperationStatusResponse... | [
"The",
"operation",
"to",
"restart",
"a",
"virtual",
"machine",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L1594-L1597 | train | Restarts a virtual machine. | [
30522,
13366,
4088,
1035,
23818,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
23818,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/channel.rb | Discordrb.Channel.users | def users
if text?
@server.online_members(include_idle: true).select { |u| u.can_read_messages? self }
elsif voice?
@server.voice_states.map { |id, voice_state| @server.member(id) if !voice_state.voice_channel.nil? && voice_state.voice_channel.id == @id }.compact
end
end | ruby | def users
if text?
@server.online_members(include_idle: true).select { |u| u.can_read_messages? self }
elsif voice?
@server.voice_states.map { |id, voice_state| @server.member(id) if !voice_state.voice_channel.nil? && voice_state.voice_channel.id == @id }.compact
end
end | [
"def",
"users",
"if",
"text?",
"@server",
".",
"online_members",
"(",
"include_idle",
":",
"true",
")",
".",
"select",
"{",
"|",
"u",
"|",
"u",
".",
"can_read_messages?",
"self",
"}",
"elsif",
"voice?",
"@server",
".",
"voice_states",
".",
"map",
"{",
"|... | The list of users currently in this channel. For a voice channel, it will return all the members currently
in that channel. For a text channel, it will return all online members that have permission to read it.
@return [Array<Member>] the users in this channel | [
"The",
"list",
"of",
"users",
"currently",
"in",
"this",
"channel",
".",
"For",
"a",
"voice",
"channel",
"it",
"will",
"return",
"all",
"the",
"members",
"currently",
"in",
"that",
"channel",
".",
"For",
"a",
"text",
"channel",
"it",
"will",
"return",
"a... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L508-L514 | train | Return the users array for this user. | [
30522,
13366,
5198,
2065,
3793,
1029,
1030,
8241,
1012,
3784,
1035,
2372,
1006,
2421,
1035,
18373,
1024,
2995,
1007,
1012,
7276,
1063,
1064,
1057,
1064,
1057,
1012,
2064,
1035,
3191,
1035,
7696,
1029,
2969,
1065,
3449,
5332,
2546,
2376,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/schema_dumper.rb | ActiveRecord.SchemaDumper.formatted_version | def formatted_version
stringified = @version.to_s
return stringified unless stringified.length == 14
stringified.insert(4, "_").insert(7, "_").insert(10, "_")
end | ruby | def formatted_version
stringified = @version.to_s
return stringified unless stringified.length == 14
stringified.insert(4, "_").insert(7, "_").insert(10, "_")
end | [
"def",
"formatted_version",
"stringified",
"=",
"@version",
".",
"to_s",
"return",
"stringified",
"unless",
"stringified",
".",
"length",
"==",
"14",
"stringified",
".",
"insert",
"(",
"4",
",",
"\"_\"",
")",
".",
"insert",
"(",
"7",
",",
"\"_\"",
")",
"."... | turns 20170404131909 into "2017_04_04_131909" | [
"turns",
"20170404131909",
"into",
"2017_04_04_131909"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/schema_dumper.rb#L59-L63 | train | Returns the version of the record | [
30522,
13366,
4289,
3064,
1035,
2544,
5164,
7810,
1027,
1030,
2544,
1012,
2000,
1035,
1055,
2709,
5164,
7810,
4983,
5164,
7810,
1012,
3091,
1027,
1027,
2403,
5164,
7810,
1012,
19274,
1006,
1018,
1010,
1000,
1035,
1000,
1007,
1012,
19274,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SamSaffron/memory_profiler | lib/memory_profiler/reporter.rb | MemoryProfiler.Reporter.run | def run(&block)
start
begin
yield
rescue Exception
ObjectSpace.trace_object_allocations_stop
GC.enable
raise
else
stop
end
end | ruby | def run(&block)
start
begin
yield
rescue Exception
ObjectSpace.trace_object_allocations_stop
GC.enable
raise
else
stop
end
end | [
"def",
"run",
"(",
"&",
"block",
")",
"start",
"begin",
"yield",
"rescue",
"Exception",
"ObjectSpace",
".",
"trace_object_allocations_stop",
"GC",
".",
"enable",
"raise",
"else",
"stop",
"end",
"end"
] | Collects object allocation and memory of ruby code inside of passed block. | [
"Collects",
"object",
"allocation",
"and",
"memory",
"of",
"ruby",
"code",
"inside",
"of",
"passed",
"block",
"."
] | bd87ff68559623d12c827800ee795475db4d5b8b | https://github.com/SamSaffron/memory_profiler/blob/bd87ff68559623d12c827800ee795475db4d5b8b/lib/memory_profiler/reporter.rb#L71-L82 | train | Run the block in the object allocator. | [
30522,
13366,
2448,
1006,
1004,
3796,
1007,
2707,
4088,
10750,
5343,
6453,
5200,
15327,
1012,
7637,
1035,
4874,
1035,
16169,
2015,
1035,
2644,
1043,
2278,
1012,
9585,
5333,
2842,
2644,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/module_model_operations.rb | Azure::Automation::Mgmt::V2015_10_31.ModuleModelOperations.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, automation_account_name, module_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, automation_account_name, module_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"module_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"m... | Create or Update the module identified by module name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param module_name [String] The name of module.
@param parameters [ModuleCreateOrUpdateParameters] The create or up... | [
"Create",
"or",
"Update",
"the",
"module",
"identified",
"by",
"module",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/module_model_operations.rb#L242-L244 | train | Creates or updates a module. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
11336,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CocoaPods/Xcodeproj | lib/xcodeproj/scheme.rb | Xcodeproj.XCScheme.add_build_target | def add_build_target(build_target, build_for_running = true)
entry = BuildAction::Entry.new(build_target)
entry.build_for_testing = true
entry.build_for_running = build_for_running
entry.build_for_profiling = build_for_running
entry.build_for_archiving = build_for_running
entry.... | ruby | def add_build_target(build_target, build_for_running = true)
entry = BuildAction::Entry.new(build_target)
entry.build_for_testing = true
entry.build_for_running = build_for_running
entry.build_for_profiling = build_for_running
entry.build_for_archiving = build_for_running
entry.... | [
"def",
"add_build_target",
"(",
"build_target",
",",
"build_for_running",
"=",
"true",
")",
"entry",
"=",
"BuildAction",
"::",
"Entry",
".",
"new",
"(",
"build_target",
")",
"entry",
".",
"build_for_testing",
"=",
"true",
"entry",
".",
"build_for_running",
"=",
... | @!group Target methods
Add a target to the list of targets to build in the build action.
@param [Xcodeproj::Project::Object::AbstractTarget] build_target
A target used by scheme in the build step.
@param [Bool] build_for_running
Whether to build this target in the launch action. Often false for tes... | [
"@!group",
"Target",
"methods",
"Add",
"a",
"target",
"to",
"the",
"list",
"of",
"targets",
"to",
"build",
"in",
"the",
"build",
"action",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/scheme.rb#L193-L203 | train | Add a build target to the build action | [
30522,
13366,
5587,
1035,
3857,
1035,
4539,
1006,
3857,
1035,
4539,
1010,
3857,
1035,
2005,
1035,
2770,
1027,
2995,
1007,
4443,
1027,
3857,
18908,
3258,
1024,
1024,
4443,
1012,
2047,
1006,
3857,
1035,
4539,
1007,
4443,
1012,
3857,
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... |
rails/sprockets | lib/sprockets/loader.rb | Sprockets.Loader.store_asset | def store_asset(asset, unloaded)
# Save the asset in the cache under the new URI
cached_asset = asset.dup
cached_asset[:uri] = compress_from_root(asset[:uri])
cached_asset[:filename] = compress_from_root(asset[:filename])
cached_asset[:load_path] = compress_fro... | ruby | def store_asset(asset, unloaded)
# Save the asset in the cache under the new URI
cached_asset = asset.dup
cached_asset[:uri] = compress_from_root(asset[:uri])
cached_asset[:filename] = compress_from_root(asset[:filename])
cached_asset[:load_path] = compress_fro... | [
"def",
"store_asset",
"(",
"asset",
",",
"unloaded",
")",
"# Save the asset in the cache under the new URI",
"cached_asset",
"=",
"asset",
".",
"dup",
"cached_asset",
"[",
":uri",
"]",
"=",
"compress_from_root",
"(",
"asset",
"[",
":uri",
"]",
")",
"cached_asset",
... | Internal: Save a given asset to the cache
asset - A hash containing values of loaded asset
unloaded - The UnloadedAsset used to lookup the `asset`
This method converts all absolute paths to "compressed" paths
which are relative if they're in the root. | [
"Internal",
":",
"Save",
"a",
"given",
"asset",
"to",
"the",
"cache"
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/loader.rb#L198-L259 | train | Stores the asset in the cache | [
30522,
13366,
3573,
1035,
11412,
1006,
11412,
1010,
4895,
30524,
2072,
17053,
2094,
1035,
11412,
1027,
11412,
1012,
4241,
2361,
17053,
2094,
1035,
11412,
1031,
1024,
24471,
2072,
1033,
1027,
4012,
20110,
1035,
2013,
1035,
7117,
1006,
11412,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb | Azure::Labservices::Mgmt::V2018_10_15.Environments.reset_password | def reset_password(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, reset_password_payload, custom_headers:nil)
response = reset_password_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, reset_password_payload, custom_he... | ruby | def reset_password(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, reset_password_payload, custom_headers:nil)
response = reset_password_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, reset_password_payload, custom_he... | [
"def",
"reset_password",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"environment_setting_name",
",",
"environment_name",
",",
"reset_password_payload",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"reset_password_async",
"(",
... | Resets the user password on an environment This operation can take a while to
complete
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param lab_name [String] The name of the lab.
@param environment_setting_name [String] The name o... | [
"Resets",
"the",
"user",
"password",
"on",
"an",
"environment",
"This",
"operation",
"can",
"take",
"a",
"while",
"to",
"complete"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb#L646-L649 | train | Reset the password of the specified environment. | [
30522,
13366,
25141,
1035,
20786,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
6845,
1035,
2171,
1010,
4044,
1035,
4292,
1035,
2171,
1010,
4044,
1035,
2171,
1010,
25141,
1035,
20786,
1035,
18093,
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_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.ProtectionContainers.refresh_with_http_info | def refresh_with_http_info(vault_name, resource_group_name, fabric_name, custom_headers:nil)
refresh_async(vault_name, resource_group_name, fabric_name, custom_headers:custom_headers).value!
end | ruby | def refresh_with_http_info(vault_name, resource_group_name, fabric_name, custom_headers:nil)
refresh_async(vault_name, resource_group_name, fabric_name, custom_headers:custom_headers).value!
end | [
"def",
"refresh_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"custom_headers",
":",
"nil",
")",
"refresh_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"custom_headers",
":custom_headers",
")",... | Discovers the containers in the subscription that can be protected in a
Recovery Services vault. This is an asynchronous operation. To learn the
status of the operation, use the GetRefreshOperationResult API.
@param vault_name [String] The name of the Recovery Services vault.
@param resource_group_name [String] Th... | [
"Discovers",
"the",
"containers",
"in",
"the",
"subscription",
"that",
"can",
"be",
"protected",
"in",
"a",
"Recovery",
"Services",
"vault",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"learn",
"the",
"status",
"of",
"the",
"operation",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb#L279-L281 | train | Refresh an existing index of the specified fabric. | [
30522,
13366,
25416,
21898,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
8313,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
25416,
21898,
1035,
2004,
6038,
227... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/v1_money.rb | SquareConnect.V1Money.currency_code= | def currency_code=(currency_code)
validator = EnumAttributeValidator.new('String', ["UNKNOWN_CURRENCY", "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", ... | ruby | def currency_code=(currency_code)
validator = EnumAttributeValidator.new('String', ["UNKNOWN_CURRENCY", "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", ... | [
"def",
"currency_code",
"=",
"(",
"currency_code",
")",
"validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"UNKNOWN_CURRENCY\"",
",",
"\"AED\"",
",",
"\"AFN\"",
",",
"\"ALL\"",
",",
"\"AMD\"",
",",
"\"ANG\"",
",",
"\"AOA\"",
"... | Custom attribute writer method checking allowed values (enum).
@param [Object] currency_code Object to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"checking",
"allowed",
"values",
"(",
"enum",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_money.rb#L94-L100 | train | Returns the index of the next valid currency code. | [
30522,
13366,
9598,
1035,
3642,
1027,
1006,
9598,
1035,
3642,
1007,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
4242,
1035,
9598,
1000,
1010,
1000,
29347,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb | Azure::Scheduler::Mgmt::V2016_03_01.Jobs.delete | def delete(resource_group_name, job_collection_name, job_name, custom_headers:nil)
response = delete_async(resource_group_name, job_collection_name, job_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, job_collection_name, job_name, custom_headers:nil)
response = delete_async(resource_group_name, job_collection_name, job_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"job_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"job_name",
",",
"custom_headers",
":custom_... | Deletes a job.
@param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param job_name [String] The job name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"a",
"job",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb#L354-L357 | train | Deletes a job from the job collection. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
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_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/connector_mappings.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.ConnectorMappings.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"hub_name",
",",
"connector_name",
",",
"mapping_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"con... | Creates a connector mapping or updates an existing connector mapping in the
connector.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param connector_name [String] The name of the connector.
@param mapping_name [String] The name of the connector ... | [
"Creates",
"a",
"connector",
"mapping",
"or",
"updates",
"an",
"existing",
"connector",
"mapping",
"in",
"the",
"connector",
"."
] | 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/connector_mappings.rb#L62-L64 | train | Creates or updates a connector mapping. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
19400,
1035,
2171,
1010,
12375,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/overcommit | lib/overcommit/hook_context/pre_commit.rb | Overcommit::HookContext.PreCommit.setup_environment | def setup_environment
store_modified_times
Overcommit::GitRepo.store_merge_state
Overcommit::GitRepo.store_cherry_pick_state
if !initial_commit? && any_changes?
@stash_attempted = true
stash_message = "Overcommit: Stash of repo state before hook run at #{Time.now}"
resu... | ruby | def setup_environment
store_modified_times
Overcommit::GitRepo.store_merge_state
Overcommit::GitRepo.store_cherry_pick_state
if !initial_commit? && any_changes?
@stash_attempted = true
stash_message = "Overcommit: Stash of repo state before hook run at #{Time.now}"
resu... | [
"def",
"setup_environment",
"store_modified_times",
"Overcommit",
"::",
"GitRepo",
".",
"store_merge_state",
"Overcommit",
"::",
"GitRepo",
".",
"store_cherry_pick_state",
"if",
"!",
"initial_commit?",
"&&",
"any_changes?",
"@stash_attempted",
"=",
"true",
"stash_message",
... | Stash unstaged contents of files so hooks don't see changes that aren't
about to be committed. | [
"Stash",
"unstaged",
"contents",
"of",
"files",
"so",
"hooks",
"don",
"t",
"see",
"changes",
"that",
"aren",
"t",
"about",
"to",
"be",
"committed",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/hook_context/pre_commit.rb#L46-L72 | train | Setup the environment for the hook. | [
30522,
13366,
16437,
1035,
4044,
3573,
1035,
6310,
1035,
2335,
2058,
9006,
22930,
1024,
1024,
21025,
7913,
6873,
1012,
3573,
1035,
13590,
1035,
2110,
2058,
9006,
22930,
1024,
1024,
21025,
7913,
6873,
1012,
3573,
1035,
9115,
1035,
4060,
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.update_prebuilt_entity_role | def update_prebuilt_entity_role(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:nil)
response = update_prebuilt_entity_role_async(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def update_prebuilt_entity_role(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:nil)
response = update_prebuilt_entity_role_async(app_id, version_id, entity_id, role_id, entity_role_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"update_prebuilt_entity_role",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"entity_role_update_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_prebuilt_entity_role_async",
"(",
"app_id",
",",
"version_id",
... | Update a role for a given prebuilt entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity ID.
@param role_id The entity role ID.
@param entity_role_update_object [EntityRoleUpdateObject] The new entity
role.
@param custom_h... | [
"Update",
"a",
"role",
"for",
"a",
"given",
"prebuilt",
"entity",
"in",
"a",
"version",
"of",
"the",
"application"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L9193-L9196 | train | Updates a prebuilt entity role. | [
30522,
13366,
10651,
1035,
3653,
8569,
4014,
2102,
1035,
9178,
1035,
2535,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
9178,
1035,
2535,
1035,
10651,
1035,
4874,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Katello/katello | app/controllers/katello/api/registry/registry_proxies_controller.rb | Katello.Api::Registry::RegistryProxiesController.readable_repositories | def readable_repositories
table_name = Repository.table_name
in_products = Repository.in_product(Katello::Product.authorized(:view_products)).select(:id)
in_environments = Repository.where(:environment_id => Katello::KTEnvironment.authorized(:view_lifecycle_environments)).select(:id)
in_unauth_e... | ruby | def readable_repositories
table_name = Repository.table_name
in_products = Repository.in_product(Katello::Product.authorized(:view_products)).select(:id)
in_environments = Repository.where(:environment_id => Katello::KTEnvironment.authorized(:view_lifecycle_environments)).select(:id)
in_unauth_e... | [
"def",
"readable_repositories",
"table_name",
"=",
"Repository",
".",
"table_name",
"in_products",
"=",
"Repository",
".",
"in_product",
"(",
"Katello",
"::",
"Product",
".",
"authorized",
"(",
":view_products",
")",
")",
".",
"select",
"(",
":id",
")",
"in_envi... | Reduce visible repos to include lifecycle env permissions
http://projects.theforeman.org/issues/22914
Also include repositories in lifecycle environments with registry_unauthenticated_pull=true | [
"Reduce",
"visible",
"repos",
"to",
"include",
"lifecycle",
"env",
"permissions",
"http",
":",
"//",
"projects",
".",
"theforeman",
".",
"org",
"/",
"issues",
"/",
"22914",
"Also",
"include",
"repositories",
"in",
"lifecycle",
"environments",
"with",
"registry_u... | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/controllers/katello/api/registry/registry_proxies_controller.rb#L92-L100 | train | Returns an array of all the readable repositories that are readable for the current user. | [
30522,
13366,
3191,
3085,
1035,
16360,
20049,
29469,
2229,
2795,
1035,
2171,
1027,
22409,
1012,
2795,
1035,
2171,
1999,
1035,
3688,
1027,
22409,
1012,
1999,
1035,
4031,
1006,
5736,
7174,
1024,
1024,
4031,
1012,
9362,
1006,
1024,
3193,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_fetcher.rb | GitHubChangelogGenerator.Generator.associate_tagged_prs | def associate_tagged_prs(tags, prs, total)
@fetcher.fetch_tag_shas_async(tags)
i = 0
prs.reject do |pr|
found = false
# XXX Wish I could use merge_commit_sha, but gcg doesn't currently
# fetch that. See
# https://developer.github.com/v3/pulls/#get-a-single-pull-request... | ruby | def associate_tagged_prs(tags, prs, total)
@fetcher.fetch_tag_shas_async(tags)
i = 0
prs.reject do |pr|
found = false
# XXX Wish I could use merge_commit_sha, but gcg doesn't currently
# fetch that. See
# https://developer.github.com/v3/pulls/#get-a-single-pull-request... | [
"def",
"associate_tagged_prs",
"(",
"tags",
",",
"prs",
",",
"total",
")",
"@fetcher",
".",
"fetch_tag_shas_async",
"(",
"tags",
")",
"i",
"=",
"0",
"prs",
".",
"reject",
"do",
"|",
"pr",
"|",
"found",
"=",
"false",
"# XXX Wish I could use merge_commit_sha, bu... | Associate merged PRs by the merge SHA contained in each tag. If the
merge_commit_sha is not found in any tag's history, skip association.
@param [Array] tags The tags sorted by time, newest to oldest.
@param [Array] prs The PRs to associate.
@return [Array] PRs without their merge_commit_sha in a tag. | [
"Associate",
"merged",
"PRs",
"by",
"the",
"merge",
"SHA",
"contained",
"in",
"each",
"tag",
".",
"If",
"the",
"merge_commit_sha",
"is",
"not",
"found",
"in",
"any",
"tag",
"s",
"history",
"skip",
"association",
"."
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_fetcher.rb#L66-L96 | train | Associate the tags with the PRs that have been tagged with the given tags. | [
30522,
13366,
5482,
1035,
26610,
1035,
10975,
2015,
1006,
22073,
1010,
10975,
2015,
1010,
2561,
1007,
1030,
18584,
2121,
1012,
18584,
1035,
6415,
1035,
21146,
2015,
1035,
2004,
6038,
2278,
1006,
22073,
1007,
1045,
1027,
1014,
10975,
2015,
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... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.Geometry.to_s | def to_s
str = ''
if @width > 0
fmt = @width.truncate == @width ? '%d' : '%.2f'
str << format(fmt, @width)
str << '%' if @flag == PercentGeometry
end
str << 'x' if (@width > 0 && @flag != PercentGeometry) || (@height > 0)
if @height > 0
fmt = @height.trunc... | ruby | def to_s
str = ''
if @width > 0
fmt = @width.truncate == @width ? '%d' : '%.2f'
str << format(fmt, @width)
str << '%' if @flag == PercentGeometry
end
str << 'x' if (@width > 0 && @flag != PercentGeometry) || (@height > 0)
if @height > 0
fmt = @height.trunc... | [
"def",
"to_s",
"str",
"=",
"''",
"if",
"@width",
">",
"0",
"fmt",
"=",
"@width",
".",
"truncate",
"==",
"@width",
"?",
"'%d'",
":",
"'%.2f'",
"str",
"<<",
"format",
"(",
"fmt",
",",
"@width",
")",
"str",
"<<",
"'%'",
"if",
"@flag",
"==",
"PercentGe... | Convert object to a geometry string | [
"Convert",
"object",
"to",
"a",
"geometry",
"string"
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L130-L148 | train | Returns the string representation of the geometry. | [
30522,
13366,
2000,
1035,
1055,
2358,
2099,
1027,
1005,
1005,
2065,
1030,
9381,
1028,
1014,
4718,
2102,
1027,
1030,
9381,
1012,
19817,
4609,
16280,
1027,
1027,
1030,
9381,
1029,
1005,
1003,
1040,
1005,
1024,
1005,
1003,
1012,
1016,
2546,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jeremytregunna/ruby-trello | lib/trello/plugin_datum.rb | Trello.PluginDatum.update_fields | def update_fields(fields)
attributes[:id] = fields['id'] || attributes[:id]
attributes[:idPlugin] = fields['idPlugin'] || attributes[:idPlugin]
attributes[:scope] = fields['scope'] || attributes[:scope]
attributes[:value] = JSON.parse(fields['value']).presence if fields.has_key?(... | ruby | def update_fields(fields)
attributes[:id] = fields['id'] || attributes[:id]
attributes[:idPlugin] = fields['idPlugin'] || attributes[:idPlugin]
attributes[:scope] = fields['scope'] || attributes[:scope]
attributes[:value] = JSON.parse(fields['value']).presence if fields.has_key?(... | [
"def",
"update_fields",
"(",
"fields",
")",
"attributes",
"[",
":id",
"]",
"=",
"fields",
"[",
"'id'",
"]",
"||",
"attributes",
"[",
":id",
"]",
"attributes",
"[",
":idPlugin",
"]",
"=",
"fields",
"[",
"'idPlugin'",
"]",
"||",
"attributes",
"[",
":idPlug... | Supply a hash of stringkeyed data retrieved from the Trello API representing
an attachment. | [
"Supply",
"a",
"hash",
"of",
"stringkeyed",
"data",
"retrieved",
"from",
"the",
"Trello",
"API",
"representing",
"an",
"attachment",
"."
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/plugin_datum.rb#L23-L31 | train | Update the fields of the object | [
30522,
13366,
10651,
1035,
4249,
1006,
4249,
1007,
12332,
1031,
1024,
8909,
1033,
1027,
4249,
1031,
1005,
8909,
1005,
1033,
1064,
1064,
12332,
1031,
1024,
8909,
1033,
12332,
1031,
1024,
8909,
24759,
15916,
2378,
1033,
1027,
4249,
1031,
1005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_trigger_histories.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowTriggerHistories.get_with_http_info | def get_with_http_info(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:nil)
get_async(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:nil)
get_async(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"history_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"history_name",
",... | Gets a workflow trigger history.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param trigger_name [String] The workflow trigger name.
@param history_name [String] The workflow trigger history name. Corresponds
to the run name for triggers that resul... | [
"Gets",
"a",
"workflow",
"trigger",
"history",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_trigger_histories.rb#L160-L162 | train | Gets the specified history of a workflow trigger. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
9495,
1035,
2171,
1010,
2381,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_policies.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.ProtectionPolicies.get_with_http_info | def get_with_http_info(vault_name, resource_group_name, policy_name, custom_headers:nil)
get_async(vault_name, resource_group_name, policy_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(vault_name, resource_group_name, policy_name, custom_headers:nil)
get_async(vault_name, resource_group_name, policy_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"policy_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"policy_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Gets the details of the backup policy associated with the Recovery Services
vault. This is an asynchronous operation. Use the GetPolicyOperationResult
API to Get the operation status.
@param vault_name [String] The name of the Recovery Services vault.
@param resource_group_name [String] The name of the resource gr... | [
"Gets",
"the",
"details",
"of",
"the",
"backup",
"policy",
"associated",
"with",
"the",
"Recovery",
"Services",
"vault",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"Use",
"the",
"GetPolicyOperationResult",
"API",
"to",
"Get",
"the",
"operation",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_policies.rb#L63-L65 | train | Gets the specified policy in a specified vault. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3343,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
11632,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_domain | def get_domain(domain_id, custom_headers:nil)
response = get_domain_async(domain_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_domain(domain_id, custom_headers:nil)
response = get_domain_async(domain_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_domain",
"(",
"domain_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_domain_async",
"(",
"domain_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
... | Get information about a specific domain.
@param domain_id The id of the domain to get information about.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Domain] operation results. | [
"Get",
"information",
"about",
"a",
"specific",
"domain",
"."
] | 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#L223-L226 | train | Gets the domain information for a domain. | [
30522,
13366,
2131,
1035,
5884,
1006,
5884,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
5884,
1035,
2004,
6038,
2278,
1006,
5884,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/authorization_policies.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.AuthorizationPolicies.get_with_http_info | def get_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"hub_name",
",",
"authorization_policy_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"authorization_policy_name",
",",
"custom_headers",
":custom_... | Gets an authorization policy in the hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param authorization_policy_name [String] The name of the policy.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to... | [
"Gets",
"an",
"authorization",
"policy",
"in",
"the",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/authorization_policies.rb#L177-L179 | train | Gets the specified authorization policy. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
20104,
1035,
3343,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_interface.rb | Aws::EC2.NetworkInterface.attach | def attach(options = {})
options = options.merge(network_interface_id: @id)
resp = @client.attach_network_interface(options)
resp.data
end | ruby | def attach(options = {})
options = options.merge(network_interface_id: @id)
resp = @client.attach_network_interface(options)
resp.data
end | [
"def",
"attach",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"network_interface_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"attach_network_interface",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
network_interface.attach({
device_index: 1, # required
dry_run: false,
instance_id: "String", # required
})
@param [Hash] options ({})
@option options [required, Integer] :device_index
The index of the device for the network interface attachment... | [
"@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_interface.rb#L323-L327 | train | Attach this network interface to a network interface. | [
30522,
13366,
22476,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2897,
1035,
8278,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
22476,
1035,
2897,
1035,
8278,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_cross_connection_peerings.rb | Azure::Network::Mgmt::V2018_07_01.ExpressRouteCrossConnectionPeerings.get_with_http_info | def get_with_http_info(resource_group_name, cross_connection_name, peering_name, custom_headers:nil)
get_async(resource_group_name, cross_connection_name, peering_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, cross_connection_name, peering_name, custom_headers:nil)
get_async(resource_group_name, cross_connection_name, peering_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"peering_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"peering_name",
",",
"custom_headers",
":custom_... | Gets the specified peering for the ExpressRouteCrossConnection.
@param resource_group_name [String] The name of the resource group.
@param cross_connection_name [String] The name of the
ExpressRouteCrossConnection.
@param peering_name [String] The name of the peering.
@param custom_headers [Hash{String => String}... | [
"Gets",
"the",
"specified",
"peering",
"for",
"the",
"ExpressRouteCrossConnection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_cross_connection_peerings.rb#L190-L192 | train | Gets the specified ExpressRouteCrossConnectionExpressRoutePeering. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2892,
1035,
4434,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appsignal/rdkafka-ruby | lib/rdkafka/consumer.rb | Rdkafka.Consumer.committed | def committed(list=nil, timeout_ms=1200)
if list.nil?
list = assignment
elsif !list.is_a?(TopicPartitionList)
raise TypeError.new("list has to be nil or a TopicPartitionList")
end
tpl = list.to_native_tpl
response = Rdkafka::Bindings.rd_kafka_committed(@native_kafka, tpl, t... | ruby | def committed(list=nil, timeout_ms=1200)
if list.nil?
list = assignment
elsif !list.is_a?(TopicPartitionList)
raise TypeError.new("list has to be nil or a TopicPartitionList")
end
tpl = list.to_native_tpl
response = Rdkafka::Bindings.rd_kafka_committed(@native_kafka, tpl, t... | [
"def",
"committed",
"(",
"list",
"=",
"nil",
",",
"timeout_ms",
"=",
"1200",
")",
"if",
"list",
".",
"nil?",
"list",
"=",
"assignment",
"elsif",
"!",
"list",
".",
"is_a?",
"(",
"TopicPartitionList",
")",
"raise",
"TypeError",
".",
"new",
"(",
"\"list has... | Return the current committed offset per partition for this consumer group.
The offset field of each requested partition will either be set to stored offset or to -1001 in case there was no stored offset for that partition.
@param list [TopicPartitionList, nil] The topic with partitions to get the offsets for or nil ... | [
"Return",
"the",
"current",
"committed",
"offset",
"per",
"partition",
"for",
"this",
"consumer",
"group",
".",
"The",
"offset",
"field",
"of",
"each",
"requested",
"partition",
"will",
"either",
"be",
"set",
"to",
"stored",
"offset",
"or",
"to",
"-",
"1001"... | 87b3e0ddae5ea576847cb67228fcea06ec2a24d6 | https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/consumer.rb#L165-L177 | train | Commit the current assignment to the Kafka broker. | [
30522,
13366,
5462,
1006,
2862,
1027,
9152,
2140,
1010,
2051,
5833,
1035,
5796,
1027,
14840,
1007,
2065,
2862,
1012,
9152,
2140,
1029,
2862,
1027,
8775,
3449,
5332,
2546,
999,
2862,
1012,
2003,
1035,
1037,
1029,
1006,
8476,
19362,
3775,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/variable_operations.rb | Azure::Automation::Mgmt::V2015_10_31.VariableOperations.delete | def delete(resource_group_name, automation_account_name, variable_name, custom_headers:nil)
response = delete_async(resource_group_name, automation_account_name, variable_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, automation_account_name, variable_name, custom_headers:nil)
response = delete_async(resource_group_name, automation_account_name, variable_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"variable_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"variable_name",
",",
"custom_hea... | Delete the variable.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param variable_name [String] The name of variable.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to th... | [
"Delete",
"the",
"variable",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/variable_operations.rb#L270-L273 | train | Deletes a variable. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
8023,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
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... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/orphan_network_manager.rb | Bosh::Director.OrphanNetworkManager.list_orphan_networks | def list_orphan_networks
Models::Network.where(orphaned: true).map do |network|
{
'name' => network.name,
'type' => network.type,
'created_at' => network.created_at.to_s,
'orphaned_at' => network.orphaned_at.to_s,
}
end
end | ruby | def list_orphan_networks
Models::Network.where(orphaned: true).map do |network|
{
'name' => network.name,
'type' => network.type,
'created_at' => network.created_at.to_s,
'orphaned_at' => network.orphaned_at.to_s,
}
end
end | [
"def",
"list_orphan_networks",
"Models",
"::",
"Network",
".",
"where",
"(",
"orphaned",
":",
"true",
")",
".",
"map",
"do",
"|",
"network",
"|",
"{",
"'name'",
"=>",
"network",
".",
"name",
",",
"'type'",
"=>",
"network",
".",
"type",
",",
"'created_at'... | returns a list of orphaned networks | [
"returns",
"a",
"list",
"of",
"orphaned",
"networks"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/orphan_network_manager.rb#L38-L47 | train | Returns an array of the network objects that are not owned by the current user. | [
30522,
13366,
2862,
1035,
18211,
1035,
6125,
4275,
1024,
1024,
2897,
1012,
2073,
1006,
27093,
1024,
2995,
1007,
1012,
4949,
2079,
1064,
2897,
1064,
1063,
1005,
2171,
1005,
1027,
1028,
2897,
1012,
2171,
1010,
1005,
2828,
1005,
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... |
sds/haml-lint | lib/haml_lint/ruby_parser.rb | HamlLint.RubyParser.parse | def parse(source)
buffer = ::Parser::Source::Buffer.new('(string)')
buffer.source = source
@parser.reset
@parser.parse(buffer)
end | ruby | def parse(source)
buffer = ::Parser::Source::Buffer.new('(string)')
buffer.source = source
@parser.reset
@parser.parse(buffer)
end | [
"def",
"parse",
"(",
"source",
")",
"buffer",
"=",
"::",
"Parser",
"::",
"Source",
"::",
"Buffer",
".",
"new",
"(",
"'(string)'",
")",
"buffer",
".",
"source",
"=",
"source",
"@parser",
".",
"reset",
"@parser",
".",
"parse",
"(",
"buffer",
")",
"end"
] | Creates a reusable parser.
Parse the given Ruby source into an abstract syntax tree.
@param source [String] Ruby source code
@return [Array] syntax tree in the form returned by Parser gem | [
"Creates",
"a",
"reusable",
"parser",
".",
"Parse",
"the",
"given",
"Ruby",
"source",
"into",
"an",
"abstract",
"syntax",
"tree",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/ruby_parser.rb#L25-L31 | train | Parse the given source | [
30522,
13366,
11968,
3366,
1006,
3120,
1007,
17698,
1027,
1024,
1024,
11968,
8043,
1024,
1024,
3120,
1024,
1024,
17698,
1012,
2047,
1006,
1005,
1006,
5164,
1007,
1005,
1007,
17698,
1012,
3120,
1027,
3120,
1030,
11968,
8043,
1012,
25141,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
boazsegev/combine_pdf | lib/combine_pdf/page_methods.rb | CombinePDF.Page_Methods.copy | def copy(secure = false)
# since only the Content streams are modified (Resource hashes are created anew),
# it should be safe (and a lot faster) to create a deep copy only for the content hashes and streams.
delete :Parent
prep_content_array
page_copy = clone
page_copy[:Contents] = ... | ruby | def copy(secure = false)
# since only the Content streams are modified (Resource hashes are created anew),
# it should be safe (and a lot faster) to create a deep copy only for the content hashes and streams.
delete :Parent
prep_content_array
page_copy = clone
page_copy[:Contents] = ... | [
"def",
"copy",
"(",
"secure",
"=",
"false",
")",
"# since only the Content streams are modified (Resource hashes are created anew),",
"# it should be safe (and a lot faster) to create a deep copy only for the content hashes and streams.",
"delete",
":Parent",
"prep_content_array",
"page_copy... | creates a copy of the page. if the :secure flag is set to true, the resource indentifiers (fonts etc') will be renamed in order to secure their uniqueness. | [
"creates",
"a",
"copy",
"of",
"the",
"page",
".",
"if",
"the",
":",
"secure",
"flag",
"is",
"set",
"to",
"true",
"the",
"resource",
"indentifiers",
"(",
"fonts",
"etc",
")",
"will",
"be",
"renamed",
"in",
"order",
"to",
"secure",
"their",
"uniqueness",
... | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/page_methods.rb#L634-L655 | train | This method copies the contents of the page to the new location. | [
30522,
13366,
6100,
1006,
5851,
1027,
6270,
1007,
1001,
2144,
2069,
1996,
4180,
9199,
2024,
6310,
1006,
7692,
23325,
2229,
2024,
2580,
2019,
7974,
1007,
1010,
1001,
2009,
2323,
2022,
3647,
1006,
1998,
1037,
2843,
5514,
1007,
2000,
3443,
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... |
fastlane/fastlane | supply/lib/supply/client.rb | Supply.Client.listing_for_language | def listing_for_language(language)
ensure_active_edit!
begin
result = client.get_listing(
current_package_name,
current_edit.id,
language
)
return Listing.new(self, language, result)
rescue Google::Apis::ClientError => e
return Listing.ne... | ruby | def listing_for_language(language)
ensure_active_edit!
begin
result = client.get_listing(
current_package_name,
current_edit.id,
language
)
return Listing.new(self, language, result)
rescue Google::Apis::ClientError => e
return Listing.ne... | [
"def",
"listing_for_language",
"(",
"language",
")",
"ensure_active_edit!",
"begin",
"result",
"=",
"client",
".",
"get_listing",
"(",
"current_package_name",
",",
"current_edit",
".",
"id",
",",
"language",
")",
"return",
"Listing",
".",
"new",
"(",
"self",
","... | Returns the listing for the given language filled with the current values if it already exists | [
"Returns",
"the",
"listing",
"for",
"the",
"given",
"language",
"filled",
"with",
"the",
"current",
"values",
"if",
"it",
"already",
"exists"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L187-L202 | train | Get the listing for a given language | [
30522,
13366,
10328,
1035,
2005,
1035,
2653,
1006,
2653,
1007,
5676,
1035,
3161,
1035,
10086,
999,
4088,
2765,
1027,
7396,
1012,
2131,
1035,
10328,
1006,
2783,
1035,
7427,
1035,
2171,
1010,
2783,
1035,
10086,
1012,
8909,
1010,
2653,
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... |
puppetlabs/puppet | lib/puppet/util/windows/sid.rb | Puppet::Util::Windows.SID.ads_to_principal | def ads_to_principal(ads_object)
if !ads_object || !ads_object.respond_to?(:ole_respond_to?) ||
!ads_object.ole_respond_to?(:objectSID) || !ads_object.ole_respond_to?(:Name)
raise Puppet::Error.new("ads_object must be an IAdsUser or IAdsGroup instance")
end
octet_string_to_principal(ad... | ruby | def ads_to_principal(ads_object)
if !ads_object || !ads_object.respond_to?(:ole_respond_to?) ||
!ads_object.ole_respond_to?(:objectSID) || !ads_object.ole_respond_to?(:Name)
raise Puppet::Error.new("ads_object must be an IAdsUser or IAdsGroup instance")
end
octet_string_to_principal(ad... | [
"def",
"ads_to_principal",
"(",
"ads_object",
")",
"if",
"!",
"ads_object",
"||",
"!",
"ads_object",
".",
"respond_to?",
"(",
":ole_respond_to?",
")",
"||",
"!",
"ads_object",
".",
"ole_respond_to?",
"(",
":objectSID",
")",
"||",
"!",
"ads_object",
".",
"ole_r... | Converts a COM instance of IAdsUser or IAdsGroup to a SID::Principal object,
Raises an Error for nil or an object without an objectSID / Name property.
This method returns a SID::Principal with the account, domain, SID, etc
This method will return instances even when the SID is unresolvable, as
may be the case when... | [
"Converts",
"a",
"COM",
"instance",
"of",
"IAdsUser",
"or",
"IAdsGroup",
"to",
"a",
"SID",
"::",
"Principal",
"object",
"Raises",
"an",
"Error",
"for",
"nil",
"or",
"an",
"object",
"without",
"an",
"objectSID",
"/",
"Name",
"property",
".",
"This",
"method... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/sid.rb#L107-L125 | train | Convert an IAdsUser or IAdsGroup object to a principal | [
30522,
13366,
14997,
1035,
2000,
1035,
4054,
1006,
14997,
1035,
4874,
1007,
2065,
999,
14997,
1035,
4874,
1064,
1064,
999,
14997,
1035,
4874,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
15589,
1035,
6869,
1035,
2000,
1029,
1007,
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... |
cucumber/aruba | lib/aruba/event_bus.rb | Aruba.EventBus.notify | def notify(event)
fail NoEventError, 'Please pass an event object, not a class' if event.is_a?(Class)
@handlers[event.class.to_s].each { |handler| handler.call(event) }
end | ruby | def notify(event)
fail NoEventError, 'Please pass an event object, not a class' if event.is_a?(Class)
@handlers[event.class.to_s].each { |handler| handler.call(event) }
end | [
"def",
"notify",
"(",
"event",
")",
"fail",
"NoEventError",
",",
"'Please pass an event object, not a class'",
"if",
"event",
".",
"is_a?",
"(",
"Class",
")",
"@handlers",
"[",
"event",
".",
"class",
".",
"to_s",
"]",
".",
"each",
"{",
"|",
"handler",
"|",
... | Broadcast an event
@param [Object] event
An object of registered event class. This object is passed to the event
handler. | [
"Broadcast",
"an",
"event"
] | add17615322f575588aef1fccce875396cdf36e9 | https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/event_bus.rb#L53-L57 | train | Notify all registered handlers | [
30522,
13366,
2025,
8757,
1006,
2724,
1007,
8246,
2053,
18697,
10111,
18933,
2099,
1010,
1005,
3531,
3413,
2019,
2724,
4874,
1010,
2025,
1037,
2465,
1005,
2065,
2724,
1012,
2003,
1035,
1037,
1029,
1006,
2465,
1007,
1030,
28213,
2015,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_hierarchical_entity | def update_hierarchical_entity(app_id, version_id, h_entity_id, hierarchical_model_update_object, custom_headers:nil)
response = update_hierarchical_entity_async(app_id, version_id, h_entity_id, hierarchical_model_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | ruby | def update_hierarchical_entity(app_id, version_id, h_entity_id, hierarchical_model_update_object, custom_headers:nil)
response = update_hierarchical_entity_async(app_id, version_id, h_entity_id, hierarchical_model_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | [
"def",
"update_hierarchical_entity",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"hierarchical_model_update_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_hierarchical_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"h_ent... | Updates the name and children of a hierarchical entity model in a version of
the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param h_entity_id The hierarchical entity extractor ID.
@param hierarchical_model_update_object [HierarchicalEntityModel] Model
containing na... | [
"Updates",
"the",
"name",
"and",
"children",
"of",
"a",
"hierarchical",
"entity",
"model",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L2529-L2532 | train | Updates a hierarchical entity. | [
30522,
13366,
10651,
1035,
25835,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1044,
1035,
9178,
1035,
8909,
1010,
25835,
1035,
2944,
1035,
10651,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_deployed_service_type_info_list_with_http_info | def get_deployed_service_type_info_list_with_http_info(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
... | ruby | def get_deployed_service_type_info_list_with_http_info(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
... | [
"def",
"get_deployed_service_type_info_list_with_http_info",
"(",
"node_name",
",",
"application_id",
",",
"service_manifest_name",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_deployed_service_type_info_list_async",
"(",
"node_name",
... | Gets the list containing the information about service types from the
applications deployed on a node in a Service Fabric cluster.
Gets the list containing the information about service types from the
applications deployed on a node in a Service Fabric cluster. The response
includes the name of the service type, i... | [
"Gets",
"the",
"list",
"containing",
"the",
"information",
"about",
"service",
"types",
"from",
"the",
"applications",
"deployed",
"on",
"a",
"node",
"in",
"a",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L5764-L5766 | train | Gets the list of service type info for a node. | [
30522,
13366,
2131,
1035,
7333,
1035,
2326,
1035,
2828,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
2326,
1035,
19676,
1035,
2171,
1024,
9152,
2140,
1010,
2051,
5833,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_privatedns/lib/2018-09-01/generated/azure_mgmt_privatedns/private_zones.rb | Azure::PrivateDns::Mgmt::V2018_09_01.PrivateZones.delete | def delete(resource_group_name, private_zone_name, if_match:nil, custom_headers:nil)
response = delete_async(resource_group_name, private_zone_name, if_match:if_match, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, private_zone_name, if_match:nil, custom_headers:nil)
response = delete_async(resource_group_name, private_zone_name, if_match:if_match, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"if_match",
":if_match",
",",
"c... | Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be
deleted. This operation cannot be undone. Private DNS zone cannot be deleted
unless all virtual network links to it are removed.
@param resource_group_name [String] The name of the resource group.
@param private_zone_name [String] The na... | [
"Deletes",
"a",
"Private",
"DNS",
"zone",
".",
"WARNING",
":",
"All",
"DNS",
"records",
"in",
"the",
"zone",
"will",
"also",
"be",
"deleted",
".",
"This",
"operation",
"cannot",
"be",
"undone",
".",
"Private",
"DNS",
"zone",
"cannot",
"be",
"deleted",
"u... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_privatedns/lib/2018-09-01/generated/azure_mgmt_privatedns/private_zones.rb#L152-L155 | train | Deletes a private DNS zone. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2797,
1035,
4224,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
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... |
CanCanCommunity/cancancan | lib/cancan/conditions_matcher.rb | CanCan.ConditionsMatcher.matches_conditions? | def matches_conditions?(action, subject, attribute = nil, *extra_args)
return call_block_with_all(action, subject, extra_args) if @match_all
return matches_block_conditions(subject, attribute, *extra_args) if @block
return matches_non_block_conditions(subject) unless conditions_empty?
true
... | ruby | def matches_conditions?(action, subject, attribute = nil, *extra_args)
return call_block_with_all(action, subject, extra_args) if @match_all
return matches_block_conditions(subject, attribute, *extra_args) if @block
return matches_non_block_conditions(subject) unless conditions_empty?
true
... | [
"def",
"matches_conditions?",
"(",
"action",
",",
"subject",
",",
"attribute",
"=",
"nil",
",",
"*",
"extra_args",
")",
"return",
"call_block_with_all",
"(",
"action",
",",
"subject",
",",
"extra_args",
")",
"if",
"@match_all",
"return",
"matches_block_conditions"... | Matches the block or conditions hash | [
"Matches",
"the",
"block",
"or",
"conditions",
"hash"
] | b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf | https://github.com/CanCanCommunity/cancancan/blob/b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf/lib/cancan/conditions_matcher.rb#L6-L12 | train | Returns true if the subject matches the conditions. | [
30522,
13366,
3503,
1035,
3785,
1029,
1006,
2895,
1010,
3395,
1010,
17961,
1027,
9152,
2140,
1010,
1008,
4469,
1035,
12098,
5620,
1007,
2709,
2655,
1035,
3796,
1035,
2007,
1035,
2035,
1006,
2895,
1010,
3395,
1010,
4469,
1035,
12098,
5620,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.list_with_http_info | def list_with_http_info(filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
list_async(filter:filter, top:top, skip:skip, expand:expand, select:select, orderby:orderby, count:count, search:search, format:format, custom_headers:custom_headers).... | ruby | def list_with_http_info(filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
list_async(filter:filter, top:top, skip:skip, expand:expand, select:select, orderby:orderby, count:count, search:search, format:format, custom_headers:custom_headers).... | [
"def",
"list_with_http_info",
"(",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"expand",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"count",
":",
"nil",
",",
"search",
":",
"nil",
",",
... | Gets the first page of Data Lake Analytics accounts, if any, within the
current subscription. This includes a link to the next page, if any.
@param filter [String] OData filter. Optional.
@param top [Integer] The number of items to return. Optional.
@param skip [Integer] The number of items to skip over before ret... | [
"Gets",
"the",
"first",
"page",
"of",
"Data",
"Lake",
"Analytics",
"accounts",
"if",
"any",
"within",
"the",
"current",
"subscription",
".",
"This",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L1683-L1685 | train | Gets a list of all the image objects in a collection of image objects. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7818,
1024,
9152,
2140,
1010,
7276,
1024,
9152,
2140,
1010,
2344,
3762,
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... |
gjtorikian/html-proofer | lib/html-proofer/url_validator.rb | HTMLProofer.UrlValidator.external_link_checker | def external_link_checker(external_urls)
external_urls = Hash[external_urls.sort]
count = external_urls.length
check_text = pluralize(count, 'external link', 'external links')
@logger.log :info, "Checking #{check_text}..."
# Route log from Typhoeus/Ethon to our own logger
Ethon.log... | ruby | def external_link_checker(external_urls)
external_urls = Hash[external_urls.sort]
count = external_urls.length
check_text = pluralize(count, 'external link', 'external links')
@logger.log :info, "Checking #{check_text}..."
# Route log from Typhoeus/Ethon to our own logger
Ethon.log... | [
"def",
"external_link_checker",
"(",
"external_urls",
")",
"external_urls",
"=",
"Hash",
"[",
"external_urls",
".",
"sort",
"]",
"count",
"=",
"external_urls",
".",
"length",
"check_text",
"=",
"pluralize",
"(",
"count",
",",
"'external link'",
",",
"'external lin... | Proofer runs faster if we pull out all the external URLs and run the checks
at the end. Otherwise, we're halting the consuming process for every file during
`process_files`.
In addition, sorting the list lets libcurl keep connections to the same hosts alive.
Finally, we'll first make a HEAD request, rather than G... | [
"Proofer",
"runs",
"faster",
"if",
"we",
"pull",
"out",
"all",
"the",
"external",
"URLs",
"and",
"run",
"the",
"checks",
"at",
"the",
"end",
".",
"Otherwise",
"we",
"re",
"halting",
"the",
"consuming",
"process",
"for",
"every",
"file",
"during",
"process_... | d00955d3b125b9a1649d056bb347ec30e935d847 | https://github.com/gjtorikian/html-proofer/blob/d00955d3b125b9a1649d056bb347ec30e935d847/lib/html-proofer/url_validator.rb#L90-L103 | train | Check if external links are available | [
30522,
13366,
6327,
1035,
4957,
1035,
4638,
2121,
1006,
6327,
1035,
24471,
4877,
1007,
6327,
1035,
24471,
4877,
1027,
23325,
1031,
6327,
1035,
24471,
4877,
1012,
4066,
1033,
4175,
1027,
6327,
1035,
24471,
4877,
1012,
3091,
4638,
1035,
3793,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_with_http_info | def get_keys_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_keys_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | ruby | def get_keys_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_keys_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | [
"def",
"get_keys_with_http_info",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_keys_async",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!... | 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#L946-L948 | train | Gets the keys of the specified vault. | [
30522,
13366,
2131,
1035,
6309,
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,
9152,
2140,
1007,
2131,
1035,
6309,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/resource.rb | Aws::CloudFormation.Resource.stacks | def stacks(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_stacks(options)
resp.each_page do |page|
batch = []
page.data.stacks.each do |s|
batch << Stack.new(
name: s.stack_name,
data: s,
client: @clie... | ruby | def stacks(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_stacks(options)
resp.each_page do |page|
batch = []
page.data.stacks.each do |s|
batch << Stack.new(
name: s.stack_name,
data: s,
client: @clie... | [
"def",
"stacks",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"resp",
"=",
"@client",
".",
"describe_stacks",
"(",
"options",
")",
"resp",
".",
"each_page",
"do",
"|",
"page",
"|",
"batch",
"=",
... | @example Request syntax with placeholder values
stacks = cloud_formation.stacks({
stack_name: "StackName",
})
@param [Hash] options ({})
@option options [String] :stack_name
The name or the unique stack ID that is associated with the stack,
which are not always interchangeable:
* Running stacks:... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/resource.rb#L351-L367 | train | Returns a collection of all stacks in the cluster | [
30522,
13366,
20829,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
20829,
1006,
7047,
1007,
24501,
2361,
1012,
2169,
1035,
393... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/service_endpoint_policies.rb | Azure::Network::Mgmt::V2018_07_01.ServiceEndpointPolicies.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"par... | Creates or updates a service Endpoint Policies.
@param resource_group_name [String] The name of the resource group.
@param service_endpoint_policy_name [String] The name of the service endpoint
policy.
@param parameters [ServiceEndpointPolicy] Parameters supplied to the create
or update service endpoint policy op... | [
"Creates",
"or",
"updates",
"a",
"service",
"Endpoint",
"Policies",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/service_endpoint_policies.rb#L545-L547 | train | Creates or updates a service endpoint policy. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2203,
8400,
1035,
3343,
1035,
2171,
1010,
11709,
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 | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.StorageAccountCredentials.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"storage_account_credential_name",
",",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"storage_account_credential_name",
",",
"para... | Creates or updates the storage account credential.
@param storage_account_credential_name [String] The storage account
credential name.
@param parameters [StorageAccountCredential] The storage account credential
to be added or updated.
@param resource_group_name [String] The resource group name
@param manager_na... | [
"Creates",
"or",
"updates",
"the",
"storage",
"account",
"credential",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb#L344-L346 | train | Creates or updates a storage account credential. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5527,
1035,
4070,
1035,
13675,
14728,
19909,
1035,
2171,
1010,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_parameter_group.rb | Aws::RDS.DBParameterGroup.parameters | def parameters(options = {})
batches = Enumerator.new do |y|
options = options.merge(db_parameter_group_name: @name)
resp = @client.describe_db_parameters(options)
resp.each_page do |page|
batch = []
page.data.parameters.each do |p|
batch << Parameter.new(
... | ruby | def parameters(options = {})
batches = Enumerator.new do |y|
options = options.merge(db_parameter_group_name: @name)
resp = @client.describe_db_parameters(options)
resp.each_page do |page|
batch = []
page.data.parameters.each do |p|
batch << Parameter.new(
... | [
"def",
"parameters",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"db_parameter_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"describe_db_... | @example Request syntax with placeholder values
parameters = db_parameter_group.parameters({
source: "String",
filters: [
{
name: "String", # required
values: ["String"], # required
},
],
})
@param [Hash] options ({})
@option options [String] :source
The parame... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_parameter_group.rb#L530-L547 | train | Returns a list of all parameters in the database. | [
30522,
13366,
11709,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
16381,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
245... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationRecoveryPlans.unplanned_failover | def unplanned_failover(recovery_plan_name, input, custom_headers:nil)
response = unplanned_failover_async(recovery_plan_name, input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def unplanned_failover(recovery_plan_name, input, custom_headers:nil)
response = unplanned_failover_async(recovery_plan_name, input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"unplanned_failover",
"(",
"recovery_plan_name",
",",
"input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"unplanned_failover_async",
"(",
"recovery_plan_name",
",",
"input",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response"... | Execute unplanned failover of the recovery plan.
The operation to start the failover of a recovery plan.
@param recovery_plan_name [String] Recovery plan name.
@param input [RecoveryPlanUnplannedFailoverInput] Failover input.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be ad... | [
"Execute",
"unplanned",
"failover",
"of",
"the",
"recovery",
"plan",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb#L568-L571 | train | Unplanned failover for the specified Recovery Plan. | [
30522,
13366,
4895,
24759,
20147,
2094,
1035,
8246,
7840,
1006,
7233,
1035,
2933,
1035,
2171,
1010,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4895,
24759,
20147,
2094,
1035,
8246,
7840,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/tty-prompt | lib/tty/prompt.rb | TTY.Prompt.invoke_question | def invoke_question(object, message, *args, &block)
options = Utils.extract_options!(args)
options[:messages] = self.class.messages
question = object.new(self, options)
question.(message, &block)
end | ruby | def invoke_question(object, message, *args, &block)
options = Utils.extract_options!(args)
options[:messages] = self.class.messages
question = object.new(self, options)
question.(message, &block)
end | [
"def",
"invoke_question",
"(",
"object",
",",
"message",
",",
"*",
"args",
",",
"&",
"block",
")",
"options",
"=",
"Utils",
".",
"extract_options!",
"(",
"args",
")",
"options",
"[",
":messages",
"]",
"=",
"self",
".",
"class",
".",
"messages",
"question... | Initialize a Prompt
@param [Hash] options
@option options [IO] :input
the input stream
@option options [IO] :output
the output stream
@option options [Hash] :env
the environment variables
@option options [String] :prefix
the prompt prefix, by default empty
@option options [Boolean] :enable_color
e... | [
"Initialize",
"a",
"Prompt"
] | b1ff627afff98fa6477e5ef3ac4a718c52eff05a | https://github.com/piotrmurach/tty-prompt/blob/b1ff627afff98fa6477e5ef3ac4a718c52eff05a/lib/tty/prompt.rb#L164-L169 | train | Invoke a question object | [
30522,
13366,
1999,
6767,
3489,
1035,
3160,
1006,
4874,
1010,
4471,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
7047,
1027,
21183,
12146,
1012,
14817,
1035,
7047,
999,
1006,
12098,
5620,
1007,
7047,
1031,
1024,
7696,
1033,
1027,
2969,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.list_async | def list_async(custom_headers:nil)
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'
#... | ruby | def list_async(custom_headers:nil)
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'
#... | [
"def",
"list_async",
"(",
"custom_headers",
":",
"nil",
")",
"fail",
"ArgumentError",
",",
"'@client.subscription_id is nil'",
"if",
"@client",
".",
"subscription_id",
".",
"nil?",
"fail",
"ArgumentError",
",",
"'@client.api_version is nil'",
"if",
"@client",
".",
"ap... | List all certificate orders in a subscription.
List all certificate orders in a subscription.
@param [Hash{String => String}] A hash of custom headers that will be added
to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response. | [
"List",
"all",
"certificate",
"orders",
"in",
"a",
"subscription",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L63-L112 | train | Gets all the certificate orders for a subscription. | [
30522,
13366,
2862,
1035,
2004,
6038,
2278,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
8246,
6685,
2121,
29165,
1010,
1005,
1030,
7396,
1012,
15002,
1035,
8909,
2003,
9152,
2140,
1005,
2065,
1030,
7396,
1012,
15002,
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... |
CocoaPods/Xcodeproj | spec/spec_helper/project_helper.rb | SpecHelper.ProjectHelper.load_settings | def load_settings(path, type)
# Load fixture
base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}"))
config_fixture = base_path + "#{path}_#{type}.xcconfig"
config = Xcodeproj::Config.new(config_fixture)
settings = config.to_hash
# Filter exclusions
settings ... | ruby | def load_settings(path, type)
# Load fixture
base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}"))
config_fixture = base_path + "#{path}_#{type}.xcconfig"
config = Xcodeproj::Config.new(config_fixture)
settings = config.to_hash
# Filter exclusions
settings ... | [
"def",
"load_settings",
"(",
"path",
",",
"type",
")",
"# Load fixture",
"base_path",
"=",
"Pathname",
"(",
"fixture_path",
"(",
"\"CommonBuildSettings/configs/#{path}\"",
")",
")",
"config_fixture",
"=",
"base_path",
"+",
"\"#{path}_#{type}.xcconfig\"",
"config",
"=",
... | Load settings from fixtures
@param [String] path
the directory, where the fixture set is located.
@param [Symbol] type
the type, where the specific
@param [Hash{String => String}]
the build settings | [
"Load",
"settings",
"from",
"fixtures"
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/spec/spec_helper/project_helper.rb#L81-L96 | train | Load the settings from a file | [
30522,
13366,
7170,
1035,
10906,
1006,
4130,
1010,
2828,
1007,
1001,
7170,
15083,
2918,
1035,
4130,
1027,
4130,
18442,
1006,
15083,
1035,
4130,
1006,
1000,
2691,
8569,
4014,
5104,
18319,
3070,
2015,
1013,
9530,
8873,
5620,
1013,
1001,
1063,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mhenrixon/sidekiq-unique-jobs | lib/sidekiq_unique_jobs/unique_args.rb | SidekiqUniqueJobs.UniqueArgs.filter_by_symbol | def filter_by_symbol(args)
return args unless worker_method_defined?(unique_args_method)
worker_class.send(unique_args_method, args)
rescue ArgumentError => ex
log_fatal(ex)
args
end | ruby | def filter_by_symbol(args)
return args unless worker_method_defined?(unique_args_method)
worker_class.send(unique_args_method, args)
rescue ArgumentError => ex
log_fatal(ex)
args
end | [
"def",
"filter_by_symbol",
"(",
"args",
")",
"return",
"args",
"unless",
"worker_method_defined?",
"(",
"unique_args_method",
")",
"worker_class",
".",
"send",
"(",
"unique_args_method",
",",
"args",
")",
"rescue",
"ArgumentError",
"=>",
"ex",
"log_fatal",
"(",
"e... | Filters unique arguments by method configured in the sidekiq worker
@param [Array] args the arguments passed to the sidekiq worker
@return [Array] unfiltered unless {#worker_method_defined?}
@return [Array] with the filtered arguments | [
"Filters",
"unique",
"arguments",
"by",
"method",
"configured",
"in",
"the",
"sidekiq",
"worker"
] | 2944b97c720528f53962ccfd17d43ac939a77f46 | https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/unique_args.rb#L128-L135 | train | Filter by symbol | [
30522,
13366,
11307,
1035,
2011,
1035,
6454,
1006,
12098,
5620,
1007,
2709,
12098,
5620,
4983,
7309,
1035,
4118,
1035,
4225,
1029,
1006,
4310,
1035,
12098,
5620,
1035,
4118,
1007,
7309,
1035,
2465,
1012,
4604,
1006,
4310,
1035,
12098,
5620,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-03-20/generated/azure_mgmt_operational_insights/workspaces.rb | Azure::OperationalInsights::Mgmt::V2015_03_20.Workspaces.get_search_results | def get_search_results(resource_group_name, workspace_name, parameters, custom_headers:nil)
response = get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_search_results(resource_group_name, workspace_name, parameters, custom_headers:nil)
response = get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_search_results",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_search_results_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_hea... | Submit a search for a given workspace. The response will contain an id to
track the search. User can use the id to poll the search status and get the
full search result later if the search takes long time to finish.
@param resource_group_name [String] The name of the resource group to get.
The name is case insensi... | [
"Submit",
"a",
"search",
"for",
"a",
"given",
"workspace",
".",
"The",
"response",
"will",
"contain",
"an",
"id",
"to",
"track",
"the",
"search",
".",
"User",
"can",
"use",
"the",
"id",
"to",
"poll",
"the",
"search",
"status",
"and",
"get",
"the",
"ful... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb#L243-L246 | train | Gets the search results for a given workspace. | [
30522,
13366,
2131,
1035,
3945,
1035,
3463,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3945,
1035,
3463,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb | Azure::Network::Mgmt::V2019_02_01.ExpressRouteCircuits.get_peering_stats | def get_peering_stats(resource_group_name, circuit_name, peering_name, custom_headers:nil)
response = get_peering_stats_async(resource_group_name, circuit_name, peering_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_peering_stats(resource_group_name, circuit_name, peering_name, custom_headers:nil)
response = get_peering_stats_async(resource_group_name, circuit_name, peering_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_peering_stats",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"peering_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_peering_stats_async",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"peering_name",
",",
"custom_heade... | Gets all stats from an express route circuit in a resource group.
@param resource_group_name [String] The name of the resource group.
@param circuit_name [String] The name of the express route circuit.
@param peering_name [String] The name of the peering.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Gets",
"all",
"stats",
"from",
"an",
"express",
"route",
"circuit",
"in",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb#L490-L493 | train | Gets the stats for the specified express route circuit. | [
30522,
13366,
2131,
1035,
16740,
1035,
26319,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4984,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
16740,
1035,
26319,
1035,
2004... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/application.rb | Rake.Application.invoke_task | def invoke_task(task_string) # :nodoc:
name, args = parse_task_string(task_string)
t = self[name]
t.invoke(*args)
end | ruby | def invoke_task(task_string) # :nodoc:
name, args = parse_task_string(task_string)
t = self[name]
t.invoke(*args)
end | [
"def",
"invoke_task",
"(",
"task_string",
")",
"# :nodoc:",
"name",
",",
"args",
"=",
"parse_task_string",
"(",
"task_string",
")",
"t",
"=",
"self",
"[",
"name",
"]",
"t",
".",
"invoke",
"(",
"args",
")",
"end"
] | internal ----------------------------------------------------------------
Invokes a task with arguments that are extracted from +task_string+ | [
"internal",
"----------------------------------------------------------------",
"Invokes",
"a",
"task",
"with",
"arguments",
"that",
"are",
"extracted",
"from",
"+",
"task_string",
"+"
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/application.rb#L157-L161 | train | Invoke a task | [
30522,
13366,
1999,
6767,
3489,
1035,
4708,
1006,
4708,
1035,
5164,
1007,
1001,
1024,
7293,
10085,
1024,
2171,
1010,
12098,
5620,
1027,
11968,
3366,
1035,
4708,
1035,
5164,
1006,
4708,
1035,
5164,
1007,
1056,
1027,
2969,
1031,
2171,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_cross_connections.rb | Azure::Network::Mgmt::V2018_07_01.ExpressRouteCrossConnections.list_routes_table_summary_async | def list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
# Send request
promise = begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers)
promise =... | ruby | def list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
# Send request
promise = begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers)
promise =... | [
"def",
"list_routes_table_summary_async",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"peering_name",
",",
"device_path",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_list_routes_table_summary_async",
"(",
"resource_group... | @param resource_group_name [String] The name of the resource group.
@param cross_connection_name [String] The name of the
ExpressRouteCrossConnection.
@param peering_name [String] The name of the peering.
@param device_path [String] The path of the device.
@param custom_headers [Hash{String => String}] A hash of c... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"cross_connection_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"ExpressRouteCrossConnection",
".",
"@param",
"peering_name",
"[",
"String... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_cross_connections.rb#L469-L485 | train | Gets the routes table summary for the specified ExpressRouteCrossConnections. | [
30522,
13366,
2862,
1035,
5847,
1035,
2795,
1035,
12654,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2892,
1035,
4434,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
5080,
1035,
4130,
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... |
jekyll/jekyll-admin | lib/jekyll-admin/urlable.rb | JekyllAdmin.URLable.http_url | def http_url
return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile)
return if is_a?(Jekyll::Document) && !collection.write?
@http_url ||= Addressable::URI.new(
:scheme => scheme, :host => host, :port => port,
:path => path_with_base(JekyllAdmin.site.config["baseurl"], url)... | ruby | def http_url
return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile)
return if is_a?(Jekyll::Document) && !collection.write?
@http_url ||= Addressable::URI.new(
:scheme => scheme, :host => host, :port => port,
:path => path_with_base(JekyllAdmin.site.config["baseurl"], url)... | [
"def",
"http_url",
"return",
"if",
"is_a?",
"(",
"Jekyll",
"::",
"Collection",
")",
"||",
"is_a?",
"(",
"JekyllAdmin",
"::",
"DataFile",
")",
"return",
"if",
"is_a?",
"(",
"Jekyll",
"::",
"Document",
")",
"&&",
"!",
"collection",
".",
"write?",
"@http_url"... | Absolute URL to the HTTP(S) rendered/served representation of this resource | [
"Absolute",
"URL",
"to",
"the",
"HTTP",
"(",
"S",
")",
"rendered",
"/",
"served",
"representation",
"of",
"this",
"resource"
] | bc053b3b93faba679e8666091c42c47970e3bb5e | https://github.com/jekyll/jekyll-admin/blob/bc053b3b93faba679e8666091c42c47970e3bb5e/lib/jekyll-admin/urlable.rb#L7-L14 | train | Returns the HTTP URL for the current request. | [
30522,
13366,
8299,
1035,
24471,
2140,
2709,
2065,
2003,
1035,
1037,
1029,
1006,
15333,
4801,
3363,
1024,
1024,
3074,
1007,
1064,
1064,
2003,
1035,
1037,
1029,
1006,
15333,
4801,
4571,
22117,
2378,
1024,
1024,
2951,
8873,
2571,
1007,
2709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_entity_roles | def list_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_entity_roles",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":custom_headers",
")",
"... | Get all roles for an entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity Id
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] operation results. | [
"Get",
"all",
"roles",
"for",
"an",
"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#L6124-L6127 | train | Gets the roles of the entity in a version of the application. | [
30522,
13366,
2862,
1035,
9178,
1035,
4395,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
9178,
1035,
4395,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
activeadmin/activeadmin | lib/active_admin/helpers/scope_chain.rb | ActiveAdmin.ScopeChain.scope_chain | def scope_chain(scope, chain)
if scope.scope_method
chain.public_send scope.scope_method
elsif scope.scope_block
instance_exec chain, &scope.scope_block
else
chain
end
end | ruby | def scope_chain(scope, chain)
if scope.scope_method
chain.public_send scope.scope_method
elsif scope.scope_block
instance_exec chain, &scope.scope_block
else
chain
end
end | [
"def",
"scope_chain",
"(",
"scope",
",",
"chain",
")",
"if",
"scope",
".",
"scope_method",
"chain",
".",
"public_send",
"scope",
".",
"scope_method",
"elsif",
"scope",
".",
"scope_block",
"instance_exec",
"chain",
",",
"scope",
".",
"scope_block",
"else",
"cha... | Scope an ActiveRecord::Relation chain
Example:
scope_chain(Scope.new(:published), Article)
# => Article.published
@param scope The <ActiveAdmin::Scope> we want to scope on
@param chain The ActiveRecord::Relation chain or ActiveRecord::Base class to scope
@return <ActiveRecord::Relation or ActiveRecord::Base... | [
"Scope",
"an",
"ActiveRecord",
"::",
"Relation",
"chain"
] | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/helpers/scope_chain.rb#L14-L22 | train | scope_chain is used to chain the method and block of methods | [
30522,
13366,
9531,
1035,
4677,
1006,
9531,
1010,
4677,
1007,
2065,
9531,
1012,
9531,
1035,
4118,
4677,
1012,
2270,
1035,
4604,
9531,
1012,
9531,
1035,
4118,
3449,
5332,
2546,
9531,
1012,
9531,
1035,
3796,
6013,
1035,
4654,
8586,
4677,
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/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachineScaleSets.begin_delete_instances_with_http_info | def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
end | ruby | def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_instances_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_instances_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
... | Deletes virtual machines in a VM scale set.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
of virtual machine instance IDs from the VM scale set.
@param ... | [
"Deletes",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1282-L1284 | train | Deletes a set of virtual machines in a VM scale set. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
12107,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
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... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.list_item | def list_item(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'list_item_for', &block)
define_method(name) do
return platform.list_item_text_for identifier.clone unless block_given?
self.send("#{name}_element").text
end
end | ruby | def list_item(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'list_item_for', &block)
define_method(name) do
return platform.list_item_text_for identifier.clone unless block_given?
self.send("#{name}_element").text
end
end | [
"def",
"list_item",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'list_item_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"retur... | adds three methods - one to retrieve the text from a list item,
another to return the list item element, and another to check the list item's
existence.
@example
list_item(:item_one, :id => 'one')
# will generate 'item_one', 'item_one_element', and 'item_one?' methods
@param [Symbol] the name used for the g... | [
"adds",
"three",
"methods",
"-",
"one",
"to",
"retrieve",
"the",
"text",
"from",
"a",
"list",
"item",
"another",
"to",
"return",
"the",
"list",
"item",
"element",
"and",
"another",
"to",
"check",
"the",
"list",
"item",
"s",
"existence",
"."
] | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L596-L602 | train | Creates a list item method | [
30522,
13366,
2862,
1035,
8875,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
2862,
1035,
8875,
1035,
2005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | supply/lib/supply/client.rb | Supply.Client.begin_edit | def begin_edit(package_name: nil)
UI.user_error!("You currently have an active edit") if @current_edit
self.current_edit = call_google_api { client.insert_edit(package_name) }
self.current_package_name = package_name
end | ruby | def begin_edit(package_name: nil)
UI.user_error!("You currently have an active edit") if @current_edit
self.current_edit = call_google_api { client.insert_edit(package_name) }
self.current_package_name = package_name
end | [
"def",
"begin_edit",
"(",
"package_name",
":",
"nil",
")",
"UI",
".",
"user_error!",
"(",
"\"You currently have an active edit\"",
")",
"if",
"@current_edit",
"self",
".",
"current_edit",
"=",
"call_google_api",
"{",
"client",
".",
"insert_edit",
"(",
"package_name"... | @!group Handling the edit lifecycle
Begin modifying a certain package | [
"@!group",
"Handling",
"the",
"edit",
"lifecycle"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L135-L141 | train | Creates an edit for the current package | [
30522,
13366,
4088,
1035,
10086,
1006,
7427,
1035,
2171,
1024,
9152,
2140,
1007,
21318,
1012,
5310,
1035,
7561,
999,
1006,
1000,
2017,
2747,
2031,
2019,
3161,
10086,
1000,
1007,
2065,
1030,
2783,
1035,
10086,
2969,
1012,
2783,
1035,
10086,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/variable_operations.rb | Azure::Automation::Mgmt::V2015_10_31.VariableOperations.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"variable_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
... | Create a variable.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param variable_name [String] The variable name.
@param parameters [VariableCreateOrUpdateParameters] The parameters supplied
to the create or update ... | [
"Create",
"a",
"variable",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/variable_operations.rb#L55-L57 | train | Creates or updates a variable in the specified automation account. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
8023,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb | Azure::CognitiveServices::Face::V1_0.FaceListOperations.add_face_from_stream_with_http_info | def add_face_from_stream_with_http_info(face_list_id, image, user_data:nil, target_face:nil, custom_headers:nil)
add_face_from_stream_async(face_list_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
end | ruby | def add_face_from_stream_with_http_info(face_list_id, image, user_data:nil, target_face:nil, custom_headers:nil)
add_face_from_stream_async(face_list_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
end | [
"def",
"add_face_from_stream_with_http_info",
"(",
"face_list_id",
",",
"image",
",",
"user_data",
":",
"nil",
",",
"target_face",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"add_face_from_stream_async",
"(",
"face_list_id",
",",
"image",
",",
"user_data",
... | Add a face to a face list. The input face is specified as an image with a
targetFace rectangle. It returns a persistedFaceId representing the added
face, and persistedFaceId will not expire.
@param face_list_id [String] Id referencing a particular face list.
@param image An image stream.
@param user_data [String]... | [
"Add",
"a",
"face",
"to",
"a",
"face",
"list",
".",
"The",
"input",
"face",
"is",
"specified",
"as",
"an",
"image",
"with",
"a",
"targetFace",
"rectangle",
".",
"It",
"returns",
"a",
"persistedFaceId",
"representing",
"the",
"added",
"face",
"and",
"persis... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb#L880-L882 | train | Adds a face to a face list. | [
30522,
13366,
5587,
1035,
2227,
1035,
2013,
1035,
5460,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2227,
1035,
2862,
1035,
8909,
1010,
3746,
1010,
5310,
1035,
2951,
1024,
9152,
2140,
1010,
4539,
1035,
2227,
1024,
9152,
2140,
1010,
7661,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.begin_patch | def begin_patch(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
response = begin_patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_patch(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
response = begin_patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_patch",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_patch_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers... | Modifies an existing web service resource. The PATCH API call is an
asynchronous operation. To determine whether it has completed successfully,
you must perform a Get operation.
@param resource_group_name [String] Name of the resource group in which the
web service is located.
@param web_service_name [String] The... | [
"Modifies",
"an",
"existing",
"web",
"service",
"resource",
".",
"The",
"PATCH",
"API",
"call",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"determine",
"whether",
"it",
"has",
"completed",
"successfully",
"you",
"must",
"perform",
"a",
"Get",
"operati... | 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#L752-L755 | train | Patch a specified Web Service. | [
30522,
13366,
4088,
1035,
8983,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
8983,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
8983,
1035,
2004,
6038,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb | Azure::Automation::Mgmt::V2015_10_31.JobOperations.resume_with_http_info | def resume_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers:nil)
resume_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
end | ruby | def resume_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers:nil)
resume_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
end | [
"def",
"resume_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"resume_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":custom_he... | Resume the job identified by jobId.
@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 custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP requ... | [
"Resume",
"the",
"job",
"identified",
"by",
"jobId",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb#L748-L750 | train | Resumes a specified job. | [
30522,
13366,
13746,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
30524,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb | Azure::Network::Mgmt::V2019_02_01.VpnConnections.list_by_vpn_gateway_next | def list_by_vpn_gateway_next(next_page_link, custom_headers:nil)
response = list_by_vpn_gateway_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_vpn_gateway_next(next_page_link, custom_headers:nil)
response = list_by_vpn_gateway_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_vpn_gateway_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_vpn_gateway_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
... | Retrieves all vpn connections for a particular virtual wan vpn gateway.
@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 [ListVpnConnectionsResul... | [
"Retrieves",
"all",
"vpn",
"connections",
"for",
"a",
"particular",
"virtual",
"wan",
"vpn",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb#L535-L538 | train | Gets the virtual network gateway s virtual network interfaces. | [
30522,
13366,
2862,
1035,
2011,
1035,
21210,
2078,
1035,
11909,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
21210,
2078,
1035,
11909,
1035,
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... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.3.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_3_0_9.ServiceFabricClientAPIs.create_volume_resource | def create_volume_resource(volume_resource_name, volume_resource_description, custom_headers:nil)
response = create_volume_resource_async(volume_resource_name, volume_resource_description, custom_headers:custom_headers).value!
nil
end | ruby | def create_volume_resource(volume_resource_name, volume_resource_description, custom_headers:nil)
response = create_volume_resource_async(volume_resource_name, volume_resource_description, custom_headers:custom_headers).value!
nil
end | [
"def",
"create_volume_resource",
"(",
"volume_resource_name",
",",
"volume_resource_description",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_volume_resource_async",
"(",
"volume_resource_name",
",",
"volume_resource_description",
",",
"custom_headers",
"... | Creates or updates a volume resource.
Creates a volume resource with the specified name and description. If a
volume with the same name already exists, then its description is updated to
the one indicated in this request.
@param volume_resource_name [String] Service Fabric volume resource name.
@param volume_res... | [
"Creates",
"or",
"updates",
"a",
"volume",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.3.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L30043-L30046 | train | Creates a volume resource. | [
30522,
13366,
3443,
1035,
3872,
1035,
7692,
1006,
3872,
1035,
7692,
1035,
2171,
1010,
3872,
1035,
7692,
1035,
6412,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
3872,
1035,
7692,
1035,
2004,
6038,
2278,
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... |
mojombo/chronic | lib/chronic/handlers.rb | Chronic.Handlers.handle_sy_sm_sd | def handle_sy_sm_sd(tokens, options)
new_tokens = [tokens[1], tokens[2], tokens[0]]
time_tokens = tokens.last(tokens.size - 3)
handle_sm_sd_sy(new_tokens + time_tokens, options)
end | ruby | def handle_sy_sm_sd(tokens, options)
new_tokens = [tokens[1], tokens[2], tokens[0]]
time_tokens = tokens.last(tokens.size - 3)
handle_sm_sd_sy(new_tokens + time_tokens, options)
end | [
"def",
"handle_sy_sm_sd",
"(",
"tokens",
",",
"options",
")",
"new_tokens",
"=",
"[",
"tokens",
"[",
"1",
"]",
",",
"tokens",
"[",
"2",
"]",
",",
"tokens",
"[",
"0",
"]",
"]",
"time_tokens",
"=",
"tokens",
".",
"last",
"(",
"tokens",
".",
"size",
"... | Handle scalar-year/scalar-month/scalar-day | [
"Handle",
"scalar",
"-",
"year",
"/",
"scalar",
"-",
"month",
"/",
"scalar",
"-",
"day"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L238-L242 | train | Handle the S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - S - | [
30522,
13366,
5047,
1035,
25353,
1035,
15488,
1035,
17371,
1006,
19204,
2015,
1010,
7047,
1007,
2047,
1035,
19204,
2015,
1027,
1031,
19204,
2015,
1031,
1015,
1033,
1010,
19204,
2015,
1031,
1016,
1033,
1010,
19204,
2015,
1031,
1014,
1033,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb | Azure::CognitiveServices::VideoSearch::V1_0.VideosOperations.search_async | def search_async(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, count:nil, freshness:nil, id:nil, length:nil, market:nil, offset:nil, pricing:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
fa... | ruby | def search_async(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, count:nil, freshness:nil, id:nil, length:nil, market:nil, offset:nil, pricing:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
fa... | [
"def",
"search_async",
"(",
"query",
",",
"accept_language",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"country_code",
":",
"nil",
",",
"count",
":",
"nil",
... | The Video Search API lets you send a search query to Bing and get back a list
of videos that are relevant to the search query. This section provides
technical details about the query parameters and headers that you use to
request videos and the JSON response objects that contain them. For examples
that show how to ... | [
"The",
"Video",
"Search",
"API",
"lets",
"you",
"send",
"a",
"search",
"query",
"to",
"Bing",
"and",
"get",
"back",
"a",
"list",
"of",
"videos",
"that",
"are",
"relevant",
"to",
"the",
"search",
"query",
".",
"This",
"section",
"provides",
"technical",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb#L795-L850 | train | Search for videos | [
30522,
13366,
3945,
1035,
2004,
6038,
2278,
1006,
23032,
1010,
5138,
1035,
2653,
1024,
9152,
2140,
1010,
5310,
1035,
4005,
1024,
9152,
2140,
1010,
7396,
1035,
8909,
1024,
9152,
2140,
1010,
7396,
1035,
12997,
1024,
9152,
2140,
1010,
3295,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb | Azure::Signalr::Mgmt::V2018_03_01_preview.SignalR.check_name_availability | def check_name_availability(location, parameters:nil, custom_headers:nil)
response = check_name_availability_async(location, parameters:parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def check_name_availability(location, parameters:nil, custom_headers:nil)
response = check_name_availability_async(location, parameters:parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"check_name_availability",
"(",
"location",
",",
"parameters",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"check_name_availability_async",
"(",
"location",
",",
"parameters",
":",
"parameters",
",",
"custom_headers",
":custom_headers",... | Checks that the SignalR name is valid and is not already in use.
@param location [String] the region
@param parameters [NameAvailabilityParameters] Parameters supplied to the
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [NameA... | [
"Checks",
"that",
"the",
"SignalR",
"name",
"is",
"valid",
"and",
"is",
"not",
"already",
"in",
"use",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb#L35-L38 | train | Checks whether the name of a given resource group is available for use. | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1006,
3295,
1010,
11709,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4638,
1035,
2171,
1035,
11343,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
11709,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb | Azure::SQL::Mgmt::V2014_04_01.QueryStatistics.list_by_query | def list_by_query(resource_group_name, server_name, database_name, query_id, custom_headers:nil)
response = list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_query(resource_group_name, server_name, database_name, query_id, custom_headers:nil)
response = list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_query",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"query_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_query_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
... | Lists a query's statistics.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the database.
@para... | [
"Lists",
"a",
"query",
"s",
"statistics",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb#L41-L44 | train | Gets the list of documents in a database. | [
30522,
13366,
2862,
1035,
2011,
1035,
23032,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
23032,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/builders/hyrax/manifest_helper.rb | Hyrax.ManifestHelper.build_rendering | def build_rendering(file_set_id)
file_set_document = query_for_rendering(file_set_id)
label = file_set_document.label.present? ? ": #{file_set_document.label}" : ''
mime = file_set_document.mime_type.present? ? file_set_document.mime_type : I18n.t("hyrax.manifest.unknown_mime_text")
{
'@... | ruby | def build_rendering(file_set_id)
file_set_document = query_for_rendering(file_set_id)
label = file_set_document.label.present? ? ": #{file_set_document.label}" : ''
mime = file_set_document.mime_type.present? ? file_set_document.mime_type : I18n.t("hyrax.manifest.unknown_mime_text")
{
'@... | [
"def",
"build_rendering",
"(",
"file_set_id",
")",
"file_set_document",
"=",
"query_for_rendering",
"(",
"file_set_id",
")",
"label",
"=",
"file_set_document",
".",
"label",
".",
"present?",
"?",
"\": #{file_set_document.label}\"",
":",
"''",
"mime",
"=",
"file_set_do... | Build a rendering hash
@return [Hash] rendering | [
"Build",
"a",
"rendering",
"hash"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/builders/hyrax/manifest_helper.rb#L18-L27 | train | Build the rendering object for a given file set | [
30522,
13366,
3857,
1035,
14259,
1006,
5371,
1035,
2275,
1035,
8909,
1007,
5371,
1035,
2275,
1035,
6254,
1027,
23032,
1035,
2005,
1035,
14259,
1006,
5371,
1035,
2275,
1035,
8909,
1007,
3830,
1027,
5371,
1035,
2275,
1035,
6254,
1012,
3830,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.custom_writer | def custom_writer(key, value, convert = true) #:nodoc:
key_as_symbol = (key = convert_key(key)).to_sym
log_built_in_message(key_as_symbol) if log_collision?(key_as_symbol)
regular_writer(key, convert ? convert_value(value) : value)
end | ruby | def custom_writer(key, value, convert = true) #:nodoc:
key_as_symbol = (key = convert_key(key)).to_sym
log_built_in_message(key_as_symbol) if log_collision?(key_as_symbol)
regular_writer(key, convert ? convert_value(value) : value)
end | [
"def",
"custom_writer",
"(",
"key",
",",
"value",
",",
"convert",
"=",
"true",
")",
"#:nodoc:",
"key_as_symbol",
"=",
"(",
"key",
"=",
"convert_key",
"(",
"key",
")",
")",
".",
"to_sym",
"log_built_in_message",
"(",
"key_as_symbol",
")",
"if",
"log_collision... | Sets an attribute in the Mash. Key will be converted to
a string before it is set, and Hashes will be converted
into Mashes for nesting purposes. | [
"Sets",
"an",
"attribute",
"in",
"the",
"Mash",
".",
"Key",
"will",
"be",
"converted",
"to",
"a",
"string",
"before",
"it",
"is",
"set",
"and",
"Hashes",
"will",
"be",
"converted",
"into",
"Mashes",
"for",
"nesting",
"purposes",
"."
] | da9fd39a0e551e09c1441cb7453c969a4afbfd7f | https://github.com/intridea/hashie/blob/da9fd39a0e551e09c1441cb7453c969a4afbfd7f/lib/hashie/mash.rb#L154-L159 | train | Creates a new writer for a custom key. | [
30522,
13366,
7661,
1035,
3213,
1006,
3145,
1010,
3643,
1010,
10463,
1027,
2995,
1007,
1001,
1024,
7293,
10085,
1024,
3145,
1035,
2004,
1035,
6454,
1027,
1006,
3145,
1027,
10463,
1035,
3145,
1006,
3145,
1007,
1007,
1012,
2000,
1035,
25353,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/gateway.rb | Discordrb.Gateway.send_request_members | def send_request_members(server_id, query, limit)
data = {
guild_id: server_id,
query: query,
limit: limit
}
send_packet(Opcodes::REQUEST_MEMBERS, data)
end | ruby | def send_request_members(server_id, query, limit)
data = {
guild_id: server_id,
query: query,
limit: limit
}
send_packet(Opcodes::REQUEST_MEMBERS, data)
end | [
"def",
"send_request_members",
"(",
"server_id",
",",
"query",
",",
"limit",
")",
"data",
"=",
"{",
"guild_id",
":",
"server_id",
",",
"query",
":",
"query",
",",
"limit",
":",
"limit",
"}",
"send_packet",
"(",
"Opcodes",
"::",
"REQUEST_MEMBERS",
",",
"dat... | Sends a request members packet (op 8). This will order Discord to gradually sent all requested members as dispatch
events with type `GUILD_MEMBERS_CHUNK`. It is necessary to use this method in order to get all members of a large
server (see `large_threshold` in {#send_identify}), however it can also be used for other... | [
"Sends",
"a",
"request",
"members",
"packet",
"(",
"op",
"8",
")",
".",
"This",
"will",
"order",
"Discord",
"to",
"gradually",
"sent",
"all",
"requested",
"members",
"as",
"dispatch",
"events",
"with",
"type",
"GUILD_MEMBERS_CHUNK",
".",
"It",
"is",
"necessa... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/gateway.rb#L391-L399 | train | Send a request members packet to a server | [
30522,
13366,
4604,
1035,
5227,
1035,
2372,
1006,
8241,
1035,
8909,
1010,
23032,
1010,
5787,
1007,
2951,
1027,
1063,
9054,
1035,
8909,
1024,
8241,
1035,
8909,
1010,
23032,
1024,
23032,
1010,
5787,
1024,
5787,
1065,
4604,
1035,
14771,
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... |
meew0/discordrb | lib/discordrb/commands/container.rb | Discordrb::Commands.CommandContainer.command | def command(name, attributes = {}, &block)
@commands ||= {}
if name.is_a? Array
new_command = nil
name.each do |e|
new_command = Command.new(e, attributes, &block)
@commands[e] = new_command
end
new_command
else
new_command = Command.new(na... | ruby | def command(name, attributes = {}, &block)
@commands ||= {}
if name.is_a? Array
new_command = nil
name.each do |e|
new_command = Command.new(e, attributes, &block)
@commands[e] = new_command
end
new_command
else
new_command = Command.new(na... | [
"def",
"command",
"(",
"name",
",",
"attributes",
"=",
"{",
"}",
",",
"&",
"block",
")",
"@commands",
"||=",
"{",
"}",
"if",
"name",
".",
"is_a?",
"Array",
"new_command",
"=",
"nil",
"name",
".",
"each",
"do",
"|",
"e",
"|",
"new_command",
"=",
"Co... | Adds a new command to the container.
@param name [Symbol, Array<Symbol>] The name of the command to add, or an array of multiple names for the command
@param attributes [Hash] The attributes to initialize the command with.
@option attributes [Integer] :permission_level The minimum permission level that can use this ... | [
"Adds",
"a",
"new",
"command",
"to",
"the",
"container",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/commands/container.rb#L60-L78 | train | Create a new command object | [
30522,
13366,
3094,
1006,
2171,
1010,
12332,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
1030,
10954,
1064,
1064,
1027,
1063,
1065,
2065,
2171,
1012,
2003,
1035,
1037,
1029,
9140,
2047,
1035,
3094,
1027,
9152,
2140,
2171,
1012,
2169,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.