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
etewiah/property_web_builder
app/models/pwb/website.rb
Pwb.Website.get_style_var
def get_style_var(var_name) style_details = style_variables_for_theme["vic"] || Pwb::PresetStyle.default_values style_vars = style_details["variables"] || [] style_vars[var_name] || "" end
ruby
def get_style_var(var_name) style_details = style_variables_for_theme["vic"] || Pwb::PresetStyle.default_values style_vars = style_details["variables"] || [] style_vars[var_name] || "" end
[ "def", "get_style_var", "(", "var_name", ")", "style_details", "=", "style_variables_for_theme", "[", "\"vic\"", "]", "||", "Pwb", "::", "PresetStyle", ".", "default_values", "style_vars", "=", "style_details", "[", "\"variables\"", "]", "||", "[", "]", "style_var...
below used by custom stylesheet generator to decide values for various class names (mainly colors)
[ "below", "used", "by", "custom", "stylesheet", "generator", "to", "decide", "values", "for", "various", "class", "names", "(", "mainly", "colors", ")" ]
fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21
https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/models/pwb/website.rb#L160-L164
train
Get the value of a specific variable in the current theme.
[ 30522, 13366, 2131, 1035, 2806, 1035, 13075, 1006, 13075, 1035, 2171, 1007, 2806, 1035, 4751, 1027, 2806, 1035, 10857, 1035, 2005, 1035, 4323, 1031, 1000, 10967, 1000, 1033, 1064, 1064, 1052, 2860, 2497, 1024, 1024, 3653, 13462, 21756, 2571...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb
Azure::Web::Mgmt::V2016_03_01.WebSiteManagementClient.get_source_control
def get_source_control(source_control_type, custom_headers:nil) response = get_source_control_async(source_control_type, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_source_control(source_control_type, custom_headers:nil) response = get_source_control_async(source_control_type, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_source_control", "(", "source_control_type", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_source_control_async", "(", "source_control_type", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "...
Gets source control token Gets source control token @param source_control_type [String] Type of source control @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SourceControl] operation results.
[ "Gets", "source", "control", "token" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb#L432-L435
train
Gets the source control of the specified resource group.
[ 30522, 13366, 2131, 1035, 3120, 1035, 2491, 1006, 3120, 1035, 2491, 1035, 2828, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 3120, 1035, 2491, 1035, 2004, 6038, 2278, 1006, 3120, 1035, 2491, 30524, 999, 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_compute/lib/2018-06-01/generated/azure_mgmt_compute/gallery_images.rb
Azure::Compute::Mgmt::V2018_06_01.GalleryImages.begin_delete
def begin_delete(resource_group_name, gallery_name, gallery_image_name, custom_headers:nil) response = begin_delete_async(resource_group_name, gallery_name, gallery_image_name, custom_headers:custom_headers).value! nil end
ruby
def begin_delete(resource_group_name, gallery_name, gallery_image_name, custom_headers:nil) response = begin_delete_async(resource_group_name, gallery_name, gallery_image_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_delete", "(", "resource_group_name", ",", "gallery_name", ",", "gallery_image_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "gallery_name", ",", "gallery_image_name", ",", "custom_hea...
Delete a gallery image. @param resource_group_name [String] The name of the resource group. @param gallery_name [String] The name of the Shared Image Gallery in which the Image Definition is to be deleted. @param gallery_image_name [String] The name of the gallery Image Definition to be deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Delete", "a", "gallery", "image", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-06-01/generated/azure_mgmt_compute/gallery_images.rb#L475-L478
train
Deletes a gallery image.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3916, 1035, 2171, 1010, 3916, 1035, 3746, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3972, 12870, 1035, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb
Azure::CognitiveServices::Face::V1_0.FaceListOperations.list
def list(return_recognition_model:false, custom_headers:nil) response = list_async(return_recognition_model:return_recognition_model, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list(return_recognition_model:false, custom_headers:nil) response = list_async(return_recognition_model:return_recognition_model, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list", "(", "return_recognition_model", ":", "false", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_async", "(", "return_recognition_model", ":return_recognition_model", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ...
List face lists’ faceListId, name, userData and recognitionModel. <br /> To get face information inside faceList use [FaceList - Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) @param return_recognition_model [Boolean] A value indicating whether the operation should return 'recognitionModel' in response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.
[ "List", "face", "lists’", "faceListId", "name", "userData", "and", "recognitionModel", ".", "<br", "/", ">", "To", "get", "face", "information", "inside", "faceList", "use", "[", "FaceList", "-", "Get", "]", "(", "/", "docs", "/", "services", "/", "563879b...
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#L510-L513
train
Gets the list of all the segmentation terms.
[ 30522, 13366, 2862, 1006, 2709, 1035, 5038, 1035, 2944, 1024, 6270, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2004, 6038, 2278, 1006, 2709, 1035, 5038, 1035, 2944, 1024, 2709, 1035, 5038, 1035, 2944, 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...
sporkmonger/addressable
lib/addressable/uri.rb
Addressable.URI.normalized_host
def normalized_host return nil unless self.host @normalized_host ||= begin if !self.host.strip.empty? result = ::Addressable::IDNA.to_ascii( URI.unencode_component(self.host.strip.downcase) ) if result =~ /[^\.]\.$/ # Single trailing dots are unnecessary. result = result[0...-1] end result = Addressable::URI.normalize_component( result, CharacterClasses::HOST) result else EMPTY_STR.dup end end # All normalized values should be UTF-8 @normalized_host.force_encoding(Encoding::UTF_8) if @normalized_host @normalized_host end
ruby
def normalized_host return nil unless self.host @normalized_host ||= begin if !self.host.strip.empty? result = ::Addressable::IDNA.to_ascii( URI.unencode_component(self.host.strip.downcase) ) if result =~ /[^\.]\.$/ # Single trailing dots are unnecessary. result = result[0...-1] end result = Addressable::URI.normalize_component( result, CharacterClasses::HOST) result else EMPTY_STR.dup end end # All normalized values should be UTF-8 @normalized_host.force_encoding(Encoding::UTF_8) if @normalized_host @normalized_host end
[ "def", "normalized_host", "return", "nil", "unless", "self", ".", "host", "@normalized_host", "||=", "begin", "if", "!", "self", ".", "host", ".", "strip", ".", "empty?", "result", "=", "::", "Addressable", "::", "IDNA", ".", "to_ascii", "(", "URI", ".", ...
The host component for this URI, normalized. @return [String] The host component, normalized.
[ "The", "host", "component", "for", "this", "URI", "normalized", "." ]
5894c95a7768435cb46d1355954611dbd194832e
https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1097-L1119
train
Returns the host in the correct order.
[ 30522, 13366, 3671, 3550, 1035, 3677, 2709, 9152, 2140, 4983, 2969, 1012, 3677, 1030, 3671, 3550, 1035, 3677, 1064, 1064, 1027, 4088, 2065, 999, 2969, 1012, 3677, 1012, 6167, 1012, 4064, 1029, 2765, 1027, 1024, 1024, 4769, 3085, 1024, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb
Azure::EventGrid::Mgmt::V2018_01_01.EventSubscriptions.create_or_update
def create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", ...
Create or update an event subscription Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. @param scope [String] The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. @param event_subscription_name [String] Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EventSubscription] operation results.
[ "Create", "or", "update", "an", "event", "subscription" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb#L176-L179
train
Creates or updates an event subscription.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 9531, 1010, 2724, 1035, 15002, 1035, 2171, 1010, 2724, 1035, 15002, 1035, 18558, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030, 1035, 10651, 1035, 2004...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.PolicyTrackedResources.list_query_results_for_resource_as_lazy
def list_query_results_for_resource_as_lazy(resource_id, query_options:nil, custom_headers:nil) response = list_query_results_for_resource_async(resource_id, query_options:query_options, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_query_results_for_resource_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_query_results_for_resource_as_lazy(resource_id, query_options:nil, custom_headers:nil) response = list_query_results_for_resource_async(resource_id, query_options:query_options, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_query_results_for_resource_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_query_results_for_resource_as_lazy", "(", "resource_id", ",", "query_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_query_results_for_resource_async", "(", "resource_id", ",", "query_options", ":query_options", ",", "cust...
Queries policy tracked resources under the resource. @param resource_id [String] Resource ID. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PolicyTrackedResourcesQueryResults] which provide lazy access to pages of the response.
[ "Queries", "policy", "tracked", "resources", "under", "the", "resource", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb#L848-L857
train
Gets the list of query results for the resource.
[ 30522, 13366, 2862, 1035, 23032, 1035, 3463, 1035, 2005, 1035, 7692, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 8909, 1010, 23032, 1035, 7047, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/convertible.rb
Jekyll.Convertible.do_layout
def do_layout(payload, layouts) self.output = _renderer.tap do |renderer| renderer.layouts = layouts renderer.payload = payload end.run Jekyll.logger.debug "Post-Render Hooks:", relative_path Jekyll::Hooks.trigger hook_owner, :post_render, self ensure @_renderer = nil # this will allow the modifications above to disappear end
ruby
def do_layout(payload, layouts) self.output = _renderer.tap do |renderer| renderer.layouts = layouts renderer.payload = payload end.run Jekyll.logger.debug "Post-Render Hooks:", relative_path Jekyll::Hooks.trigger hook_owner, :post_render, self ensure @_renderer = nil # this will allow the modifications above to disappear end
[ "def", "do_layout", "(", "payload", ",", "layouts", ")", "self", ".", "output", "=", "_renderer", ".", "tap", "do", "|", "renderer", "|", "renderer", ".", "layouts", "=", "layouts", "renderer", ".", "payload", "=", "payload", "end", ".", "run", "Jekyll",...
Add any necessary layouts to this convertible document. payload - The site payload Drop or Hash. layouts - A Hash of {"name" => "layout"}. Returns nothing.
[ "Add", "any", "necessary", "layouts", "to", "this", "convertible", "document", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/convertible.rb#L205-L215
train
Do the layout
[ 30522, 13366, 2079, 1035, 9621, 1006, 18093, 1010, 9621, 2015, 1007, 2969, 1012, 6434, 1027, 1035, 17552, 2121, 1012, 11112, 2079, 1064, 17552, 2121, 1064, 17552, 2121, 1012, 9621, 2015, 1027, 9621, 2015, 17552, 2121, 1012, 18093, 1027, 180...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb
Azure::CDN::Mgmt::V2017_04_02.CustomDomains.get_with_http_info
def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "profile_name", ",", "endpoint_name", ",", "custom_domain_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "profile_name", ",", "endpoint_name", ",", "custom_domain...
Gets an existing custom domain within an endpoint. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param profile_name [String] Name of the CDN profile which is unique within the resource group. @param endpoint_name [String] Name of the endpoint under the profile which is unique globally. @param custom_domain_name [String] Name of the custom domain within an endpoint. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "an", "existing", "custom", "domain", "within", "an", "endpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb#L171-L173
train
Gets the specified domain s index.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6337, 1035, 2171, 1010, 2203, 8400, 1035, 2171, 1010, 7661, 1035, 5884, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
samvera/hyrax
app/services/hyrax/admin_set_create_service.rb
Hyrax.AdminSetCreateService.create
def create admin_set.creator = [creating_user.user_key] if creating_user admin_set.save.tap do |result| if result ActiveRecord::Base.transaction do permission_template = create_permission_template workflow = create_workflows_for(permission_template: permission_template) create_default_access_for(permission_template: permission_template, workflow: workflow) if admin_set.default_set? end end end end
ruby
def create admin_set.creator = [creating_user.user_key] if creating_user admin_set.save.tap do |result| if result ActiveRecord::Base.transaction do permission_template = create_permission_template workflow = create_workflows_for(permission_template: permission_template) create_default_access_for(permission_template: permission_template, workflow: workflow) if admin_set.default_set? end end end end
[ "def", "create", "admin_set", ".", "creator", "=", "[", "creating_user", ".", "user_key", "]", "if", "creating_user", "admin_set", ".", "save", ".", "tap", "do", "|", "result", "|", "if", "result", "ActiveRecord", "::", "Base", ".", "transaction", "do", "p...
Creates an admin set, setting the creator and the default access controls. @return [TrueClass, FalseClass] true if it was successful
[ "Creates", "an", "admin", "set", "setting", "the", "creator", "and", "the", "default", "access", "controls", "." ]
e2b4f56e829a53b1f11296324736e9d5b8c9ee5f
https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/admin_set_create_service.rb#L55-L66
train
Create the object
[ 30522, 13366, 3443, 4748, 10020, 1035, 2275, 1012, 8543, 1027, 1031, 4526, 1035, 5310, 1012, 5310, 1035, 3145, 1033, 2065, 4526, 1035, 5310, 4748, 10020, 1035, 2275, 1012, 3828, 1012, 11112, 2079, 1064, 2765, 1064, 2065, 2765, 3161, 2890, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sunspot/sunspot
sunspot/lib/sunspot/session.rb
Sunspot.Session.remove_by_id
def remove_by_id(clazz, *ids) class_name = if clazz.is_a?(Class) clazz.name else clazz.to_s end indexer.remove_by_id(class_name, ids) end
ruby
def remove_by_id(clazz, *ids) class_name = if clazz.is_a?(Class) clazz.name else clazz.to_s end indexer.remove_by_id(class_name, ids) end
[ "def", "remove_by_id", "(", "clazz", ",", "*", "ids", ")", "class_name", "=", "if", "clazz", ".", "is_a?", "(", "Class", ")", "clazz", ".", "name", "else", "clazz", ".", "to_s", "end", "indexer", ".", "remove_by_id", "(", "class_name", ",", "ids", ")",...
See Sunspot.remove_by_id
[ "See", "Sunspot", ".", "remove_by_id" ]
31dd76cd7a14a4ef7bd541de97483d8cd72ff685
https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/session.rb#L169-L177
train
Remove the specified class from the index
[ 30522, 13366, 6366, 1035, 2011, 1035, 8909, 1006, 18856, 10936, 2480, 1010, 1008, 8909, 2015, 1007, 2465, 1035, 2171, 1027, 2065, 18856, 10936, 2480, 1012, 2003, 1035, 1037, 1029, 1006, 2465, 1007, 18856, 10936, 2480, 1012, 2171, 2842, 1885...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/users.rb
Azure::Labservices::Mgmt::V2018_10_15.Users.create_or_update_with_http_info
def create_or_update_with_http_info(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:nil) create_or_update_async(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:nil) create_or_update_async(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "user_name", ",", "user", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "resource_group_name", ",", "lab_account_name", ",", "la...
Create or replace an existing User. @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 user_name [String] The name of the user. @param user [User] The User registered to a lab @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "or", "replace", "an", "existing", "User", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/users.rb#L278-L280
train
Creates or updates a user s sequencelector.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6845, 1035, 4070, 1035, 2171, 1010, 6845, 1035, 2171, 1010, 5310, 1035, 2171, 1010, 5310, 1010, 7661, 1035, 20346, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb
Azure::CognitiveServices::Face::V1_0.Face.verify_face_to_face
def verify_face_to_face(face_id1, face_id2, custom_headers:nil) response = verify_face_to_face_async(face_id1, face_id2, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def verify_face_to_face(face_id1, face_id2, custom_headers:nil) response = verify_face_to_face_async(face_id1, face_id2, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "verify_face_to_face", "(", "face_id1", ",", "face_id2", ",", "custom_headers", ":", "nil", ")", "response", "=", "verify_face_to_face_async", "(", "face_id1", ",", "face_id2", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "...
Verify whether two faces belong to a same person or whether one face belongs to a person. <br/> Remarks:<br /> * Higher face image quality means better identification precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. * For the scenarios that are sensitive to accuracy please make your own judgment. * The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target face, person group or large person group. @param face_id1 FaceId of the first face, comes from Face - Detect @param face_id2 FaceId of the second face, comes from Face - Detect @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VerifyResult] operation results.
[ "Verify", "whether", "two", "faces", "belong", "to", "a", "same", "person", "or", "whether", "one", "face", "belongs", "to", "a", "person", ".", "<br", "/", ">", "Remarks", ":", "<br", "/", ">", "*", "Higher", "face", "image", "quality", "means", "bett...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb#L705-L708
train
Verify face to face.
[ 30522, 13366, 20410, 1035, 2227, 1035, 2000, 1035, 2227, 1006, 2227, 1035, 8909, 2487, 1010, 2227, 1035, 8909, 2475, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 20410, 1035, 2227, 1035, 2000, 1035, 2227, 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...
httprb/http
lib/http/client.rb
HTTP.Client.make_request_headers
def make_request_headers(opts) headers = opts.headers # Tell the server to keep the conn open headers[Headers::CONNECTION] = default_options.persistent? ? Connection::KEEP_ALIVE : Connection::CLOSE cookies = opts.cookies.values unless cookies.empty? cookies = opts.headers.get(Headers::COOKIE).concat(cookies).join("; ") headers[Headers::COOKIE] = cookies end headers end
ruby
def make_request_headers(opts) headers = opts.headers # Tell the server to keep the conn open headers[Headers::CONNECTION] = default_options.persistent? ? Connection::KEEP_ALIVE : Connection::CLOSE cookies = opts.cookies.values unless cookies.empty? cookies = opts.headers.get(Headers::COOKIE).concat(cookies).join("; ") headers[Headers::COOKIE] = cookies end headers end
[ "def", "make_request_headers", "(", "opts", ")", "headers", "=", "opts", ".", "headers", "# Tell the server to keep the conn open", "headers", "[", "Headers", "::", "CONNECTION", "]", "=", "default_options", ".", "persistent?", "?", "Connection", "::", "KEEP_ALIVE", ...
Creates request headers with cookies (if any) merged in
[ "Creates", "request", "headers", "with", "cookies", "(", "if", "any", ")", "merged", "in" ]
f37a10ea4fab3ee411907ea2e4251ddf0ca33a93
https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/client.rb#L150-L164
train
Make the request headers
[ 30522, 13366, 2191, 1035, 5227, 1035, 20346, 2015, 1006, 23569, 2015, 1007, 20346, 2015, 1027, 23569, 2015, 1012, 20346, 2015, 1001, 2425, 1996, 8241, 2000, 2562, 1996, 9530, 2078, 2330, 20346, 2015, 1031, 20346, 2015, 1024, 1024, 4434, 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...
deivid-rodriguez/pry-byebug
lib/pry-byebug/pry_remote_ext.rb
PryRemote.Server.run
def run raise("Already running a pry-remote session!") if PryByebug.current_remote_server PryByebug.current_remote_server = self setup Pry.start @object, input: client.input_proxy, output: client.output end
ruby
def run raise("Already running a pry-remote session!") if PryByebug.current_remote_server PryByebug.current_remote_server = self setup Pry.start @object, input: client.input_proxy, output: client.output end
[ "def", "run", "raise", "(", "\"Already running a pry-remote session!\"", ")", "if", "PryByebug", ".", "current_remote_server", "PryByebug", ".", "current_remote_server", "=", "self", "setup", "Pry", ".", "start", "@object", ",", "input", ":", "client", ".", "input_p...
Override the call to Pry.start to save off current Server, and not teardown the server right after Pry.start finishes.
[ "Override", "the", "call", "to", "Pry", ".", "start", "to", "save", "off", "current", "Server", "and", "not", "teardown", "the", "server", "right", "after", "Pry", ".", "start", "finishes", "." ]
d2923e7a1629c2b860a4ea66a71dec09a4a15763
https://github.com/deivid-rodriguez/pry-byebug/blob/d2923e7a1629c2b860a4ea66a71dec09a4a15763/lib/pry-byebug/pry_remote_ext.rb#L14-L22
train
Run the remote session
[ 30522, 13366, 2448, 5333, 1006, 1000, 2525, 2770, 1037, 29198, 1011, 6556, 5219, 999, 1000, 1007, 2065, 29198, 3762, 15878, 15916, 1012, 2783, 1035, 6556, 1035, 8241, 29198, 3762, 15878, 15916, 1012, 2783, 1035, 6556, 1035, 8241, 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_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb
Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.begin_delete_with_http_info
def begin_delete_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:nil) begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:custom_headers).value! end
ruby
def begin_delete_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:nil) begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers:custom_headers).value! end
[ "def", "begin_delete_with_http_info", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_name", ",", "server_endpoint_name", ",", "custom_headers", ":", "nil", ")", "begin_delete_async", "(", "resource_group_name", ",", "storage_sync_service_name", ...
Delete a given ServerEndpoint. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param storage_sync_service_name [String] Name of Storage Sync Service resource. @param sync_group_name [String] Name of Sync Group resource. @param server_endpoint_name [String] Name of Server Endpoint object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Delete", "a", "given", "ServerEndpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L725-L727
train
Deletes a server endpoint from the specified sync group.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 5527, 1035, 26351, 1035, 2326, 1035, 2171, 1010, 26351, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2203, 8400, 1035, 2171, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
spaceship/lib/spaceship/portal/portal_client.rb
Spaceship.PortalClient.fetch_csrf_token_for_provisioning
def fetch_csrf_token_for_provisioning(mac: false) response = request(:post, "account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action", { teamId: team_id, pageNumber: 1, pageSize: 1, sort: 'name=asc' }) parse_response(response, 'provisioningProfiles') return nil end
ruby
def fetch_csrf_token_for_provisioning(mac: false) response = request(:post, "account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action", { teamId: team_id, pageNumber: 1, pageSize: 1, sort: 'name=asc' }) parse_response(response, 'provisioningProfiles') return nil end
[ "def", "fetch_csrf_token_for_provisioning", "(", "mac", ":", "false", ")", "response", "=", "request", "(", ":post", ",", "\"account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action\"", ",", "{", "teamId", ":", "team_id", ",", "pageNumber", ":", "1", ",", ...
We need a custom way to fetch the csrf token for the provisioning profile requests, since we use a separate API endpoint (host of Xcode API) to fetch the provisioning profiles All we do is fetch one profile (if exists) to get a valid csrf token with its time stamp This method is being called from all requests that modify, create or downloading provisioning profiles. Source https://github.com/fastlane/fastlane/issues/5903
[ "We", "need", "a", "custom", "way", "to", "fetch", "the", "csrf", "token", "for", "the", "provisioning", "profile", "requests", "since", "we", "use", "a", "separate", "API", "endpoint", "(", "host", "of", "Xcode", "API", ")", "to", "fetch", "the", "provi...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/portal/portal_client.rb#L823-L833
train
Fetch the CSRF token for provisioning profiles
[ 30522, 13366, 18584, 1035, 20116, 12881, 1035, 19204, 1035, 2005, 1035, 9347, 2075, 1006, 6097, 1024, 6270, 1007, 3433, 1027, 5227, 1006, 1024, 2695, 1010, 1000, 4070, 1013, 1001, 1063, 4132, 1035, 23667, 1006, 6097, 1007, 1065, 1013, 6337,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/search/legacy.rb
Github.Client::Search::Legacy.issues
def issues(*args) required = %w[ owner repo state keyword ] arguments(args, required: required) get_request("/legacy/issues/search/#{arguments.owner}/#{arguments.repo}/#{arguments.state}/#{escape_uri(arguments.keyword)}", arguments.params) end
ruby
def issues(*args) required = %w[ owner repo state keyword ] arguments(args, required: required) get_request("/legacy/issues/search/#{arguments.owner}/#{arguments.repo}/#{arguments.state}/#{escape_uri(arguments.keyword)}", arguments.params) end
[ "def", "issues", "(", "*", "args", ")", "required", "=", "%w[", "owner", "repo", "state", "keyword", "]", "arguments", "(", "args", ",", "required", ":", "required", ")", "get_request", "(", "\"/legacy/issues/search/#{arguments.owner}/#{arguments.repo}/#{arguments.sta...
Search issues Find issues by state and keyword. @param [Hash] params @option params [String] :state Indicates the state of the issues to return. Can be either open or closed. @option params [String] :keyword The search term @example github = Github.new github.search.legacy.issues 'owner', 'repo-name', 'open','api' github.search.legacy.issues owner: 'owner', repo: 'repo-name', state: 'open', keyword: 'api' @api public
[ "Search", "issues" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/search/legacy.rb#L25-L30
train
Get a list of issues
[ 30522, 13366, 3314, 1006, 1008, 12098, 5620, 1007, 3223, 1027, 1003, 1059, 1031, 3954, 16360, 2080, 2110, 3145, 18351, 1033, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 3223, 1007, 2131, 1035, 5227, 1006, 1000, 1013, 8027, 1013, 3314, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
deliver/lib/deliver/upload_metadata.rb
Deliver.UploadMetadata.upload
def upload(options) return if options[:skip_metadata] # it is not possible to create new languages, because # :keywords is not write-able on published versions # therefore skip it. verify_available_languages!(options) unless options[:edit_live] app = options[:app] details = app.details if options[:edit_live] # not all values are editable when using live_version v = app.live_version(platform: options[:platform]) localised_options = LOCALISED_LIVE_VALUES non_localised_options = NON_LOCALISED_LIVE_VALUES if v.nil? UI.message("Couldn't find live version, editing the current version on App Store Connect instead") v = app.edit_version(platform: options[:platform]) # we don't want to update the localised_options and non_localised_options # as we also check for `options[:edit_live]` at other areas in the code # by not touching those 2 variables, deliver is more consistent with what the option says # in the documentation end else v = app.edit_version(platform: options[:platform]) localised_options = (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES) non_localised_options = (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES) end individual = options[:individual_metadata_items] || [] localised_options.each do |key| current = options[key] next unless current unless current.kind_of?(Hash) UI.error("Error with provided '#{key}'. Must be a hash, the key being the language.") next end current.each do |language, value| next unless value.to_s.length > 0 strip_value = value.to_s.strip if individual.include?(key.to_s) upload_individual_item(app, v, language, key, strip_value) else v.send(key)[language] = strip_value if LOCALISED_VERSION_VALUES.include?(key) details.send(key)[language] = strip_value if LOCALISED_APP_VALUES.include?(key) end end end non_localised_options.each do |key| current = options[key].to_s.strip next unless current.to_s.length > 0 v.send("#{key}=", current) if NON_LOCALISED_VERSION_VALUES.include?(key) details.send("#{key}=", current) if NON_LOCALISED_APP_VALUES.include?(key) end v.release_on_approval = options[:automatic_release] v.auto_release_date = options[:auto_release_date] unless options[:auto_release_date].nil? v.toggle_phased_release(enabled: !!options[:phased_release]) unless options[:phased_release].nil? set_trade_representative_contact_information(v, options) set_review_information(v, options) set_app_rating(v, options) v.ratings_reset = options[:reset_ratings] unless options[:reset_ratings].nil? Helper.show_loading_indicator("Uploading metadata to App Store Connect") v.save! Helper.hide_loading_indicator begin details.save! UI.success("Successfully uploaded set of metadata to App Store Connect") rescue Spaceship::TunesClient::ITunesConnectError => e # This makes sure that we log invalid app names as user errors # If another string needs to be checked here we should # figure out a more generic way to handle these cases. if e.message.include?('App Name cannot be longer than 50 characters') || e.message.include?('The app name you entered is already being used') UI.error("Error in app name. Try using 'individual_metadata_items' to identify the problem language.") UI.user_error!(e.message) else raise e end end end
ruby
def upload(options) return if options[:skip_metadata] # it is not possible to create new languages, because # :keywords is not write-able on published versions # therefore skip it. verify_available_languages!(options) unless options[:edit_live] app = options[:app] details = app.details if options[:edit_live] # not all values are editable when using live_version v = app.live_version(platform: options[:platform]) localised_options = LOCALISED_LIVE_VALUES non_localised_options = NON_LOCALISED_LIVE_VALUES if v.nil? UI.message("Couldn't find live version, editing the current version on App Store Connect instead") v = app.edit_version(platform: options[:platform]) # we don't want to update the localised_options and non_localised_options # as we also check for `options[:edit_live]` at other areas in the code # by not touching those 2 variables, deliver is more consistent with what the option says # in the documentation end else v = app.edit_version(platform: options[:platform]) localised_options = (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES) non_localised_options = (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES) end individual = options[:individual_metadata_items] || [] localised_options.each do |key| current = options[key] next unless current unless current.kind_of?(Hash) UI.error("Error with provided '#{key}'. Must be a hash, the key being the language.") next end current.each do |language, value| next unless value.to_s.length > 0 strip_value = value.to_s.strip if individual.include?(key.to_s) upload_individual_item(app, v, language, key, strip_value) else v.send(key)[language] = strip_value if LOCALISED_VERSION_VALUES.include?(key) details.send(key)[language] = strip_value if LOCALISED_APP_VALUES.include?(key) end end end non_localised_options.each do |key| current = options[key].to_s.strip next unless current.to_s.length > 0 v.send("#{key}=", current) if NON_LOCALISED_VERSION_VALUES.include?(key) details.send("#{key}=", current) if NON_LOCALISED_APP_VALUES.include?(key) end v.release_on_approval = options[:automatic_release] v.auto_release_date = options[:auto_release_date] unless options[:auto_release_date].nil? v.toggle_phased_release(enabled: !!options[:phased_release]) unless options[:phased_release].nil? set_trade_representative_contact_information(v, options) set_review_information(v, options) set_app_rating(v, options) v.ratings_reset = options[:reset_ratings] unless options[:reset_ratings].nil? Helper.show_loading_indicator("Uploading metadata to App Store Connect") v.save! Helper.hide_loading_indicator begin details.save! UI.success("Successfully uploaded set of metadata to App Store Connect") rescue Spaceship::TunesClient::ITunesConnectError => e # This makes sure that we log invalid app names as user errors # If another string needs to be checked here we should # figure out a more generic way to handle these cases. if e.message.include?('App Name cannot be longer than 50 characters') || e.message.include?('The app name you entered is already being used') UI.error("Error in app name. Try using 'individual_metadata_items' to identify the problem language.") UI.user_error!(e.message) else raise e end end end
[ "def", "upload", "(", "options", ")", "return", "if", "options", "[", ":skip_metadata", "]", "# it is not possible to create new languages, because", "# :keywords is not write-able on published versions", "# therefore skip it.", "verify_available_languages!", "(", "options", ")", ...
Make sure to call `load_from_filesystem` before calling upload
[ "Make", "sure", "to", "call", "load_from_filesystem", "before", "calling", "upload" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/upload_metadata.rb#L67-L152
train
Upload metadata to the app store
[ 30522, 13366, 2039, 11066, 1006, 7047, 1007, 2709, 2065, 7047, 1031, 1024, 13558, 1035, 27425, 1033, 1001, 2009, 2003, 2025, 2825, 2000, 3443, 2047, 4155, 1010, 2138, 1001, 1024, 3145, 22104, 2003, 2025, 4339, 1011, 2583, 2006, 2405, 4617, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.begin_get_vpnclient_ipsec_parameters
def begin_get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_get_vpnclient_ipsec_parameters", "(", "resource_group_name", ",", "virtual_network_gateway_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_get_vpnclient_ipsec_parameters_async", "(", "resource_group_name", ",", "virtual_network_gateway_name", ...
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. @param resource_group_name [String] The name of the resource group. @param virtual_network_gateway_name [String] The virtual network gateway name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VpnClientIPsecParameters] operation results.
[ "The", "Get", "VpnclientIpsecParameters", "operation", "retrieves", "information", "about", "the", "vpnclient", "ipsec", "policy", "for", "P2S", "client", "of", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "through", "Network", "re...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L2244-L2247
train
Gets the vpnclient ipsec parameters for P2S client.
[ 30522, 13366, 4088, 1035, 2131, 1035, 21210, 12273, 8751, 3372, 1035, 12997, 3366, 2278, 1035, 11709, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 11909, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
deivid-rodriguez/byebug
lib/byebug/history.rb
Byebug.History.save
def save n_cmds = Setting[:histsize] > size ? size : Setting[:histsize] File.open(Setting[:histfile], "w") do |file| n_cmds.times { file.puts(pop) } end clear end
ruby
def save n_cmds = Setting[:histsize] > size ? size : Setting[:histsize] File.open(Setting[:histfile], "w") do |file| n_cmds.times { file.puts(pop) } end clear end
[ "def", "save", "n_cmds", "=", "Setting", "[", ":histsize", "]", ">", "size", "?", "size", ":", "Setting", "[", ":histsize", "]", "File", ".", "open", "(", "Setting", "[", ":histfile", "]", ",", "\"w\"", ")", "do", "|", "file", "|", "n_cmds", ".", "...
Saves history to disk.
[ "Saves", "history", "to", "disk", "." ]
bf41a63858a648baa7fb621600d6451786d1572a
https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/history.rb#L45-L53
train
Save the current sequence number to the histogram file
[ 30522, 13366, 3828, 1050, 1035, 4642, 5104, 1027, 4292, 1031, 1024, 2010, 3215, 4697, 1033, 1028, 2946, 1029, 2946, 1024, 4292, 1031, 1024, 2010, 3215, 4697, 1033, 5371, 1012, 2330, 1006, 4292, 1031, 1024, 2010, 24475, 9463, 1033, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/haml-lint
lib/haml_lint/linter.rb
HamlLint.Linter.tag_with_inline_text
def tag_with_inline_text(tag_node) # Normalize each of the lines to ignore the multiline bar (|) and # excess whitespace @document.source_lines[(tag_node.line - 1)...(following_node_line(tag_node) - 1)] .map do |line| line.strip.gsub(/\|\z/, '').rstrip end.join(' ') end
ruby
def tag_with_inline_text(tag_node) # Normalize each of the lines to ignore the multiline bar (|) and # excess whitespace @document.source_lines[(tag_node.line - 1)...(following_node_line(tag_node) - 1)] .map do |line| line.strip.gsub(/\|\z/, '').rstrip end.join(' ') end
[ "def", "tag_with_inline_text", "(", "tag_node", ")", "# Normalize each of the lines to ignore the multiline bar (|) and", "# excess whitespace", "@document", ".", "source_lines", "[", "(", "tag_node", ".", "line", "-", "1", ")", "...", "(", "following_node_line", "(", "ta...
Extracts all text for a tag node and normalizes it, including additional lines following commas or multiline bar indicators ('|') @param tag_node [HamlLine::Tree::TagNode] @return [String] source code of original parse node
[ "Extracts", "all", "text", "for", "a", "tag", "node", "and", "normalizes", "it", "including", "additional", "lines", "following", "commas", "or", "multiline", "bar", "indicators", "(", "|", ")" ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter.rb#L179-L186
train
Returns the string containing the inline text of the given tag node.
[ 30522, 13366, 6415, 1035, 2007, 1035, 23881, 1035, 3793, 1006, 6415, 1035, 13045, 1007, 1001, 3671, 4697, 2169, 1997, 1996, 3210, 2000, 8568, 1996, 4800, 4179, 3347, 1006, 1064, 1007, 1998, 1001, 9987, 12461, 15327, 1030, 6254, 1012, 3120, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_azure/lib/ms_rest_azure/azure_service_client.rb
MsRestAzure.AzureServiceClient.update_state_from_get_resource_operation
def update_state_from_get_resource_operation(request, polling_state, custom_deserialization_block) result = get_async_with_custom_deserialization(request, custom_deserialization_block) fail AzureOperationError, 'The response from long running operation does not contain a body' if result.response.body.nil? || result.response.body.empty? # On non flattened resource, we should find provisioning_state inside 'properties' if result.body.respond_to?(:properties) && result.body.properties.respond_to?(:provisioning_state) && !result.body.properties.provisioning_state.nil? polling_state.status = result.body.properties.provisioning_state # On flattened resource, we should find provisioning_state at the top level elsif result.body.respond_to?(:provisioning_state) && !result.body.provisioning_state.nil? polling_state.status = result.body.provisioning_state else polling_state.status = AsyncOperationStatus::SUCCESS_STATUS end error_data = CloudErrorData.new error_data.code = polling_state.status error_data.message = "Long running operation failed with status #{polling_state.status}" polling_state.error_data = error_data polling_state.update_response(result.response) polling_state.request = result.request polling_state.resource = result.body end
ruby
def update_state_from_get_resource_operation(request, polling_state, custom_deserialization_block) result = get_async_with_custom_deserialization(request, custom_deserialization_block) fail AzureOperationError, 'The response from long running operation does not contain a body' if result.response.body.nil? || result.response.body.empty? # On non flattened resource, we should find provisioning_state inside 'properties' if result.body.respond_to?(:properties) && result.body.properties.respond_to?(:provisioning_state) && !result.body.properties.provisioning_state.nil? polling_state.status = result.body.properties.provisioning_state # On flattened resource, we should find provisioning_state at the top level elsif result.body.respond_to?(:provisioning_state) && !result.body.provisioning_state.nil? polling_state.status = result.body.provisioning_state else polling_state.status = AsyncOperationStatus::SUCCESS_STATUS end error_data = CloudErrorData.new error_data.code = polling_state.status error_data.message = "Long running operation failed with status #{polling_state.status}" polling_state.error_data = error_data polling_state.update_response(result.response) polling_state.request = result.request polling_state.resource = result.body end
[ "def", "update_state_from_get_resource_operation", "(", "request", ",", "polling_state", ",", "custom_deserialization_block", ")", "result", "=", "get_async_with_custom_deserialization", "(", "request", ",", "custom_deserialization_block", ")", "fail", "AzureOperationError", ",...
Updates polling state based on location header for PUT HTTP requests. @param request [MsRest::HttpOperationRequest] The url retrieve data from. @param polling_state [MsRestAzure::PollingState] polling state to update. @param custom_deserialization_block [Proc] custom deserialization method for parsing response.
[ "Updates", "polling", "state", "based", "on", "location", "header", "for", "PUT", "HTTP", "requests", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/runtime/ms_rest_azure/lib/ms_rest_azure/azure_service_client.rb#L141-L164
train
Update the polling state from the resource operation
[ 30522, 13366, 10651, 1035, 2110, 1035, 2013, 1035, 2131, 1035, 7692, 1035, 3169, 1006, 5227, 1010, 17888, 1035, 2110, 1010, 7661, 1035, 4078, 11610, 22731, 1035, 3796, 1007, 2765, 1027, 2131, 1035, 2004, 6038, 2278, 1035, 2007, 1035, 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...
jekyll/jekyll
lib/jekyll/configuration.rb
Jekyll.Configuration.read_config_files
def read_config_files(files) configuration = clone begin files.each do |config_file| next if config_file.nil? || config_file.empty? new_config = read_config_file(config_file) configuration = Utils.deep_merge_hashes(configuration, new_config) end rescue ArgumentError => e Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ "Using defaults (and options)." warn e end configuration.backwards_compatibilize.add_default_collections end
ruby
def read_config_files(files) configuration = clone begin files.each do |config_file| next if config_file.nil? || config_file.empty? new_config = read_config_file(config_file) configuration = Utils.deep_merge_hashes(configuration, new_config) end rescue ArgumentError => e Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ "Using defaults (and options)." warn e end configuration.backwards_compatibilize.add_default_collections end
[ "def", "read_config_files", "(", "files", ")", "configuration", "=", "clone", "begin", "files", ".", "each", "do", "|", "config_file", "|", "next", "if", "config_file", ".", "nil?", "||", "config_file", ".", "empty?", "new_config", "=", "read_config_file", "("...
Public: Read in a list of configuration files and merge with this hash files - the list of configuration file paths Returns the full configuration, with the defaults overridden by the values in the configuration files
[ "Public", ":", "Read", "in", "a", "list", "of", "configuration", "files", "and", "merge", "with", "this", "hash" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/configuration.rb#L192-L209
train
Read the configuration files
[ 30522, 13366, 3191, 1035, 9530, 8873, 2290, 1035, 6764, 1006, 6764, 1007, 9563, 1027, 17598, 4088, 6764, 1012, 2169, 2079, 1064, 9530, 8873, 2290, 1035, 5371, 1064, 2279, 2065, 9530, 8873, 2290, 1035, 5371, 1012, 9152, 2140, 1029, 1064, 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/uploader.rb
Supply.Uploader.all_languages
def all_languages Dir.entries(metadata_path) .select { |f| File.directory?(File.join(metadata_path, f)) } .reject { |f| f.start_with?('.') } .sort { |x, y| x <=> y } end
ruby
def all_languages Dir.entries(metadata_path) .select { |f| File.directory?(File.join(metadata_path, f)) } .reject { |f| f.start_with?('.') } .sort { |x, y| x <=> y } end
[ "def", "all_languages", "Dir", ".", "entries", "(", "metadata_path", ")", ".", "select", "{", "|", "f", "|", "File", ".", "directory?", "(", "File", ".", "join", "(", "metadata_path", ",", "f", ")", ")", "}", ".", "reject", "{", "|", "f", "|", "f",...
returns only language directories from metadata_path
[ "returns", "only", "language", "directories", "from", "metadata_path" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/uploader.rb#L276-L281
train
Returns all languages in the metadata_path
[ 30522, 13366, 2035, 1035, 4155, 16101, 1012, 10445, 1006, 27425, 1035, 4130, 1007, 1012, 7276, 1063, 1064, 1042, 1064, 5371, 1012, 14176, 1029, 1006, 5371, 1012, 3693, 1006, 27425, 1035, 4130, 1010, 1042, 1007, 1007, 1065, 1012, 15454, 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...
mongodb/mongoid
lib/mongoid/atomic.rb
Mongoid.Atomic.add_atomic_pull
def add_atomic_pull(document) document.flagged_for_destroy = true (delayed_atomic_pulls[document.association_name.to_s] ||= []).push(document) end
ruby
def add_atomic_pull(document) document.flagged_for_destroy = true (delayed_atomic_pulls[document.association_name.to_s] ||= []).push(document) end
[ "def", "add_atomic_pull", "(", "document", ")", "document", ".", "flagged_for_destroy", "=", "true", "(", "delayed_atomic_pulls", "[", "document", ".", "association_name", ".", "to_s", "]", "||=", "[", "]", ")", ".", "push", "(", "document", ")", "end" ]
Add the document as an atomic pull. @example Add the atomic pull. person.add_atomic_pull(address) @param [ Document ] document The embedded document to pull. @since 2.2.0
[ "Add", "the", "document", "as", "an", "atomic", "pull", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/atomic.rb#L38-L41
train
Add a document to the delayed atomic pull list
[ 30522, 13366, 5587, 1035, 9593, 1035, 4139, 1006, 6254, 1007, 6254, 1012, 5210, 5999, 1035, 2005, 1035, 6033, 1027, 2995, 1006, 8394, 1035, 9593, 1035, 8005, 1031, 6254, 1012, 2523, 1035, 2171, 1012, 2000, 1035, 1055, 1033, 1064, 1064, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb
Aws::EC2.Instance.create_image
def create_image(options = {}) options = options.merge(instance_id: @id) resp = @client.create_image(options) Image.new( id: resp.data.image_id, client: @client ) end
ruby
def create_image(options = {}) options = options.merge(instance_id: @id) resp = @client.create_image(options) Image.new( id: resp.data.image_id, client: @client ) end
[ "def", "create_image", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "instance_id", ":", "@id", ")", "resp", "=", "@client", ".", "create_image", "(", "options", ")", "Image", ".", "new", "(", "id", ":", "resp", "....
@example Request syntax with placeholder values image = instance.create_image({ block_device_mappings: [ { device_name: "String", virtual_name: "String", ebs: { delete_on_termination: false, iops: 1, snapshot_id: "String", volume_size: 1, volume_type: "standard", # accepts standard, io1, gp2, sc1, st1 encrypted: false, kms_key_id: "String", }, no_device: "String", }, ], description: "String", dry_run: false, name: "String", # required no_reboot: false, }) @param [Hash] options ({}) @option options [Array<Types::BlockDeviceMapping>] :block_device_mappings Tthe block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action. @option options [String] :description A description for the new image. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @option options [required, String] :name A name for the new image. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(\_) @option options [Boolean] :no_reboot By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed. @return [Image]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L662-L669
train
Create an image
[ 30522, 13366, 3443, 1035, 3746, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 6013, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 3746, 1006, 7047, 1007, 3746, 1012, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2015-05-01-preview/generated/azure_mgmt_network/network_interfaces.rb
Azure::Network::Mgmt::V2015_05_01_preview.NetworkInterfaces.list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy
def list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers:nil) response = list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers:nil) response = list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy", "(", "resource_group_name", ",", "virtual_machine_scale_set_name", ",", "virtualmachine_index", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_virtual_machine_scale_set_vmnetwork_interfaces_async", ...
The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set. @param resource_group_name [String] The name of the resource group. @param virtual_machine_scale_set_name [String] The name of the virtual machine scale set. @param virtualmachine_index [String] The virtual machine index. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [NetworkInterfaceListResult] which provide lazy access to pages of the response.
[ "The", "list", "network", "interface", "operation", "retrieves", "information", "about", "all", "network", "interfaces", "in", "a", "virtual", "machine", "from", "a", "virtual", "machine", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2015-05-01-preview/generated/azure_mgmt_network/network_interfaces.rb#L1262-L1271
train
Gets all the virtual machines in a virtual machine scale set.
[ 30522, 13366, 2862, 1035, 7484, 1035, 3698, 1035, 4094, 1035, 2275, 1035, 1058, 2213, 7159, 6198, 1035, 19706, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 3698, 1035, 4094, 1035, 2275, 1035, 2171, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb
Azure::Hdinsight::Mgmt::V2015_03_01_preview.ScriptActions.list_persisted_scripts_next
def list_persisted_scripts_next(next_page_link, custom_headers:nil) response = list_persisted_scripts_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_persisted_scripts_next(next_page_link, custom_headers:nil) response = list_persisted_scripts_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_persisted_scripts_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_persisted_scripts_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unle...
Lists all the persisted script actions for the specified cluster. @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 [ScriptActionsList] operation results.
[ "Lists", "all", "the", "persisted", "script", "actions", "for", "the", "specified", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb#L307-L310
train
Gets the persisted scripts for a given App Service Environment.
[ 30522, 13366, 2862, 1035, 19035, 1035, 14546, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 19035, 1035, 14546, 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...
randym/axlsx
lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
Axlsx.PivotTableCacheDefinition.to_xml_string
def to_xml_string(str = '') str << '<?xml version="1.0" encoding="UTF-8"?>' str << ('<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">') str << '<cacheSource type="worksheet">' str << ( '<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>') str << '</cacheSource>' str << ( '<cacheFields count="' << pivot_table.header_cells_count.to_s << '">') pivot_table.header_cells.each do |cell| str << ( '<cacheField name="' << cell.value << '" numFmtId="0">') str << '<sharedItems count="0">' str << '</sharedItems>' str << '</cacheField>' end str << '</cacheFields>' str << '</pivotCacheDefinition>' end
ruby
def to_xml_string(str = '') str << '<?xml version="1.0" encoding="UTF-8"?>' str << ('<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">') str << '<cacheSource type="worksheet">' str << ( '<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>') str << '</cacheSource>' str << ( '<cacheFields count="' << pivot_table.header_cells_count.to_s << '">') pivot_table.header_cells.each do |cell| str << ( '<cacheField name="' << cell.value << '" numFmtId="0">') str << '<sharedItems count="0">' str << '</sharedItems>' str << '</cacheField>' end str << '</cacheFields>' str << '</pivotCacheDefinition>' end
[ "def", "to_xml_string", "(", "str", "=", "''", ")", "str", "<<", "'<?xml version=\"1.0\" encoding=\"UTF-8\"?>'", "str", "<<", "(", "'<pivotCacheDefinition xmlns=\"'", "<<", "XML_NS", "<<", "'\" xmlns:r=\"'", "<<", "XML_NS_R", "<<", "'\" invalid=\"1\" refreshOnLoad=\"1\" rec...
Serializes the object @param [String] str @return [String]
[ "Serializes", "the", "object" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb#L48-L63
train
Returns the XML string for this pivot table.
[ 30522, 13366, 2000, 1035, 20950, 1035, 5164, 1006, 2358, 2099, 1027, 1005, 1005, 1007, 2358, 2099, 1026, 1026, 1005, 1026, 1029, 20950, 2544, 1027, 1000, 1015, 1012, 1014, 1000, 17181, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1029, 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/tree/tag_node.rb
HamlLint::Tree.TagNode.dynamic_attributes_sources
def dynamic_attributes_sources @dynamic_attributes_sources ||= if Gem::Version.new(Haml::VERSION) < Gem::Version.new('5') @value[:attributes_hashes] else Array(@value[:dynamic_attributes].to_literal).reject(&:empty?) end end
ruby
def dynamic_attributes_sources @dynamic_attributes_sources ||= if Gem::Version.new(Haml::VERSION) < Gem::Version.new('5') @value[:attributes_hashes] else Array(@value[:dynamic_attributes].to_literal).reject(&:empty?) end end
[ "def", "dynamic_attributes_sources", "@dynamic_attributes_sources", "||=", "if", "Gem", "::", "Version", ".", "new", "(", "Haml", "::", "VERSION", ")", "<", "Gem", "::", "Version", ".", "new", "(", "'5'", ")", "@value", "[", ":attributes_hashes", "]", "else", ...
rubocop:disable ClassLength Computed set of attribute hashes code. This is a combination of all dynamically calculated attributes from the different attribute setting syntaxes (`{...}`/`(...)`), converted into Ruby code. @note This has to be memoized because of a design decision in Haml 5. When calling `DynamicAttributes#to_literal`, they mutate the "old" parameter using `String#sub!` instead of returning a new string. This means that any subsequent calls can return a nil instead of a string for that attribute, which causes any subsequent calls to the method to raise an error. @return [Array<String>]
[ "rubocop", ":", "disable", "ClassLength", "Computed", "set", "of", "attribute", "hashes", "code", "." ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/tree/tag_node.rb#L19-L26
train
Returns the dynamic attributes sources for the current object.
[ 30522, 13366, 8790, 1035, 12332, 1035, 4216, 1030, 8790, 1035, 12332, 1035, 4216, 1064, 1064, 1027, 2065, 17070, 1024, 1024, 2544, 1012, 2047, 1006, 10654, 2140, 1024, 1024, 2544, 1007, 1026, 17070, 1024, 1024, 2544, 1012, 2047, 1006, 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...
watir/watir
lib/watir/elements/element.rb
Watir.Element.present?
def present? displayed = display_check if displayed.nil? && display_check Watir.logger.deprecate 'Checking `#present? == false` to determine a stale element', '`#stale? == true`', reference: 'http://watir.com/staleness-changes', ids: [:stale_present] end displayed rescue UnknownObjectException, UnknownFrameException false end
ruby
def present? displayed = display_check if displayed.nil? && display_check Watir.logger.deprecate 'Checking `#present? == false` to determine a stale element', '`#stale? == true`', reference: 'http://watir.com/staleness-changes', ids: [:stale_present] end displayed rescue UnknownObjectException, UnknownFrameException false end
[ "def", "present?", "displayed", "=", "display_check", "if", "displayed", ".", "nil?", "&&", "display_check", "Watir", ".", "logger", ".", "deprecate", "'Checking `#present? == false` to determine a stale element'", ",", "'`#stale? == true`'", ",", "reference", ":", "'http...
Returns true if the element exists and is visible on the page. Returns false if element does not exist or exists but is not visible @return [Boolean] @see Watir::Wait
[ "Returns", "true", "if", "the", "element", "exists", "and", "is", "visible", "on", "the", "page", ".", "Returns", "false", "if", "element", "does", "not", "exist", "or", "exists", "but", "is", "not", "visible" ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/element.rb#L494-L505
train
Returns the element ID that is present in the current object.
[ 30522, 13366, 2556, 1029, 6913, 1027, 4653, 1035, 4638, 2065, 6913, 1012, 9152, 2140, 1029, 1004, 1004, 4653, 1035, 4638, 28194, 4313, 1012, 8833, 4590, 1012, 2139, 28139, 16280, 1005, 9361, 1036, 1001, 2556, 1029, 1027, 1027, 6270, 1036, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/vaults.rb
Azure::RecoveryServices::Mgmt::V2016_06_01.Vaults.update_with_http_info
def update_with_http_info(resource_group_name, vault_name, vault, custom_headers:nil) update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value! end
ruby
def update_with_http_info(resource_group_name, vault_name, vault, custom_headers:nil) update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value! end
[ "def", "update_with_http_info", "(", "resource_group_name", ",", "vault_name", ",", "vault", ",", "custom_headers", ":", "nil", ")", "update_async", "(", "resource_group_name", ",", "vault_name", ",", "vault", ",", "custom_headers", ":custom_headers", ")", ".", "val...
Updates the 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 vault [PatchVault] Recovery Services Vault to be created. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "the", "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/vaults.rb#L523-L525
train
Updates a key vault.
[ 30522, 13366, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11632, 1035, 2171, 1010, 11632, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
httprb/http
lib/http/headers.rb
HTTP.Headers.include?
def include?(name) name = normalize_header name.to_s @pile.any? { |k, _| k == name } end
ruby
def include?(name) name = normalize_header name.to_s @pile.any? { |k, _| k == name } end
[ "def", "include?", "(", "name", ")", "name", "=", "normalize_header", "name", ".", "to_s", "@pile", ".", "any?", "{", "|", "k", ",", "_", "|", "k", "==", "name", "}", "end" ]
Tells whenever header with given `name` is set or not. @return [Boolean]
[ "Tells", "whenever", "header", "with", "given", "name", "is", "set", "or", "not", "." ]
f37a10ea4fab3ee411907ea2e4251ddf0ca33a93
https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/headers.rb#L82-L85
train
Returns true if the header is in the list of header names.
[ 30522, 13366, 2421, 1029, 1006, 2171, 1007, 2171, 1027, 3671, 4697, 1035, 20346, 2171, 1012, 2000, 1035, 1055, 1030, 8632, 1012, 2151, 1029, 1063, 1064, 1047, 1010, 1035, 1064, 1047, 1027, 1027, 2171, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_networks.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworks.delete
def delete(resource_group_name, virtual_network_name, custom_headers:nil) response = delete_async(resource_group_name, virtual_network_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, virtual_network_name, custom_headers:nil) response = delete_async(resource_group_name, virtual_network_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "virtual_network_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "virtual_network_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "n...
Deletes the specified virtual network. @param resource_group_name [String] The name of the resource group. @param virtual_network_name [String] The name of the virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "the", "specified", "virtual", "network", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_networks.rb#L32-L35
train
Deletes a virtual network.
[ 30522, 13366, 3972, 12870, 1006, 30524, 20346, 2015, 1007, 1012, 3643, 999, 9152, 2140, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kpumuk/meta-tags
lib/meta_tags/text_normalizer.rb
MetaTags.TextNormalizer.truncate
def truncate(string, limit = nil, natural_separator = ' ') return string if limit.to_i == 0 # rubocop:disable Lint/NumberConversion helpers.truncate( string, length: limit, separator: natural_separator, omission: '', escape: true, ) end
ruby
def truncate(string, limit = nil, natural_separator = ' ') return string if limit.to_i == 0 # rubocop:disable Lint/NumberConversion helpers.truncate( string, length: limit, separator: natural_separator, omission: '', escape: true, ) end
[ "def", "truncate", "(", "string", ",", "limit", "=", "nil", ",", "natural_separator", "=", "' '", ")", "return", "string", "if", "limit", ".", "to_i", "==", "0", "# rubocop:disable Lint/NumberConversion", "helpers", ".", "truncate", "(", "string", ",", "length...
Truncates a string to a specific limit. Return string without truncation when limit 0 or nil @param [String] string input strings. @param [Integer,nil] limit characters number to truncate to. @param [String] natural_separator natural separator to truncate at. @return [String] truncated string.
[ "Truncates", "a", "string", "to", "a", "specific", "limit", ".", "Return", "string", "without", "truncation", "when", "limit", "0", "or", "nil" ]
03585f95edf96cd17024c5c155ce46ec8bc47232
https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/text_normalizer.rb#L138-L148
train
Truncate a string to a specified length
[ 30522, 13366, 19817, 4609, 16280, 1006, 5164, 1010, 5787, 1027, 9152, 2140, 1010, 3019, 1035, 19802, 25879, 2953, 1027, 1005, 1005, 1007, 2709, 5164, 2065, 5787, 1012, 2000, 1035, 1045, 1027, 1027, 30524, 2953, 1024, 3019, 1035, 19802, 2587...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.update
def update(recovery_plan_name, input, custom_headers:nil) response = update_async(recovery_plan_name, input, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update(recovery_plan_name, input, custom_headers:nil) response = update_async(recovery_plan_name, input, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update", "(", "recovery_plan_name", ",", "input", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "recovery_plan_name", ",", "input", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "un...
Updates the given recovery plan. The operation to update a recovery plan. @param recovery_plan_name [String] Recovery plan name. @param input [UpdateRecoveryPlanInput] Update recovery plan input @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RecoveryPlan] operation results.
[ "Updates", "the", "given", "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#L306-L309
train
Updates a Recovery Plan.
[ 30522, 13366, 10651, 1006, 7233, 1035, 2933, 1035, 2171, 1010, 7953, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 2004, 6038, 2278, 1006, 7233, 1035, 2933, 1035, 2171, 1010, 7953, 1010, 7661, 1035, 20346, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grodowski/undercover
lib/undercover.rb
Undercover.Report.each_result_arg
def each_result_arg match_all = ->(_) { true } lcov.source_files.each do |relative_filename, coverage| path = File.join(code_dir, relative_filename) root_ast = Imagen::Node::Root.new.build_from_file(path) next if root_ast.children.empty? root_ast.children[0].find_all(match_all).each do |node| yield(relative_filename, coverage, node) end end end
ruby
def each_result_arg match_all = ->(_) { true } lcov.source_files.each do |relative_filename, coverage| path = File.join(code_dir, relative_filename) root_ast = Imagen::Node::Root.new.build_from_file(path) next if root_ast.children.empty? root_ast.children[0].find_all(match_all).each do |node| yield(relative_filename, coverage, node) end end end
[ "def", "each_result_arg", "match_all", "=", "->", "(", "_", ")", "{", "true", "}", "lcov", ".", "source_files", ".", "each", "do", "|", "relative_filename", ",", "coverage", "|", "path", "=", "File", ".", "join", "(", "code_dir", ",", "relative_filename", ...
TODO: should that start from changeset.file_paths? this way we could report things that weren't even loaded in any spec, so is this still good idea? (Rakefile, .gemspec etc)
[ "TODO", ":", "should", "that", "start", "from", "changeset", ".", "file_paths?", "this", "way", "we", "could", "report", "things", "that", "weren", "t", "even", "loaded", "in", "any", "spec", "so", "is", "this", "still", "good", "idea?", "(", "Rakefile", ...
8f9cb32094d1669d67ff957337f95243c4d15ff2
https://github.com/grodowski/undercover/blob/8f9cb32094d1669d67ff957337f95243c4d15ff2/lib/undercover.rb#L89-L100
train
Yields the result of the given block.
[ 30522, 13366, 2169, 1035, 2765, 1035, 12098, 2290, 2674, 1035, 2035, 1027, 1011, 1028, 1006, 1035, 1007, 1063, 2995, 1065, 29215, 4492, 1012, 3120, 1035, 6764, 1012, 2169, 2079, 1064, 5816, 1035, 5371, 18442, 1010, 6325, 1064, 4130, 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...
jekyll/jekyll
lib/jekyll/utils.rb
Jekyll.Utils.safe_glob
def safe_glob(dir, patterns, flags = 0) return [] unless Dir.exist?(dir) pattern = File.join(Array(patterns)) return [dir] if pattern.empty? Dir.chdir(dir) do Dir.glob(pattern, flags).map { |f| File.join(dir, f) } end end
ruby
def safe_glob(dir, patterns, flags = 0) return [] unless Dir.exist?(dir) pattern = File.join(Array(patterns)) return [dir] if pattern.empty? Dir.chdir(dir) do Dir.glob(pattern, flags).map { |f| File.join(dir, f) } end end
[ "def", "safe_glob", "(", "dir", ",", "patterns", ",", "flags", "=", "0", ")", "return", "[", "]", "unless", "Dir", ".", "exist?", "(", "dir", ")", "pattern", "=", "File", ".", "join", "(", "Array", "(", "patterns", ")", ")", "return", "[", "dir", ...
Work the same way as Dir.glob but seperating the input into two parts ('dir' + '/' + 'pattern') to make sure the first part('dir') does not act as a pattern. For example, Dir.glob("path[/*") always returns an empty array, because the method fails to find the closing pattern to '[' which is ']' Examples: safe_glob("path[", "*") # => ["path[/file1", "path[/file2"] safe_glob("path", "*", File::FNM_DOTMATCH) # => ["path/.", "path/..", "path/file1"] safe_glob("path", ["**", "*"]) # => ["path[/file1", "path[/folder/file2"] dir - the dir where glob will be executed under (the dir will be included to each result) patterns - the patterns (or the pattern) which will be applied under the dir flags - the flags which will be applied to the pattern Returns matched pathes
[ "Work", "the", "same", "way", "as", "Dir", ".", "glob", "but", "seperating", "the", "input", "into", "two", "parts", "(", "dir", "+", "/", "+", "pattern", ")", "to", "make", "sure", "the", "first", "part", "(", "dir", ")", "does", "not", "act", "as...
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/utils.rb#L288-L297
train
Globs a directory and returns an array of files that match the patterns.
[ 30522, 13366, 3647, 1035, 1043, 4135, 2497, 1006, 16101, 1010, 7060, 1010, 9245, 1027, 1014, 1007, 2709, 1031, 1033, 4983, 16101, 1012, 4839, 1029, 1006, 16101, 1007, 5418, 1027, 5371, 1012, 3693, 1006, 9140, 1006, 7060, 1007, 1007, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/puppet
lib/puppet/functions.rb
Puppet::Functions.DispatcherBuilder.required_repeated_param
def required_repeated_param(type, name) internal_param(type, name, true) raise ArgumentError, _('A required repeated parameter cannot be added after an optional parameter') if @min != @max @min += 1 @max = :default end
ruby
def required_repeated_param(type, name) internal_param(type, name, true) raise ArgumentError, _('A required repeated parameter cannot be added after an optional parameter') if @min != @max @min += 1 @max = :default end
[ "def", "required_repeated_param", "(", "type", ",", "name", ")", "internal_param", "(", "type", ",", "name", ",", "true", ")", "raise", "ArgumentError", ",", "_", "(", "'A required repeated parameter cannot be added after an optional parameter'", ")", "if", "@min", "!...
Defines a repeated positional parameter with _type_ and _name_ that may occur 1 to "infinite" number of times. It may only appear last or just before a block parameter. @param type [String] The type specification for the parameter. @param name [Symbol] The name of the parameter. This is primarily used for error message output and does not have to match an implementation method parameter. @return [Void] @api public
[ "Defines", "a", "repeated", "positional", "parameter", "with", "_type_", "and", "_name_", "that", "may", "occur", "1", "to", "infinite", "number", "of", "times", ".", "It", "may", "only", "appear", "last", "or", "just", "before", "a", "block", "parameter", ...
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/functions.rb#L461-L466
train
Add a repeated parameter to the parameter list.
[ 30522, 13366, 3223, 1035, 5567, 1035, 11498, 2213, 1006, 2828, 1010, 2171, 1007, 4722, 1035, 11498, 2213, 1006, 2828, 1010, 2171, 1010, 2995, 1007, 5333, 6685, 2121, 29165, 1010, 1035, 1006, 1005, 1037, 3223, 5567, 16381, 3685, 2022, 2794, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_variation
def create_variation(location_id, item_id, body, opts = {}) data, _status_code, _headers = create_variation_with_http_info(location_id, item_id, body, opts) return data end
ruby
def create_variation(location_id, item_id, body, opts = {}) data, _status_code, _headers = create_variation_with_http_info(location_id, item_id, body, opts) return data end
[ "def", "create_variation", "(", "location_id", ",", "item_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_variation_with_http_info", "(", "location_id", ",", "item_id", ",", "body", ",", "opts", "...
CreateVariation Creates an item variation for an existing item. @param location_id The ID of the item&#39;s associated location. @param item_id The item&#39;s ID. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [V1Variation]
[ "CreateVariation", "Creates", "an", "item", "variation", "for", "an", "existing", "item", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L633-L636
train
Creates a variation
[ 30522, 13366, 3443, 1035, 8386, 1006, 3295, 1035, 8909, 1010, 8875, 1035, 8909, 1010, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 3443, 1035, 8386, 1035, 2007, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.enable_partition_backup_with_http_info
def enable_partition_backup_with_http_info(partition_id, enable_backup_description, timeout:60, custom_headers:nil) enable_partition_backup_async(partition_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def enable_partition_backup_with_http_info(partition_id, enable_backup_description, timeout:60, custom_headers:nil) enable_partition_backup_async(partition_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "enable_partition_backup_with_http_info", "(", "partition_id", ",", "enable_backup_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "enable_partition_backup_async", "(", "partition_id", ",", "enable_backup_description", ",", "timeout",...
Enables periodic backup of the stateful persisted partition. Enables periodic backup of stateful persisted partition. Each partition is backed up as per the specified backup policy description. In case the application or service, which is partition is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup of this partition. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup. @param partition_id The identity of the partition. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Enables", "periodic", "backup", "of", "the", "stateful", "persisted", "partition", "." ]
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#L24758-L24760
train
Enables backup of the specified partition.
[ 30522, 13366, 9585, 1035, 13571, 1035, 10200, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 13571, 1035, 8909, 1010, 9585, 1035, 10200, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 9585, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/network_interface_load_balancers.rb
Azure::Network::Mgmt::V2018_07_01.NetworkInterfaceLoadBalancers.list
def list(resource_group_name, network_interface_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list(resource_group_name, network_interface_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list", "(", "resource_group_name", ",", "network_interface_name", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_as_lazy", "(", "resource_group_name", ",", "network_interface_name", ",", "custom_headers", ":custom_headers", ")", "first_page", "...
List all load balancers in a network interface. @param resource_group_name [String] The name of the resource group. @param network_interface_name [String] The name of the network interface. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<LoadBalancer>] operation results.
[ "List", "all", "load", "balancers", "in", "a", "network", "interface", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/network_interface_load_balancers.rb#L34-L37
train
Gets all the network interface segmentation rules.
[ 30522, 13366, 2862, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 8278, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster.rb
Aws::RDS.DBCluster.create
def create(options = {}) options = options.merge(db_cluster_identifier: @id) resp = @client.create_db_cluster(options) DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end
ruby
def create(options = {}) options = options.merge(db_cluster_identifier: @id) resp = @client.create_db_cluster(options) DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end
[ "def", "create", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_cluster_identifier", ":", "@id", ")", "resp", "=", "@client", ".", "create_db_cluster", "(", "options", ")", "DBCluster", ".", "new", "(", "id", ":", ...
@!group Actions @example Request syntax with placeholder values dbcluster = db_cluster.create({ availability_zones: ["String"], backup_retention_period: 1, character_set_name: "String", database_name: "String", db_cluster_parameter_group_name: "String", vpc_security_group_ids: ["String"], db_subnet_group_name: "String", engine: "String", # required engine_version: "String", port: 1, master_username: "String", master_user_password: "String", option_group_name: "String", preferred_backup_window: "String", preferred_maintenance_window: "String", replication_source_identifier: "String", tags: [ { key: "String", value: "String", }, ], storage_encrypted: false, kms_key_id: "String", pre_signed_url: "String", enable_iam_database_authentication: false, backtrack_window: 1, enable_cloudwatch_logs_exports: ["String"], engine_mode: "String", scaling_configuration: { min_capacity: 1, max_capacity: 1, auto_pause: false, seconds_until_auto_pause: 1, timeout_action: "String", }, deletion_protection: false, global_cluster_identifier: "String", copy_tags_to_snapshot: false, source_region: "String", }) @param [Hash] options ({}) @option options [Array<String>] :availability_zones A list of EC2 Availability Zones that instances in the DB cluster can be created in. For information on AWS Regions and Availability Zones, see [Choosing the Regions and Availability Zones][1] in the *Amazon Aurora User Guide*. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html @option options [Integer] :backup_retention_period The number of days for which automated backups are retained. You must specify a minimum value of 1. Default: 1 Constraints: * Must be a value from 1 to 35 ^ @option options [String] :character_set_name A value that indicates that the DB cluster should be associated with the specified CharacterSet. @option options [String] :database_name The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating. @option options [String] :db_cluster_parameter_group_name The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, `default.aurora5.6` is used. Constraints: * If supplied, must match the name of an existing DB cluster parameter group. ^ @option options [Array<String>] :vpc_security_group_ids A list of EC2 VPC security groups to associate with this DB cluster. @option options [String] :db_subnet_group_name A DB subnet group to associate with this DB cluster. Constraints: Must match the name of an existing DBSubnetGroup. Must not be default. Example: `mySubnetgroup` @option options [required, String] :engine The name of the database engine to be used for this DB cluster. Valid Values: `aurora` (for MySQL 5.6-compatible Aurora), `aurora-mysql` (for MySQL 5.7-compatible Aurora), and `aurora-postgresql` @option options [String] :engine_version The version number of the database engine to use. **Aurora MySQL** Example: `5.6.10a`, `5.7.12` **Aurora PostgreSQL** Example: `9.6.3` @option options [Integer] :port The port number on which the instances in the DB cluster accept connections. Default: `3306` if engine is set as aurora or `5432` if set to aurora-postgresql. @option options [String] :master_username The name of the master user for the DB cluster. Constraints: * Must be 1 to 16 letters or numbers. * First character must be a letter. * Can't be a reserved word for the chosen database engine. @option options [String] :master_user_password The password for the master database user. This password can contain any printable ASCII character except "/", """, or "@". Constraints: Must contain from 8 to 41 characters. @option options [String] :option_group_name A value that indicates that the DB cluster should be associated with the specified option group. Permanent options can't be removed from an option group. The option group can't be removed from a DB cluster once it is associated with a DB cluster. @option options [String] :preferred_backup_window The daily time range during which automated backups are created if automated backups are enabled using the `BackupRetentionPeriod` parameter. The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see [ Adjusting the Preferred DB Cluster Maintenance Window][1] in the *Amazon Aurora User Guide.* Constraints: * Must be in the format `hh24:mi-hh24:mi`. * Must be in Universal Coordinated Time (UTC). * Must not conflict with the preferred maintenance window. * Must be at least 30 minutes. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora @option options [String] :preferred_maintenance_window The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). Format: `ddd:hh24:mi-ddd:hh24:mi` The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see [ Adjusting the Preferred DB Cluster Maintenance Window][1] in the *Amazon Aurora User Guide.* Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Constraints: Minimum 30-minute window. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora @option options [String] :replication_source_identifier The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica. @option options [Array<Types::Tag>] :tags A list of tags. For more information, see [Tagging Amazon RDS Resources][1] in the *Amazon RDS User Guide.* [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html @option options [Boolean] :storage_encrypted Specifies whether the DB cluster is encrypted. @option options [String] :kms_key_id The AWS KMS key identifier for an encrypted DB cluster. The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key. If an encryption key is not specified in `KmsKeyId`\: * If `ReplicationSourceIdentifier` identifies an encrypted source, then Amazon RDS will use the encryption key used to encrypt the source. Otherwise, Amazon RDS will use your default encryption key. * If the `StorageEncrypted` parameter is true and `ReplicationSourceIdentifier` is not specified, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region. If you create a Read Replica of an encrypted DB cluster in another AWS Region, you must set `KmsKeyId` to a KMS key ID that is valid in the destination AWS Region. This key is used to encrypt the Read Replica in that AWS Region. @option options [String] :pre_signed_url A URL that contains a Signature Version 4 signed request for the `CreateDBCluster` action to be called in the source AWS Region where the DB cluster is replicated from. You only need to specify `PreSignedUrl` when you are performing cross-region replication from an encrypted DB cluster. The pre-signed URL must be a valid request for the `CreateDBCluster` API action that can be executed in the source AWS Region that contains the encrypted DB cluster to be copied. The pre-signed URL request must contain the following parameter values: * `KmsKeyId` - The AWS KMS key identifier for the key to use to encrypt the copy of the DB cluster in the destination AWS Region. This should refer to the same KMS key for both the `CreateDBCluster` action that is called in the destination AWS Region, and the action contained in the pre-signed URL. * `DestinationRegion` - The name of the AWS Region that Aurora Read Replica will be created in. * `ReplicationSourceIdentifier` - The DB cluster identifier for the encrypted DB cluster to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source AWS Region. For example, if you are copying an encrypted DB cluster from the us-west-2 AWS Region, then your `ReplicationSourceIdentifier` would look like Example: `arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1`. To learn how to generate a Signature Version 4 signed request, see [ Authenticating Requests: Using Query Parameters (AWS Signature Version 4)][1] and [ Signature Version 4 Signing Process][2]. [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html [2]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html @option options [Boolean] :enable_iam_database_authentication True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false. Default: `false` @option options [Integer] :backtrack_window The target backtrack window, in seconds. To disable backtracking, set this value to 0. Default: 0 Constraints: * If specified, this value must be set to a number from 0 to 259,200 (72 hours). ^ @option options [Array<String>] :enable_cloudwatch_logs_exports The list of log types that need to be enabled for exporting to CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, see [Publishing Database Logs to Amazon CloudWatch Logs][1] in the *Amazon Aurora User Guide*. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch @option options [String] :engine_mode The DB engine mode of the DB cluster, either `provisioned`, `serverless`, `parallelquery`, or `global`. @option options [Types::ScalingConfiguration] :scaling_configuration For DB clusters in `serverless` DB engine mode, the scaling properties of the DB cluster. @option options [Boolean] :deletion_protection Indicates if the DB cluster should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false. @option options [String] :global_cluster_identifier The global cluster ID of an Aurora cluster that becomes the primary cluster in the new global database cluster. @option options [Boolean] :copy_tags_to_snapshot True to copy all tags from the DB cluster to snapshots of the DB cluster, and otherwise false. The default is false. @option options [String] :destination_region @option options [String] :source_region The source region of the snapshot. This is only needed when the shapshot is encrypted and in a different region. @return [DBCluster]
[ "@!group", "Actions", "@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_cluster.rb#L825-L833
train
Create a new cluster
[ 30522, 13366, 3443, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 16962, 1035, 9324, 1035, 8909, 4765, 18095, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 16962, 1035, 9324, 1006, 7047,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb
Azure::StreamAnalytics::Mgmt::V2016_03_01.Outputs.get_with_http_info
def get_with_http_info(resource_group_name, job_name, output_name, custom_headers:nil) get_async(resource_group_name, job_name, output_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, job_name, output_name, custom_headers:nil) get_async(resource_group_name, job_name, output_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "job_name", ",", "output_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "job_name", ",", "output_name", ",", "custom_headers", ":custom_headers", ")", ".", "v...
Gets details about the specified output. @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 job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "details", "about", "the", "specified", "output", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb#L436-L438
train
Gets the specified output s index.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 6434, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 2004, 6038, 2278, 1006, 7692, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/gists.rb
Github.Client::Gists.get
def get(*args) arguments(args, required: [:id]) if (sha = arguments.params.delete('sha')) get_request("/gists/#{arguments.id}/#{sha}") else get_request("/gists/#{arguments.id}", arguments.params) end end
ruby
def get(*args) arguments(args, required: [:id]) if (sha = arguments.params.delete('sha')) get_request("/gists/#{arguments.id}/#{sha}") else get_request("/gists/#{arguments.id}", arguments.params) end end
[ "def", "get", "(", "*", "args", ")", "arguments", "(", "args", ",", "required", ":", "[", ":id", "]", ")", "if", "(", "sha", "=", "arguments", ".", "params", ".", "delete", "(", "'sha'", ")", ")", "get_request", "(", "\"/gists/#{arguments.id}/#{sha}\"", ...
Get a single gist @see https://developer.github.com/v3/gists/#get-a-single-gist @example github = Github.new github.gists.get 'gist-id' Get a specific revision of gist @see https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist @example github = Github.new github.gists.get 'gist-id', sha: ' @return [Hash] @api public
[ "Get", "a", "single", "gist" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/gists.rb#L90-L98
train
Get a single Gist
[ 30522, 13366, 2131, 1006, 1008, 12098, 5620, 1007, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 8909, 1033, 1007, 2065, 1006, 21146, 1027, 9918, 1012, 11498, 5244, 1012, 3972, 12870, 1006, 1005, 21146, 1005, 1007, 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...
Fullscreen/yt
lib/yt/request.rb
Yt.Request.set_request_body!
def set_request_body!(request) case @request_format when :json then request.body = (camelize_keys! @body).to_json when :form then request.set_form_data @body when :file then request.body_stream = @body end if @body end
ruby
def set_request_body!(request) case @request_format when :json then request.body = (camelize_keys! @body).to_json when :form then request.set_form_data @body when :file then request.body_stream = @body end if @body end
[ "def", "set_request_body!", "(", "request", ")", "case", "@request_format", "when", ":json", "then", "request", ".", "body", "=", "(", "camelize_keys!", "@body", ")", ".", "to_json", "when", ":form", "then", "request", ".", "set_form_data", "@body", "when", ":...
Adds the request body to the request in the appropriate format. if the request body is a JSON Object, transform its keys into camel-case, since this is the common format for JSON APIs.
[ "Adds", "the", "request", "body", "to", "the", "request", "in", "the", "appropriate", "format", ".", "if", "the", "request", "body", "is", "a", "JSON", "Object", "transform", "its", "keys", "into", "camel", "-", "case", "since", "this", "is", "the", "com...
bf5c33b977cb162bb7735ad5b80d1abdb5a38215
https://github.com/Fullscreen/yt/blob/bf5c33b977cb162bb7735ad5b80d1abdb5a38215/lib/yt/request.rb#L120-L126
train
Set the request body for the request
[ 30522, 13366, 2275, 1035, 5227, 1035, 2303, 999, 1006, 5227, 1007, 2553, 1030, 5227, 1035, 4289, 2043, 1024, 1046, 3385, 2059, 5227, 1012, 2303, 1027, 1006, 19130, 4697, 1035, 6309, 999, 1030, 2303, 1007, 1012, 2000, 1035, 1046, 3385, 204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_untagged_images_with_http_info
def get_untagged_images_with_http_info(project_id, iteration_id:nil, order_by:nil, take:50, skip:0, custom_headers:nil) get_untagged_images_async(project_id, iteration_id:iteration_id, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value! end
ruby
def get_untagged_images_with_http_info(project_id, iteration_id:nil, order_by:nil, take:50, skip:0, custom_headers:nil) get_untagged_images_async(project_id, iteration_id:iteration_id, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value! end
[ "def", "get_untagged_images_with_http_info", "(", "project_id", ",", "iteration_id", ":", "nil", ",", "order_by", ":", "nil", ",", "take", ":", "50", ",", "skip", ":", "0", ",", "custom_headers", ":", "nil", ")", "get_untagged_images_async", "(", "project_id", ...
Get untagged images for a given project iteration. This API supports batching and range selection. By default it will only return first 50 images matching images. Use the {take} and {skip} parameters to control how many images to return in a given batch. @param project_id The project id. @param iteration_id The iteration id. Defaults to workspace. @param order_by [Enum] The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest' @param take [Integer] Maximum number of images to return. Defaults to 50, limited to 256. @param skip [Integer] Number of images to skip before beginning the image batch. Defaults to 0. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "untagged", "images", "for", "a", "given", "project", "iteration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L1138-L1140
train
Gets the untagged images for a project.
[ 30522, 13366, 2131, 1035, 4895, 15900, 5999, 1035, 4871, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2622, 1035, 8909, 1010, 27758, 1035, 8909, 1024, 9152, 2140, 1010, 2344, 1035, 2011, 1024, 9152, 2140, 1010, 2202, 1024, 2753, 1010, 13558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/instance.rb
Aws::EC2.Instance.detach_volume
def detach_volume(options = {}) options = options.merge(instance_id: @id) resp = @client.detach_volume(options) resp.data end
ruby
def detach_volume(options = {}) options = options.merge(instance_id: @id) resp = @client.detach_volume(options) resp.data end
[ "def", "detach_volume", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "instance_id", ":", "@id", ")", "resp", "=", "@client", ".", "detach_volume", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values instance.detach_volume({ device: "String", force: false, volume_id: "String", # required dry_run: false, }) @param [Hash] options ({}) @option options [String] :device The device name. @option options [Boolean] :force Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. @option options [required, String] :volume_id The ID of the volume. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @return [Types::VolumeAttachment]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L780-L784
train
Detaches the volume from the instance.
[ 30522, 13366, 20010, 6776, 1035, 3872, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 6013, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 20010, 6776, 1035, 3872, 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...
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.delete_page_cell
def delete_page_cell(location_id, page_id, opts = {}) data, _status_code, _headers = delete_page_cell_with_http_info(location_id, page_id, opts) return data end
ruby
def delete_page_cell(location_id, page_id, opts = {}) data, _status_code, _headers = delete_page_cell_with_http_info(location_id, page_id, opts) return data end
[ "def", "delete_page_cell", "(", "location_id", ",", "page_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "delete_page_cell_with_http_info", "(", "location_id", ",", "page_id", ",", "opts", ")", "return", "data", "end" ...
DeletePageCell Deletes a cell from a Favorites page in Square Register. *Note**: DeletePageCell returns nothing on success but Connect SDKs map the empty response to an empty `V1DeletePageCellRequest` object as documented below. @param location_id The ID of the Favorites page&#39;s associated location. @param page_id The ID of the page to delete. @param [Hash] opts the optional parameters @option opts [String] :row The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row. @option opts [String] :column The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column. @return [V1Page]
[ "DeletePageCell", "Deletes", "a", "cell", "from", "a", "Favorites", "page", "in", "Square", "Register", ".", "*", "Note", "**", ":", "DeletePageCell", "returns", "nothing", "on", "success", "but", "Connect", "SDKs", "map", "the", "empty", "response", "to", "...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1114-L1117
train
Delete a page cell
[ 30522, 13366, 3972, 12870, 1035, 3931, 1035, 3526, 1006, 3295, 1035, 8909, 1010, 3931, 1035, 8909, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 3972, 12870, 1035, 3931, 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...
decidim/decidim
decidim-core/app/helpers/decidim/layout_helper.rb
Decidim.LayoutHelper.external_icon
def external_icon(path, options = {}) classes = _icon_classes(options) + ["external-icon"] if path.split(".").last == "svg" asset = Rails.application.assets_manifest.find_sources(path).first asset.gsub("<svg ", "<svg class=\"#{classes.join(" ")}\" ").html_safe else image_tag(path, class: classes.join(" "), style: "display: none") end end
ruby
def external_icon(path, options = {}) classes = _icon_classes(options) + ["external-icon"] if path.split(".").last == "svg" asset = Rails.application.assets_manifest.find_sources(path).first asset.gsub("<svg ", "<svg class=\"#{classes.join(" ")}\" ").html_safe else image_tag(path, class: classes.join(" "), style: "display: none") end end
[ "def", "external_icon", "(", "path", ",", "options", "=", "{", "}", ")", "classes", "=", "_icon_classes", "(", "options", ")", "+", "[", "\"external-icon\"", "]", "if", "path", ".", "split", "(", "\".\"", ")", ".", "last", "==", "\"svg\"", "asset", "="...
Outputs a SVG icon from an external file. It apparently renders an image tag, but then a JS script kicks in and replaces it with an inlined SVG version. path - The asset's path Returns an <img /> tag with the SVG icon.
[ "Outputs", "a", "SVG", "icon", "from", "an", "external", "file", ".", "It", "apparently", "renders", "an", "image", "tag", "but", "then", "a", "JS", "script", "kicks", "in", "and", "replaces", "it", "with", "an", "inlined", "SVG", "version", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/layout_helper.rb#L53-L62
train
Returns an external icon for the given path.
[ 30522, 13366, 6327, 1035, 12696, 1006, 4130, 1010, 7047, 1027, 1063, 1065, 1007, 4280, 1027, 1035, 12696, 1035, 4280, 1006, 7047, 1007, 1009, 1031, 1000, 6327, 1011, 12696, 1000, 1033, 2065, 4130, 1012, 3975, 1006, 1000, 1012, 1000, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/bolt
lib/bolt/inventory.rb
Bolt.Inventory.resolve_name
def resolve_name(target) if (group = @group_lookup[target]) group.node_names else # Try to wildcard match nodes in inventory # Ignore case because hostnames are generally case-insensitive regexp = Regexp.new("^#{Regexp.escape(target).gsub('\*', '.*?')}$", Regexp::IGNORECASE) nodes = @groups.node_names.select { |node| node =~ regexp } nodes += @groups.node_aliases.select { |target_alias, _node| target_alias =~ regexp }.values if nodes.empty? raise(WildcardError, target) if target.include?('*') [target] else nodes end end end
ruby
def resolve_name(target) if (group = @group_lookup[target]) group.node_names else # Try to wildcard match nodes in inventory # Ignore case because hostnames are generally case-insensitive regexp = Regexp.new("^#{Regexp.escape(target).gsub('\*', '.*?')}$", Regexp::IGNORECASE) nodes = @groups.node_names.select { |node| node =~ regexp } nodes += @groups.node_aliases.select { |target_alias, _node| target_alias =~ regexp }.values if nodes.empty? raise(WildcardError, target) if target.include?('*') [target] else nodes end end end
[ "def", "resolve_name", "(", "target", ")", "if", "(", "group", "=", "@group_lookup", "[", "target", "]", ")", "group", ".", "node_names", "else", "# Try to wildcard match nodes in inventory", "# Ignore case because hostnames are generally case-insensitive", "regexp", "=", ...
If target is a group name, expand it to the members of that group. Else match against nodes in inventory by name or alias. If a wildcard string, error if no matches are found. Else fall back to [target] if no matches are found.
[ "If", "target", "is", "a", "group", "name", "expand", "it", "to", "the", "members", "of", "that", "group", ".", "Else", "match", "against", "nodes", "in", "inventory", "by", "name", "or", "alias", ".", "If", "a", "wildcard", "string", "error", "if", "n...
50689a33699939d262ea7c822a4b24fd8c4f8d8a
https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/inventory.rb#L232-L250
train
Returns the node names of the target
[ 30522, 13366, 10663, 1035, 2171, 1006, 4539, 1007, 2065, 1006, 2177, 1027, 1030, 2177, 1035, 2298, 6279, 1031, 4539, 1033, 1007, 2177, 1012, 13045, 1035, 3415, 2842, 1001, 3046, 2000, 3748, 11522, 2674, 14164, 1999, 12612, 1001, 8568, 2553,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
actionpack/lib/action_controller/metal/data_streaming.rb
ActionController.DataStreaming.send_file
def send_file(path, options = {}) #:doc: raise MissingFile, "Cannot read file #{path}" unless File.file?(path) && File.readable?(path) options[:filename] ||= File.basename(path) unless options[:url_based_filename] send_file_headers! options self.status = options[:status] || 200 self.content_type = options[:content_type] if options.key?(:content_type) response.send_file path end
ruby
def send_file(path, options = {}) #:doc: raise MissingFile, "Cannot read file #{path}" unless File.file?(path) && File.readable?(path) options[:filename] ||= File.basename(path) unless options[:url_based_filename] send_file_headers! options self.status = options[:status] || 200 self.content_type = options[:content_type] if options.key?(:content_type) response.send_file path end
[ "def", "send_file", "(", "path", ",", "options", "=", "{", "}", ")", "#:doc:", "raise", "MissingFile", ",", "\"Cannot read file #{path}\"", "unless", "File", ".", "file?", "(", "path", ")", "&&", "File", ".", "readable?", "(", "path", ")", "options", "[", ...
Sends the file. This uses a server-appropriate method (such as X-Sendfile) via the Rack::Sendfile middleware. The header to use is set via +config.action_dispatch.x_sendfile_header+. Your server can also configure this for you by setting the X-Sendfile-Type header. Be careful to sanitize the path parameter if it is coming from a web page. <tt>send_file(params[:path])</tt> allows a malicious user to download any file on your server. Options: * <tt>:filename</tt> - suggests a filename for the browser to use. Defaults to <tt>File.basename(path)</tt>. * <tt>:type</tt> - specifies an HTTP content type. You can specify either a string or a symbol for a registered type with <tt>Mime::Type.register</tt>, for example :json. If omitted, the type will be inferred from the file extension specified in <tt>:filename</tt>. If no content type is registered for the extension, the default type 'application/octet-stream' will be used. * <tt>:disposition</tt> - specifies whether the file will be shown inline or downloaded. Valid values are 'inline' and 'attachment' (default). * <tt>:status</tt> - specifies the status code to send with the response. Defaults to 200. * <tt>:url_based_filename</tt> - set to +true+ if you want the browser to guess the filename from the URL, which is necessary for i18n filenames on certain browsers (setting <tt>:filename</tt> overrides this option). The default Content-Type and Content-Disposition headers are set to download arbitrary binary files in as many browsers as possible. IE versions 4, 5, 5.5, and 6 are all known to have a variety of quirks (especially when downloading over SSL). Simple download: send_file '/path/to.zip' Show a JPEG in the browser: send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' Show a 404 page in the browser: send_file '/path/to/404.html', type: 'text/html; charset=utf-8', status: 404 Read about the other Content-* HTTP headers if you'd like to provide the user with more information (such as Content-Description) in https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11. Also be aware that the document may be cached by proxies and browsers. The Pragma and Cache-Control headers declare how the file may be cached by intermediaries. They default to require clients to validate with the server before releasing cached responses. See https://www.mnot.net/cache_docs/ for an overview of web caching and https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 for the Cache-Control header spec.
[ "Sends", "the", "file", ".", "This", "uses", "a", "server", "-", "appropriate", "method", "(", "such", "as", "X", "-", "Sendfile", ")", "via", "the", "Rack", "::", "Sendfile", "middleware", ".", "The", "header", "to", "use", "is", "set", "via", "+", ...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/data_streaming.rb#L69-L78
train
Sends a file to the client
[ 30522, 13366, 4604, 1035, 5371, 1006, 4130, 1010, 7047, 1027, 1063, 1065, 1007, 1001, 1024, 9986, 1024, 5333, 4394, 8873, 2571, 1010, 1000, 3685, 3191, 5371, 1001, 1063, 4130, 1065, 1000, 4983, 5371, 1012, 5371, 1029, 1006, 4130, 1007, 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...
sunspot/sunspot
sunspot/lib/sunspot/schema.rb
Sunspot.Schema.variant_combinations
def variant_combinations combinations = [] 0.upto(2 ** FIELD_VARIANTS.length - 1) do |b| combinations << combination = [] FIELD_VARIANTS.each_with_index do |variant, i| combination << variant if b & 1<<i > 0 end end combinations end
ruby
def variant_combinations combinations = [] 0.upto(2 ** FIELD_VARIANTS.length - 1) do |b| combinations << combination = [] FIELD_VARIANTS.each_with_index do |variant, i| combination << variant if b & 1<<i > 0 end end combinations end
[ "def", "variant_combinations", "combinations", "=", "[", "]", "0", ".", "upto", "(", "2", "**", "FIELD_VARIANTS", ".", "length", "-", "1", ")", "do", "|", "b", "|", "combinations", "<<", "combination", "=", "[", "]", "FIELD_VARIANTS", ".", "each_with_index...
All of the possible combinations of variants
[ "All", "of", "the", "possible", "combinations", "of", "variants" ]
31dd76cd7a14a4ef7bd541de97483d8cd72ff685
https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/schema.rb#L108-L117
train
Returns the combinations of the variants of the variant.
[ 30522, 13366, 8349, 1035, 14930, 14930, 1027, 1031, 1033, 1014, 1012, 2039, 3406, 1006, 1016, 1008, 1008, 2492, 1035, 10176, 1012, 3091, 1011, 1015, 1007, 2079, 1064, 1038, 1064, 14930, 1026, 1026, 5257, 1027, 1031, 1033, 2492, 1035, 10176,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb
Azure::Compute::Mgmt::V2018_09_30.Disks.begin_create_or_update
def begin_create_or_update(resource_group_name, disk_name, disk, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create_or_update(resource_group_name, disk_name, disk, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create_or_update", "(", "resource_group_name", ",", "disk_name", ",", "disk", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "disk_name", ",", "disk", ",", "custom_headers", ":cus...
Creates or updates a disk. @param resource_group_name [String] The name of the resource group. @param disk_name [String] The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @param disk [Disk] Disk object supplied in the body of the Put disk operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Disk] operation results.
[ "Creates", "or", "updates", "a", "disk", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb#L542-L545
train
Creates or updates a disk in a resource group.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9785, 1035, 2171, 1010, 9785, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 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...
kaminari/kaminari
kaminari-core/lib/kaminari/models/array_extension.rb
Kaminari.PaginatableArray.entry_name
def entry_name(options = {}) I18n.t('helpers.page_entries_info.entry', options.reverse_merge(default: ENTRY.pluralize(options[:count]))) end
ruby
def entry_name(options = {}) I18n.t('helpers.page_entries_info.entry', options.reverse_merge(default: ENTRY.pluralize(options[:count]))) end
[ "def", "entry_name", "(", "options", "=", "{", "}", ")", "I18n", ".", "t", "(", "'helpers.page_entries_info.entry'", ",", "options", ".", "reverse_merge", "(", "default", ":", "ENTRY", ".", "pluralize", "(", "options", "[", ":count", "]", ")", ")", ")", ...
==== Options * <tt>:limit</tt> - limit * <tt>:offset</tt> - offset * <tt>:total_count</tt> - total_count * <tt>:padding</tt> - padding Used for page_entry_info
[ "====", "Options", "*", "<tt", ">", ":", "limit<", "/", "tt", ">", "-", "limit", "*", "<tt", ">", ":", "offset<", "/", "tt", ">", "-", "offset", "*", "<tt", ">", ":", "total_count<", "/", "tt", ">", "-", "total_count", "*", "<tt", ">", ":", "pa...
e2078ce46b145b811423dc8b5993e4bc87dc88b8
https://github.com/kaminari/kaminari/blob/e2078ce46b145b811423dc8b5993e4bc87dc88b8/kaminari-core/lib/kaminari/models/array_extension.rb#L37-L39
train
Returns the name of the entry
[ 30522, 13366, 4443, 1035, 2171, 1006, 7047, 1027, 1063, 1065, 1007, 1045, 15136, 2078, 1012, 1056, 1006, 1005, 2393, 2545, 1012, 3931, 1035, 10445, 1035, 18558, 1012, 4443, 1005, 1010, 7047, 1012, 7901, 1035, 13590, 1006, 12398, 1024, 4443,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
geokit/geokit-rails
lib/geokit-rails/ip_geocode_lookup.rb
Geokit.IpGeocodeLookup.retrieve_location_from_cookie_or_service
def retrieve_location_from_cookie_or_service return GeoLoc.new(YAML.load(cookies[:geo_location])) if cookies[:geo_location] location = Geocoders::MultiGeocoder.geocode(get_ip_address) return location.success ? location : nil end
ruby
def retrieve_location_from_cookie_or_service return GeoLoc.new(YAML.load(cookies[:geo_location])) if cookies[:geo_location] location = Geocoders::MultiGeocoder.geocode(get_ip_address) return location.success ? location : nil end
[ "def", "retrieve_location_from_cookie_or_service", "return", "GeoLoc", ".", "new", "(", "YAML", ".", "load", "(", "cookies", "[", ":geo_location", "]", ")", ")", "if", "cookies", "[", ":geo_location", "]", "location", "=", "Geocoders", "::", "MultiGeocoder", "."...
Uses the stored location value from the cookie if it exists. If no cookie exists, calls out to the web service to get the location.
[ "Uses", "the", "stored", "location", "value", "from", "the", "cookie", "if", "it", "exists", ".", "If", "no", "cookie", "exists", "calls", "out", "to", "the", "web", "service", "to", "get", "the", "location", "." ]
cc5fd43ab4e69878fb31ebd1fc22918e2952b560
https://github.com/geokit/geokit-rails/blob/cc5fd43ab4e69878fb31ebd1fc22918e2952b560/lib/geokit-rails/ip_geocode_lookup.rb#L36-L40
train
Returns the location from the cookie or service
[ 30522, 13366, 12850, 1035, 3295, 1035, 2013, 1035, 17387, 1035, 2030, 1035, 2326, 2709, 20248, 4135, 2278, 1012, 2047, 1006, 8038, 19968, 1012, 7170, 1006, 16324, 1031, 1024, 20248, 1035, 3295, 1033, 1007, 1007, 2065, 16324, 1031, 1024, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/haml-lint
lib/haml_lint/utils.rb
HamlLint.Utils.for_consecutive_items
def for_consecutive_items(items, satisfies, min_consecutive = 2) current_index = -1 while (current_index += 1) < items.count next unless satisfies[items[current_index]] count = count_consecutive(items, current_index, &satisfies) next unless count >= min_consecutive # Yield the chunk of consecutive items yield items[current_index...(current_index + count)] current_index += count # Skip this patch of consecutive items to find more end end
ruby
def for_consecutive_items(items, satisfies, min_consecutive = 2) current_index = -1 while (current_index += 1) < items.count next unless satisfies[items[current_index]] count = count_consecutive(items, current_index, &satisfies) next unless count >= min_consecutive # Yield the chunk of consecutive items yield items[current_index...(current_index + count)] current_index += count # Skip this patch of consecutive items to find more end end
[ "def", "for_consecutive_items", "(", "items", ",", "satisfies", ",", "min_consecutive", "=", "2", ")", "current_index", "=", "-", "1", "while", "(", "current_index", "+=", "1", ")", "<", "items", ".", "count", "next", "unless", "satisfies", "[", "items", "...
Find all consecutive items satisfying the given block of a minimum size, yielding each group of consecutive items to the provided block. @param items [Array] @param satisfies [Proc] function that takes an item and returns true/false @param min_consecutive [Fixnum] minimum number of consecutive items before yielding the group @yield Passes list of consecutive items all matching the criteria defined by the `satisfies` {Proc} to the provided block @yieldparam group [Array] List of consecutive items @yieldreturn [Boolean] block should return whether item matches criteria for inclusion
[ "Find", "all", "consecutive", "items", "satisfying", "the", "given", "block", "of", "a", "minimum", "size", "yielding", "each", "group", "of", "consecutive", "items", "to", "the", "provided", "block", "." ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/utils.rb#L108-L122
train
Yields the chunk of consecutive items that satisfy the given list of items.
[ 30522, 13366, 2005, 1035, 5486, 1035, 5167, 1006, 5167, 1010, 2938, 2483, 14213, 1010, 8117, 1035, 5486, 1027, 1016, 1007, 2783, 1035, 5950, 1027, 1011, 1015, 2096, 1006, 2783, 1035, 5950, 1009, 1027, 1015, 1007, 1026, 5167, 1012, 4175, 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...
aws/aws-sdk-ruby
gems/aws-sdk-iam/lib/aws-sdk-iam/resource.rb
Aws::IAM.Resource.create_role
def create_role(options = {}) resp = @client.create_role(options) Role.new( name: options[:role_name], data: resp.data.role, client: @client ) end
ruby
def create_role(options = {}) resp = @client.create_role(options) Role.new( name: options[:role_name], data: resp.data.role, client: @client ) end
[ "def", "create_role", "(", "options", "=", "{", "}", ")", "resp", "=", "@client", ".", "create_role", "(", "options", ")", "Role", ".", "new", "(", "name", ":", "options", "[", ":role_name", "]", ",", "data", ":", "resp", ".", "data", ".", "role", ...
@example Request syntax with placeholder values role = iam.create_role({ path: "pathType", role_name: "roleNameType", # required assume_role_policy_document: "policyDocumentType", # required description: "roleDescriptionType", max_session_duration: 1, permissions_boundary: "arnType", tags: [ { key: "tagKeyType", # required value: "tagValueType", # required }, ], }) @param [Hash] options ({}) @option options [String] :path The path to the role. For more information about paths, see [IAM Identifiers][1] in the *IAM User Guide*. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its [regex pattern][2]) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\\u0021) through the DEL character (\\u007F), including most punctuation characters, digits, and upper and lowercased letters. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html [2]: http://wikipedia.org/wiki/regex @option options [required, String] :role_name The name of the role to create. This parameter allows (through its [regex pattern][1]) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \_+=,.@- Role names are not distinguished by case. For example, you cannot create roles named both "PRODROLE" and "prodrole". [1]: http://wikipedia.org/wiki/regex @option options [required, String] :assume_role_policy_document The trust relationship policy document that grants an entity permission to assume the role. The [regex pattern][1] used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \\u00FF) * The special characters tab (\\u0009), line feed (\\u000A), and carriage return (\\u000D) [1]: http://wikipedia.org/wiki/regex @option options [String] :description A description of the role. @option options [Integer] :max_session_duration The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the AWS CLI or API can use the `DurationSeconds` API parameter or the `duration-seconds` CLI parameter to request a longer session. The `MaxSessionDuration` setting determines the maximum duration that can be requested using the `DurationSeconds` parameter. If users don't specify a value for the `DurationSeconds` parameter, their security credentials are valid for one hour by default. This applies when you use the `AssumeRole*` API operations or the `assume-role*` CLI operations but does not apply when you use those operations to create a console URL. For more information, see [Using IAM Roles][1] in the *IAM User Guide*. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html @option options [String] :permissions_boundary The ARN of the policy that is used to set the permissions boundary for the role. @option options [Array<Types::Tag>] :tags A list of tags that you want to attach to the newly created role. Each tag consists of a key name and an associated value. For more information about tagging, see [Tagging IAM Identities][1] in the *IAM User Guide*. <note markdown="1"> If any one of the tags is invalid or if you exceed the allowed number of tags per role, then the entire request fails and the role is not created. </note> [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html @return [Role]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/resource.rb#L449-L456
train
Create a role
[ 30522, 13366, 3443, 1035, 2535, 1006, 7047, 1027, 1063, 1065, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 2535, 1006, 7047, 1007, 2535, 1012, 2047, 1006, 2171, 1024, 7047, 1031, 1024, 2535, 1035, 2171, 1033, 1010, 2951, 1024, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongoid
lib/mongoid/validatable.rb
Mongoid.Validatable.read_attribute_for_validation
def read_attribute_for_validation(attr) attribute = database_field_name(attr) if relations.key?(attribute) begin_validate relation = without_autobuild { send(attr) } exit_validate relation.do_or_do_not(:in_memory) || relation elsif fields[attribute].try(:localized?) attributes[attribute] else send(attr) end end
ruby
def read_attribute_for_validation(attr) attribute = database_field_name(attr) if relations.key?(attribute) begin_validate relation = without_autobuild { send(attr) } exit_validate relation.do_or_do_not(:in_memory) || relation elsif fields[attribute].try(:localized?) attributes[attribute] else send(attr) end end
[ "def", "read_attribute_for_validation", "(", "attr", ")", "attribute", "=", "database_field_name", "(", "attr", ")", "if", "relations", ".", "key?", "(", "attribute", ")", "begin_validate", "relation", "=", "without_autobuild", "{", "send", "(", "attr", ")", "}"...
Overrides the default ActiveModel behavior since we need to handle validations of associations slightly different than just calling the getter. @example Read the value. person.read_attribute_for_validation(:addresses) @param [ Symbol ] attr The name of the field or association. @return [ Object ] The value of the field or the association. @since 2.0.0.rc.1
[ "Overrides", "the", "default", "ActiveModel", "behavior", "since", "we", "need", "to", "handle", "validations", "of", "associations", "slightly", "different", "than", "just", "calling", "the", "getter", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/validatable.rb#L70-L82
train
Read the attribute for validation
[ 30522, 13366, 3191, 1035, 17961, 1035, 2005, 1035, 27354, 1006, 2012, 16344, 1007, 17961, 1027, 7809, 1035, 2492, 1035, 2171, 1006, 2012, 16344, 1007, 2065, 4262, 1012, 3145, 1029, 1006, 17961, 1007, 4088, 1035, 9398, 3686, 7189, 1027, 2302...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.octet_string_to_principal
def octet_string_to_principal(bytes) if !bytes || !bytes.respond_to?('pack') || bytes.empty? raise Puppet::Util::Windows::Error.new(_("Octet string must be an array of bytes")) end Principal.lookup_account_sid(bytes) end
ruby
def octet_string_to_principal(bytes) if !bytes || !bytes.respond_to?('pack') || bytes.empty? raise Puppet::Util::Windows::Error.new(_("Octet string must be an array of bytes")) end Principal.lookup_account_sid(bytes) end
[ "def", "octet_string_to_principal", "(", "bytes", ")", "if", "!", "bytes", "||", "!", "bytes", ".", "respond_to?", "(", "'pack'", ")", "||", "bytes", ".", "empty?", "raise", "Puppet", "::", "Util", "::", "Windows", "::", "Error", ".", "new", "(", "_", ...
Converts an octet string array of bytes to a SID::Principal object, e.g. [1, 1, 0, 0, 0, 0, 0, 5, 18, 0, 0, 0] is the representation for S-1-5-18, the local 'SYSTEM' account. Raises an Error for nil or non-array input. This method returns a SID::Principal with the account, domain, SID, etc
[ "Converts", "an", "octet", "string", "array", "of", "bytes", "to", "a", "SID", "::", "Principal", "object", "e", ".", "g", ".", "[", "1", "1", "0", "0", "0", "0", "0", "5", "18", "0", "0", "0", "]", "is", "the", "representation", "for", "S", "-...
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/sid.rb#L91-L97
train
Convert an octet string to a principal
[ 30522, 13366, 13323, 3388, 1035, 5164, 1035, 2000, 1035, 4054, 1006, 27507, 1007, 2065, 999, 27507, 1064, 1064, 999, 27507, 1012, 6869, 1035, 2000, 1029, 1006, 1005, 5308, 1005, 1007, 1064, 1064, 27507, 1012, 4064, 1029, 5333, 13997, 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_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb
Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.Workspaces.update_with_http_info
def update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil) update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value! end
ruby
def update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil) update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value! end
[ "def", "update_with_http_info", "(", "resource_group_name", ",", "workspace_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "update_async", "(", "resource_group_name", ",", "workspace_name", ",", "parameters", ",", "custom_headers", ":custom_headers", ...
Updates a machine learning workspace with the specified parameters. @param resource_group_name [String] Name of the resource group in which workspace is located. @param workspace_name [String] Name of Azure Machine Learning workspace. @param parameters [WorkspaceUpdateParameters] The parameters for updating a machine learning workspace. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "a", "machine", "learning", "workspace", "with", "the", "specified", "parameters", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb#L354-L356
train
Updates a node in a workspace.
[ 30522, 13366, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb
Azure::ApiManagement::Mgmt::V2018_01_01.OpenIdConnectProvider.delete
def delete(resource_group_name, service_name, opid, if_match, custom_headers:nil) response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, service_name, opid, if_match, custom_headers:nil) response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "service_name", ",", "opid", ",", "if_match", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "service_name", ",", "opid", ",", "if_match", ",", "custom_h...
Deletes specific OpenID Connect Provider of the API Management service instance. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param opid [String] Identifier of the OpenID Connect Provider. @param if_match [String] ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "specific", "OpenID", "Connect", "Provider", "of", "the", "API", "Management", "service", "instance", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb#L597-L600
train
Deletes an existing sequence of documents in an App Service Environment.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 6728, 3593, 1010, 2065, 1035, 2674, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby/rake
lib/rake/application.rb
Rake.Application.display_error_message
def display_error_message(ex) # :nodoc: trace "#{name} aborted!" display_exception_details(ex) trace "Tasks: #{ex.chain}" if has_chain?(ex) trace "(See full trace by running task with --trace)" unless options.backtrace end
ruby
def display_error_message(ex) # :nodoc: trace "#{name} aborted!" display_exception_details(ex) trace "Tasks: #{ex.chain}" if has_chain?(ex) trace "(See full trace by running task with --trace)" unless options.backtrace end
[ "def", "display_error_message", "(", "ex", ")", "# :nodoc:", "trace", "\"#{name} aborted!\"", "display_exception_details", "(", "ex", ")", "trace", "\"Tasks: #{ex.chain}\"", "if", "has_chain?", "(", "ex", ")", "trace", "\"(See full trace by running task with --trace)\"", "u...
Display the error message that caused the exception.
[ "Display", "the", "error", "message", "that", "caused", "the", "exception", "." ]
1c22b490ee6cb8bd614fa8d0d6145f671466206b
https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/application.rb#L206-L212
train
Display error message
[ 30522, 13366, 4653, 1035, 7561, 1035, 4471, 1006, 4654, 1007, 1001, 1024, 7293, 10085, 1024, 7637, 1000, 1001, 1063, 2171, 1065, 11113, 15613, 999, 1000, 4653, 1035, 6453, 1035, 4751, 1006, 4654, 1007, 7637, 1000, 8518, 1024, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb
Azure::SQL::Mgmt::V2015_05_01_preview.DatabaseRecommendedActions.get_with_http_info
def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil) get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil) get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "advisor_name", ",", "recommended_action_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "server_name", ",", "database_na...
Gets a database recommended action. @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. @param advisor_name [String] The name of the Database Advisor. @param recommended_action_name [String] The name of Database Recommended Action. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "database", "recommended", "action", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb#L186-L188
train
Gets the specified database s index and its associated advisor.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 8619, 1035, 2171, 1010, 6749, 1035, 2895, 1035, 2171, 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...
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.resolve_service
def resolve_service(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil) response = resolve_service_async(service_id, partition_key_type:partition_key_type, partition_key_value:partition_key_value, previous_rsp_version:previous_rsp_version, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def resolve_service(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil) response = resolve_service_async(service_id, partition_key_type:partition_key_type, partition_key_value:partition_key_value, previous_rsp_version:previous_rsp_version, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "resolve_service", "(", "service_id", ",", "partition_key_type", ":", "nil", ",", "partition_key_value", ":", "nil", ",", "previous_rsp_version", ":", "nil", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "resolve_serv...
Resolve a Service Fabric partition. Resolve a Service Fabric service partition to get the endpoints of the service replicas. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. @param partition_key_type [Integer] Key type for the partition. This parameter is required if the partition scheme for the service is Int64Range or Named. The possible values are following. - None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid for the partitions with partitioning scheme as Singleton. This is the default value. The value is 1. - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. @param partition_key_value [String] Partition key. This is required if the partition scheme for the service is Int64Range or Named. @param previous_rsp_version [String] The value in the Version field of the response that was received previously. This is required if the user knows that the result that was got previously is stale. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ResolvedServicePartition] operation results.
[ "Resolve", "a", "Service", "Fabric", "partition", "." ]
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#L11669-L11672
train
Resolve a service to a specific language.
[ 30522, 13366, 10663, 1035, 2326, 1006, 2326, 1035, 8909, 1010, 13571, 1035, 3145, 1035, 2828, 1024, 9152, 2140, 1010, 13571, 1035, 3145, 1035, 3643, 1024, 9152, 2140, 1010, 3025, 1035, 12667, 2361, 1035, 2544, 1024, 9152, 2140, 1010, 2051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/data/role.rb
Discordrb.Role.sort_above
def sort_above(other = nil) other = @server.role(other.resolve_id) if other roles = @server.roles.sort_by(&:position) roles.delete_at(@position) index = other ? roles.index { |role| role.id == other.id } + 1 : 1 roles.insert(index, self) updated_roles = roles.map.with_index { |role, position| { id: role.id, position: position } } @server.update_role_positions(updated_roles) index end
ruby
def sort_above(other = nil) other = @server.role(other.resolve_id) if other roles = @server.roles.sort_by(&:position) roles.delete_at(@position) index = other ? roles.index { |role| role.id == other.id } + 1 : 1 roles.insert(index, self) updated_roles = roles.map.with_index { |role, position| { id: role.id, position: position } } @server.update_role_positions(updated_roles) index end
[ "def", "sort_above", "(", "other", "=", "nil", ")", "other", "=", "@server", ".", "role", "(", "other", ".", "resolve_id", ")", "if", "other", "roles", "=", "@server", ".", "roles", ".", "sort_by", "(", ":position", ")", "roles", ".", "delete_at", "(",...
Moves this role above another role in the list. @param other [Role, #resolve_id, nil] The role above which this role should be moved. If it is `nil`, the role will be moved above the @everyone role. @return [Integer] the new position of this role
[ "Moves", "this", "role", "above", "another", "role", "in", "the", "list", "." ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/role.rb#L152-L163
train
Sort roles above other
[ 30522, 13366, 4066, 1035, 2682, 1006, 2060, 1027, 9152, 2140, 1007, 2060, 1027, 1030, 8241, 1012, 2535, 1006, 2060, 1012, 10663, 1035, 8909, 1007, 2065, 2060, 4395, 1027, 1030, 8241, 1012, 4395, 1012, 4066, 1035, 2011, 1006, 1004, 1024, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
randym/axlsx
lib/axlsx/workbook/worksheet/table.rb
Axlsx.Table.name=
def name=(v) DataTypeValidator.validate :table_name, [String], v if v.is_a?(String) @name = v end end
ruby
def name=(v) DataTypeValidator.validate :table_name, [String], v if v.is_a?(String) @name = v end end
[ "def", "name", "=", "(", "v", ")", "DataTypeValidator", ".", "validate", ":table_name", ",", "[", "String", "]", ",", "v", "if", "v", ".", "is_a?", "(", "String", ")", "@name", "=", "v", "end", "end" ]
The name of the Table. @param [String, Cell] v @return [Title]
[ "The", "name", "of", "the", "Table", "." ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/table.rb#L60-L65
train
Set the name of the table.
[ 30522, 13366, 2171, 1027, 1006, 1058, 1007, 2951, 13874, 10175, 8524, 4263, 1012, 9398, 3686, 1024, 2795, 1035, 2171, 1010, 1031, 5164, 1033, 1010, 1058, 2065, 1058, 1012, 2003, 1035, 1037, 1029, 1006, 5164, 1007, 1030, 2171, 1027, 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_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb
Azure::CDN::Mgmt::V2015_06_01.Endpoints.begin_load_content_with_http_info
def begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil) begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value! end
ruby
def begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil) begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value! end
[ "def", "begin_load_content_with_http_info", "(", "endpoint_name", ",", "content_file_paths", ",", "profile_name", ",", "resource_group_name", ",", "custom_headers", ":", "nil", ")", "begin_load_content_async", "(", "endpoint_name", ",", "content_file_paths", ",", "profile_n...
Forcibly pre-loads CDN endpoint content. @param endpoint_name [String] Name of the endpoint within the CDN profile. @param content_file_paths [LoadParameters] The path to the content to be loaded. Path should describe a file. @param profile_name [String] Name of the CDN profile within the resource group. @param resource_group_name [String] Name of the resource group within the Azure subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Forcibly", "pre", "-", "loads", "CDN", "endpoint", "content", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb#L1384-L1386
train
Loads the content of the specified endpoint.
[ 30522, 13366, 4088, 1035, 7170, 1035, 4180, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2203, 8400, 1035, 2171, 1010, 4180, 1035, 5371, 1035, 10425, 1010, 6337, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github-changelog-generator/github-changelog-generator
lib/github_changelog_generator/octo_fetcher.rb
GitHubChangelogGenerator.OctoFetcher.iterate_pages
def iterate_pages(client, method, *args) args << DEFAULT_REQUEST_OPTIONS.merge(extract_request_args(args)) check_github_response { client.send(method, user_project, *args) } last_response = client.last_response.tap do |response| raise(MovedPermanentlyError, response.data[:url]) if response.status == 301 end yield(last_response.data) until (next_one = last_response.rels[:next]).nil? last_response = check_github_response { next_one.get } yield(last_response.data) end end
ruby
def iterate_pages(client, method, *args) args << DEFAULT_REQUEST_OPTIONS.merge(extract_request_args(args)) check_github_response { client.send(method, user_project, *args) } last_response = client.last_response.tap do |response| raise(MovedPermanentlyError, response.data[:url]) if response.status == 301 end yield(last_response.data) until (next_one = last_response.rels[:next]).nil? last_response = check_github_response { next_one.get } yield(last_response.data) end end
[ "def", "iterate_pages", "(", "client", ",", "method", ",", "*", "args", ")", "args", "<<", "DEFAULT_REQUEST_OPTIONS", ".", "merge", "(", "extract_request_args", "(", "args", ")", ")", "check_github_response", "{", "client", ".", "send", "(", "method", ",", "...
Iterates through all pages until there are no more :next pages to follow yields the result per page @param [Octokit::Client] client @param [String] method (eg. 'tags') @yield [Sawyer::Resource] An OctoKit-provided response (which can be empty) @return [void]
[ "Iterates", "through", "all", "pages", "until", "there", "are", "no", "more", ":", "next", "pages", "to", "follow", "yields", "the", "result", "per", "page" ]
f18c64b5cc0d7473b059275b88385ac11ca8b564
https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/octo_fetcher.rb#L367-L381
train
Iterate over the pages of a GitHub client.
[ 30522, 13366, 2009, 22139, 1035, 5530, 1006, 7396, 1010, 4118, 1010, 1008, 12098, 5620, 1007, 12098, 5620, 1026, 1026, 12398, 1035, 5227, 1035, 7047, 1012, 13590, 1006, 14817, 1035, 5227, 1035, 12098, 5620, 1006, 12098, 5620, 1007, 1007, 46...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/inventory_api.rb
SquareConnect.InventoryApi.batch_retrieve_inventory_counts
def batch_retrieve_inventory_counts(body, opts = {}) data, _status_code, _headers = batch_retrieve_inventory_counts_with_http_info(body, opts) return data end
ruby
def batch_retrieve_inventory_counts(body, opts = {}) data, _status_code, _headers = batch_retrieve_inventory_counts_with_http_info(body, opts) return data end
[ "def", "batch_retrieve_inventory_counts", "(", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "batch_retrieve_inventory_counts_with_http_info", "(", "body", ",", "opts", ")", "return", "data", "end" ]
BatchRetrieveInventoryCounts Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s. Results are paginated and sorted in descending order according to their `calculated_at` timestamp (newest first). When `updated_after` is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \"sync\" operation, for example in response to receiving a Webhook notification. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [BatchRetrieveInventoryCountsResponse]
[ "BatchRetrieveInventoryCounts", "Returns", "current", "counts", "for", "the", "provided", "[", "CatalogObject", "]", "(", "#type", "-", "catalogobject", ")", "s", "at", "the", "requested", "[", "Location", "]", "(", "#type", "-", "location", ")", "s", ".", "...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/inventory_api.rb#L135-L138
train
Retrieve inventory counts
[ 30522, 13366, 14108, 1035, 12850, 1035, 12612, 1035, 9294, 1006, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 14108, 1035, 12850, 1035, 12612, 1035, 9294, 1035, 2007, 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...
deivid-rodriguez/byebug
lib/byebug/commands/list.rb
Byebug.ListCommand.range
def range(input) return auto_range(@match[1] || "+") unless input b, e = parse_range(input) raise("Invalid line range") unless valid_range?(b, e) [b, e] end
ruby
def range(input) return auto_range(@match[1] || "+") unless input b, e = parse_range(input) raise("Invalid line range") unless valid_range?(b, e) [b, e] end
[ "def", "range", "(", "input", ")", "return", "auto_range", "(", "@match", "[", "1", "]", "||", "\"+\"", ")", "unless", "input", "b", ",", "e", "=", "parse_range", "(", "input", ")", "raise", "(", "\"Invalid line range\"", ")", "unless", "valid_range?", "...
Line range to be printed by `list`. If <input> is set, range is parsed from it. Otherwise it's automatically chosen.
[ "Line", "range", "to", "be", "printed", "by", "list", "." ]
bf41a63858a648baa7fb621600d6451786d1572a
https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/commands/list.rb#L60-L67
train
Parse the line range
[ 30522, 13366, 2846, 1006, 7953, 1007, 2709, 8285, 1035, 2846, 1006, 1030, 2674, 1031, 1015, 1033, 1064, 1064, 1000, 1009, 1000, 1007, 4983, 7953, 1038, 1010, 1041, 1027, 11968, 3366, 1035, 2846, 1006, 7953, 1007, 5333, 1006, 1000, 19528, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/app/helpers/decidim/amendments_helper.rb
Decidim.AmendmentsHelper.action_button_card_for
def action_button_card_for(emendation) return accept_and_reject_buttons_for(emendation) if allowed_to_accept_and_reject?(emendation) return promote_button_for(emendation) if allowed_to_promote?(emendation) end
ruby
def action_button_card_for(emendation) return accept_and_reject_buttons_for(emendation) if allowed_to_accept_and_reject?(emendation) return promote_button_for(emendation) if allowed_to_promote?(emendation) end
[ "def", "action_button_card_for", "(", "emendation", ")", "return", "accept_and_reject_buttons_for", "(", "emendation", ")", "if", "allowed_to_accept_and_reject?", "(", "emendation", ")", "return", "promote_button_for", "(", "emendation", ")", "if", "allowed_to_promote?", ...
Returns Html action button cards to ACCEPT/REJECT or to PROMOTE an emendation
[ "Returns", "Html", "action", "button", "cards", "to", "ACCEPT", "/", "REJECT", "or", "to", "PROMOTE", "an", "emendation" ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/amendments_helper.rb#L56-L59
train
returns the action button card for the given emendation
[ 30522, 13366, 2895, 1035, 6462, 1035, 4003, 1035, 2005, 1006, 7861, 10497, 3370, 1007, 2709, 5138, 1035, 1998, 1035, 15454, 1035, 11287, 1035, 2005, 1006, 7861, 10497, 3370, 1007, 2065, 3039, 1035, 2000, 1035, 5138, 1035, 1998, 1035, 15454,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.encode_text
def encode_text(text, fonts) # text must be a unicode string and fonts must be an array. # this is an internal method, don't perform tests. fonts_array = [] fonts.each do |name| f = Fonts.get_font name fonts_array << f if f end # before starting, we should reorder any RTL content in the string text = reorder_rtl_content text out = [] text.chars.each do |c| fonts_array.each_index do |i| next unless fonts_array[i].cmap.nil? || (fonts_array[i].cmap && fonts_array[i].cmap[c]) # add to array if out.last.nil? || out.last[0] != fonts[i] out.last[1] << '>' unless out.last.nil? out << [fonts[i], '<', 0, 0] end out.last[1] << (fonts_array[i].cmap.nil? ? (c.unpack('H*')[0]) : fonts_array[i].cmap[c]) if fonts_array[i].metrics[c] out.last[2] += fonts_array[i].metrics[c][:wx].to_f out.last[3] += fonts_array[i].metrics[c][:wy].to_f end break end end out.last[1] << '>' if out.last out end
ruby
def encode_text(text, fonts) # text must be a unicode string and fonts must be an array. # this is an internal method, don't perform tests. fonts_array = [] fonts.each do |name| f = Fonts.get_font name fonts_array << f if f end # before starting, we should reorder any RTL content in the string text = reorder_rtl_content text out = [] text.chars.each do |c| fonts_array.each_index do |i| next unless fonts_array[i].cmap.nil? || (fonts_array[i].cmap && fonts_array[i].cmap[c]) # add to array if out.last.nil? || out.last[0] != fonts[i] out.last[1] << '>' unless out.last.nil? out << [fonts[i], '<', 0, 0] end out.last[1] << (fonts_array[i].cmap.nil? ? (c.unpack('H*')[0]) : fonts_array[i].cmap[c]) if fonts_array[i].metrics[c] out.last[2] += fonts_array[i].metrics[c][:wx].to_f out.last[3] += fonts_array[i].metrics[c][:wy].to_f end break end end out.last[1] << '>' if out.last out end
[ "def", "encode_text", "(", "text", ",", "fonts", ")", "# text must be a unicode string and fonts must be an array.", "# this is an internal method, don't perform tests.", "fonts_array", "=", "[", "]", "fonts", ".", "each", "do", "|", "name", "|", "f", "=", "Fonts", ".",...
encodes the text in an array of [:font_name, <PDFHexString>] for use in textbox
[ "encodes", "the", "text", "in", "an", "array", "of", "[", ":", "font_name", "<PDFHexString", ">", "]", "for", "use", "in", "textbox" ]
09054051019c069f551f3e60be789577c0f93900
https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/page_methods.rb#L772-L803
train
Encode a text string to a font array.
[ 30522, 13366, 4372, 16044, 1035, 3793, 1006, 3793, 1010, 15489, 2015, 1007, 1001, 3793, 2442, 2022, 1037, 27260, 5164, 1998, 15489, 2015, 2442, 2022, 2019, 9140, 1012, 1001, 2023, 2003, 2019, 4722, 4118, 1010, 2123, 1005, 1056, 4685, 5852, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb
Azure::SQL::Mgmt::V2014_04_01.Databases.pause_async
def pause_async(resource_group_name, server_name, database_name, custom_headers:nil) # Send request promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def pause_async(resource_group_name, server_name, database_name, custom_headers:nil) # Send request promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "pause_async", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_pause_async", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "custo...
@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 data warehouse to pause. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", "that", "contains", "the", "resource", ".", "You", "can", "obtain", "this", "value", "from", "the", "Azure", "Resource", "Manager", "API", "or", "the", "por...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L55-L69
train
Pause a database.
[ 30522, 13366, 8724, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 8724, 1035, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb
Azure::Hdinsight::Mgmt::V2015_03_01_preview.ScriptActions.get_execution_detail
def get_execution_detail(resource_group_name, cluster_name, script_execution_id, custom_headers:nil) response = get_execution_detail_async(resource_group_name, cluster_name, script_execution_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_execution_detail(resource_group_name, cluster_name, script_execution_id, custom_headers:nil) response = get_execution_detail_async(resource_group_name, cluster_name, script_execution_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_execution_detail", "(", "resource_group_name", ",", "cluster_name", ",", "script_execution_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_execution_detail_async", "(", "resource_group_name", ",", "cluster_name", ",", "script_execution_id", ...
Gets the script execution detail for the given script execution ID. @param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param script_execution_id [String] The script execution Id @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RuntimeScriptActionDetail] operation results.
[ "Gets", "the", "script", "execution", "detail", "for", "the", "given", "script", "execution", "ID", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb#L212-L215
train
Gets the execution detail of the script execution.
[ 30522, 13366, 2131, 1035, 7781, 1035, 6987, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9324, 1035, 2171, 1010, 5896, 1035, 7781, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 7781, 1035, 6987, 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
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Features.get_phrase_list_with_http_info
def get_phrase_list_with_http_info(app_id, version_id, phraselist_id, custom_headers:nil) get_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value! end
ruby
def get_phrase_list_with_http_info(app_id, version_id, phraselist_id, custom_headers:nil) get_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value! end
[ "def", "get_phrase_list_with_http_info", "(", "app_id", ",", "version_id", ",", "phraselist_id", ",", "custom_headers", ":", "nil", ")", "get_phrase_list_async", "(", "app_id", ",", "version_id", ",", "phraselist_id", ",", "custom_headers", ":custom_headers", ")", "."...
Gets phraselist feature info in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param phraselist_id [Integer] The ID of the feature to be retrieved. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "phraselist", "feature", "info", "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/features.rb#L516-L518
train
Gets the phrase list of the applications in a version of the application.
[ 30522, 13366, 2131, 1035, 7655, 1035, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 7655, 9863, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 7655, 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_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.ReplicationJobs.resume_async
def resume_async(job_name, resume_job_params, custom_headers:nil) # Send request promise = begin_resume_async(job_name, resume_job_params, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10::Models::Job.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def resume_async(job_name, resume_job_params, custom_headers:nil) # Send request promise = begin_resume_async(job_name, resume_job_params, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10::Models::Job.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "resume_async", "(", "job_name", ",", "resume_job_params", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_resume_async", "(", "job_name", ",", "resume_job_params", ",", "custom_headers", ":custom_headers", ")", "promise", "=", ...
@param job_name [String] Job identifier. @param resume_job_params [ResumeJobParams] Resume rob comments. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "job_name", "[", "String", "]", "Job", "identifier", ".", "@param", "resume_job_params", "[", "ResumeJobParams", "]", "Resume", "rob", "comments", ".", "@param", "custom_headers", "[", "Hash", "{", "String", "=", ">", "String", "}", "]", "A", "hash...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb#L50-L66
train
Resume a job.
[ 30522, 13366, 13746, 1035, 2004, 6038, 2278, 1006, 3105, 1035, 2171, 1010, 13746, 1035, 3105, 1035, 11498, 5244, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 13746, 1035, 2004, 6038, 2278,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_qnamaker/lib/4.0/generated/azure_cognitiveservices_qnamaker/endpoint_keys.rb
Azure::CognitiveServices::Qnamaker::V4_0.EndpointKeys.get_keys
def get_keys(custom_headers:nil) response = get_keys_async(custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_keys(custom_headers:nil) response = get_keys_async(custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_keys", "(", "custom_headers", ":", "nil", ")", "response", "=", "get_keys_async", "(", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", "nil?", "end" ]
Gets endpoint keys for an endpoint @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EndpointKeysDTO] operation results.
[ "Gets", "endpoint", "keys", "for", "an", "endpoint" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_qnamaker/lib/4.0/generated/azure_cognitiveservices_qnamaker/endpoint_keys.rb#L32-L35
train
Gets the keys of the specified key group.
[ 30522, 13366, 2131, 1035, 6309, 1006, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 6309, 1035, 2004, 6038, 2278, 1006, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999, 3433, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/snapshot.rb
Aws::EC2.Snapshot.modify_attribute
def modify_attribute(options = {}) options = options.merge(snapshot_id: @id) resp = @client.modify_snapshot_attribute(options) resp.data end
ruby
def modify_attribute(options = {}) options = options.merge(snapshot_id: @id) resp = @client.modify_snapshot_attribute(options) resp.data end
[ "def", "modify_attribute", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "snapshot_id", ":", "@id", ")", "resp", "=", "@client", ".", "modify_snapshot_attribute", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values snapshot.modify_attribute({ attribute: "productCodes", # accepts productCodes, createVolumePermission create_volume_permission: { add: [ { group: "all", # accepts all user_id: "String", }, ], remove: [ { group: "all", # accepts all user_id: "String", }, ], }, group_names: ["String"], operation_type: "add", # accepts add, remove user_ids: ["String"], dry_run: false, }) @param [Hash] options ({}) @option options [String] :attribute The snapshot attribute to modify. Only volume creation permissions can be modified. @option options [Types::CreateVolumePermissionModifications] :create_volume_permission A JSON representation of the snapshot attribute modification. @option options [Array<String>] :group_names The group to modify for the snapshot. @option options [String] :operation_type The type of operation to perform to the attribute. @option options [Array<String>] :user_ids The account ID to modify for the snapshot. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/snapshot.rb#L497-L501
train
Modify the attributes of a snapshot
[ 30522, 13366, 19933, 1035, 17961, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 20057, 12326, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 19933, 1035, 20057, 12326, 1035, 17961, 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...
castwide/solargraph
lib/solargraph/library.rb
Solargraph.Library.definitions_at
def definitions_at filename, line, column position = Position.new(line, column) cursor = Source::Cursor.new(checkout(filename), position) api_map.clip(cursor).define end
ruby
def definitions_at filename, line, column position = Position.new(line, column) cursor = Source::Cursor.new(checkout(filename), position) api_map.clip(cursor).define end
[ "def", "definitions_at", "filename", ",", "line", ",", "column", "position", "=", "Position", ".", "new", "(", "line", ",", "column", ")", "cursor", "=", "Source", "::", "Cursor", ".", "new", "(", "checkout", "(", "filename", ")", ",", "position", ")", ...
Get definition suggestions for the expression at the specified file and location. @param filename [String] The file to analyze @param line [Integer] The zero-based line number @param column [Integer] The zero-based column number @return [Array<Solargraph::Pin::Base>] @todo Take filename/position instead of filename/line/column
[ "Get", "definition", "suggestions", "for", "the", "expression", "at", "the", "specified", "file", "and", "location", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/library.rb#L174-L178
train
Returns the definition at the given position
[ 30522, 13366, 15182, 1035, 2012, 5371, 18442, 1010, 2240, 1010, 5930, 2597, 1027, 2597, 1012, 2047, 1006, 2240, 1010, 5930, 1007, 12731, 25301, 2099, 1027, 3120, 1024, 1024, 12731, 25301, 2099, 1012, 2047, 1006, 4638, 5833, 1006, 5371, 1844...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/express_route_cross_connections.rb
Azure::Network::Mgmt::V2018_10_01.ExpressRouteCrossConnections.update_tags_async
def update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil) # Send request promise = begin_update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2018_10_01::Models::ExpressRouteCrossConnection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil) # Send request promise = begin_update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2018_10_01::Models::ExpressRouteCrossConnection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "update_tags_async", "(", "resource_group_name", ",", "cross_connection_name", ",", "cross_connection_parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_update_tags_async", "(", "resource_group_name", ",", "cross_connection_na...
@param resource_group_name [String] The name of the resource group. @param cross_connection_name [String] The name of the cross connection. @param cross_connection_parameters [TagsObject] Parameters supplied to update express route cross connection tags. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", ".", "@param", "cross_connection_name", "[", "String", "]", "The", "name", "of", "the", "cross", "connection", ".", "@param", "cross_connection_parameters", "[", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/express_route_cross_connections.rb#L370-L386
train
Updates the tags of the specified ExpressRouteCrossConnection.
[ 30522, 13366, 10651, 1035, 22073, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2892, 1035, 4434, 1035, 2171, 1010, 2892, 1035, 4434, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_intent_with_http_info
def delete_intent_with_http_info(app_id, version_id, intent_id, delete_utterances:false, custom_headers:nil) delete_intent_async(app_id, version_id, intent_id, delete_utterances:delete_utterances, custom_headers:custom_headers).value! end
ruby
def delete_intent_with_http_info(app_id, version_id, intent_id, delete_utterances:false, custom_headers:nil) delete_intent_async(app_id, version_id, intent_id, delete_utterances:delete_utterances, custom_headers:custom_headers).value! end
[ "def", "delete_intent_with_http_info", "(", "app_id", ",", "version_id", ",", "intent_id", ",", "delete_utterances", ":", "false", ",", "custom_headers", ":", "nil", ")", "delete_intent_async", "(", "app_id", ",", "version_id", ",", "intent_id", ",", "delete_utteran...
Deletes an intent from a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param intent_id The intent classifier ID. @param delete_utterances [Boolean] If true, deletes the intent's example utterances. If false, moves the example utterances to the None intent. The default value is false. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "an", "intent", "from", "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#L2049-L2051
train
Deletes an intent from the application version.
[ 30522, 13366, 3972, 12870, 1035, 7848, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 7848, 1035, 8909, 1010, 3972, 12870, 1035, 14395, 26755, 1024, 6270, 1010, 7661, 1035, 20346, 2015, 1024, 915...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/event_subscription.rb
Aws::RDS.EventSubscription.create
def create(options = {}) options = options.merge(subscription_name: @name) resp = @client.create_event_subscription(options) EventSubscription.new( name: resp.data.event_subscription.cust_subscription_id, data: resp.data.event_subscription, client: @client ) end
ruby
def create(options = {}) options = options.merge(subscription_name: @name) resp = @client.create_event_subscription(options) EventSubscription.new( name: resp.data.event_subscription.cust_subscription_id, data: resp.data.event_subscription, client: @client ) end
[ "def", "create", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "subscription_name", ":", "@name", ")", "resp", "=", "@client", ".", "create_event_subscription", "(", "options", ")", "EventSubscription", ".", "new", "(", ...
@example Request syntax with placeholder values eventsubscription = event_subscription.create({ sns_topic_arn: "String", # required source_type: "String", event_categories: ["String"], source_ids: ["String"], enabled: false, tags: [ { key: "String", value: "String", }, ], }) @param [Hash] options ({}) @option options [required, String] :sns_topic_arn The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it. @option options [String] :source_type The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned. Valid values: `db-instance` \| `db-cluster` \| `db-parameter-group` \| `db-security-group` \| `db-snapshot` \| `db-cluster-snapshot` @option options [Array<String>] :event_categories A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType in the [Events][1] topic in the *Amazon RDS User Guide* or by using the **DescribeEventCategories** action. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html @option options [Array<String>] :source_ids The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. Constraints: * If SourceIds are supplied, SourceType must also be provided. * If the source type is a DB instance, then a `DBInstanceIdentifier` must be supplied. * If the source type is a DB security group, a `DBSecurityGroupName` must be supplied. * If the source type is a DB parameter group, a `DBParameterGroupName` must be supplied. * If the source type is a DB snapshot, a `DBSnapshotIdentifier` must be supplied. @option options [Boolean] :enabled A Boolean value; set to **true** to activate the subscription, set to **false** to create the subscription but not active it. @option options [Array<Types::Tag>] :tags A list of tags. For more information, see [Tagging Amazon RDS Resources][1] in the *Amazon RDS User Guide.* [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html @return [EventSubscription]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/event_subscription.rb#L336-L344
train
Creates an event subscription
[ 30522, 13366, 3443, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 15002, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 2724, 1035, 15002, 1006, 7047, 1007, 2824, 12083, 22483...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.authorize_for_service_encryption_key_rollover_with_http_info
def authorize_for_service_encryption_key_rollover_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil) authorize_for_service_encryption_key_rollover_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value! end
ruby
def authorize_for_service_encryption_key_rollover_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil) authorize_for_service_encryption_key_rollover_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value! end
[ "def", "authorize_for_service_encryption_key_rollover_with_http_info", "(", "device_name", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "authorize_for_service_encryption_key_rollover_async", "(", "device_name", ",", "resource_group_name",...
Authorizes the specified device for service data encryption key rollover. @param device_name [String] The device name @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Authorizes", "the", "specified", "device", "for", "service", "data", "encryption", "key", "rollover", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L453-L455
train
Authorize for service encryption key rollover.
[ 30522, 13366, 3166, 4697, 1035, 2005, 1035, 2326, 1035, 21999, 1035, 3145, 1035, 4897, 7840, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 5080, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
brunofacca/active-record-query-trace
lib/active_record_query_trace.rb
ActiveRecordQueryTrace.CustomLogSubscriber.lines_to_display
def lines_to_display(full_trace) ActiveRecordQueryTrace.lines.zero? ? full_trace : full_trace.first(ActiveRecordQueryTrace.lines) end
ruby
def lines_to_display(full_trace) ActiveRecordQueryTrace.lines.zero? ? full_trace : full_trace.first(ActiveRecordQueryTrace.lines) end
[ "def", "lines_to_display", "(", "full_trace", ")", "ActiveRecordQueryTrace", ".", "lines", ".", "zero?", "?", "full_trace", ":", "full_trace", ".", "first", "(", "ActiveRecordQueryTrace", ".", "lines", ")", "end" ]
Must be called after the backtrace cleaner.
[ "Must", "be", "called", "after", "the", "backtrace", "cleaner", "." ]
9584d5d49cfc2170271f75bbf2773b46145e1be4
https://github.com/brunofacca/active-record-query-trace/blob/9584d5d49cfc2170271f75bbf2773b46145e1be4/lib/active_record_query_trace.rb#L101-L103
train
Returns the lines to display
[ 30522, 13366, 3210, 1035, 2000, 1035, 4653, 1006, 2440, 1035, 7637, 1007, 3161, 2890, 27108, 2094, 4226, 2854, 6494, 3401, 1012, 3210, 1012, 5717, 1029, 1029, 2440, 1035, 7637, 1024, 2440, 1035, 7637, 1012, 2034, 1006, 3161, 2890, 27108, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.pause
def pause(list) unless list.is_a?(TopicPartitionList) raise TypeError.new("list has to be a TopicPartitionList") end tpl = list.to_native_tpl response = Rdkafka::Bindings.rd_kafka_pause_partitions(@native_kafka, tpl) if response != 0 list = TopicPartitionList.from_native_tpl(tpl) raise Rdkafka::RdkafkaTopicPartitionListError.new(response, list, "Error pausing '#{list.to_h}'") end end
ruby
def pause(list) unless list.is_a?(TopicPartitionList) raise TypeError.new("list has to be a TopicPartitionList") end tpl = list.to_native_tpl response = Rdkafka::Bindings.rd_kafka_pause_partitions(@native_kafka, tpl) if response != 0 list = TopicPartitionList.from_native_tpl(tpl) raise Rdkafka::RdkafkaTopicPartitionListError.new(response, list, "Error pausing '#{list.to_h}'") end end
[ "def", "pause", "(", "list", ")", "unless", "list", ".", "is_a?", "(", "TopicPartitionList", ")", "raise", "TypeError", ".", "new", "(", "\"list has to be a TopicPartitionList\"", ")", "end", "tpl", "=", "list", ".", "to_native_tpl", "response", "=", "Rdkafka", ...
Pause producing or consumption for the provided list of partitions @param list [TopicPartitionList] The topic with partitions to pause @raise [RdkafkaTopicPartitionListError] When pausing subscription fails. @return [nil]
[ "Pause", "producing", "or", "consumption", "for", "the", "provided", "list", "of", "partitions" ]
87b3e0ddae5ea576847cb67228fcea06ec2a24d6
https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/consumer.rb#L68-L79
train
Pause the partitions in the specified list of partitions.
[ 30522, 13366, 8724, 1006, 2862, 1007, 4983, 2862, 1012, 2003, 1035, 1037, 30524, 2862, 1012, 2000, 1035, 3128, 1035, 1056, 24759, 3433, 1027, 16428, 2912, 24316, 2050, 1024, 1024, 8031, 2015, 1012, 16428, 1035, 10556, 24316, 2050, 1035, 872...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/create_refund_request.rb
SquareConnect.CreateRefundRequest.reason=
def reason=(reason) if !reason.nil? && reason.to_s.length > 192 fail ArgumentError, "invalid value for 'reason', the character length must be smaller than or equal to 192." end @reason = reason end
ruby
def reason=(reason) if !reason.nil? && reason.to_s.length > 192 fail ArgumentError, "invalid value for 'reason', the character length must be smaller than or equal to 192." end @reason = reason end
[ "def", "reason", "=", "(", "reason", ")", "if", "!", "reason", ".", "nil?", "&&", "reason", ".", "to_s", ".", "length", ">", "192", "fail", "ArgumentError", ",", "\"invalid value for 'reason', the character length must be smaller than or equal to 192.\"", "end", "@rea...
Custom attribute writer method with validation @param [Object] reason Value to be assigned
[ "Custom", "attribute", "writer", "method", "with", "validation" ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/create_refund_request.rb#L165-L172
train
Set the reason of the message.
[ 30522, 13366, 3114, 1027, 1006, 3114, 1007, 2065, 999, 3114, 1012, 9152, 2140, 1029, 1004, 1004, 3114, 1012, 2000, 1035, 1055, 1012, 3091, 1028, 17613, 8246, 6685, 2121, 29165, 1010, 1000, 19528, 3643, 2005, 1005, 3114, 1005, 1010, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/haml-lint
lib/haml_lint/linter/indentation.rb
HamlLint.Linter::Indentation.check_width
def check_width(width, root) dummy_node = Struct.new(:line) root.children.each do |top_node| # once we've found one line with leading space, there's no need to check any more lines # `haml` will check indenting_at_start, deeper_indenting, inconsistent_indentation break if top_node.children.find do |node| line = node.source_code leading_space = LEADING_SPACES_REGEX.match(line) break unless leading_space && !node.disabled?(self) if leading_space[1] != ' ' * width record_lint dummy_node.new(node.line), "File does not use #{width}-space indentation" end break true end end end
ruby
def check_width(width, root) dummy_node = Struct.new(:line) root.children.each do |top_node| # once we've found one line with leading space, there's no need to check any more lines # `haml` will check indenting_at_start, deeper_indenting, inconsistent_indentation break if top_node.children.find do |node| line = node.source_code leading_space = LEADING_SPACES_REGEX.match(line) break unless leading_space && !node.disabled?(self) if leading_space[1] != ' ' * width record_lint dummy_node.new(node.line), "File does not use #{width}-space indentation" end break true end end end
[ "def", "check_width", "(", "width", ",", "root", ")", "dummy_node", "=", "Struct", ".", "new", "(", ":line", ")", "root", ".", "children", ".", "each", "do", "|", "top_node", "|", "# once we've found one line with leading space, there's no need to check any more lines...
validate that indentation matches config width (only for spaces)
[ "validate", "that", "indentation", "matches", "config", "width", "(", "only", "for", "spaces", ")" ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter/indentation.rb#L42-L61
train
Check the width of the given file.
[ 30522, 13366, 4638, 1035, 9381, 1006, 9381, 1010, 7117, 1007, 24369, 1035, 13045, 1027, 2358, 6820, 6593, 1012, 2047, 1006, 1024, 2240, 1007, 7117, 1012, 2336, 1012, 2169, 2079, 1064, 2327, 1035, 13045, 1064, 1001, 2320, 2057, 1005, 2310, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
cloudfoundry/bosh
src/bosh-director/lib/bosh/director/job_runner.rb
Bosh::Director.JobRunner.setup_task_logging_for_files
def setup_task_logging_for_files log_dir = File.join(Config.base_dir, 'tasks', @task_id.to_s) FileUtils.mkdir_p(log_dir) debug_log = File.join(log_dir, 'debug') @task_logger = Logging::Logger.new('DirectorJobRunner') shared_appender = Logging.appenders.file( 'DirectorJobRunnerFile', filename: debug_log, layout: ThreadFormatter.layout, filters: [Bosh::Common::Logging.null_query_filter], ) @task_logger.add_appenders(shared_appender) @task_logger.level = Config.logger.level Config.logger = @task_logger Config.db.logger = @task_logger Config.dns_db.logger = @task_logger if Config.dns_db cpi_log = File.join(log_dir, 'cpi') Config.cloud_options['properties'] ||= {} Config.cloud_options['properties']['cpi_log'] = cpi_log end
ruby
def setup_task_logging_for_files log_dir = File.join(Config.base_dir, 'tasks', @task_id.to_s) FileUtils.mkdir_p(log_dir) debug_log = File.join(log_dir, 'debug') @task_logger = Logging::Logger.new('DirectorJobRunner') shared_appender = Logging.appenders.file( 'DirectorJobRunnerFile', filename: debug_log, layout: ThreadFormatter.layout, filters: [Bosh::Common::Logging.null_query_filter], ) @task_logger.add_appenders(shared_appender) @task_logger.level = Config.logger.level Config.logger = @task_logger Config.db.logger = @task_logger Config.dns_db.logger = @task_logger if Config.dns_db cpi_log = File.join(log_dir, 'cpi') Config.cloud_options['properties'] ||= {} Config.cloud_options['properties']['cpi_log'] = cpi_log end
[ "def", "setup_task_logging_for_files", "log_dir", "=", "File", ".", "join", "(", "Config", ".", "base_dir", ",", "'tasks'", ",", "@task_id", ".", "to_s", ")", "FileUtils", ".", "mkdir_p", "(", "log_dir", ")", "debug_log", "=", "File", ".", "join", "(", "lo...
Sets up job logging. @return [void]
[ "Sets", "up", "job", "logging", "." ]
2eaa7100879ddd20cd909cd698514746195e28b7
https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/job_runner.rb#L44-L68
train
Setup task logging for files
[ 30522, 13366, 16437, 1035, 4708, 1035, 15899, 1035, 2005, 1035, 6764, 8833, 1035, 16101, 1027, 5371, 1012, 3693, 1006, 9530, 8873, 2290, 1012, 2918, 1035, 16101, 1010, 1005, 8518, 1005, 1010, 1030, 4708, 1035, 8909, 1012, 2000, 1035, 1055, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_keys_as_lazy
def get_deleted_keys_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil) first_page = get_deleted_keys_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers) first_page.get_all_items end
ruby
def get_deleted_keys_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil) first_page = get_deleted_keys_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "get_deleted_keys_as_lazy", "(", "vault_base_url", ",", "maxresults", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "get_deleted_keys_as_lazy_as_lazy", "(", "vault_base_url", ",", "maxresults", ":", "maxresults", ",", "custom_headers", ...
Lists the deleted keys in the specified vault. Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a deleted key. This operation includes deletion-specific information. The Get Deleted Keys operation is applicable for vaults enabled for soft-delete. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/list permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param maxresults [Integer] Maximum number of results to return in a page. If not specified the service will return up to 25 results. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [DeletedKeyListResult] operation results.
[ "Lists", "the", "deleted", "keys", "in", "the", "specified", "vault", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L9688-L9691
train
Gets the deleted keys for the specified vault.
[ 30522, 13366, 2131, 1035, 17159, 1035, 6309, 1035, 2004, 1035, 13971, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 4098, 6072, 11314, 2015, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/population_criteria.rb
HQMF2.PopulationCriteria.to_model
def to_model mps = preconditions.collect(&:to_model) HQMF::PopulationCriteria.new(id, hqmf_id, type, mps, title, aggregator, comments) end
ruby
def to_model mps = preconditions.collect(&:to_model) HQMF::PopulationCriteria.new(id, hqmf_id, type, mps, title, aggregator, comments) end
[ "def", "to_model", "mps", "=", "preconditions", ".", "collect", "(", ":to_model", ")", "HQMF", "::", "PopulationCriteria", ".", "new", "(", "id", ",", "hqmf_id", ",", "type", ",", "mps", ",", "title", ",", "aggregator", ",", "comments", ")", "end" ]
Generates this classes hqmf-model equivalent
[ "Generates", "this", "classes", "hqmf", "-", "model", "equivalent" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/population_criteria.rb#L129-L132
train
Returns a new HQMF object with the population criteria
[ 30522, 13366, 2000, 1035, 2944, 12616, 1027, 3653, 8663, 20562, 2015, 1012, 8145, 1006, 1004, 1024, 2000, 1035, 2944, 1007, 16260, 2213, 2546, 1024, 1024, 2313, 26775, 21646, 2401, 1012, 2047, 1006, 8909, 1010, 16260, 2213, 2546, 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...
dry-rb/dry-initializer
lib/dry/initializer/config.rb
Dry::Initializer.Config.attributes
def attributes(instance) definitions.values.each_with_object({}) do |item, obj| key = item.target val = instance.send(:instance_variable_get, item.ivar) obj[key] = val unless null == val end end
ruby
def attributes(instance) definitions.values.each_with_object({}) do |item, obj| key = item.target val = instance.send(:instance_variable_get, item.ivar) obj[key] = val unless null == val end end
[ "def", "attributes", "(", "instance", ")", "definitions", ".", "values", ".", "each_with_object", "(", "{", "}", ")", "do", "|", "item", ",", "obj", "|", "key", "=", "item", ".", "target", "val", "=", "instance", ".", "send", "(", ":instance_variable_get...
The hash of assigned attributes for an instance of the [#extended_class] @param [Dry::Initializer::Instance] instance @return [Hash<Symbol, Object>]
[ "The", "hash", "of", "assigned", "attributes", "for", "an", "instance", "of", "the", "[", "#extended_class", "]" ]
422d331468602ff0d3543fbb336b784343e5cc31
https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/config.rb#L89-L95
train
Get the attributes of the object
[ 30522, 13366, 12332, 1006, 6013, 1007, 15182, 1012, 5300, 1012, 2169, 1035, 2007, 1035, 4874, 1006, 1063, 1065, 1007, 2079, 1064, 8875, 1010, 27885, 3501, 1064, 3145, 1027, 8875, 1012, 4539, 11748, 1027, 6013, 1012, 4604, 1006, 1024, 6013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
lib/rmagick_internal.rb
Magick.Draw.interline_spacing
def interline_spacing(space) begin Float(space) rescue ArgumentError Kernel.raise ArgumentError, 'invalid value for interline_spacing' rescue TypeError Kernel.raise TypeError, "can't convert #{space.class} into Float" end primitive "interline-spacing #{space}" end
ruby
def interline_spacing(space) begin Float(space) rescue ArgumentError Kernel.raise ArgumentError, 'invalid value for interline_spacing' rescue TypeError Kernel.raise TypeError, "can't convert #{space.class} into Float" end primitive "interline-spacing #{space}" end
[ "def", "interline_spacing", "(", "space", ")", "begin", "Float", "(", "space", ")", "rescue", "ArgumentError", "Kernel", ".", "raise", "ArgumentError", ",", "'invalid value for interline_spacing'", "rescue", "TypeError", "Kernel", ".", "raise", "TypeError", ",", "\"...
IM 6.5.5-8 and later
[ "IM", "6", ".", "5", ".", "5", "-", "8", "and", "later" ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L369-L378
train
Returns the interline spacing of the given space.
[ 30522, 13366, 6970, 4179, 1035, 12403, 6129, 1006, 2686, 1007, 4088, 14257, 1006, 2686, 1007, 5343, 6685, 2121, 29165, 16293, 1012, 5333, 6685, 2121, 29165, 1010, 1005, 19528, 3643, 2005, 6970, 4179, 1035, 12403, 6129, 1005, 5343, 2828, 212...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_node_load_info
def get_node_load_info(node_name, timeout:60, custom_headers:nil) response = get_node_load_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_node_load_info(node_name, timeout:60, custom_headers:nil) response = get_node_load_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_node_load_info", "(", "node_name", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_node_load_info_async", "(", "node_name", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ")", ".", "...
Gets the load information of a Service Fabric node. Retrieves the load information of a Service Fabric node for all the metrics that have load or capacity defined. @param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [NodeLoadInfo] operation results.
[ "Gets", "the", "load", "information", "of", "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#L4055-L4058
train
Gets the load information of a node.
[ 30522, 13366, 2131, 1035, 13045, 1035, 7170, 1035, 18558, 1006, 30524, 1006, 13045, 1035, 2171, 1010, 2051, 5833, 1024, 2051, 5833, 1010, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999, 3433, 1012, 2303, 4983,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.wait_for_expected_title
def wait_for_expected_title(expected_title, timeout=::PageObject.default_element_wait) define_method("wait_for_expected_title?") do error_message = lambda { "Expected title '#{expected_title}' instead of '#{title}'" } has_expected_title = (expected_title === title) wait_until(timeout, error_message.call) do has_expected_title = (expected_title === title) end unless has_expected_title raise error_message.call unless has_expected_title has_expected_title end end
ruby
def wait_for_expected_title(expected_title, timeout=::PageObject.default_element_wait) define_method("wait_for_expected_title?") do error_message = lambda { "Expected title '#{expected_title}' instead of '#{title}'" } has_expected_title = (expected_title === title) wait_until(timeout, error_message.call) do has_expected_title = (expected_title === title) end unless has_expected_title raise error_message.call unless has_expected_title has_expected_title end end
[ "def", "wait_for_expected_title", "(", "expected_title", ",", "timeout", "=", "::", "PageObject", ".", "default_element_wait", ")", "define_method", "(", "\"wait_for_expected_title?\"", ")", "do", "error_message", "=", "lambda", "{", "\"Expected title '#{expected_title}' in...
Creates a method that waits the expected_title of a page to match the actual. @param [String] expected_title the literal expected title for the page @param [Regexp] expected_title the expected title pattern for the page @param [optional, Integer] timeout default value is nil - do not wait @return [boolean] @raise An exception if expected_title does not match actual title @example Specify 'Google' as the expected title of a page expected_title "Google" page.has_expected_title?
[ "Creates", "a", "method", "that", "waits", "the", "expected_title", "of", "a", "page", "to", "match", "the", "actual", ".", "@param", "[", "String", "]", "expected_title", "the", "literal", "expected", "title", "for", "the", "page", "@param", "[", "Regexp", ...
850d775bf63768fbb1551a34480195785fe8e193
https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L64-L76
train
Waits for the title to appear
[ 30522, 13366, 3524, 1035, 2005, 1035, 3517, 1035, 2516, 1006, 3517, 1035, 2516, 1010, 2051, 5833, 1027, 1024, 1024, 3931, 16429, 20614, 1012, 12398, 1035, 5783, 1035, 3524, 1007, 9375, 1035, 4118, 1006, 1000, 3524, 1035, 2005, 1035, 3517, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.filtered_args
def filtered_args(args) return args if args.empty? json_args = Normalizer.jsonify(args) case unique_args_method when Proc filter_by_proc(json_args) when Symbol filter_by_symbol(json_args) else log_debug("#{__method__} arguments not filtered (using all arguments for uniqueness)") json_args end end
ruby
def filtered_args(args) return args if args.empty? json_args = Normalizer.jsonify(args) case unique_args_method when Proc filter_by_proc(json_args) when Symbol filter_by_symbol(json_args) else log_debug("#{__method__} arguments not filtered (using all arguments for uniqueness)") json_args end end
[ "def", "filtered_args", "(", "args", ")", "return", "args", "if", "args", ".", "empty?", "json_args", "=", "Normalizer", ".", "jsonify", "(", "args", ")", "case", "unique_args_method", "when", "Proc", "filter_by_proc", "(", "json_args", ")", "when", "Symbol", ...
Filters unique arguments by proc or symbol @param [Array] args the arguments passed to the sidekiq worker @return [Array] {#filter_by_proc} when {#unique_args_method} is a Proc @return [Array] {#filter_by_symbol} when {#unique_args_method} is a Symbol @return [Array] args unfiltered when neither of the above
[ "Filters", "unique", "arguments", "by", "proc", "or", "symbol" ]
2944b97c720528f53962ccfd17d43ac939a77f46
https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/unique_args.rb#L101-L115
train
Returns the arguments that should be filtered
[ 30522, 13366, 21839, 1035, 12098, 5620, 1006, 12098, 5620, 1007, 2709, 12098, 5620, 2065, 12098, 5620, 1012, 4064, 1029, 1046, 3385, 1035, 12098, 5620, 1027, 3671, 17629, 1012, 1046, 3385, 8757, 1006, 12098, 5620, 1007, 2553, 4310, 1035, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
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.report_service_health_with_http_info
def report_service_health_with_http_info(service_id, health_information, immediate:false, timeout:60, custom_headers:nil) report_service_health_async(service_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def report_service_health_with_http_info(service_id, health_information, immediate:false, timeout:60, custom_headers:nil) report_service_health_async(service_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "report_service_health_with_http_info", "(", "service_id", ",", "health_information", ",", "immediate", ":", "false", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "report_service_health_async", "(", "service_id", ",", "health_information", ...
Sends a health report on the Service Fabric service. Reports health state of the specified Service Fabric service. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetServiceHealth and check that the report appears in the HealthEvents section. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Sends", "a", "health", "report", "on", "the", "Service", "Fabric", "service", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L11522-L11524
train
Report health of the specified service.
[ 30522, 13366, 3189, 1035, 2326, 1035, 2740, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2326, 1035, 8909, 1010, 2740, 1035, 2592, 1010, 6234, 1024, 6270, 1010, 2051, 5833, 1024, 3438, 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...
rails/sprockets
lib/sprockets/bower.rb
Sprockets.Bower.resolve_alternates
def resolve_alternates(load_path, logical_path) candidates, deps = super # bower.json can only be nested one level deep if !logical_path.index('/'.freeze) dirname = File.join(load_path, logical_path) if directory?(dirname) filenames = POSSIBLE_BOWER_JSONS.map { |basename| File.join(dirname, basename) } filename = filenames.detect { |fn| self.file?(fn) } if filename deps << build_file_digest_uri(filename) read_bower_main(dirname, filename) do |path| if file?(path) candidates << path end end end end end return candidates, deps end
ruby
def resolve_alternates(load_path, logical_path) candidates, deps = super # bower.json can only be nested one level deep if !logical_path.index('/'.freeze) dirname = File.join(load_path, logical_path) if directory?(dirname) filenames = POSSIBLE_BOWER_JSONS.map { |basename| File.join(dirname, basename) } filename = filenames.detect { |fn| self.file?(fn) } if filename deps << build_file_digest_uri(filename) read_bower_main(dirname, filename) do |path| if file?(path) candidates << path end end end end end return candidates, deps end
[ "def", "resolve_alternates", "(", "load_path", ",", "logical_path", ")", "candidates", ",", "deps", "=", "super", "# bower.json can only be nested one level deep", "if", "!", "logical_path", ".", "index", "(", "'/'", ".", "freeze", ")", "dirname", "=", "File", "."...
Internal: Override resolve_alternates to install bower.json behavior. load_path - String environment path logical_path - String path relative to base Returns candiate filenames.
[ "Internal", ":", "Override", "resolve_alternates", "to", "install", "bower", ".", "json", "behavior", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/bower.rb#L17-L40
train
Resolve all alternate files in the given load path.
[ 30522, 13366, 10663, 1035, 6585, 2015, 1006, 7170, 1035, 4130, 1010, 11177, 1035, 4130, 1007, 5347, 1010, 2139, 4523, 1027, 3565, 1001, 6812, 2121, 1012, 1046, 3385, 2064, 2069, 2022, 9089, 2098, 2028, 2504, 2784, 2065, 999, 11177, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/jets
lib/jets/commands/deploy.rb
Jets::Commands.Deploy.minimal_rollback_complete?
def minimal_rollback_complete? stack = find_stack(stack_name) return false unless stack return false unless stack.stack_status == 'ROLLBACK_COMPLETE' # Finally check if all the minimal resources in the parent template have been deleted resp = cfn.describe_stack_resources(stack_name: stack_name) resource_statuses = resp.stack_resources.map(&:resource_status).uniq resource_statuses == ['DELETE_COMPLETE'] end
ruby
def minimal_rollback_complete? stack = find_stack(stack_name) return false unless stack return false unless stack.stack_status == 'ROLLBACK_COMPLETE' # Finally check if all the minimal resources in the parent template have been deleted resp = cfn.describe_stack_resources(stack_name: stack_name) resource_statuses = resp.stack_resources.map(&:resource_status).uniq resource_statuses == ['DELETE_COMPLETE'] end
[ "def", "minimal_rollback_complete?", "stack", "=", "find_stack", "(", "stack_name", ")", "return", "false", "unless", "stack", "return", "false", "unless", "stack", ".", "stack_status", "==", "'ROLLBACK_COMPLETE'", "# Finally check if all the minimal resources in the parent t...
Checks for a few things before deciding to delete the parent stack * Parent stack status status is ROLLBACK_COMPLETE * Parent resources are in the DELETE_COMPLETE state
[ "Checks", "for", "a", "few", "things", "before", "deciding", "to", "delete", "the", "parent", "stack" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/commands/deploy.rb#L98-L108
train
Returns true if the rollback is complete
[ 30522, 13366, 10124, 1035, 4897, 5963, 1035, 3143, 1029, 9991, 1027, 2424, 1035, 9991, 1006, 9991, 1035, 2171, 1007, 2709, 6270, 4983, 9991, 2709, 6270, 4983, 9991, 1012, 9991, 1035, 3570, 1027, 1027, 1005, 4897, 5963, 1035, 3143, 1005, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...