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
middleman/middleman
middleman-core/lib/middleman-core/sources/source_watcher.rb
Listen.Silencer.silenced?
def silenced?(relative_path, _type) path = relative_path.to_s # if only_patterns && type == :file # return true unless only_patterns.any? { |pattern| path =~ pattern } # end return only_patterns.none? { |pattern| path =~ pattern } if only_patterns ignore_patterns.any? { |pattern| path =~ pattern } end
ruby
def silenced?(relative_path, _type) path = relative_path.to_s # if only_patterns && type == :file # return true unless only_patterns.any? { |pattern| path =~ pattern } # end return only_patterns.none? { |pattern| path =~ pattern } if only_patterns ignore_patterns.any? { |pattern| path =~ pattern } end
[ "def", "silenced?", "(", "relative_path", ",", "_type", ")", "path", "=", "relative_path", ".", "to_s", "# if only_patterns && type == :file", "# return true unless only_patterns.any? { |pattern| path =~ pattern }", "# end", "return", "only_patterns", ".", "none?", "{", "|"...
TODO: switch type and path places - and verify
[ "TODO", ":", "switch", "type", "and", "path", "places", "-", "and", "verify" ]
a0dd9f78094813162895511e8516e0c5507cee50
https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/sources/source_watcher.rb#L11-L21
train
Returns true if the given path should be silenced.
[ 30522, 13366, 25030, 1029, 1006, 5816, 1035, 4130, 1010, 1035, 2828, 1007, 4130, 1027, 5816, 1035, 4130, 1012, 2000, 1035, 1055, 1001, 2065, 2069, 1035, 7060, 1004, 1004, 2828, 1027, 1027, 1024, 5371, 1001, 2709, 2995, 4983, 2069, 1035, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_relay/lib/2016-07-01/generated/azure_mgmt_relay/hybrid_connections.rb
Azure::Relay::Mgmt::V2016_07_01.HybridConnections.get_authorization_rule_with_http_info
def get_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil) get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value! end
ruby
def get_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil) get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value! end
[ "def", "get_authorization_rule_with_http_info", "(", "resource_group_name", ",", "namespace_name", ",", "hybrid_connection_name", ",", "authorization_rule_name", ",", "custom_headers", ":", "nil", ")", "get_authorization_rule_async", "(", "resource_group_name", ",", "namespace_...
HybridConnection authorizationRule for a HybridConnection by name. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param namespace_name [String] The Namespace Name @param hybrid_connection_name [String] The hybrid connection name. @param authorization_rule_name [String] The authorizationRule 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.
[ "HybridConnection", "authorizationRule", "for", "a", "HybridConnection", "by", "name", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_relay/lib/2016-07-01/generated/azure_mgmt_relay/hybrid_connections.rb#L905-L907
train
Gets the authorization rule for a HybridConnection.
[ 30522, 13366, 2131, 1035, 20104, 1035, 3627, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 8893, 1035, 4434, 1035, 2171, 1010, 20104, 1035, 3627, 1035, 2171, 1010, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
haml/haml
lib/haml/buffer.rb
Haml.Buffer.rstrip!
def rstrip! if capture_position.nil? buffer.rstrip! return end buffer << buffer.slice!(capture_position..-1).rstrip end
ruby
def rstrip! if capture_position.nil? buffer.rstrip! return end buffer << buffer.slice!(capture_position..-1).rstrip end
[ "def", "rstrip!", "if", "capture_position", ".", "nil?", "buffer", ".", "rstrip!", "return", "end", "buffer", "<<", "buffer", ".", "slice!", "(", "capture_position", "..", "-", "1", ")", ".", "rstrip", "end" ]
Remove the whitespace from the right side of the buffer string. Doesn't do anything if we're at the beginning of a capture_haml block.
[ "Remove", "the", "whitespace", "from", "the", "right", "side", "of", "the", "buffer", "string", ".", "Doesn", "t", "do", "anything", "if", "we", "re", "at", "the", "beginning", "of", "a", "capture_haml", "block", "." ]
9aa0fbe4a91b999978927be569d2ad0cd39076f1
https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/buffer.rb#L146-L153
train
Return the trailing whitespace of the buffer.
[ 30522, 13366, 12667, 24901, 999, 2065, 5425, 1035, 2597, 1012, 9152, 2140, 1029, 17698, 1012, 12667, 24901, 999, 2709, 2203, 17698, 1026, 1026, 17698, 1012, 14704, 999, 1006, 5425, 1035, 2597, 1012, 1012, 1011, 1015, 1007, 1012, 12667, 2490...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb
Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.get_virtual_network_rule
def get_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil) response = get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil) response = get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_virtual_network_rule", "(", "resource_group_name", ",", "namespace_name", ",", "virtual_network_rule_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_virtual_network_rule_async", "(", "resource_group_name", ",", "namespace_name", ",", "virtua...
Gets an VirtualNetworkRule for a Namespace by rule name. @param resource_group_name [String] Name of the resource group within the Azure subscription. @param namespace_name [String] The Namespace name @param virtual_network_rule_name [String] The Virtual Network Rule name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VirtualNetworkRule] operation results.
[ "Gets", "an", "VirtualNetworkRule", "for", "a", "Namespace", "by", "rule", "name", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L1255-L1258
train
Gets the specified virtual network rule.
[ 30522, 13366, 2131, 1035, 7484, 1035, 2897, 1035, 3627, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 3627, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb
Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.export_devices_with_http_info
def export_devices_with_http_info(resource_group_name, resource_name, export_devices_parameters, custom_headers:nil) export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers:custom_headers).value! end
ruby
def export_devices_with_http_info(resource_group_name, resource_name, export_devices_parameters, custom_headers:nil) export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers:custom_headers).value! end
[ "def", "export_devices_with_http_info", "(", "resource_group_name", ",", "resource_name", ",", "export_devices_parameters", ",", "custom_headers", ":", "nil", ")", "export_devices_async", "(", "resource_group_name", ",", "resource_name", ",", "export_devices_parameters", ",",...
Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. @param resource_group_name [String] The name of the resource group that contains the IoT hub. @param resource_name [String] The name of the IoT hub. @param export_devices_parameters [ExportDevicesRequest] The parameters that specify the export devices operation. @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.
[ "Exports", "all", "the", "device", "identities", "in", "the", "IoT", "hub", "identity", "registry", "to", "an", "Azure", "Storage", "blob", "container", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com"...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L1748-L1750
train
Export devices.
[ 30522, 13366, 9167, 1035, 5733, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 9167, 1035, 5733, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 9167, 1035, 5733, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mikel/mail
lib/mail/network/retriever_methods/base.rb
Mail.Retriever.all
def all(options = nil, &block) options = options ? Hash[options] : {} options[:count] = :all find(options, &block) end
ruby
def all(options = nil, &block) options = options ? Hash[options] : {} options[:count] = :all find(options, &block) end
[ "def", "all", "(", "options", "=", "nil", ",", "&", "block", ")", "options", "=", "options", "?", "Hash", "[", "options", "]", ":", "{", "}", "options", "[", ":count", "]", "=", ":all", "find", "(", "options", ",", "block", ")", "end" ]
Get all emails. Possible options: order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
[ "Get", "all", "emails", "." ]
fb53fb369eb2bf0494ac70675970c90cdcc3f495
https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/network/retriever_methods/base.rb#L39-L43
train
Find all the documents in the collection.
[ 30522, 13366, 2035, 1006, 7047, 1027, 9152, 2140, 1010, 1004, 3796, 1007, 7047, 1027, 7047, 1029, 23325, 1031, 7047, 1033, 1024, 1063, 1065, 7047, 1031, 1024, 4175, 1033, 1027, 1024, 2035, 2424, 1006, 7047, 1010, 1004, 3796, 1007, 2203, 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/scss-lint
lib/scss_lint/linter/import_path.rb
SCSSLint.Linter::ImportPath.compose_message
def compose_message(orig_filename) orig_basename = File.basename(orig_filename) fixed_basename = orig_basename if config['leading_underscore'] fixed_basename = '_' + fixed_basename unless fixed_basename.start_with?('_') else fixed_basename = fixed_basename.sub(/^_/, '') end if config['filename_extension'] fixed_basename += '.scss' unless fixed_basename.end_with?('.scss') else fixed_basename = fixed_basename.sub(/\.scss$/, '') end fixed_filename = orig_filename.sub(/(.*)#{Regexp.quote(orig_basename)}/, "\\1#{fixed_basename}") "Imported partial `#{orig_filename}` should be written as `#{fixed_filename}`" end
ruby
def compose_message(orig_filename) orig_basename = File.basename(orig_filename) fixed_basename = orig_basename if config['leading_underscore'] fixed_basename = '_' + fixed_basename unless fixed_basename.start_with?('_') else fixed_basename = fixed_basename.sub(/^_/, '') end if config['filename_extension'] fixed_basename += '.scss' unless fixed_basename.end_with?('.scss') else fixed_basename = fixed_basename.sub(/\.scss$/, '') end fixed_filename = orig_filename.sub(/(.*)#{Regexp.quote(orig_basename)}/, "\\1#{fixed_basename}") "Imported partial `#{orig_filename}` should be written as `#{fixed_filename}`" end
[ "def", "compose_message", "(", "orig_filename", ")", "orig_basename", "=", "File", ".", "basename", "(", "orig_filename", ")", "fixed_basename", "=", "orig_basename", "if", "config", "[", "'leading_underscore'", "]", "fixed_basename", "=", "'_'", "+", "fixed_basenam...
Composes a helpful lint message based on the original filename and the config options. @param orig_filename [String] the original filename @return [String] the helpful lint message
[ "Composes", "a", "helpful", "lint", "message", "based", "on", "the", "original", "filename", "and", "the", "config", "options", "." ]
e99afe4ede041a431a06e585c12ce82f6ad50116
https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/import_path.rb#L41-L60
train
compose message for the import of a file
[ 30522, 13366, 17202, 1035, 4471, 1006, 2030, 8004, 1035, 5371, 18442, 1007, 2030, 8004, 1035, 2918, 18442, 1027, 5371, 1012, 2918, 18442, 1006, 2030, 8004, 1035, 5371, 18442, 1007, 4964, 1035, 2918, 18442, 1027, 2030, 8004, 1035, 2918, 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_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb
Azure::Labservices::Mgmt::V2018_10_15.Labs.create_or_update_with_http_info
def create_or_update_with_http_info(resource_group_name, lab_account_name, lab_name, lab, custom_headers:nil) create_or_update_async(resource_group_name, lab_account_name, lab_name, lab, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(resource_group_name, lab_account_name, lab_name, lab, custom_headers:nil) create_or_update_async(resource_group_name, lab_account_name, lab_name, lab, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "lab", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "lab"...
Create or replace an existing Lab. @param resource_group_name [String] The name of the resource group. @param lab_account_name [String] The name of the lab Account. @param lab_name [String] The name of the lab. @param lab [Lab] Represents 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", "Lab", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb#L268-L270
train
Creates or updates a lab in the specified Data Lake Store account.
[ 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, 6845, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Dynamoid/dynamoid
lib/dynamoid/persistence.rb
Dynamoid.Persistence.update_attributes
def update_attributes(attributes) attributes.each { |attribute, value| write_attribute(attribute, value) } save end
ruby
def update_attributes(attributes) attributes.each { |attribute, value| write_attribute(attribute, value) } save end
[ "def", "update_attributes", "(", "attributes", ")", "attributes", ".", "each", "{", "|", "attribute", ",", "value", "|", "write_attribute", "(", "attribute", ",", "value", ")", "}", "save", "end" ]
Updates multiple attributes at once, saving the object once the updates are complete. @param [Hash] attributes a hash of attributes to update @since 0.2.0
[ "Updates", "multiple", "attributes", "at", "once", "saving", "the", "object", "once", "the", "updates", "are", "complete", "." ]
9e3d006b039e45877b003564ded65509b10b6354
https://github.com/Dynamoid/dynamoid/blob/9e3d006b039e45877b003564ded65509b10b6354/lib/dynamoid/persistence.rb#L158-L161
train
Update the attributes of the object
[ 30522, 13366, 10651, 1035, 12332, 1006, 12332, 1007, 12332, 1012, 2169, 1063, 1064, 17961, 1010, 3643, 1064, 4339, 1035, 17961, 1006, 17961, 1010, 3643, 1007, 1065, 3828, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
googleapis/google-cloud-ruby
google-cloud-pubsub/lib/google-cloud-pubsub.rb
Google.Cloud.pubsub
def pubsub scope: nil, timeout: nil, client_config: nil timeout ||= @timeout Google::Cloud.pubsub @project, @keyfile, scope: scope, timeout: timeout, client_config: client_config end
ruby
def pubsub scope: nil, timeout: nil, client_config: nil timeout ||= @timeout Google::Cloud.pubsub @project, @keyfile, scope: scope, timeout: timeout, client_config: client_config end
[ "def", "pubsub", "scope", ":", "nil", ",", "timeout", ":", "nil", ",", "client_config", ":", "nil", "timeout", "||=", "@timeout", "Google", "::", "Cloud", ".", "pubsub", "@project", ",", "@keyfile", ",", "scope", ":", "scope", ",", "timeout", ":", "timeo...
Creates a new object for connecting to the Pub/Sub service. Each call creates a new connection. For more information on connecting to Google Cloud see the {file:AUTHENTICATION.md Authentication Guide}. @param [String, Array<String>] scope The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See [Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/OAuth2). The default scope is: * `https://www.googleapis.com/auth/pubsub` @param [Integer] timeout Default timeout to use in requests. Optional. @param [Hash] client_config A hash of values to override the default behavior of the API client. Optional. @return [Google::Cloud::PubSub::Project] @example require "google/cloud" gcloud = Google::Cloud.new pubsub = gcloud.pubsub topic = pubsub.topic "my-topic" topic.publish "task completed" @example The default scope can be overridden with the `scope` option: require "google/cloud" gcloud = Google::Cloud.new platform_scope = "https://www.googleapis.com/auth/cloud-platform" pubsub = gcloud.pubsub scope: platform_scope
[ "Creates", "a", "new", "object", "for", "connecting", "to", "the", "Pub", "/", "Sub", "service", ".", "Each", "call", "creates", "a", "new", "connection", "." ]
846c1a57250ac860ef4de1b54853a480ab2ff702
https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-pubsub/lib/google-cloud-pubsub.rb#L65-L70
train
Create a pubsub client
[ 30522, 13366, 23598, 12083, 9531, 1024, 9152, 2140, 1010, 2051, 5833, 1024, 9152, 2140, 1010, 7396, 1035, 9530, 8873, 2290, 1024, 9152, 2140, 2051, 5833, 1064, 1064, 1027, 1030, 2051, 5833, 8224, 1024, 1024, 6112, 1012, 23598, 12083, 1030, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mikel/mail
lib/mail/message.rb
Mail.Message.body_lazy
def body_lazy(value) process_body_raw if @body_raw && value case when value == nil || value.length<=0 @body = Mail::Body.new('') @body_raw = nil add_encoding_to_body when @body && @body.multipart? self.text_part = value else @body_raw = value end end
ruby
def body_lazy(value) process_body_raw if @body_raw && value case when value == nil || value.length<=0 @body = Mail::Body.new('') @body_raw = nil add_encoding_to_body when @body && @body.multipart? self.text_part = value else @body_raw = value end end
[ "def", "body_lazy", "(", "value", ")", "process_body_raw", "if", "@body_raw", "&&", "value", "case", "when", "value", "==", "nil", "||", "value", ".", "length", "<=", "0", "@body", "=", "Mail", "::", "Body", ".", "new", "(", "''", ")", "@body_raw", "="...
see comments to body=. We take data and process it lazily
[ "see", "comments", "to", "body", "=", ".", "We", "take", "data", "and", "process", "it", "lazily" ]
fb53fb369eb2bf0494ac70675970c90cdcc3f495
https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/message.rb#L1988-L2000
train
This method is called when the body is not set in the body_raw attribute.
[ 30522, 13366, 2303, 1035, 13971, 1006, 3643, 1007, 2832, 1035, 2303, 1035, 6315, 2065, 1030, 2303, 1035, 6315, 1004, 1004, 3643, 2553, 2043, 3643, 1027, 1027, 9152, 2140, 1064, 1064, 3643, 1012, 3091, 1026, 1027, 1014, 1030, 2303, 1027, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.list_by_manager_with_http_info
def list_by_manager_with_http_info(resource_group_name, manager_name, expand:nil, custom_headers:nil) list_by_manager_async(resource_group_name, manager_name, expand:expand, custom_headers:custom_headers).value! end
ruby
def list_by_manager_with_http_info(resource_group_name, manager_name, expand:nil, custom_headers:nil) list_by_manager_async(resource_group_name, manager_name, expand:expand, custom_headers:custom_headers).value! end
[ "def", "list_by_manager_with_http_info", "(", "resource_group_name", ",", "manager_name", ",", "expand", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by_manager_async", "(", "resource_group_name", ",", "manager_name", ",", "expand", ":", "expand", ",", ...
Returns the list of devices for the specified manager. @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param expand [String] Specify $expand=details to populate additional fields related to the device or $expand=rolloverdetails to populate additional fields related to the service data encryption key rollover on device @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.
[ "Returns", "the", "list", "of", "devices", "for", "the", "specified", "manager", "." ]
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#L97-L99
train
Gets the list of the segmentation of the specified resource group.
[ 30522, 13366, 2862, 1035, 2011, 1035, 3208, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7818, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 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...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb
Aws::EC2.Volume.enable_io
def enable_io(options = {}) options = options.merge(volume_id: @id) resp = @client.enable_volume_io(options) resp.data end
ruby
def enable_io(options = {}) options = options.merge(volume_id: @id) resp = @client.enable_volume_io(options) resp.data end
[ "def", "enable_io", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "volume_id", ":", "@id", ")", "resp", "=", "@client", ".", "enable_volume_io", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values volume.enable_io({ dry_run: false, }) @param [Hash] options ({}) @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the 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/volume.rb#L516-L520
train
Enables IO on this volume.
[ 30522, 13366, 9585, 1035, 22834, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 3872, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 9585, 1035, 3872, 1035, 22834, 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...
hashicorp/vagrant
lib/vagrant/bundler.rb
Vagrant.Bundler.validate_configured_sources!
def validate_configured_sources! Gem.sources.each_source do |src| begin src.load_specs(:released) rescue Gem::Exception => source_error if ENV["VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS"] @logger.warn("Failed to load configured plugin source: #{src}!") @logger.warn("Error received attempting to load source (#{src}): #{source_error}") @logger.warn("Ignoring plugin source load failure due user request via env variable") else @logger.error("Failed to load configured plugin source `#{src}`: #{source_error}") raise Vagrant::Errors::PluginSourceError, source: src.uri.to_s, error_msg: source_error.message end end end end
ruby
def validate_configured_sources! Gem.sources.each_source do |src| begin src.load_specs(:released) rescue Gem::Exception => source_error if ENV["VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS"] @logger.warn("Failed to load configured plugin source: #{src}!") @logger.warn("Error received attempting to load source (#{src}): #{source_error}") @logger.warn("Ignoring plugin source load failure due user request via env variable") else @logger.error("Failed to load configured plugin source `#{src}`: #{source_error}") raise Vagrant::Errors::PluginSourceError, source: src.uri.to_s, error_msg: source_error.message end end end end
[ "def", "validate_configured_sources!", "Gem", ".", "sources", ".", "each_source", "do", "|", "src", "|", "begin", "src", ".", "load_specs", "(", ":released", ")", "rescue", "Gem", "::", "Exception", "=>", "source_error", "if", "ENV", "[", "\"VAGRANT_ALLOW_PLUGIN...
Iterates each configured RubyGem source to validate that it is properly available. If source is unavailable an exception is raised.
[ "Iterates", "each", "configured", "RubyGem", "source", "to", "validate", "that", "it", "is", "properly", "available", ".", "If", "source", "is", "unavailable", "an", "exception", "is", "raised", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/bundler.rb#L426-L443
train
Validate the configured sources
[ 30522, 13366, 9398, 3686, 1035, 26928, 1035, 4216, 999, 17070, 1012, 4216, 1012, 2169, 1035, 3120, 2079, 1064, 5034, 2278, 1064, 4088, 5034, 2278, 1012, 7170, 1035, 28699, 2015, 1006, 1024, 2207, 1007, 5343, 17070, 1024, 1024, 6453, 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...
aws/aws-sdk-ruby
gems/aws-sdk-iam/lib/aws-sdk-iam/resource.rb
Aws::IAM.Resource.virtual_mfa_devices
def virtual_mfa_devices(options = {}) batches = Enumerator.new do |y| resp = @client.list_virtual_mfa_devices(options) resp.each_page do |page| batch = [] page.data.virtual_mfa_devices.each do |v| batch << VirtualMfaDevice.new( serial_number: v.serial_number, data: v, client: @client ) end y.yield(batch) end end VirtualMfaDevice::Collection.new(batches) end
ruby
def virtual_mfa_devices(options = {}) batches = Enumerator.new do |y| resp = @client.list_virtual_mfa_devices(options) resp.each_page do |page| batch = [] page.data.virtual_mfa_devices.each do |v| batch << VirtualMfaDevice.new( serial_number: v.serial_number, data: v, client: @client ) end y.yield(batch) end end VirtualMfaDevice::Collection.new(batches) end
[ "def", "virtual_mfa_devices", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "resp", "=", "@client", ".", "list_virtual_mfa_devices", "(", "options", ")", "resp", ".", "each_page", "do", "|", "page", "|...
@example Request syntax with placeholder values virtual_mfa_devices = iam.virtual_mfa_devices({ assignment_status: "Assigned", # accepts Assigned, Unassigned, Any }) @param [Hash] options ({}) @option options [String] :assignment_status The status (`Unassigned` or `Assigned`) of the devices to list. If you do not specify an `AssignmentStatus`, the operation defaults to `Any`, which lists both assigned and unassigned virtual MFA devices., @return [VirtualMfaDevice::Collection]
[ "@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#L1166-L1182
train
Returns a list of all virtual mfa devices
[ 30522, 13366, 7484, 1035, 26913, 1035, 5733, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 24501, 2361, 1027, 1030, 7396, 1012, 2862, 1035, 7484, 1035, 26913, 1035, 5733, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc_peering_connection.rb
Aws::EC2.VpcPeeringConnection.accept
def accept(options = {}) options = options.merge(vpc_peering_connection_id: @id) resp = @client.accept_vpc_peering_connection(options) resp.data end
ruby
def accept(options = {}) options = options.merge(vpc_peering_connection_id: @id) resp = @client.accept_vpc_peering_connection(options) resp.data end
[ "def", "accept", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "vpc_peering_connection_id", ":", "@id", ")", "resp", "=", "@client", ".", "accept_vpc_peering_connection", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values vpc_peering_connection.accept({ dry_run: false, }) @param [Hash] options ({}) @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @return [Types::AcceptVpcPeeringConnectionResult]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc_peering_connection.rb#L242-L246
train
Accept a VPC Peering Connection
[ 30522, 13366, 5138, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 21210, 2278, 1035, 16740, 1035, 4434, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 5138, 1035, 21210, 2278, 1035, 16740...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_pattern_any_entity_model_with_http_info
def update_pattern_any_entity_model_with_http_info(app_id, version_id, entity_id, pattern_any_update_object, custom_headers:nil) update_pattern_any_entity_model_async(app_id, version_id, entity_id, pattern_any_update_object, custom_headers:custom_headers).value! end
ruby
def update_pattern_any_entity_model_with_http_info(app_id, version_id, entity_id, pattern_any_update_object, custom_headers:nil) update_pattern_any_entity_model_async(app_id, version_id, entity_id, pattern_any_update_object, custom_headers:custom_headers).value! end
[ "def", "update_pattern_any_entity_model_with_http_info", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "pattern_any_update_object", ",", "custom_headers", ":", "nil", ")", "update_pattern_any_entity_model_async", "(", "app_id", ",", "version_id", ",", "entity_id"...
Updates the name and explicit (exception) list of a Pattern.Any entity model in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param entity_id The Pattern.Any entity extractor ID. @param pattern_any_update_object [PatternAnyModelUpdateObject] An object containing the explicit list of the Pattern.Any entity. @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", "name", "and", "explicit", "(", "exception", ")", "list", "of", "a", "Pattern", ".", "Any", "entity", "model", "in", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L8595-L8597
train
Updates an entity in a version of the application.
[ 30522, 13366, 10651, 1035, 5418, 1035, 2151, 1035, 9178, 1035, 2944, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 5418, 1035, 2151, 1035, 10651, 1035, 4874, 1010, 7661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vagrant
lib/vagrant/cli.rb
Vagrant.CLI.help
def help # We use the optionparser for this. Its just easier. We don't use # an optionparser above because I don't think the performance hits # of creating a whole object are worth checking only a couple flags. opts = OptionParser.new do |o| o.banner = "Usage: vagrant [options] <command> [<args>]" o.separator "" o.on("-v", "--version", "Print the version and exit.") o.on("-h", "--help", "Print this help.") o.separator "" o.separator "Common commands:" # Add the available subcommands as separators in order to print them # out as well. commands = {} longest = 0 Vagrant.plugin("2").manager.commands.each do |key, data| # Skip non-primary commands. These only show up in extended # help output. next if !data[1][:primary] key = key.to_s klass = data[0].call commands[key] = klass.synopsis longest = key.length if key.length > longest end commands.keys.sort.each do |key| o.separator " #{key.ljust(longest+2)} #{commands[key]}" @env.ui.machine("cli-command", key.dup) end o.separator "" o.separator "For help on any individual command run `vagrant COMMAND -h`" o.separator "" o.separator "Additional subcommands are available, but are either more advanced" o.separator "or not commonly used. To see all subcommands, run the command" o.separator "`vagrant list-commands`." end @env.ui.info(opts.help, prefix: false) end
ruby
def help # We use the optionparser for this. Its just easier. We don't use # an optionparser above because I don't think the performance hits # of creating a whole object are worth checking only a couple flags. opts = OptionParser.new do |o| o.banner = "Usage: vagrant [options] <command> [<args>]" o.separator "" o.on("-v", "--version", "Print the version and exit.") o.on("-h", "--help", "Print this help.") o.separator "" o.separator "Common commands:" # Add the available subcommands as separators in order to print them # out as well. commands = {} longest = 0 Vagrant.plugin("2").manager.commands.each do |key, data| # Skip non-primary commands. These only show up in extended # help output. next if !data[1][:primary] key = key.to_s klass = data[0].call commands[key] = klass.synopsis longest = key.length if key.length > longest end commands.keys.sort.each do |key| o.separator " #{key.ljust(longest+2)} #{commands[key]}" @env.ui.machine("cli-command", key.dup) end o.separator "" o.separator "For help on any individual command run `vagrant COMMAND -h`" o.separator "" o.separator "Additional subcommands are available, but are either more advanced" o.separator "or not commonly used. To see all subcommands, run the command" o.separator "`vagrant list-commands`." end @env.ui.info(opts.help, prefix: false) end
[ "def", "help", "# We use the optionparser for this. Its just easier. We don't use", "# an optionparser above because I don't think the performance hits", "# of creating a whole object are worth checking only a couple flags.", "opts", "=", "OptionParser", ".", "new", "do", "|", "o", "|", ...
This prints out the help for the CLI.
[ "This", "prints", "out", "the", "help", "for", "the", "CLI", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/cli.rb#L78-L119
train
This is the main help method for the command.
[ 30522, 13366, 2393, 1001, 2057, 2224, 1996, 5724, 19362, 8043, 2005, 2023, 1012, 2049, 2074, 6082, 1012, 2057, 2123, 1005, 1056, 2224, 1001, 2019, 5724, 19362, 8043, 2682, 2138, 1045, 2123, 1005, 1056, 2228, 1996, 2836, 4978, 1001, 1997, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.get_keys_as_lazy
def get_keys_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil) first_page = get_keys_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers) first_page.get_all_items end
ruby
def get_keys_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil) first_page = get_keys_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "get_keys_as_lazy", "(", "vault_base_url", ",", "maxresults", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "get_keys_as_lazy_as_lazy", "(", "vault_base_url", ",", "maxresults", ":", "maxresults", ",", "custom_headers", ":custom_headers...
List keys in the specified vault. Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier, attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. 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 [KeyListResult] operation results.
[ "List", "keys", "in", "the", "specified", "vault", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L9576-L9579
train
Gets all the keys in a specified vault.
[ 30522, 13366, 2131, 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, 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...
tongueroo/jets
lib/jets/router.rb
Jets.Router.ordered_routes
def ordered_routes length = Proc.new { |r| r.path.length * -1 } capture_routes = routes.select { |r| r.path.include?(':') }.sort_by(&length) wildcard_routes = routes.select { |r| r.path.include?('*') }.sort_by(&length) simple_routes = (routes - capture_routes - wildcard_routes).sort_by(&length) simple_routes + capture_routes + wildcard_routes end
ruby
def ordered_routes length = Proc.new { |r| r.path.length * -1 } capture_routes = routes.select { |r| r.path.include?(':') }.sort_by(&length) wildcard_routes = routes.select { |r| r.path.include?('*') }.sort_by(&length) simple_routes = (routes - capture_routes - wildcard_routes).sort_by(&length) simple_routes + capture_routes + wildcard_routes end
[ "def", "ordered_routes", "length", "=", "Proc", ".", "new", "{", "|", "r", "|", "r", ".", "path", ".", "length", "*", "-", "1", "}", "capture_routes", "=", "routes", ".", "select", "{", "|", "r", "|", "r", ".", "path", ".", "include?", "(", "':'"...
Useful for RouterMatcher Precedence: 1. Routes with no captures get highest precedence: posts/new 2. Then consider the routes with captures: post/:id 3. Last consider the routes with wildcards: *catchall Within these 2 groups we consider the routes with the longest path first since posts/:id and posts/:id/edit can both match.
[ "Useful", "for", "RouterMatcher" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/router.rb#L119-L125
train
Returns an array of routes ordered by the path length
[ 30522, 13366, 3641, 1035, 5847, 3091, 1027, 4013, 2278, 1012, 2047, 1063, 1064, 1054, 1064, 1054, 1012, 4130, 1012, 3091, 1008, 1011, 1015, 1065, 5425, 1035, 5847, 1027, 5847, 1012, 7276, 1063, 1064, 1054, 1064, 1054, 1012, 4130, 1012, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.title_min_height
def title_min_height @title_min_height ||= begin height = fetch_config['title_min_height'] || 0 if height.kind_of?(String) && height.end_with?('%') height = ([image.width, image.height].min * height.to_f * 0.01).ceil end height end end
ruby
def title_min_height @title_min_height ||= begin height = fetch_config['title_min_height'] || 0 if height.kind_of?(String) && height.end_with?('%') height = ([image.width, image.height].min * height.to_f * 0.01).ceil end height end end
[ "def", "title_min_height", "@title_min_height", "||=", "begin", "height", "=", "fetch_config", "[", "'title_min_height'", "]", "||", "0", "if", "height", ".", "kind_of?", "(", "String", ")", "&&", "height", ".", "end_with?", "(", "'%'", ")", "height", "=", "...
Minimum height for the title
[ "Minimum", "height", "for", "the", "title" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L213-L221
train
Returns the minimum height of the title.
[ 30522, 13366, 2516, 1035, 8117, 1035, 4578, 1030, 2516, 1035, 8117, 1035, 4578, 1064, 1064, 1027, 4088, 4578, 1027, 18584, 1035, 9530, 8873, 2290, 1031, 1005, 2516, 1035, 8117, 1035, 4578, 1005, 1033, 1064, 1064, 1014, 2065, 4578, 1012, 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_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb
Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.get_event_hub_consumer_group
def get_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil) response = get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil) response = get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_event_hub_consumer_group", "(", "resource_group_name", ",", "resource_name", ",", "event_hub_endpoint_name", ",", "name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_event_hub_consumer_group_async", "(", "resource_group_name", ",", "resource_na...
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. @param resource_group_name [String] The name of the resource group that contains the IoT hub. @param resource_name [String] The name of the IoT hub. @param event_hub_endpoint_name [String] The name of the Event Hub-compatible endpoint in the IoT hub. @param name [String] The name of the consumer group to retrieve. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EventHubConsumerGroupInfo] operation results.
[ "Get", "a", "consumer", "group", "from", "the", "Event", "Hub", "-", "compatible", "device", "-", "to", "-", "cloud", "endpoint", "for", "an", "IoT", "hub", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L751-L754
train
Gets the consumer group for an Event Hub endpoint.
[ 30522, 13366, 2131, 1035, 2724, 1035, 9594, 1035, 7325, 1035, 2177, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 2724, 1035, 9594, 1035, 2203, 8400, 1035, 2171, 1010, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/jets
lib/jets/router.rb
Jets.Router.all_paths
def all_paths results = [] paths = routes.map(&:path) paths.each do |p| sub_paths = [] parts = p.split('/') until parts.empty? parts.pop sub_path = parts.join('/') sub_paths << sub_path unless sub_path == '' end results += sub_paths end @all_paths = (results + paths).sort.uniq end
ruby
def all_paths results = [] paths = routes.map(&:path) paths.each do |p| sub_paths = [] parts = p.split('/') until parts.empty? parts.pop sub_path = parts.join('/') sub_paths << sub_path unless sub_path == '' end results += sub_paths end @all_paths = (results + paths).sort.uniq end
[ "def", "all_paths", "results", "=", "[", "]", "paths", "=", "routes", ".", "map", "(", ":path", ")", "paths", ".", "each", "do", "|", "p", "|", "sub_paths", "=", "[", "]", "parts", "=", "p", ".", "split", "(", "'/'", ")", "until", "parts", ".", ...
Useful for creating API Gateway Resources
[ "Useful", "for", "creating", "API", "Gateway", "Resources" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/router.rb#L94-L108
train
Returns all the paths that match the route
[ 30522, 13366, 2035, 1035, 10425, 3463, 1027, 1031, 1033, 10425, 1027, 5847, 1012, 4949, 1006, 1004, 1024, 4130, 1007, 10425, 1012, 2169, 2079, 1064, 1052, 1064, 4942, 1035, 10425, 1027, 1031, 1033, 3033, 1027, 1052, 1012, 3975, 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...
mongodb/mongoid
lib/mongoid/changeable.rb
Mongoid.Changeable.changes
def changes _changes = {} changed.each do |attr| change = attribute_change(attr) _changes[attr] = change if change end _changes.with_indifferent_access end
ruby
def changes _changes = {} changed.each do |attr| change = attribute_change(attr) _changes[attr] = change if change end _changes.with_indifferent_access end
[ "def", "changes", "_changes", "=", "{", "}", "changed", ".", "each", "do", "|", "attr", "|", "change", "=", "attribute_change", "(", "attr", ")", "_changes", "[", "attr", "]", "=", "change", "if", "change", "end", "_changes", ".", "with_indifferent_access"...
Get all the changes for the document. @example Get all the changes. model.changes @return [ Hash<String, Array<Object, Object> ] The changes. @since 2.4.0
[ "Get", "all", "the", "changes", "for", "the", "document", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/changeable.rb#L67-L74
train
Returns a hash of the changes to the attributes in the current object.
[ 30522, 13366, 3431, 1035, 3431, 1027, 1063, 1065, 2904, 1012, 2169, 2079, 1064, 2012, 16344, 1064, 2689, 1027, 17961, 1035, 2689, 1006, 2012, 16344, 1007, 1035, 3431, 1031, 2012, 16344, 1033, 1027, 2689, 2065, 2689, 2203, 1035, 3431, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_entity_with_http_info
def add_entity_with_http_info(app_id, version_id, model_create_object, custom_headers:nil) add_entity_async(app_id, version_id, model_create_object, custom_headers:custom_headers).value! end
ruby
def add_entity_with_http_info(app_id, version_id, model_create_object, custom_headers:nil) add_entity_async(app_id, version_id, model_create_object, custom_headers:custom_headers).value! end
[ "def", "add_entity_with_http_info", "(", "app_id", ",", "version_id", ",", "model_create_object", ",", "custom_headers", ":", "nil", ")", "add_entity_async", "(", "app_id", ",", "version_id", ",", "model_create_object", ",", "custom_headers", ":custom_headers", ")", "...
Adds a simple entity extractor to a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param model_create_object [ModelCreateObject] A model object containing the name for the new simple entity extractor. @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.
[ "Adds", "a", "simple", "entity", "extractor", "to", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L285-L287
train
Adds an entity to the application version.
[ 30522, 13366, 5587, 1035, 9178, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 2944, 1035, 3443, 1035, 4874, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 5587, 1035, 9178, 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_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/restores.rb
Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.Restores.trigger
def trigger(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_request, custom_headers:nil) response = trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_request, custom_headers:custom_headers).value! nil end
ruby
def trigger(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_request, custom_headers:nil) response = trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_request, custom_headers:custom_headers).value! nil end
[ "def", "trigger", "(", "vault_name", ",", "resource_group_name", ",", "fabric_name", ",", "container_name", ",", "protected_item_name", ",", "recovery_point_id", ",", "resource_restore_request", ",", "custom_headers", ":", "nil", ")", "response", "=", "trigger_async", ...
Restores the specified backup data. This is an asynchronous operation. To know the status of this API call, use GetProtectedItemOperationResult API. @param vault_name [String] The name of the Recovery Services vault. @param resource_group_name [String] The name of the resource group associated with the Recovery Services vault. @param fabric_name [String] The fabric name associated with the backup items. @param container_name [String] The container name associated with the backup items. @param protected_item_name [String] The backup item to be restored. @param recovery_point_id [String] The recovery point ID for the backup data to be restored. @param resource_restore_request [RestoreRequestResource] The resource restore request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Restores", "the", "specified", "backup", "data", ".", "This", "is", "an", "asynchronous", "operation", ".", "To", "know", "the", "status", "of", "this", "API", "call", "use", "GetProtectedItemOperationResult", "API", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/restores.rb#L47-L50
train
Trigger a protected item.
[ 30522, 13366, 9495, 1006, 11632, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 8313, 1035, 2171, 1010, 11661, 1035, 2171, 1010, 5123, 1035, 8875, 1035, 2171, 1010, 7233, 1035, 2391, 1035, 8909, 1010, 7692, 1035, 9239, 1035, 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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.get_secrets
def get_secrets(vault_base_url, maxresults:nil, custom_headers:nil) first_page = get_secrets_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers) first_page.get_all_items end
ruby
def get_secrets(vault_base_url, maxresults:nil, custom_headers:nil) first_page = get_secrets_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "get_secrets", "(", "vault_base_url", ",", "maxresults", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "get_secrets_as_lazy", "(", "vault_base_url", ",", "maxresults", ":", "maxresults", ",", "custom_headers", ":custom_headers", ")", ...
List secrets in a specified key vault. The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/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 [Array<SecretItem>] operation results.
[ "List", "secrets", "in", "a", "specified", "key", "vault", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L3157-L3160
train
Gets all the secrets for the specified vault.
[ 30522, 13366, 2131, 1035, 7800, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 4098, 6072, 11314, 2015, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2131, 1035, 7800, 1035, 2004, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/readers/collection_reader.rb
Jekyll.CollectionReader.read
def read site.collections.each_value do |collection| collection.read unless SPECIAL_COLLECTIONS.include?(collection.label) end end
ruby
def read site.collections.each_value do |collection| collection.read unless SPECIAL_COLLECTIONS.include?(collection.label) end end
[ "def", "read", "site", ".", "collections", ".", "each_value", "do", "|", "collection", "|", "collection", ".", "read", "unless", "SPECIAL_COLLECTIONS", ".", "include?", "(", "collection", ".", "label", ")", "end", "end" ]
Read in all collections specified in the configuration Returns nothing.
[ "Read", "in", "all", "collections", "specified", "in", "the", "configuration" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/readers/collection_reader.rb#L16-L20
train
Reads the data from the database.
[ 30522, 13366, 3191, 2609, 1012, 6407, 1012, 2169, 1035, 3643, 2079, 1064, 3074, 1064, 3074, 1012, 3191, 4983, 2569, 1035, 6407, 1012, 2421, 1029, 1006, 3074, 1012, 3830, 1007, 2203, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/data/channel.rb
Discordrb.Channel.history_ids
def history_ids(amount, before_id = nil, after_id = nil, around_id = nil) logs = API::Channel.messages(@bot.token, @id, amount, before_id, after_id, around_id) JSON.parse(logs).map { |message| message['id'].to_i } end
ruby
def history_ids(amount, before_id = nil, after_id = nil, around_id = nil) logs = API::Channel.messages(@bot.token, @id, amount, before_id, after_id, around_id) JSON.parse(logs).map { |message| message['id'].to_i } end
[ "def", "history_ids", "(", "amount", ",", "before_id", "=", "nil", ",", "after_id", "=", "nil", ",", "around_id", "=", "nil", ")", "logs", "=", "API", "::", "Channel", ".", "messages", "(", "@bot", ".", "token", ",", "@id", ",", "amount", ",", "befor...
Retrieves message history, but only message IDs for use with prune. @note For internal use only @!visibility private
[ "Retrieves", "message", "history", "but", "only", "message", "IDs", "for", "use", "with", "prune", "." ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L537-L540
train
Returns an array of history IDs for this channel.
[ 30522, 13366, 2381, 1035, 8909, 2015, 1006, 3815, 1010, 2077, 1035, 8909, 1027, 9152, 2140, 1010, 2044, 1035, 8909, 1027, 9152, 2140, 1010, 2105, 1035, 8909, 1027, 9152, 2140, 1007, 15664, 1027, 17928, 1024, 1024, 3149, 1012, 7696, 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...
hashicorp/vagrant
lib/vagrant/environment.rb
Vagrant.Environment.upgrade_home_path_v1_1
def upgrade_home_path_v1_1 if !ENV["VAGRANT_UPGRADE_SILENT_1_5"] @ui.ask(I18n.t("vagrant.upgrading_home_path_v1_5")) end collection = BoxCollection.new( @home_path.join("boxes"), temp_dir_root: tmp_path) collection.upgrade_v1_1_v1_5 end
ruby
def upgrade_home_path_v1_1 if !ENV["VAGRANT_UPGRADE_SILENT_1_5"] @ui.ask(I18n.t("vagrant.upgrading_home_path_v1_5")) end collection = BoxCollection.new( @home_path.join("boxes"), temp_dir_root: tmp_path) collection.upgrade_v1_1_v1_5 end
[ "def", "upgrade_home_path_v1_1", "if", "!", "ENV", "[", "\"VAGRANT_UPGRADE_SILENT_1_5\"", "]", "@ui", ".", "ask", "(", "I18n", ".", "t", "(", "\"vagrant.upgrading_home_path_v1_5\"", ")", ")", "end", "collection", "=", "BoxCollection", ".", "new", "(", "@home_path"...
This upgrades a home directory that was in the v1.1 format to the v1.5 format. It will raise exceptions if anything fails.
[ "This", "upgrades", "a", "home", "directory", "that", "was", "in", "the", "v1", ".", "1", "format", "to", "the", "v1", ".", "5", "format", ".", "It", "will", "raise", "exceptions", "if", "anything", "fails", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/environment.rb#L1041-L1049
train
Upgrade the home path to v1. 1. 0
[ 30522, 13366, 12200, 1035, 2188, 1035, 4130, 1035, 1058, 2487, 1035, 1015, 2065, 999, 4372, 2615, 1031, 1000, 12436, 18980, 1035, 12200, 1035, 4333, 1035, 1015, 1035, 1019, 1000, 1033, 1030, 21318, 1012, 3198, 1006, 1045, 15136, 2078, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/encoding_utils.rb
Sprockets.EncodingUtils.detect_unicode
def detect_unicode(str) str = detect_unicode_bom(str) # Fallback to UTF-8 if str.encoding == Encoding::BINARY str.force_encoding(Encoding::UTF_8) end str end
ruby
def detect_unicode(str) str = detect_unicode_bom(str) # Fallback to UTF-8 if str.encoding == Encoding::BINARY str.force_encoding(Encoding::UTF_8) end str end
[ "def", "detect_unicode", "(", "str", ")", "str", "=", "detect_unicode_bom", "(", "str", ")", "# Fallback to UTF-8", "if", "str", ".", "encoding", "==", "Encoding", "::", "BINARY", "str", ".", "force_encoding", "(", "Encoding", "::", "UTF_8", ")", "end", "str...
Public: Detect Unicode string. Attempts to parse Unicode BOM and falls back to UTF-8. str - ASCII-8BIT encoded String Returns encoded String.
[ "Public", ":", "Detect", "Unicode", "string", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/encoding_utils.rb#L139-L148
train
Detect unicode encoding of a string
[ 30522, 13366, 11487, 1035, 27260, 1006, 2358, 2099, 1007, 2358, 2099, 1027, 11487, 1035, 27260, 1035, 8945, 2213, 1006, 2358, 2099, 1007, 1001, 2991, 5963, 2000, 21183, 2546, 1011, 1022, 2065, 2358, 2099, 1012, 17181, 1027, 1027, 17181, 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...
rmosolgo/graphql-ruby
lib/graphql/schema.rb
GraphQL.Schema.id_from_object
def id_from_object(object, type, ctx) if @id_from_object_proc.nil? raise(NotImplementedError, "Can't generate an ID for #{object.inspect} of type #{type}, schema's `id_from_object` must be defined") else @id_from_object_proc.call(object, type, ctx) end end
ruby
def id_from_object(object, type, ctx) if @id_from_object_proc.nil? raise(NotImplementedError, "Can't generate an ID for #{object.inspect} of type #{type}, schema's `id_from_object` must be defined") else @id_from_object_proc.call(object, type, ctx) end end
[ "def", "id_from_object", "(", "object", ",", "type", ",", "ctx", ")", "if", "@id_from_object_proc", ".", "nil?", "raise", "(", "NotImplementedError", ",", "\"Can't generate an ID for #{object.inspect} of type #{type}, schema's `id_from_object` must be defined\"", ")", "else", ...
Get a unique identifier from this object @param object [Any] An application object @param type [GraphQL::BaseType] The current type definition @param ctx [GraphQL::Query::Context] the context for the current query @return [String] a unique identifier for `object` which clients can use to refetch it
[ "Get", "a", "unique", "identifier", "from", "this", "object" ]
d5be13a816f220b9efbabeaa69a3e56fedf311f5
https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/schema.rb#L605-L611
train
Generate an ID from an object
[ 30522, 13366, 8909, 1035, 2013, 1035, 4874, 1006, 4874, 1010, 30524, 1000, 2064, 1005, 1056, 9699, 2019, 8909, 2005, 1001, 1063, 4874, 1012, 22459, 1065, 1997, 2828, 1001, 1063, 2828, 1065, 1010, 8040, 28433, 1005, 1055, 1036, 8909, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github/linguist
lib/linguist/generated.rb
Linguist.Generated.generated_pkgdown?
def generated_pkgdown? return false unless extname == '.html' return false unless lines.count > 1 return lines[0].start_with?("<!-- Generated by pkgdown: do not edit by hand -->") || lines[1].start_with?("<!-- Generated by pkgdown: do not edit by hand -->") end
ruby
def generated_pkgdown? return false unless extname == '.html' return false unless lines.count > 1 return lines[0].start_with?("<!-- Generated by pkgdown: do not edit by hand -->") || lines[1].start_with?("<!-- Generated by pkgdown: do not edit by hand -->") end
[ "def", "generated_pkgdown?", "return", "false", "unless", "extname", "==", "'.html'", "return", "false", "unless", "lines", ".", "count", ">", "1", "return", "lines", "[", "0", "]", ".", "start_with?", "(", "\"<!-- Generated by pkgdown: do not edit by hand -->\"", "...
Internal: Is this a pkgdown-generated file? A pkgdown-generated file typically contains: <!-- Generated by pkgdown: do not edit by hand --> on the first or second line. Return true or false
[ "Internal", ":", "Is", "this", "a", "pkgdown", "-", "generated", "file?" ]
9116c90fcbb82ac03b4b33c58cfbde1fcf745e99
https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/generated.rb#L516-L522
train
Returns true if the generated_pkgdown file is a pkgdown file.
[ 30522, 13366, 7013, 1035, 1052, 2243, 2290, 7698, 1029, 2709, 6270, 4983, 4654, 2102, 18442, 1027, 1027, 1005, 1012, 16129, 1005, 2709, 6270, 4983, 3210, 1012, 4175, 1028, 1015, 2709, 3210, 1031, 1014, 1033, 1012, 2707, 1035, 2007, 1029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_cors.rb
Aws::S3.BucketCors.put
def put(options = {}) options = options.merge(bucket: @bucket_name) resp = @client.put_bucket_cors(options) resp.data end
ruby
def put(options = {}) options = options.merge(bucket: @bucket_name) resp = @client.put_bucket_cors(options) resp.data end
[ "def", "put", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "bucket", ":", "@bucket_name", ")", "resp", "=", "@client", ".", "put_bucket_cors", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values bucket_cors.put({ cors_configuration: { # required cors_rules: [ # required { allowed_headers: ["AllowedHeader"], allowed_methods: ["AllowedMethod"], # required allowed_origins: ["AllowedOrigin"], # required expose_headers: ["ExposeHeader"], max_age_seconds: 1, }, ], }, content_md5: "ContentMD5", }) @param [Hash] options ({}) @option options [required, Types::CORSConfiguration] :cors_configuration @option options [String] :content_md5 @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_cors.rb#L202-L206
train
Put the object to the bucket
[ 30522, 13366, 2404, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 13610, 1024, 1030, 13610, 1035, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 2404, 1035, 13610, 1035, 2522, 2869, 1006, 7047, 1007, 24501, 2361...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/file_finder.rb
HamlLint.FileFinder.find
def find(patterns, excluded_patterns) excluded_patterns = excluded_patterns.map { |pattern| normalize_path(pattern) } extract_files_from(patterns).reject do |file| excluded_patterns.any? do |exclusion_glob| HamlLint::Utils.any_glob_matches?(exclusion_glob, file) end end end
ruby
def find(patterns, excluded_patterns) excluded_patterns = excluded_patterns.map { |pattern| normalize_path(pattern) } extract_files_from(patterns).reject do |file| excluded_patterns.any? do |exclusion_glob| HamlLint::Utils.any_glob_matches?(exclusion_glob, file) end end end
[ "def", "find", "(", "patterns", ",", "excluded_patterns", ")", "excluded_patterns", "=", "excluded_patterns", ".", "map", "{", "|", "pattern", "|", "normalize_path", "(", "pattern", ")", "}", "extract_files_from", "(", "patterns", ")", ".", "reject", "do", "|"...
Create a file finder using the specified configuration. @param config [HamlLint::Configuration] Return list of files to lint given the specified set of paths and glob patterns. @param patterns [Array<String>] @param excluded_patterns [Array<String>] @raise [HamlLint::Exceptions::InvalidFilePath] @return [Array<String>] list of actual files
[ "Create", "a", "file", "finder", "using", "the", "specified", "configuration", "." ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/file_finder.rb#L26-L34
train
Find all files matching the given patterns.
[ 30522, 13366, 2424, 1006, 7060, 1010, 12421, 1035, 7060, 1007, 12421, 1035, 7060, 1027, 12421, 1035, 7060, 1012, 4949, 1063, 1064, 5418, 1064, 3671, 4697, 1035, 4130, 1006, 5418, 1007, 1065, 14817, 1035, 6764, 1035, 2013, 1006, 7060, 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...
mhenrixon/sidekiq-unique-jobs
lib/sidekiq_unique_jobs/locksmith.rb
SidekiqUniqueJobs.Locksmith.unlock!
def unlock!(token = nil) token ||= jid Scripts.call( :unlock, redis_pool, keys: [exists_key, grabbed_key, available_key, version_key, UNIQUE_SET, unique_digest], argv: [token, ttl, lock_type], ) end
ruby
def unlock!(token = nil) token ||= jid Scripts.call( :unlock, redis_pool, keys: [exists_key, grabbed_key, available_key, version_key, UNIQUE_SET, unique_digest], argv: [token, ttl, lock_type], ) end
[ "def", "unlock!", "(", "token", "=", "nil", ")", "token", "||=", "jid", "Scripts", ".", "call", "(", ":unlock", ",", "redis_pool", ",", "keys", ":", "[", "exists_key", ",", "grabbed_key", ",", "available_key", ",", "version_key", ",", "UNIQUE_SET", ",", ...
Removes the lock keys from Redis @param [String] token the token to unlock (defaults to jid) @return [false] unless locked? @return [String] Sidekiq job_id (jid) if successful
[ "Removes", "the", "lock", "keys", "from", "Redis" ]
2944b97c720528f53962ccfd17d43ac939a77f46
https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/locksmith.rb#L91-L100
train
Unlocks the lock
[ 30522, 13366, 19829, 999, 1006, 19204, 1027, 9152, 2140, 1007, 19204, 1064, 1064, 1027, 10147, 2094, 14546, 1012, 2655, 1006, 1024, 19829, 1010, 2417, 2483, 1035, 4770, 1010, 6309, 1024, 1031, 6526, 1035, 3145, 1010, 4046, 1035, 3145, 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...
cucumber/aruba
lib/aruba/basic_configuration.rb
Aruba.BasicConfiguration.before
def before(name, context = proc {}, *args, &block) name = format('%s_%s', 'before_', name.to_s).to_sym if block_given? @hooks.append(name, block) self else @hooks.execute(name, context, *args) end end
ruby
def before(name, context = proc {}, *args, &block) name = format('%s_%s', 'before_', name.to_s).to_sym if block_given? @hooks.append(name, block) self else @hooks.execute(name, context, *args) end end
[ "def", "before", "(", "name", ",", "context", "=", "proc", "{", "}", ",", "*", "args", ",", "&", "block", ")", "name", "=", "format", "(", "'%s_%s'", ",", "'before_'", ",", "name", ".", "to_s", ")", ".", "to_sym", "if", "block_given?", "@hooks", "....
Define or run before-hook @param [Symbol, String] name The name of the hook @param [Proc] context The context a hook should run in. This is a runtime only option. @param [Array] args Arguments for the run of hook. This is a runtime only option. @yield The code block which should be run. This is a configure time only option
[ "Define", "or", "run", "before", "-", "hook" ]
add17615322f575588aef1fccce875396cdf36e9
https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/basic_configuration.rb#L137-L147
train
Add hooks to the current object.
[ 30522, 13366, 2077, 1006, 2171, 1010, 6123, 1027, 4013, 2278, 1063, 1065, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2171, 1027, 4289, 1006, 1005, 1003, 1055, 1035, 1003, 1055, 1005, 1010, 1005, 2077, 1035, 1005, 1010, 2171, 1012, 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-ec2/lib/aws-sdk-ec2/route.rb
Aws::EC2.Route.delete
def delete(options = {}) options = options.merge( route_table_id: @route_table_id, destination_cidr_block: @destination_cidr_block ) resp = @client.delete_route(options) resp.data end
ruby
def delete(options = {}) options = options.merge( route_table_id: @route_table_id, destination_cidr_block: @destination_cidr_block ) resp = @client.delete_route(options) resp.data end
[ "def", "delete", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "route_table_id", ":", "@route_table_id", ",", "destination_cidr_block", ":", "@destination_cidr_block", ")", "resp", "=", "@client", ".", "delete_route", "(", "...
@!group Actions @example Request syntax with placeholder values route.delete({ destination_ipv_6_cidr_block: "String", dry_run: false, }) @param [Hash] options ({}) @option options [String] :destination_ipv_6_cidr_block The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly. @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]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/route.rb#L267-L274
train
Delete a route
[ 30522, 13366, 3972, 12870, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 2799, 1035, 2795, 1035, 8909, 1024, 1030, 2799, 1035, 2795, 1035, 8909, 1010, 7688, 1035, 28744, 2099, 1035, 3796, 1024, 1030, 7688, 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...
backup/backup
lib/backup/model.rb
Backup.Model.get_class_from_scope
def get_class_from_scope(scope, name) klass = scope name = name.to_s.sub(/^Backup::Config::DSL::/, "") name.split("::").each do |chunk| klass = klass.const_get(chunk) end klass end
ruby
def get_class_from_scope(scope, name) klass = scope name = name.to_s.sub(/^Backup::Config::DSL::/, "") name.split("::").each do |chunk| klass = klass.const_get(chunk) end klass end
[ "def", "get_class_from_scope", "(", "scope", ",", "name", ")", "klass", "=", "scope", "name", "=", "name", ".", "to_s", ".", "sub", "(", "/", "/", ",", "\"\"", ")", "name", ".", "split", "(", "\"::\"", ")", ".", "each", "do", "|", "chunk", "|", "...
Returns the class/model specified by +name+ inside of +scope+. +scope+ should be a Class/Module. +name+ may be Class/Module or String representation of any namespace which exists under +scope+. The 'Backup::Config::DSL' namespace is stripped from +name+, since this is the namespace where we define module namespaces for use with Model's DSL methods. Examples: get_class_from_scope(Backup::Database, 'MySQL') returns the class Backup::Database::MySQL get_class_from_scope(Backup::Syncer, Backup::Config::RSync::Local) returns the class Backup::Syncer::RSync::Local
[ "Returns", "the", "class", "/", "model", "specified", "by", "+", "name", "+", "inside", "of", "+", "scope", "+", ".", "+", "scope", "+", "should", "be", "a", "Class", "/", "Module", ".", "+", "name", "+", "may", "be", "Class", "/", "Module", "or", ...
64370f925e859f858766b674717a3dbee0de7a26
https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/lib/backup/model.rb#L371-L378
train
Get the class from a given scope
[ 30522, 13366, 2131, 1035, 2465, 1035, 2013, 1035, 9531, 1006, 9531, 1010, 2171, 1007, 1047, 27102, 1027, 9531, 2171, 1027, 2171, 1012, 2000, 1035, 1055, 1012, 4942, 1006, 1013, 1034, 10200, 1024, 1024, 9530, 8873, 2290, 1024, 1024, 16233, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Dynamoid/dynamoid
lib/dynamoid/adapter.rb
Dynamoid.Adapter.benchmark
def benchmark(method, *args) start = Time.now result = yield Dynamoid.logger.debug "(#{((Time.now - start) * 1000.0).round(2)} ms) #{method.to_s.split('_').collect(&:upcase).join(' ')}#{" - #{args.inspect}" unless args.nil? || args.empty?}" result end
ruby
def benchmark(method, *args) start = Time.now result = yield Dynamoid.logger.debug "(#{((Time.now - start) * 1000.0).round(2)} ms) #{method.to_s.split('_').collect(&:upcase).join(' ')}#{" - #{args.inspect}" unless args.nil? || args.empty?}" result end
[ "def", "benchmark", "(", "method", ",", "*", "args", ")", "start", "=", "Time", ".", "now", "result", "=", "yield", "Dynamoid", ".", "logger", ".", "debug", "\"(#{((Time.now - start) * 1000.0).round(2)} ms) #{method.to_s.split('_').collect(&:upcase).join(' ')}#{\" - #{args....
Shows how long it takes a method to run on the adapter. Useful for generating logged output. @param [Symbol] method the name of the method to appear in the log @param [Array] args the arguments to the method to appear in the log @yield the actual code to benchmark @return the result of the yield @since 0.2.0
[ "Shows", "how", "long", "it", "takes", "a", "method", "to", "run", "on", "the", "adapter", ".", "Useful", "for", "generating", "logged", "output", "." ]
9e3d006b039e45877b003564ded65509b10b6354
https://github.com/Dynamoid/dynamoid/blob/9e3d006b039e45877b003564ded65509b10b6354/lib/dynamoid/adapter.rb#L52-L57
train
Benchmarks the block for the given method.
[ 30522, 13366, 6847, 10665, 1006, 4118, 1010, 1008, 12098, 5620, 1007, 2707, 1027, 2051, 1012, 2085, 2765, 1027, 10750, 17205, 3593, 1012, 8833, 4590, 1012, 2139, 8569, 2290, 1000, 1006, 1001, 1063, 1006, 1006, 2051, 1012, 2085, 1011, 2707, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb
Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_azure_reachability_report
def begin_get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_get_azure_reachability_report", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_get_azure_reachability_report_async", "(", "resource_group_name", ",", "network_watcher_name...
Gets the relative latency score for internet service providers from a specified location to Azure regions. @param resource_group_name [String] The name of the network watcher resource group. @param network_watcher_name [String] The name of the network watcher resource. @param parameters [AzureReachabilityReportParameters] Parameters that determine Azure reachability report configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [AzureReachabilityReport] operation results.
[ "Gets", "the", "relative", "latency", "score", "for", "internet", "service", "providers", "from", "a", "specified", "location", "to", "Azure", "regions", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L2253-L2256
train
Gets the current Azure reachability report.
[ 30522, 13366, 4088, 1035, 2131, 1035, 24296, 1035, 3362, 8010, 1035, 3189, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3422, 2121, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
deivid-rodriguez/byebug
lib/byebug/processors/command_processor.rb
Byebug.CommandProcessor.run_auto_cmds
def run_auto_cmds(run_level) safely do auto_cmds_for(run_level).each { |cmd| cmd.new(self).execute } end end
ruby
def run_auto_cmds(run_level) safely do auto_cmds_for(run_level).each { |cmd| cmd.new(self).execute } end end
[ "def", "run_auto_cmds", "(", "run_level", ")", "safely", "do", "auto_cmds_for", "(", "run_level", ")", ".", "each", "{", "|", "cmd", "|", "cmd", ".", "new", "(", "self", ")", ".", "execute", "}", "end", "end" ]
Run permanent commands.
[ "Run", "permanent", "commands", "." ]
bf41a63858a648baa7fb621600d6451786d1572a
https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/processors/command_processor.rb#L146-L150
train
Run auto commands for the specified run level.
[ 30522, 13366, 2448, 1035, 8285, 1035, 4642, 5104, 1006, 2448, 1035, 2504, 1007, 9689, 2079, 8285, 1035, 4642, 5104, 1035, 2005, 1006, 2448, 1035, 2504, 1007, 1012, 2169, 1063, 1064, 4642, 2094, 1064, 4642, 2094, 1012, 2047, 1006, 2969, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-04-01/generated/azure_mgmt_network/express_route_cross_connections.rb
Azure::Network::Mgmt::V2018_04_01.ExpressRouteCrossConnections.update_tags
def update_tags(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil) response = update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update_tags(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil) response = update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update_tags", "(", "resource_group_name", ",", "cross_connection_name", ",", "cross_connection_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_tags_async", "(", "resource_group_name", ",", "cross_connection_name", ",", "cross_connection...
Updates an express route cross connection tags. @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 [ExpressRouteCrossConnection] operation results.
[ "Updates", "an", "express", "route", "cross", "connection", "tags", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-04-01/generated/azure_mgmt_network/express_route_cross_connections.rb#L354-L357
train
Updates the tags of the specified cross connection.
[ 30522, 13366, 10651, 1035, 22073, 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, 3433, 1027, 10651, 1035, 22073, 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...
aws/aws-sdk-ruby
gems/aws-sdk-iam/lib/aws-sdk-iam/instance_profile.rb
Aws::IAM.InstanceProfile.add_role
def add_role(options = {}) options = options.merge(instance_profile_name: @name) resp = @client.add_role_to_instance_profile(options) resp.data end
ruby
def add_role(options = {}) options = options.merge(instance_profile_name: @name) resp = @client.add_role_to_instance_profile(options) resp.data end
[ "def", "add_role", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "instance_profile_name", ":", "@name", ")", "resp", "=", "@client", ".", "add_role_to_instance_profile", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values instance_profile.add_role({ role_name: "roleNameType", # required }) @param [Hash] options ({}) @option options [required, String] :role_name The name of the role to add. 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: \_+=,.@- [1]: http://wikipedia.org/wiki/regex @return [EmptyStructure]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/instance_profile.rb#L256-L260
train
Add a role to the instance profile
[ 30522, 13366, 5587, 1035, 2535, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 6013, 1035, 6337, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 5587, 1035, 2535, 1035, 2000, 1035, 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...
jekyll/jekyll
lib/jekyll/collection.rb
Jekyll.Collection.entries
def entries return [] unless exists? @entries ||= Utils.safe_glob(collection_dir, ["**", "*"], File::FNM_DOTMATCH).map do |entry| entry["#{collection_dir}/"] = "" entry end end
ruby
def entries return [] unless exists? @entries ||= Utils.safe_glob(collection_dir, ["**", "*"], File::FNM_DOTMATCH).map do |entry| entry["#{collection_dir}/"] = "" entry end end
[ "def", "entries", "return", "[", "]", "unless", "exists?", "@entries", "||=", "Utils", ".", "safe_glob", "(", "collection_dir", ",", "[", "\"**\"", ",", "\"*\"", "]", ",", "File", "::", "FNM_DOTMATCH", ")", ".", "map", "do", "|", "entry", "|", "entry", ...
All the entries in this collection. Returns an Array of file paths to the documents in this collection relative to the collection's directory
[ "All", "the", "entries", "in", "this", "collection", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/collection.rb#L75-L83
train
Returns an array of the entries in the collection
[ 30522, 13366, 10445, 2709, 1031, 1033, 4983, 6526, 1029, 1030, 10445, 1064, 1064, 1027, 21183, 12146, 1012, 3647, 1035, 1043, 4135, 2497, 1006, 3074, 1035, 16101, 1010, 1031, 1000, 1008, 1008, 1000, 1010, 1000, 1008, 1000, 1033, 1010, 5371,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/default_security_rules.rb
Azure::Network::Mgmt::V2018_07_01.DefaultSecurityRules.get_with_http_info
def get_with_http_info(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers:nil) get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers:nil) get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "network_security_group_name", ",", "default_security_rule_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "network_security_group_name", ",", "default_security_rule_name"...
Get the specified default network security rule. @param resource_group_name [String] The name of the resource group. @param network_security_group_name [String] The name of the network security group. @param default_security_rule_name [String] The name of the default security rule. @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", "the", "specified", "default", "network", "security", "rule", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/default_security_rules.rb#L150-L152
train
Gets the specified network security group default security rule.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3036, 1035, 2177, 1035, 2171, 1010, 12398, 1035, 3036, 1035, 3627, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/repos/branches/protections.rb
Github.Client::Repos::Branches::Protections.edit
def edit(*args) arguments(args, required: [:user, :repo, :branch]) do permit VALID_PROTECTION_PARAM_NAMES end put_request("/repos/#{arguments.user}/#{arguments.repo}/branches/#{arguments.branch}/protection", arguments.params) end
ruby
def edit(*args) arguments(args, required: [:user, :repo, :branch]) do permit VALID_PROTECTION_PARAM_NAMES end put_request("/repos/#{arguments.user}/#{arguments.repo}/branches/#{arguments.branch}/protection", arguments.params) end
[ "def", "edit", "(", "*", "args", ")", "arguments", "(", "args", ",", "required", ":", "[", ":user", ",", ":repo", ",", ":branch", "]", ")", "do", "permit", "VALID_PROTECTION_PARAM_NAMES", "end", "put_request", "(", "\"/repos/#{arguments.user}/#{arguments.repo}/bra...
Edit a branch protection Users with push access to the repository can edit a branch protection. @param [Hash] params @input params [String] :required_status_checks Required. @input params [String] :enforce_admins Required. @input params [String] :restrictions Required. @input params [String] :required_pull_request_reviews Required. Look to the branch protection API to see how to use these https://developer.github.com/v3/repos/branches/#update-branch-protection @example github = Github.new github.repos.branches.protections.edit 'user', 'repo', 'branch', required_pull_request_reviews: {dismiss_stale_reviews: false} @api public
[ "Edit", "a", "branch", "protection" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/branches/protections.rb#L52-L58
train
Edit a protection
[ 30522, 13366, 10086, 1006, 1008, 12098, 5620, 1007, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 5310, 1010, 1024, 16360, 2080, 1010, 1024, 3589, 1033, 1007, 2079, 9146, 9398, 1035, 3860, 1035, 11498, 2213, 1035, 3415, 2203, 2404,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/security_group.rb
Aws::EC2.SecurityGroup.delete
def delete(options = {}) options = options.merge(group_id: @id) resp = @client.delete_security_group(options) resp.data end
ruby
def delete(options = {}) options = options.merge(group_id: @id) resp = @client.delete_security_group(options) resp.data end
[ "def", "delete", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "group_id", ":", "@id", ")", "resp", "=", "@client", ".", "delete_security_group", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values security_group.delete({ group_name: "String", dry_run: false, }) @param [Hash] options ({}) @option options [String] :group_name \[EC2-Classic, default VPC\] The name of the security group. You can specify either the security group name or the security group ID. @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/security_group.rb#L457-L461
train
Delete a security group
[ 30522, 13366, 3972, 12870, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 2177, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3972, 12870, 1035, 3036, 1035, 2177, 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...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb
Aws::EC2.Instance.reset_attribute
def reset_attribute(options = {}) options = options.merge(instance_id: @id) resp = @client.reset_instance_attribute(options) resp.data end
ruby
def reset_attribute(options = {}) options = options.merge(instance_id: @id) resp = @client.reset_instance_attribute(options) resp.data end
[ "def", "reset_attribute", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "instance_id", ":", "@id", ")", "resp", "=", "@client", ".", "reset_instance_attribute", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values instance.reset_attribute({ attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport dry_run: false, }) @param [Hash] options ({}) @option options [required, String] :attribute The attribute to reset. You can only reset the following attributes: `kernel` \| `ramdisk` \| `sourceDestCheck`. To change an instance attribute, use ModifyInstanceAttribute. @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/instance.rb#L1056-L1060
train
Reset the attribute of the instance
[ 30522, 13366, 25141, 1035, 17961, 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, 25141, 1035, 6013, 1035, 17961, 1006, 7047, 1007, 2450...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/resource.rb
Aws::RDS.Resource.event_subscriptions
def event_subscriptions(options = {}) batches = Enumerator.new do |y| resp = @client.describe_event_subscriptions(options) resp.each_page do |page| batch = [] page.data.event_subscriptions_list.each do |e| batch << EventSubscription.new( name: e.cust_subscription_id, data: e, client: @client ) end y.yield(batch) end end EventSubscription::Collection.new(batches) end
ruby
def event_subscriptions(options = {}) batches = Enumerator.new do |y| resp = @client.describe_event_subscriptions(options) resp.each_page do |page| batch = [] page.data.event_subscriptions_list.each do |e| batch << EventSubscription.new( name: e.cust_subscription_id, data: e, client: @client ) end y.yield(batch) end end EventSubscription::Collection.new(batches) end
[ "def", "event_subscriptions", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "resp", "=", "@client", ".", "describe_event_subscriptions", "(", "options", ")", "resp", ".", "each_page", "do", "|", "page", ...
@example Request syntax with placeholder values event_subscriptions = rds.event_subscriptions({ subscription_name: "String", filters: [ { name: "String", # required values: ["String"], # required }, ], }) @param [Hash] options ({}) @option options [String] :subscription_name The name of the RDS event notification subscription you want to describe. @option options [Array<Types::Filter>] :filters This parameter is not currently supported. @return [EventSubscription::Collection]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb#L2222-L2238
train
Returns an array of EventSubscription objects
[ 30522, 13366, 2724, 1035, 15002, 2015, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 24501, 2361, 1027, 1030, 7396, 1012, 6235, 1035, 2724, 1035, 15002, 2015, 1006, 7047, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
commander-rb/commander
lib/commander/user_interaction.rb
Commander.UI.enable_paging
def enable_paging return unless $stdout.tty? return unless Process.respond_to? :fork read, write = IO.pipe # Kernel.fork is not supported on all platforms and configurations. # As of Ruby 1.9, `Process.respond_to? :fork` should return false on # configurations that don't support it, but versions before 1.9 don't # seem to do this reliably and instead raise a NotImplementedError # (which is rescued below). if Kernel.fork $stdin.reopen read write.close read.close Kernel.select [$stdin] ENV['LESS'] = 'FSRX' unless ENV.key? 'LESS' pager = ENV['PAGER'] || 'less' exec pager rescue exec '/bin/sh', '-c', pager else # subprocess $stdout.reopen write $stderr.reopen write if $stderr.tty? write.close read.close end rescue NotImplementedError ensure write.close if write && !write.closed? read.close if read && !read.closed? end
ruby
def enable_paging return unless $stdout.tty? return unless Process.respond_to? :fork read, write = IO.pipe # Kernel.fork is not supported on all platforms and configurations. # As of Ruby 1.9, `Process.respond_to? :fork` should return false on # configurations that don't support it, but versions before 1.9 don't # seem to do this reliably and instead raise a NotImplementedError # (which is rescued below). if Kernel.fork $stdin.reopen read write.close read.close Kernel.select [$stdin] ENV['LESS'] = 'FSRX' unless ENV.key? 'LESS' pager = ENV['PAGER'] || 'less' exec pager rescue exec '/bin/sh', '-c', pager else # subprocess $stdout.reopen write $stderr.reopen write if $stderr.tty? write.close read.close end rescue NotImplementedError ensure write.close if write && !write.closed? read.close if read && !read.closed? end
[ "def", "enable_paging", "return", "unless", "$stdout", ".", "tty?", "return", "unless", "Process", ".", "respond_to?", ":fork", "read", ",", "write", "=", "IO", ".", "pipe", "# Kernel.fork is not supported on all platforms and configurations.", "# As of Ruby 1.9, `Process.r...
Enable paging of output after called.
[ "Enable", "paging", "of", "output", "after", "called", "." ]
332047c14948225462fe60042eed23adfb996d68
https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L274-L304
train
Enable pagering on the specified index.
[ 30522, 13366, 9585, 1035, 6643, 4726, 2709, 4983, 1002, 2358, 26797, 2102, 1012, 23746, 2100, 1029, 2709, 4983, 2832, 1012, 6869, 1035, 2000, 1029, 1024, 9292, 3191, 1010, 4339, 1027, 22834, 1012, 8667, 1001, 16293, 1012, 9292, 2003, 2025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/component_path_helper.rb
Decidim.ComponentPathHelper.main_component_path
def main_component_path(component) current_params = try(:params) || {} EngineRouter.main_proxy(component).root_path(locale: current_params[:locale]) end
ruby
def main_component_path(component) current_params = try(:params) || {} EngineRouter.main_proxy(component).root_path(locale: current_params[:locale]) end
[ "def", "main_component_path", "(", "component", ")", "current_params", "=", "try", "(", ":params", ")", "||", "{", "}", "EngineRouter", ".", "main_proxy", "(", "component", ")", ".", "root_path", "(", "locale", ":", "current_params", "[", ":locale", "]", ")"...
Returns the defined root path for a given component. component - the Component we want to find the root path for. Returns a relative url.
[ "Returns", "the", "defined", "root", "path", "for", "a", "given", "component", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/component_path_helper.rb#L11-L14
train
Returns the main component path
[ 30522, 13366, 2364, 1035, 6922, 1035, 4130, 1006, 6922, 1007, 2783, 1035, 30524, 11498, 5244, 1031, 1024, 2334, 2063, 1033, 1007, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb
Azure::OperationalInsights::Mgmt::V2015_03_20.Workspaces.get_purge_status
def get_purge_status(resource_group_name, workspace_name, custom_headers:nil) response = get_purge_status_async(resource_group_name, workspace_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_purge_status(resource_group_name, workspace_name, custom_headers:nil) response = get_purge_status_async(resource_group_name, workspace_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_purge_status", "(", "resource_group_name", ",", "workspace_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_purge_status_async", "(", "resource_group_name", ",", "workspace_name", ",", "custom_headers", ":custom_headers", ")", ".", "value...
Gets status of an ongoing purge operation. @param resource_group_name [String] The name of the resource group to get. The name is case insensitive. @param workspace_name [String] Log Analytics workspace name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [WorkspacePurgeStatusResponse] operation results.
[ "Gets", "status", "of", "an", "ongoing", "purge", "operation", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb#L500-L503
train
Gets the purge status of the specified HDInsight workspace.
[ 30522, 13366, 2131, 1035, 24694, 1035, 3570, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 24694, 1035, 3570, 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...
rails/sprockets
lib/sprockets/context.rb
Sprockets.Context.resolve
def resolve(path, **kargs) kargs[:base_path] = @dirname uri, deps = environment.resolve!(path, **kargs) @dependencies.merge(deps) uri end
ruby
def resolve(path, **kargs) kargs[:base_path] = @dirname uri, deps = environment.resolve!(path, **kargs) @dependencies.merge(deps) uri end
[ "def", "resolve", "(", "path", ",", "**", "kargs", ")", "kargs", "[", ":base_path", "]", "=", "@dirname", "uri", ",", "deps", "=", "environment", ".", "resolve!", "(", "path", ",", "**", "kargs", ")", "@dependencies", ".", "merge", "(", "deps", ")", ...
Public: Given a logical path, `resolve` will find and return an Asset URI. Relative paths will also be resolved. An accept type maybe given to restrict the search. resolve("foo.js") # => "file:///path/to/app/javascripts/foo.js?type=application/javascript" resolve("./bar.js") # => "file:///path/to/app/javascripts/bar.js?type=application/javascript" path - String logical or absolute path accept - String content accept type Returns an Asset URI String.
[ "Public", ":", "Given", "a", "logical", "path", "resolve", "will", "find", "and", "return", "an", "Asset", "URI", ".", "Relative", "paths", "will", "also", "be", "resolved", ".", "An", "accept", "type", "maybe", "given", "to", "restrict", "the", "search", ...
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/context.rb#L103-L108
train
Resolve a path to a URI
[ 30522, 13366, 10663, 1006, 4130, 1010, 1008, 1008, 10556, 10623, 2015, 1007, 10556, 10623, 2015, 1031, 1024, 2918, 1035, 4130, 1033, 1027, 1030, 16101, 18442, 24471, 2072, 1010, 2139, 4523, 1027, 4044, 1012, 10663, 999, 1006, 4130, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activemodel/lib/active_model/errors.rb
ActiveModel.Errors.slice!
def slice!(*keys) deprecation_removal_warning(:slice!) keys = keys.map(&:to_sym) results = messages.dup.slice!(*keys) @errors.keep_if do |error| keys.include?(error.attribute) end results end
ruby
def slice!(*keys) deprecation_removal_warning(:slice!) keys = keys.map(&:to_sym) results = messages.dup.slice!(*keys) @errors.keep_if do |error| keys.include?(error.attribute) end results end
[ "def", "slice!", "(", "*", "keys", ")", "deprecation_removal_warning", "(", ":slice!", ")", "keys", "=", "keys", ".", "map", "(", ":to_sym", ")", "results", "=", "messages", ".", "dup", ".", "slice!", "(", "keys", ")", "@errors", ".", "keep_if", "do", ...
Removes all errors except the given keys. Returns a hash containing the removed errors. person.errors.keys # => [:name, :age, :gender, :city] person.errors.slice!(:age, :gender) # => { :name=>["cannot be nil"], :city=>["cannot be nil"] } person.errors.keys # => [:age, :gender]
[ "Removes", "all", "errors", "except", "the", "given", "keys", ".", "Returns", "a", "hash", "containing", "the", "removed", "errors", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/errors.rb#L149-L161
train
Slice messages by the given keys.
[ 30522, 13366, 14704, 999, 1006, 1008, 6309, 1007, 2139, 28139, 10719, 1035, 8208, 1035, 5432, 1006, 1024, 14704, 999, 1007, 6309, 1027, 6309, 1012, 4949, 1006, 1004, 1024, 2000, 1035, 25353, 2213, 1007, 3463, 1027, 7696, 1012, 4241, 2361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vault-ruby
lib/vault/api/sys/seal.rb
Vault.Sys.unseal
def unseal(shard) json = client.put("/v1/sys/unseal", JSON.fast_generate( key: shard, )) return SealStatus.decode(json) end
ruby
def unseal(shard) json = client.put("/v1/sys/unseal", JSON.fast_generate( key: shard, )) return SealStatus.decode(json) end
[ "def", "unseal", "(", "shard", ")", "json", "=", "client", ".", "put", "(", "\"/v1/sys/unseal\"", ",", "JSON", ".", "fast_generate", "(", "key", ":", "shard", ",", ")", ")", "return", "SealStatus", ".", "decode", "(", "json", ")", "end" ]
Unseal the vault with the given shard. @example Vault.sys.unseal("abcd-1234") #=> #<Vault::SealStatus sealed=true, t=3, n=5, progress=1> @param [String] shard the key to use @return [SealStatus]
[ "Unseal", "the", "vault", "with", "the", "given", "shard", "." ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/sys/seal.rb#L74-L79
train
Unseal a shard
[ 30522, 13366, 4895, 17310, 2140, 1006, 21146, 4103, 1007, 1046, 3385, 1027, 7396, 1012, 2404, 1006, 1000, 1013, 1058, 2487, 1013, 25353, 2015, 1013, 4895, 17310, 2140, 1000, 1010, 1046, 3385, 1012, 3435, 1035, 9699, 1006, 3145, 1024, 21146,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_trigger_histories.rb
Azure::Logic::Mgmt::V2016_06_01.WorkflowTriggerHistories.resubmit_with_http_info
def resubmit_with_http_info(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:nil) resubmit_async(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:custom_headers).value! end
ruby
def resubmit_with_http_info(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:nil) resubmit_async(resource_group_name, workflow_name, trigger_name, history_name, custom_headers:custom_headers).value! end
[ "def", "resubmit_with_http_info", "(", "resource_group_name", ",", "workflow_name", ",", "trigger_name", ",", "history_name", ",", "custom_headers", ":", "nil", ")", "resubmit_async", "(", "resource_group_name", ",", "workflow_name", ",", "trigger_name", ",", "history_n...
Resubmits a workflow run based on the trigger history. @param resource_group_name [String] The resource group name. @param workflow_name [String] The workflow name. @param trigger_name [String] The workflow trigger name. @param history_name [String] The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. @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.
[ "Resubmits", "a", "workflow", "run", "based", "on", "the", "trigger", "history", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_trigger_histories.rb#L262-L264
train
Resubmits a workflow trigger history.
[ 30522, 13366, 24501, 12083, 22930, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2147, 12314, 1035, 2171, 1010, 9495, 1035, 2171, 1010, 2381, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/lab_accounts.rb
Azure::Labservices::Mgmt::V2018_10_15.LabAccounts.list_by_resource_group
def list_by_resource_group(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_by_resource_group(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_by_resource_group", "(", "resource_group_name", ",", "expand", ":", "nil", ",", "filter", ":", "nil", ",", "top", ":", "nil", ",", "orderby", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_by_resource_group_as_lazy", ...
List lab accounts in a resource group. @param resource_group_name [String] The name of the resource group. @param expand [String] Specify the $expand query. Example: 'properties($expand=sizeConfiguration)' @param filter [String] The filter to apply to the operation. @param top [Integer] The maximum number of resources to return from the operation. @param orderby [String] The ordering expression for the results, using OData notation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<LabAccount>] operation results.
[ "List", "lab", "accounts", "in", "a", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb#L145-L148
train
Gets all the segmentation products under a resource group.
[ 30522, 13366, 2862, 1035, 2011, 1035, 7692, 1035, 2177, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7818, 1024, 9152, 2140, 1010, 11307, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 2344, 3762, 1024, 9152, 2140, 1010, 7661, 1035, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activerecord/lib/active_record/connection_handling.rb
ActiveRecord.ConnectionHandling.clear_query_caches_for_current_thread
def clear_query_caches_for_current_thread ActiveRecord::Base.connection_handlers.each_value do |handler| handler.connection_pool_list.each do |pool| pool.connection.clear_query_cache if pool.active_connection? end end end
ruby
def clear_query_caches_for_current_thread ActiveRecord::Base.connection_handlers.each_value do |handler| handler.connection_pool_list.each do |pool| pool.connection.clear_query_cache if pool.active_connection? end end end
[ "def", "clear_query_caches_for_current_thread", "ActiveRecord", "::", "Base", ".", "connection_handlers", ".", "each_value", "do", "|", "handler", "|", "handler", ".", "connection_pool_list", ".", "each", "do", "|", "pool", "|", "pool", ".", "connection", ".", "cl...
Clears the query cache for all connections associated with the current thread.
[ "Clears", "the", "query", "cache", "for", "all", "connections", "associated", "with", "the", "current", "thread", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/connection_handling.rb#L187-L193
train
Clear the query caches for the current thread
[ 30522, 13366, 3154, 1035, 23032, 1035, 17053, 2015, 1035, 2005, 1035, 30524, 1012, 3154, 1035, 23032, 1035, 17053, 2065, 4770, 1012, 3161, 1035, 4434, 1029, 2203, 2203, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github/linguist
lib/linguist/generated.rb
Linguist.Generated.generated_module?
def generated_module? return false unless extname == '.mod' return false unless lines.count > 1 return lines[0].include?("PCBNEW-LibModule-V") || lines[0].include?("GFORTRAN module version '") end
ruby
def generated_module? return false unless extname == '.mod' return false unless lines.count > 1 return lines[0].include?("PCBNEW-LibModule-V") || lines[0].include?("GFORTRAN module version '") end
[ "def", "generated_module?", "return", "false", "unless", "extname", "==", "'.mod'", "return", "false", "unless", "lines", ".", "count", ">", "1", "return", "lines", "[", "0", "]", ".", "include?", "(", "\"PCBNEW-LibModule-V\"", ")", "||", "lines", "[", "0", ...
Internal: Is it a KiCAD or GFortran module file? KiCAD module files contain: PCBNEW-LibModule-V1 yyyy-mm-dd h:mm:ss XM on the first line. GFortran module files contain: GFORTRAN module version 'x' created from on the first line. Return true or false
[ "Internal", ":", "Is", "it", "a", "KiCAD", "or", "GFortran", "module", "file?" ]
9116c90fcbb82ac03b4b33c58cfbde1fcf745e99
https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/generated.rb#L435-L440
train
Returns true if the module is generated by the generated module.
[ 30522, 13366, 7013, 1035, 11336, 1029, 2709, 6270, 4983, 4654, 2102, 18442, 1027, 1027, 1005, 1012, 16913, 1005, 2709, 6270, 4983, 3210, 1012, 4175, 1028, 1015, 2709, 3210, 1031, 1014, 1033, 1012, 2421, 1029, 1006, 1000, 7473, 24700, 7974, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/machine_learning_compute.rb
Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.MachineLearningCompute.begin_delete
def begin_delete(resource_group_name, workspace_name, compute_name, custom_headers:nil) response = begin_delete_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value! nil end
ruby
def begin_delete(resource_group_name, workspace_name, compute_name, custom_headers:nil) response = begin_delete_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_delete", "(", "resource_group_name", ",", "workspace_name", ",", "compute_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "workspace_name", ",", "compute_name", ",", "custom_headers", ...
Deletes specified Machine Learning compute. @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 compute_name [String] Name of the Azure Machine Learning compute. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "specified", "Machine", "Learning", "compute", "." ]
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/machine_learning_compute.rb#L603-L606
train
Deletes a compute.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 24134, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3972, 12870, 1035, 2004, 6038,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_circuit_peerings.rb
Azure::Network::Mgmt::V2018_07_01.ExpressRouteCircuitPeerings.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, circuit_name, peering_name, peering_parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "circuit_name", ",", "peering_name", ",", "peering_parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "circuit_name", ",", "pe...
Creates or updates a peering in the specified express route circuits. @param resource_group_name [String] The name of the resource group. @param circuit_name [String] The name of the express route circuit. @param peering_name [String] The name of the peering. @param peering_parameters [ExpressRouteCircuitPeering] Parameters supplied to the create or update express route circuit peering operation. @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.
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "express", "route", "circuits", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_circuit_peerings.rb#L416-L418
train
Creates or updates a express route express route express route express route express route express route express route express route express route express route route
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4984, 1035, 2171, 1010, 16740, 1035, 2171, 1010, 16740, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb
Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_detector_responses_next
def list_site_detector_responses_next(next_page_link, custom_headers:nil) response = list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_site_detector_responses_next(next_page_link, custom_headers:nil) response = list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_site_detector_responses_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_site_detector_responses_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "bo...
List Site Detector Responses List Site Detector Responses @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 [DetectorResponseCollection] operation results.
[ "List", "Site", "Detector", "Responses" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L2628-L2631
train
Gets the site detector responses for a site detector.
[ 30522, 13366, 2862, 1035, 2609, 1035, 19034, 1035, 10960, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2609, 1035, 19034, 1035, 10960, 1035, 2279, 1035, 2004,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/reader.rb
Jekyll.Reader.retrieve_posts
def retrieve_posts(dir) return if outside_configured_directory?(dir) site.posts.docs.concat(post_reader.read_posts(dir)) site.posts.docs.concat(post_reader.read_drafts(dir)) if site.show_drafts end
ruby
def retrieve_posts(dir) return if outside_configured_directory?(dir) site.posts.docs.concat(post_reader.read_posts(dir)) site.posts.docs.concat(post_reader.read_drafts(dir)) if site.show_drafts end
[ "def", "retrieve_posts", "(", "dir", ")", "return", "if", "outside_configured_directory?", "(", "dir", ")", "site", ".", "posts", ".", "docs", ".", "concat", "(", "post_reader", ".", "read_posts", "(", "dir", ")", ")", "site", ".", "posts", ".", "docs", ...
Retrieves all the posts(posts/drafts) from the given directory and add them to the site and sort them. dir - The String representing the directory to retrieve the posts from. Returns nothing.
[ "Retrieves", "all", "the", "posts", "(", "posts", "/", "drafts", ")", "from", "the", "given", "directory", "and", "add", "them", "to", "the", "site", "and", "sort", "them", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/reader.rb#L71-L76
train
Retrieve the posts from a directory
[ 30522, 13366, 12850, 1035, 8466, 1006, 16101, 1007, 2709, 2065, 2648, 1035, 26928, 1035, 14176, 1029, 1006, 16101, 1007, 2609, 1012, 8466, 1012, 9986, 2015, 1012, 9530, 11266, 1006, 2695, 1035, 8068, 1012, 3191, 1035, 8466, 1006, 16101, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.begin_update_with_http_info
def begin_update_with_http_info(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:nil) begin_update_async(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:custom_headers).value! end
ruby
def begin_update_with_http_info(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:nil) begin_update_async(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:custom_headers).value! end
[ "def", "begin_update_with_http_info", "(", "fabric_name", ",", "protection_container_name", ",", "mapping_name", ",", "update_input", ",", "custom_headers", ":", "nil", ")", "begin_update_async", "(", "fabric_name", ",", "protection_container_name", ",", "mapping_name", "...
Update protection container mapping. The operation to update protection container mapping. @param fabric_name [String] Fabric name. @param protection_container_name [String] Protection container name. @param mapping_name [String] Protection container mapping name. @param update_input [UpdateProtectionContainerMappingInput] Mapping update input. @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.
[ "Update", "protection", "container", "mapping", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb#L752-L754
train
Updates a protection container mapping.
[ 30522, 13366, 4088, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 8313, 1035, 2171, 1010, 3860, 1035, 11661, 1035, 2171, 1010, 12375, 1035, 2171, 1010, 10651, 1035, 7953, 1010, 7661, 30524, 6038, 2278, 1006, 8313, 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...
excon/excon
lib/excon/utils.rb
Excon.Utils.split_header_value
def split_header_value(str) return [] if str.nil? str = str.dup.strip binary_encode(str) str.scan(%r'\G((?:"(?:\\.|[^"])+?"|[^",]+)+) (?:,\s*|\Z)'xn).flatten end
ruby
def split_header_value(str) return [] if str.nil? str = str.dup.strip binary_encode(str) str.scan(%r'\G((?:"(?:\\.|[^"])+?"|[^",]+)+) (?:,\s*|\Z)'xn).flatten end
[ "def", "split_header_value", "(", "str", ")", "return", "[", "]", "if", "str", ".", "nil?", "str", "=", "str", ".", "dup", ".", "strip", "binary_encode", "(", "str", ")", "str", ".", "scan", "(", "%r'", "\\G", "\\\\", "\\s", "\\Z", "'xn", ")", ".",...
Splits a header value +str+ according to HTTP specification.
[ "Splits", "a", "header", "value", "+", "str", "+", "according", "to", "HTTP", "specification", "." ]
d4975a8a5b49d5901a769b289fb5054a6d064f6d
https://github.com/excon/excon/blob/d4975a8a5b49d5901a769b289fb5054a6d064f6d/lib/excon/utils.rb#L78-L84
train
Split header value into chunks of chunks
[ 30522, 13366, 3975, 1035, 20346, 1035, 3643, 1006, 2358, 2099, 1007, 2709, 1031, 1033, 2065, 2358, 2099, 1012, 9152, 2140, 1029, 2358, 2099, 1027, 2358, 2099, 1012, 4241, 2361, 1012, 6167, 12441, 1035, 4372, 16044, 1006, 2358, 2099, 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...
plum-umd/rdl
lib/rdl/types/method.rb
RDL::Type.MethodType.match
def match(other) other = other.type if other.instance_of? AnnotatedArgType return true if other.instance_of? WildQuery return false unless other.instance_of? MethodType return false unless @ret.match(other.ret) if @block == nil return false unless other.block == nil else return false if other.block == nil return false unless @block.match(other.block) end # Check arg matches; logic is similar to pre_cond states = [[0,0]] # [position in self, position in other] until states.empty? s_arg, o_arg = states.pop return true if s_arg == @args.size && o_arg == other.args.size # everything matches next if s_arg >= @args.size # match not possible, not enough args in self if @args[s_arg].instance_of? DotsQuery then if o_arg == other.args.size # no args left in other, skip ... states << [s_arg+1, o_arg] else states << [s_arg+1, o_arg+1] # match, no more matches to ... states << [s_arg, o_arg+1] # match, more matches to ... coming end else next if o_arg == other.args.size # match not possible, not enough args in other s_arg_t = @args[s_arg] s_arg_t = s_arg_t.type if s_arg_t.instance_of? AnnotatedArgType o_arg_t = other.args[o_arg] o_arg_t = o_arg_t.type if o_arg_t.instance_of? AnnotatedArgType next unless s_arg_t.match(o_arg_t) states << [s_arg+1, o_arg+1] end end return false end
ruby
def match(other) other = other.type if other.instance_of? AnnotatedArgType return true if other.instance_of? WildQuery return false unless other.instance_of? MethodType return false unless @ret.match(other.ret) if @block == nil return false unless other.block == nil else return false if other.block == nil return false unless @block.match(other.block) end # Check arg matches; logic is similar to pre_cond states = [[0,0]] # [position in self, position in other] until states.empty? s_arg, o_arg = states.pop return true if s_arg == @args.size && o_arg == other.args.size # everything matches next if s_arg >= @args.size # match not possible, not enough args in self if @args[s_arg].instance_of? DotsQuery then if o_arg == other.args.size # no args left in other, skip ... states << [s_arg+1, o_arg] else states << [s_arg+1, o_arg+1] # match, no more matches to ... states << [s_arg, o_arg+1] # match, more matches to ... coming end else next if o_arg == other.args.size # match not possible, not enough args in other s_arg_t = @args[s_arg] s_arg_t = s_arg_t.type if s_arg_t.instance_of? AnnotatedArgType o_arg_t = other.args[o_arg] o_arg_t = o_arg_t.type if o_arg_t.instance_of? AnnotatedArgType next unless s_arg_t.match(o_arg_t) states << [s_arg+1, o_arg+1] end end return false end
[ "def", "match", "(", "other", ")", "other", "=", "other", ".", "type", "if", "other", ".", "instance_of?", "AnnotatedArgType", "return", "true", "if", "other", ".", "instance_of?", "WildQuery", "return", "false", "unless", "other", ".", "instance_of?", "Method...
other may not be a query
[ "other", "may", "not", "be", "a", "query" ]
c00134413f7a600fd395e7e7cd8b01f57f850830
https://github.com/plum-umd/rdl/blob/c00134413f7a600fd395e7e7cd8b01f57f850830/lib/rdl/types/method.rb#L308-L344
train
Check if the arguments match the given argument type
[ 30522, 13366, 2674, 1006, 2060, 1007, 2060, 1027, 2060, 1012, 2828, 2065, 2060, 1012, 6013, 1035, 1997, 1029, 5754, 17287, 3064, 2906, 13512, 18863, 2709, 2995, 2065, 2060, 1012, 6013, 1035, 1997, 1029, 3748, 4226, 2854, 2709, 6270, 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...
opal/opal
opal/corelib/marshal/read_buffer.rb
Marshal.ReadBuffer.read_bignum
def read_bignum sign = read_char == '-' ? -1 : 1 size = read_fixnum * 2 result = 0 (0...size).each do |exp| result += read_char.ord * 2**(exp * 8) end result = result.to_i * sign @object_cache << result result end
ruby
def read_bignum sign = read_char == '-' ? -1 : 1 size = read_fixnum * 2 result = 0 (0...size).each do |exp| result += read_char.ord * 2**(exp * 8) end result = result.to_i * sign @object_cache << result result end
[ "def", "read_bignum", "sign", "=", "read_char", "==", "'-'", "?", "-", "1", ":", "1", "size", "=", "read_fixnum", "*", "2", "result", "=", "0", "(", "0", "...", "size", ")", ".", "each", "do", "|", "exp", "|", "result", "+=", "read_char", ".", "o...
Reads and returns Bignum from an input stream
[ "Reads", "and", "returns", "Bignum", "from", "an", "input", "stream" ]
41aedc0fd62aab00d3c117ba0caf00206bedd981
https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/opal/corelib/marshal/read_buffer.rb#L172-L182
train
Read a number of bytes from the stream.
[ 30522, 13366, 3191, 1035, 2502, 19172, 3696, 1027, 3191, 1035, 25869, 1027, 1027, 1005, 1011, 1005, 1029, 1011, 1015, 1024, 1015, 2946, 1027, 3191, 1035, 8081, 19172, 1008, 1016, 2765, 1027, 1014, 1006, 1014, 1012, 1012, 1012, 2946, 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...
appsignal/rdkafka-ruby
lib/rdkafka/config.rb
Rdkafka.Config.consumer
def consumer opaque = Opaque.new config = native_config(opaque) if @consumer_rebalance_listener opaque.consumer_rebalance_listener = @consumer_rebalance_listener Rdkafka::Bindings.rd_kafka_conf_set_rebalance_cb(config, Rdkafka::Bindings::RebalanceCallback) end kafka = native_kafka(config, :rd_kafka_consumer) # Redirect the main queue to the consumer Rdkafka::Bindings.rd_kafka_poll_set_consumer(kafka) # Return consumer with Kafka client Rdkafka::Consumer.new(kafka) end
ruby
def consumer opaque = Opaque.new config = native_config(opaque) if @consumer_rebalance_listener opaque.consumer_rebalance_listener = @consumer_rebalance_listener Rdkafka::Bindings.rd_kafka_conf_set_rebalance_cb(config, Rdkafka::Bindings::RebalanceCallback) end kafka = native_kafka(config, :rd_kafka_consumer) # Redirect the main queue to the consumer Rdkafka::Bindings.rd_kafka_poll_set_consumer(kafka) # Return consumer with Kafka client Rdkafka::Consumer.new(kafka) end
[ "def", "consumer", "opaque", "=", "Opaque", ".", "new", "config", "=", "native_config", "(", "opaque", ")", "if", "@consumer_rebalance_listener", "opaque", ".", "consumer_rebalance_listener", "=", "@consumer_rebalance_listener", "Rdkafka", "::", "Bindings", ".", "rd_k...
Create a consumer with this configuration. @raise [ConfigError] When the configuration contains invalid options @raise [ClientCreationError] When the native client cannot be created @return [Consumer] The created consumer
[ "Create", "a", "consumer", "with", "this", "configuration", "." ]
87b3e0ddae5ea576847cb67228fcea06ec2a24d6
https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/config.rb#L110-L126
train
Return the consumer
[ 30522, 13366, 7325, 28670, 1027, 28670, 1012, 2047, 9530, 8873, 2290, 1027, 3128, 1035, 9530, 8873, 2290, 1006, 28670, 1007, 2065, 1030, 7325, 1035, 2128, 26657, 1035, 19373, 28670, 1012, 7325, 1035, 2128, 26657, 1035, 19373, 1027, 1030, 73...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb
Aws::EC2.Instance.reboot
def reboot(options = {}) options = Aws::Util.deep_merge(options, instance_ids: [@id]) resp = @client.reboot_instances(options) resp.data end
ruby
def reboot(options = {}) options = Aws::Util.deep_merge(options, instance_ids: [@id]) resp = @client.reboot_instances(options) resp.data end
[ "def", "reboot", "(", "options", "=", "{", "}", ")", "options", "=", "Aws", "::", "Util", ".", "deep_merge", "(", "options", ",", "instance_ids", ":", "[", "@id", "]", ")", "resp", "=", "@client", ".", "reboot_instances", "(", "options", ")", "resp", ...
@example Request syntax with placeholder values instance.reboot({ dry_run: false, }) @param [Hash] options ({}) @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the 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/instance.rb#L973-L977
train
Reboot the instance
[ 30522, 13366, 2128, 27927, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 22091, 2015, 1024, 1024, 21183, 4014, 1012, 2784, 1035, 13590, 1006, 7047, 1010, 6013, 1035, 8909, 2015, 1024, 1031, 1030, 8909, 1033, 1007, 24501, 2361, 1027, 1030,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
lib/rmagick_internal.rb
Magick.Draw.kerning
def kerning(space) begin Float(space) rescue ArgumentError Kernel.raise ArgumentError, 'invalid value for kerning' rescue TypeError Kernel.raise TypeError, "can't convert #{space.class} into Float" end primitive "kerning #{space}" end
ruby
def kerning(space) begin Float(space) rescue ArgumentError Kernel.raise ArgumentError, 'invalid value for kerning' rescue TypeError Kernel.raise TypeError, "can't convert #{space.class} into Float" end primitive "kerning #{space}" end
[ "def", "kerning", "(", "space", ")", "begin", "Float", "(", "space", ")", "rescue", "ArgumentError", "Kernel", ".", "raise", "ArgumentError", ",", "'invalid value for kerning'", "rescue", "TypeError", "Kernel", ".", "raise", "TypeError", ",", "\"can't convert #{spac...
IM 6.4.8-3 and later
[ "IM", "6", ".", "4", ".", "8", "-", "3", "and", "later" ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L393-L402
train
Returns the kerning of the given space.
[ 30522, 13366, 22762, 2075, 1006, 2686, 1007, 4088, 14257, 1006, 2686, 1007, 5343, 6685, 2121, 29165, 16293, 1012, 5333, 6685, 2121, 29165, 1010, 1005, 19528, 3643, 2005, 22762, 2075, 1005, 5343, 2828, 2121, 29165, 16293, 1012, 5333, 2828, 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_search/lib/2015-08-19/generated/azure_mgmt_search/query_keys.rb
Azure::Search::Mgmt::V2015_08_19.QueryKeys.create_with_http_info
def create_with_http_info(resource_group_name, search_service_name, name, search_management_request_options:nil, custom_headers:nil) create_async(resource_group_name, search_service_name, name, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value! end
ruby
def create_with_http_info(resource_group_name, search_service_name, name, search_management_request_options:nil, custom_headers:nil) create_async(resource_group_name, search_service_name, name, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value! end
[ "def", "create_with_http_info", "(", "resource_group_name", ",", "search_service_name", ",", "name", ",", "search_management_request_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "create_async", "(", "resource_group_name", ",", "search_service_name", ",", ...
Generates a new query key for the specified Search service. You can create up to 50 query keys per service. @param resource_group_name [String] The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. @param search_service_name [String] The name of the Azure Search service associated with the specified resource group. @param name [String] The name of the new query API key. @param search_management_request_options [SearchManagementRequestOptions] 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 [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Generates", "a", "new", "query", "key", "for", "the", "specified", "Search", "service", ".", "You", "can", "create", "up", "to", "50", "query", "keys", "per", "service", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_search/lib/2015-08-19/generated/azure_mgmt_search/query_keys.rb#L63-L65
train
Creates a new search service.
[ 30522, 13366, 3443, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3945, 1035, 2326, 1035, 2171, 1010, 2171, 1010, 3945, 1035, 2968, 1035, 5227, 1035, 7047, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/puppet
lib/puppet/util/logging.rb
Puppet::Util.Logging.log_deprecations_to_file
def log_deprecations_to_file(deprecations_file, pattern = nil) # this method may get called lots and lots of times (e.g., from spec_helper config.after) without the global # list of deprecation warnings being cleared out. We don't want to keep logging the same offenders over and over, # so, we need to keep track of what we've logged. # # It'd be nice if we could just clear out the list of deprecation warnings, but then the very next spec might # find the same offender, and we'd end up logging it again. $logged_deprecation_warnings ||= {} # Deprecation messages are UTF-8 as they are produced by Ruby Puppet::FileSystem.open(deprecations_file, nil, "a:UTF-8") do |f| if ($deprecation_warnings) then $deprecation_warnings.each do |offender, message| if (! $logged_deprecation_warnings.has_key?(offender)) then $logged_deprecation_warnings[offender] = true if ((pattern.nil?) || (message =~ pattern)) then f.puts(message) f.puts(offender) f.puts() end end end end end end
ruby
def log_deprecations_to_file(deprecations_file, pattern = nil) # this method may get called lots and lots of times (e.g., from spec_helper config.after) without the global # list of deprecation warnings being cleared out. We don't want to keep logging the same offenders over and over, # so, we need to keep track of what we've logged. # # It'd be nice if we could just clear out the list of deprecation warnings, but then the very next spec might # find the same offender, and we'd end up logging it again. $logged_deprecation_warnings ||= {} # Deprecation messages are UTF-8 as they are produced by Ruby Puppet::FileSystem.open(deprecations_file, nil, "a:UTF-8") do |f| if ($deprecation_warnings) then $deprecation_warnings.each do |offender, message| if (! $logged_deprecation_warnings.has_key?(offender)) then $logged_deprecation_warnings[offender] = true if ((pattern.nil?) || (message =~ pattern)) then f.puts(message) f.puts(offender) f.puts() end end end end end end
[ "def", "log_deprecations_to_file", "(", "deprecations_file", ",", "pattern", "=", "nil", ")", "# this method may get called lots and lots of times (e.g., from spec_helper config.after) without the global", "# list of deprecation warnings being cleared out. We don't want to keep logging the same...
TODO: determine whether there might be a potential use for adding a puppet configuration option that would enable this deprecation logging. utility method that can be called, e.g., from spec_helper config.after, when tracking down calls to deprecated code. Parameters: [deprecations_file] relative or absolute path of a file to log the deprecations to [pattern] (default nil) if specified, will only log deprecations whose message matches the provided pattern
[ "TODO", ":", "determine", "whether", "there", "might", "be", "a", "potential", "use", "for", "adding", "a", "puppet", "configuration", "option", "that", "would", "enable", "this", "deprecation", "logging", ".", "utility", "method", "that", "can", "be", "called...
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/logging.rb#L216-L240
train
Logs deprecation warnings to a file
[ 30522, 13366, 8833, 1035, 2139, 28139, 10719, 2015, 1035, 2000, 1035, 5371, 1006, 2139, 28139, 10719, 2015, 1035, 5371, 1010, 5418, 1027, 9152, 2140, 1007, 1001, 2023, 4118, 2089, 2131, 2170, 7167, 1998, 7167, 1997, 2335, 1006, 1041, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/local_network_gateways.rb
Azure::Network::Mgmt::V2018_07_01.LocalNetworkGateways.begin_update_tags_with_http_info
def begin_update_tags_with_http_info(resource_group_name, local_network_gateway_name, parameters, custom_headers:nil) begin_update_tags_async(resource_group_name, local_network_gateway_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_update_tags_with_http_info(resource_group_name, local_network_gateway_name, parameters, custom_headers:nil) begin_update_tags_async(resource_group_name, local_network_gateway_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_update_tags_with_http_info", "(", "resource_group_name", ",", "local_network_gateway_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_update_tags_async", "(", "resource_group_name", ",", "local_network_gateway_name", ",", "parameters", ",...
Updates a local network gateway tags. @param resource_group_name [String] The name of the resource group. @param local_network_gateway_name [String] The name of the local network gateway. @param parameters [TagsObject] Parameters supplied to update local network gateway tags. @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", "local", "network", "gateway", "tags", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/local_network_gateways.rb#L580-L582
train
Updates a local network gateway tags.
[ 30522, 13366, 4088, 1035, 10651, 1035, 22073, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2334, 1035, 2897, 1035, 11909, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb
Azure::ContainerService::Mgmt::V2019_02_01.AgentPools.begin_create_or_update
def begin_create_or_update(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create_or_update(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create_or_update", "(", "resource_group_name", ",", "managed_cluster_name", ",", "agent_pool_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "managed_cluster_na...
Creates or updates an agent pool. Creates or updates an agent pool in the specified managed cluster. @param resource_group_name [String] The name of the resource group. @param managed_cluster_name [String] The name of the managed cluster resource. @param agent_pool_name [String] The name of the agent pool. @param parameters [AgentPool] Parameters supplied to the Create or Update an agent pool operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [AgentPool] operation results.
[ "Creates", "or", "updates", "an", "agent", "pool", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb#L347-L350
train
Creates or updates an agent pool.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 30524, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3266, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb
Azure::CognitiveServices::ContentModerator::V1_0.ListManagementImage.add_image_file_input
def add_image_file_input(list_id, image_stream, tag:nil, label:nil, custom_headers:nil) response = add_image_file_input_async(list_id, image_stream, tag:tag, label:label, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def add_image_file_input(list_id, image_stream, tag:nil, label:nil, custom_headers:nil) response = add_image_file_input_async(list_id, image_stream, tag:tag, label:label, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "add_image_file_input", "(", "list_id", ",", "image_stream", ",", "tag", ":", "nil", ",", "label", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "add_image_file_input_async", "(", "list_id", ",", "image_stream", ",", "tag", ":", ...
Add an image to the list with list Id equal to list Id passed. @param list_id [String] List Id of the image list. @param image_stream The image file. @param tag [Integer] Tag for the image. @param label [String] The image label. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Image] operation results.
[ "Add", "an", "image", "to", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb#L529-L532
train
Adds an image file input to a list.
[ 30522, 13366, 5587, 1035, 3746, 1035, 5371, 1035, 7953, 1006, 2862, 1035, 8909, 1010, 3746, 1035, 5460, 1010, 6415, 1024, 9152, 2140, 1010, 3830, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 5587, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb
Azure::Compute::Mgmt::V2017_12_01.VirtualMachineScaleSetVMs.begin_redeploy_with_http_info
def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end
ruby
def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end
[ "def", "begin_redeploy_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "custom_headers", ":", "nil", ")", "begin_redeploy_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "custom_headers",...
Redeploys a virtual machine in a VM scale set. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param instance_id [String] The instance ID of the virtual machine. @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.
[ "Redeploys", "a", "virtual", "machine", "in", "a", "VM", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L1613-L1615
train
Redeploy a virtual machine in a VM scale set.
[ 30522, 13366, 4088, 1035, 2417, 13699, 4135, 2100, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 6013, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/tty-prompt
lib/tty/prompt/utils.rb
TTY.Utils.blank?
def blank?(value) value.nil? || value.respond_to?(:empty?) && value.empty? || BLANK_REGEX === value end
ruby
def blank?(value) value.nil? || value.respond_to?(:empty?) && value.empty? || BLANK_REGEX === value end
[ "def", "blank?", "(", "value", ")", "value", ".", "nil?", "||", "value", ".", "respond_to?", "(", ":empty?", ")", "&&", "value", ".", "empty?", "||", "BLANK_REGEX", "===", "value", "end" ]
Check if value is nil or an empty string @param [Object] value the value to check @return [Boolean] @api public
[ "Check", "if", "value", "is", "nil", "or", "an", "empty", "string" ]
b1ff627afff98fa6477e5ef3ac4a718c52eff05a
https://github.com/piotrmurach/tty-prompt/blob/b1ff627afff98fa6477e5ef3ac4a718c52eff05a/lib/tty/prompt/utils.rb#L31-L35
train
Returns true if the value is blank.
[ 30522, 13366, 8744, 1029, 1006, 3643, 1007, 3643, 1012, 9152, 2140, 1029, 1064, 1064, 3643, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 4064, 1029, 1007, 1004, 1004, 3643, 1012, 4064, 1029, 1064, 1064, 8744, 1035, 19723, 10288, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github-changelog-generator/github-changelog-generator
lib/github_changelog_generator/generator/generator.rb
GitHubChangelogGenerator.Generator.generate_entry_between_tags
def generate_entry_between_tags(older_tag, newer_tag) filtered_issues, filtered_pull_requests = filter_issues_for_tags(newer_tag, older_tag) if newer_tag.nil? && filtered_issues.empty? && filtered_pull_requests.empty? # do not generate empty unreleased section return "" end newer_tag_link, newer_tag_name, newer_tag_time = detect_link_tag_time(newer_tag) # If the older tag is nil, go back in time from the latest tag and find # the SHA for the first commit. older_tag_name = if older_tag.nil? @fetcher.oldest_commit["sha"] else older_tag["name"] end Entry.new(options).generate_entry_for_tag(filtered_pull_requests, filtered_issues, newer_tag_name, newer_tag_link, newer_tag_time, older_tag_name) end
ruby
def generate_entry_between_tags(older_tag, newer_tag) filtered_issues, filtered_pull_requests = filter_issues_for_tags(newer_tag, older_tag) if newer_tag.nil? && filtered_issues.empty? && filtered_pull_requests.empty? # do not generate empty unreleased section return "" end newer_tag_link, newer_tag_name, newer_tag_time = detect_link_tag_time(newer_tag) # If the older tag is nil, go back in time from the latest tag and find # the SHA for the first commit. older_tag_name = if older_tag.nil? @fetcher.oldest_commit["sha"] else older_tag["name"] end Entry.new(options).generate_entry_for_tag(filtered_pull_requests, filtered_issues, newer_tag_name, newer_tag_link, newer_tag_time, older_tag_name) end
[ "def", "generate_entry_between_tags", "(", "older_tag", ",", "newer_tag", ")", "filtered_issues", ",", "filtered_pull_requests", "=", "filter_issues_for_tags", "(", "newer_tag", ",", "older_tag", ")", "if", "newer_tag", ".", "nil?", "&&", "filtered_issues", ".", "empt...
Generate log only between 2 specified tags @param [String] older_tag all issues before this tag date will be excluded. May be nil, if it's first tag @param [String] newer_tag all issue after this tag will be excluded. May be nil for unreleased section
[ "Generate", "log", "only", "between", "2", "specified", "tags" ]
f18c64b5cc0d7473b059275b88385ac11ca8b564
https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator.rb#L73-L93
train
Generate an entry between two tags.
[ 30522, 13366, 9699, 1035, 4443, 1035, 2090, 1035, 22073, 1006, 3080, 1035, 6415, 1010, 10947, 1035, 6415, 1007, 21839, 1035, 3314, 1010, 21839, 1035, 4139, 1035, 11186, 1027, 11307, 1035, 3314, 1035, 2005, 1035, 22073, 1006, 10947, 1035, 64...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb
Azure::Network::Mgmt::V2018_01_01.InboundNatRules.list
def list(resource_group_name, load_balancer_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list(resource_group_name, load_balancer_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list", "(", "resource_group_name", ",", "load_balancer_name", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_as_lazy", "(", "resource_group_name", ",", "load_balancer_name", ",", "custom_headers", ":custom_headers", ")", "first_page", ".", "g...
Gets all the inbound nat rules in a load balancer. @param resource_group_name [String] The name of the resource group. @param load_balancer_name [String] The name of the load balancer. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<InboundNatRule>] operation results.
[ "Gets", "all", "the", "inbound", "nat", "rules", "in", "a", "load", "balancer", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb#L34-L37
train
Gets all the load balancer segmentation.
[ 30522, 13366, 2862, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7170, 1035, 5703, 2099, 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, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-sns/lib/aws-sdk-sns/platform_endpoint.rb
Aws::SNS.PlatformEndpoint.delete
def delete(options = {}) options = options.merge(endpoint_arn: @arn) resp = @client.delete_endpoint(options) resp.data end
ruby
def delete(options = {}) options = options.merge(endpoint_arn: @arn) resp = @client.delete_endpoint(options) resp.data end
[ "def", "delete", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "endpoint_arn", ":", "@arn", ")", "resp", "=", "@client", ".", "delete_endpoint", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values platform_endpoint.delete() @param [Hash] options ({}) @return [EmptyStructure]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/platform_endpoint.rb#L95-L99
train
Delete an endpoint
[ 30522, 13366, 3972, 12870, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 2203, 8400, 1035, 12098, 2078, 1024, 1030, 12098, 2078, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3972, 12870, 1035, 2203, 8400, 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_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGatewayConnections.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "virtual_network_gateway_connection_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "virtual_network_gateway_connectio...
Creates or updates a virtual network gateway connection in the specified resource group. @param resource_group_name [String] The name of the resource group. @param virtual_network_gateway_connection_name [String] The name of the virtual network gateway connection. @param parameters [VirtualNetworkGatewayConnection] Parameters supplied to the create or update virtual network gateway connection operation. @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.
[ "Creates", "or", "updates", "a", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb#L586-L588
train
Creates or updates a virtual network gateway connection.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 11909, 1035, 4434, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chaps-io/public_activity
lib/public_activity/renderable.rb
PublicActivity.Renderable.text
def text(params = {}) # TODO: some helper for key transformation for two supported formats k = key.split('.') k.unshift('activity') if k.first != 'activity' k = k.join('.') I18n.t(k, parameters.merge(params) || {}) end
ruby
def text(params = {}) # TODO: some helper for key transformation for two supported formats k = key.split('.') k.unshift('activity') if k.first != 'activity' k = k.join('.') I18n.t(k, parameters.merge(params) || {}) end
[ "def", "text", "(", "params", "=", "{", "}", ")", "# TODO: some helper for key transformation for two supported formats", "k", "=", "key", ".", "split", "(", "'.'", ")", "k", ".", "unshift", "(", "'activity'", ")", "if", "k", ".", "first", "!=", "'activity'", ...
Virtual attribute returning text description of the activity using the activity's key to translate using i18n.
[ "Virtual", "attribute", "returning", "text", "description", "of", "the", "activity", "using", "the", "activity", "s", "key", "to", "translate", "using", "i18n", "." ]
e4357cd14db67299e0cbbd656300f51b7069ea9b
https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/renderable.rb#L9-L16
train
Returns the text for this object
[ 30522, 13366, 3793, 1006, 11498, 5244, 1027, 1063, 1065, 1007, 1001, 28681, 2080, 1024, 2070, 2393, 2121, 2005, 3145, 8651, 2005, 2048, 3569, 11630, 1047, 1027, 3145, 1012, 3975, 1006, 1005, 1012, 1005, 1007, 1047, 1012, 4895, 6182, 6199, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb
Azure::CustomerInsights::Mgmt::V2017_01_01.Interactions.list_by_hub_with_http_info
def list_by_hub_with_http_info(resource_group_name, hub_name, locale_code:'en-us', custom_headers:nil) list_by_hub_async(resource_group_name, hub_name, locale_code:locale_code, custom_headers:custom_headers).value! end
ruby
def list_by_hub_with_http_info(resource_group_name, hub_name, locale_code:'en-us', custom_headers:nil) list_by_hub_async(resource_group_name, hub_name, locale_code:locale_code, custom_headers:custom_headers).value! end
[ "def", "list_by_hub_with_http_info", "(", "resource_group_name", ",", "hub_name", ",", "locale_code", ":", "'en-us'", ",", "custom_headers", ":", "nil", ")", "list_by_hub_async", "(", "resource_group_name", ",", "hub_name", ",", "locale_code", ":locale_code", ",", "cu...
Gets all interactions in the hub. @param resource_group_name [String] The name of the resource group. @param hub_name [String] The name of the hub. @param locale_code [String] Locale of interaction to retrieve, default is en-us. @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", "all", "interactions", "in", "the", "hub", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb#L206-L208
train
Gets the list of all the segmentation of the hub.
[ 30522, 13366, 2862, 1035, 2011, 1035, 9594, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9594, 1035, 2171, 1010, 2334, 2063, 1035, 30524, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 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...
troessner/reek
lib/reek/context_builder.rb
Reek.ContextBuilder.process_casgn
def process_casgn(exp, parent) if exp.defines_module? process_module(exp, parent) else process(exp) end end
ruby
def process_casgn(exp, parent) if exp.defines_module? process_module(exp, parent) else process(exp) end end
[ "def", "process_casgn", "(", "exp", ",", "parent", ")", "if", "exp", ".", "defines_module?", "process_module", "(", "exp", ",", "parent", ")", "else", "process", "(", "exp", ")", "end", "end" ]
Handles `casgn` ("class assign") nodes. An input example that would trigger this method would be: Foo = Class.new Bar
[ "Handles", "casgn", "(", "class", "assign", ")", "nodes", "." ]
8c6b5c0c6228a6981ab48543457889f9ea984054
https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/context_builder.rb#L107-L113
train
Process the CASGN
[ 30522, 13366, 2832, 1035, 25222, 16206, 1006, 4654, 2361, 1010, 6687, 1007, 2065, 4654, 2361, 1012, 11859, 1035, 11336, 1029, 2832, 1035, 11336, 1006, 4654, 2361, 1010, 6687, 1007, 2842, 2832, 1006, 4654, 2361, 1007, 2203, 2203, 102, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.begin_create_or_update_multi_role_pool_with_http_info
def begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_multi_role_pool_with_http_info", "(", "resource_group_name", ",", "name", ",", "multi_role_pool_envelope", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_multi_role_pool_async", "(", "resource_group_name", ",", "name", ",", "multi...
Create or update a multi-role pool. Create or update a multi-role pool. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @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", "update", "a", "multi", "-", "role", "pool", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L4529-L4531
train
Creates or updates a multi - role pool.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 4800, 1035, 2535, 1035, 4770, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 4800, 1035, 2535, 1035, 30524, 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_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb
Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.create_images_from_urls
def create_images_from_urls(project_id, batch, custom_headers:nil) response = create_images_from_urls_async(project_id, batch, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_images_from_urls(project_id, batch, custom_headers:nil) response = create_images_from_urls_async(project_id, batch, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_images_from_urls", "(", "project_id", ",", "batch", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_images_from_urls_async", "(", "project_id", ",", "batch", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", "....
Add the provided images urls to the set of training images. This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64 images and 20 tags. @param project_id The project id. @param batch [ImageUrlCreateBatch] Image urls and tag ids. Limited to 64 images and 20 tags per batch. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ImageCreateSummary] operation results.
[ "Add", "the", "provided", "images", "urls", "to", "the", "set", "of", "training", "images", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L1695-L1698
train
Creates an image from a set of URLs.
[ 30522, 13366, 3443, 1035, 4871, 1035, 2013, 1035, 24471, 4877, 1006, 2622, 1035, 8909, 1010, 14108, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 4871, 1035, 2013, 1035, 24471, 4877, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb
Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_delete
def begin_delete(resource_group_name, network_watcher_name, custom_headers:nil) response = begin_delete_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! nil end
ruby
def begin_delete(resource_group_name, network_watcher_name, custom_headers:nil) response = begin_delete_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_delete", "(", "resource_group_name", ",", "network_watcher_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "network_watcher_name", ",", "custom_headers", ":custom_headers", ")", ".", "v...
Deletes the specified network watcher resource. @param resource_group_name [String] The name of the resource group. @param network_watcher_name [String] The name of the network watcher. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "the", "specified", "network", "watcher", "resource", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L1199-L1202
train
Deletes a network pool.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3422, 2121, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3972, 12870, 1035, 2004, 30524, 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...
sds/overcommit
lib/overcommit/hook_context/pre_commit.rb
Overcommit::HookContext.PreCommit.cleanup_environment
def cleanup_environment unless initial_commit? || (@stash_attempted && !@changes_stashed) clear_working_tree # Ensure working tree is clean before restoring it restore_modified_times end if @changes_stashed restore_working_tree restore_modified_times end Overcommit::GitRepo.restore_merge_state Overcommit::GitRepo.restore_cherry_pick_state restore_modified_times end
ruby
def cleanup_environment unless initial_commit? || (@stash_attempted && !@changes_stashed) clear_working_tree # Ensure working tree is clean before restoring it restore_modified_times end if @changes_stashed restore_working_tree restore_modified_times end Overcommit::GitRepo.restore_merge_state Overcommit::GitRepo.restore_cherry_pick_state restore_modified_times end
[ "def", "cleanup_environment", "unless", "initial_commit?", "||", "(", "@stash_attempted", "&&", "!", "@changes_stashed", ")", "clear_working_tree", "# Ensure working tree is clean before restoring it", "restore_modified_times", "end", "if", "@changes_stashed", "restore_working_tree...
Restore unstaged changes and reset file modification times so it appears as if nothing ever changed. We want to restore the modification times for each of the files after every step to ensure as little time as possible has passed while the modification time on the file was newer. This helps us play more nicely with file watchers.
[ "Restore", "unstaged", "changes", "and", "reset", "file", "modification", "times", "so", "it", "appears", "as", "if", "nothing", "ever", "changed", "." ]
35d60adb41da942178b789560968e3ad030b0ac7
https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/hook_context/pre_commit.rb#L81-L95
train
Restores the environment object
[ 30522, 13366, 27686, 1035, 4044, 4983, 3988, 1035, 10797, 1029, 1064, 1064, 1006, 1030, 2358, 11823, 1035, 4692, 1004, 1004, 999, 1030, 3431, 1035, 2358, 11823, 2098, 1007, 3154, 1035, 2551, 1035, 3392, 1001, 5676, 2551, 3392, 2003, 4550, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.update_employee_role
def update_employee_role(role_id, body, opts = {}) data, _status_code, _headers = update_employee_role_with_http_info(role_id, body, opts) return data end
ruby
def update_employee_role(role_id, body, opts = {}) data, _status_code, _headers = update_employee_role_with_http_info(role_id, body, opts) return data end
[ "def", "update_employee_role", "(", "role_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_employee_role_with_http_info", "(", "role_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
UpdateEmployeeRole Modifies the details of an employee role. @param role_id The ID of the role to modify. @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 [V1EmployeeRole]
[ "UpdateEmployeeRole", "Modifies", "the", "details", "of", "an", "employee", "role", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L885-L888
train
Update Employee Role Returns the Employee
[ 30522, 13366, 10651, 1035, 7904, 1035, 2535, 1006, 2535, 1035, 8909, 1010, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 10651, 1035, 7904, 1035, 2535, 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...
jekyll/jekyll
lib/jekyll/collection.rb
Jekyll.Collection.collection_dir
def collection_dir(*files) return directory if files.empty? site.in_source_dir(container, relative_directory, *files) end
ruby
def collection_dir(*files) return directory if files.empty? site.in_source_dir(container, relative_directory, *files) end
[ "def", "collection_dir", "(", "*", "files", ")", "return", "directory", "if", "files", ".", "empty?", "site", ".", "in_source_dir", "(", "container", ",", "relative_directory", ",", "files", ")", "end" ]
The full path to the directory containing the collection, with optional subpaths. *files - (optional) any other path pieces relative to the directory to append to the path Returns a String containing th directory name where the collection is stored on the filesystem.
[ "The", "full", "path", "to", "the", "directory", "containing", "the", "collection", "with", "optional", "subpaths", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/collection.rb#L128-L132
train
Returns the directory containing the files in the collection.
[ 30522, 13366, 3074, 1035, 16101, 1006, 1008, 6764, 1007, 2709, 14176, 2065, 6764, 1012, 4064, 1029, 2609, 1012, 1999, 1035, 3120, 1035, 16101, 1006, 11661, 1010, 5816, 1035, 14176, 1010, 1008, 6764, 1007, 2203, 102, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_accounts.rb
Azure::Storage::Mgmt::V2018_03_01_preview.StorageAccounts.delete_management_policies
def delete_management_policies(resource_group_name, account_name, custom_headers:nil) response = delete_management_policies_async(resource_group_name, account_name, custom_headers:custom_headers).value! nil end
ruby
def delete_management_policies(resource_group_name, account_name, custom_headers:nil) response = delete_management_policies_async(resource_group_name, account_name, custom_headers:custom_headers).value! nil end
[ "def", "delete_management_policies", "(", "resource_group_name", ",", "account_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_management_policies_async", "(", "resource_group_name", ",", "account_name", ",", "custom_headers", ":custom_headers", ")",...
Deletes the data policy rules associated with the specified storage account. @param resource_group_name [String] The name of the resource group within the user's subscription. The name is case insensitive. @param account_name [String] The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "the", "data", "policy", "rules", "associated", "with", "the", "specified", "storage", "account", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_accounts.rb#L1449-L1452
train
Deletes the management policies for the specified Data Lake Store account.
[ 30522, 13366, 3972, 12870, 1035, 2968, 1035, 6043, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2968, 1035, 6043, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.unprovision_cluster_with_http_info
def unprovision_cluster_with_http_info(unprovision_fabric_description, timeout:60, custom_headers:nil) unprovision_cluster_async(unprovision_fabric_description, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def unprovision_cluster_with_http_info(unprovision_fabric_description, timeout:60, custom_headers:nil) unprovision_cluster_async(unprovision_fabric_description, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "unprovision_cluster_with_http_info", "(", "unprovision_fabric_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "unprovision_cluster_async", "(", "unprovision_fabric_description", ",", "timeout", ":", "timeout", ",", "custom_headers", ...
Unprovision the code or configuration packages of a Service Fabric cluster. Unprovision the code or configuration packages of a Service Fabric cluster. It is supported to unprovision code and configuration separately. @param unprovision_fabric_description [UnprovisionFabricDescription] Describes the parameters for unprovisioning a cluster. @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.
[ "Unprovision", "the", "code", "or", "configuration", "packages", "of", "a", "Service", "Fabric", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L2488-L2490
train
Unprovisions the specified fabric cluster.
[ 30522, 13366, 4895, 21572, 17084, 1035, 9324, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 4895, 21572, 17084, 1035, 8313, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4895, 21572, 17084, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Examples.batch_with_http_info
def batch_with_http_info(app_id, version_id, example_label_object_array, custom_headers:nil) batch_async(app_id, version_id, example_label_object_array, custom_headers:custom_headers).value! end
ruby
def batch_with_http_info(app_id, version_id, example_label_object_array, custom_headers:nil) batch_async(app_id, version_id, example_label_object_array, custom_headers:custom_headers).value! end
[ "def", "batch_with_http_info", "(", "app_id", ",", "version_id", ",", "example_label_object_array", ",", "custom_headers", ":", "nil", ")", "batch_async", "(", "app_id", ",", "version_id", ",", "example_label_object_array", ",", "custom_headers", ":custom_headers", ")",...
Adds a batch of labeled example utterances to a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param example_label_object_array [Array<ExampleLabelObject>] Array of example utterances. @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.
[ "Adds", "a", "batch", "of", "labeled", "example", "utterances", "to", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb#L158-L160
train
Batch the list of examples in a version of the application.
[ 30522, 13366, 14108, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 2742, 1035, 3830, 1035, 4874, 1035, 9140, 1010, 7661, 30524, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/repos.rb
Github.Client::Repos.list
def list(*args) arguments(args) do permit %w[ user org type sort direction since ] end params = arguments.params unless params.symbolize_keys[:per_page] params.merge!(Pagination.per_page_as_param(current_options[:per_page])) end response = if (user_name = params.delete('user') || user) get_request("/users/#{user_name}/repos", params) elsif (org_name = params.delete('org') || org) get_request("/orgs/#{org_name}/repos", params) elsif args.map(&:to_s).include?('every') get_request('/repositories', params) else # For authenticated user get_request('/user/repos', params) end return response unless block_given? response.each { |el| yield el } end
ruby
def list(*args) arguments(args) do permit %w[ user org type sort direction since ] end params = arguments.params unless params.symbolize_keys[:per_page] params.merge!(Pagination.per_page_as_param(current_options[:per_page])) end response = if (user_name = params.delete('user') || user) get_request("/users/#{user_name}/repos", params) elsif (org_name = params.delete('org') || org) get_request("/orgs/#{org_name}/repos", params) elsif args.map(&:to_s).include?('every') get_request('/repositories', params) else # For authenticated user get_request('/user/repos', params) end return response unless block_given? response.each { |el| yield el } end
[ "def", "list", "(", "*", "args", ")", "arguments", "(", "args", ")", "do", "permit", "%w[", "user", "org", "type", "sort", "direction", "since", "]", "end", "params", "=", "arguments", ".", "params", "unless", "params", ".", "symbolize_keys", "[", ":per_...
List repositories for the authenticated user @example github = Github.new oauth_token: '...' github.repos.list github.repos.list { |repo| ... } List all repositories This provides a dump of every repository, in the order that they were created. @param [Hash] params @option params [Integer] :since the integer ID of the last Repository that you've seen. @example github = Github.new github.repos.list :every github.repos.list :every { |repo| ... } List public repositories for the specified user. @example github = Github.new github.repos.list user: 'user-name' github.repos.list user: 'user-name', { |repo| ... } List repositories for the specified organisation. @example github = Github.new github.repos.list org: 'org-name' github.repos.list org: 'org-name', { |repo| ... } @api public
[ "List", "repositories", "for", "the", "authenticated", "user" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos.rb#L132-L153
train
Get a list of repos
[ 30522, 13366, 2862, 1006, 1008, 12098, 5620, 1007, 9918, 1006, 12098, 5620, 1007, 2079, 9146, 1003, 1059, 1031, 5310, 8917, 2828, 4066, 3257, 2144, 1033, 2203, 11498, 5244, 1027, 9918, 1012, 11498, 5244, 4983, 11498, 5244, 1012, 6454, 4697,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_discount
def create_discount(location_id, body, opts = {}) data, _status_code, _headers = create_discount_with_http_info(location_id, body, opts) return data end
ruby
def create_discount(location_id, body, opts = {}) data, _status_code, _headers = create_discount_with_http_info(location_id, body, opts) return data end
[ "def", "create_discount", "(", "location_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_discount_with_http_info", "(", "location_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
CreateDiscount Creates a discount. @param location_id The ID of the location to create an item for. @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 [V1Discount]
[ "CreateDiscount", "Creates", "a", "discount", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L274-L277
train
Creates a discount for a location
[ 30522, 13366, 3443, 1035, 19575, 1006, 3295, 1035, 8909, 1010, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 3443, 1035, 19575, 1035, 2007, 1035, 8299, 1035, 18558, 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...
rails/sprockets
lib/sprockets/utils.rb
Sprockets.Utils.duplicable?
def duplicable?(obj) case obj when NilClass, FalseClass, TrueClass, Symbol, Numeric false else true end end
ruby
def duplicable?(obj) case obj when NilClass, FalseClass, TrueClass, Symbol, Numeric false else true end end
[ "def", "duplicable?", "(", "obj", ")", "case", "obj", "when", "NilClass", ",", "FalseClass", ",", "TrueClass", ",", "Symbol", ",", "Numeric", "false", "else", "true", "end", "end" ]
Internal: Check if object can safely be .dup'd. Similar to ActiveSupport #duplicable? check. obj - Any Object Returns false if .dup would raise a TypeError, otherwise true.
[ "Internal", ":", "Check", "if", "object", "can", "safely", "be", ".", "dup", "d", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/utils.rb#L17-L24
train
Returns true if the object is duplicable.
[ 30522, 13366, 4241, 24759, 5555, 3468, 1029, 1006, 27885, 3501, 1007, 2553, 27885, 3501, 2043, 9152, 15472, 27102, 1010, 6270, 26266, 1010, 2995, 26266, 1010, 6454, 1010, 16371, 25531, 6270, 2842, 2995, 2203, 2203, 102, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_grant_access
def begin_grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil) response = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil) response = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_grant_access", "(", "resource_group_name", ",", "disk_name", ",", "grant_access_data", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_grant_access_async", "(", "resource_group_name", ",", "disk_name", ",", "grant_access_data", ",", "custom...
Grants access to 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 grant_access_data [GrantAccessData] Access data object supplied in the body of the get disk access operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [AccessUri] operation results.
[ "Grants", "access", "to", "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#L873-L876
train
Grant access to a disk.
[ 30522, 13366, 4088, 1035, 3946, 1035, 3229, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9785, 1035, 2171, 1010, 3946, 1035, 3229, 1035, 2951, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3946, 1035, 3229, 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_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.unprovision_cluster
def unprovision_cluster(unprovision_fabric_description, timeout:60, custom_headers:nil) response = unprovision_cluster_async(unprovision_fabric_description, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def unprovision_cluster(unprovision_fabric_description, timeout:60, custom_headers:nil) response = unprovision_cluster_async(unprovision_fabric_description, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "unprovision_cluster", "(", "unprovision_fabric_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "unprovision_cluster_async", "(", "unprovision_fabric_description", ",", "timeout", ":", "timeout", ",", "custom_head...
Unprovision the code or configuration packages of a Service Fabric cluster. Unprovision the code or configuration packages of a Service Fabric cluster. It is supported to unprovision code and configuration separately. @param unprovision_fabric_description [UnprovisionFabricDescription] Describes the parameters for unprovisioning a cluster. @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.
[ "Unprovision", "the", "code", "or", "configuration", "packages", "of", "a", "Service", "Fabric", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L2466-L2469
train
Unprovision the specified fabric description.
[ 30522, 13366, 4895, 21572, 17084, 1035, 9324, 1006, 4895, 21572, 17084, 1035, 8313, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4895, 21572, 17084, 1035, 9324, 1035, 2004, 603...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/lib/decidim/form_builder.rb
Decidim.FormBuilder.translated
def translated(type, name, options = {}) return translated_one_locale(type, name, locales.first, options.merge(label: (options[:label] || label_for(name)))) if locales.count == 1 tabs_id = sanitize_tabs_selector(options[:tabs_id] || "#{object_name}-#{name}-tabs") label_tabs = content_tag(:div, class: "label--tabs") do field_label = label_i18n(name, options[:label] || label_for(name)) tabs_panels = "".html_safe if options[:label] != false tabs_panels = content_tag(:ul, class: "tabs tabs--lang", id: tabs_id, data: { tabs: true }) do locales.each_with_index.inject("".html_safe) do |string, (locale, index)| string + content_tag(:li, class: tab_element_class_for("title", index)) do title = I18n.with_locale(locale) { I18n.t("name", scope: "locale") } element_class = nil element_class = "is-tab-error" if error?(name_with_locale(name, locale)) tab_content_id = sanitize_tabs_selector "#{tabs_id}-#{name}-panel-#{index}" content_tag(:a, title, href: "##{tab_content_id}", class: element_class) end end end end safe_join [field_label, tabs_panels] end tabs_content = content_tag(:div, class: "tabs-content", data: { tabs_content: tabs_id }) do locales.each_with_index.inject("".html_safe) do |string, (locale, index)| tab_content_id = "#{tabs_id}-#{name}-panel-#{index}" string + content_tag(:div, class: tab_element_class_for("panel", index), id: tab_content_id) do if options[:hashtaggable] hashtaggable_text_field(type, name, locale, options.merge(label: false)) else send(type, name_with_locale(name, locale), options.merge(label: false)) end end end end safe_join [label_tabs, tabs_content] end
ruby
def translated(type, name, options = {}) return translated_one_locale(type, name, locales.first, options.merge(label: (options[:label] || label_for(name)))) if locales.count == 1 tabs_id = sanitize_tabs_selector(options[:tabs_id] || "#{object_name}-#{name}-tabs") label_tabs = content_tag(:div, class: "label--tabs") do field_label = label_i18n(name, options[:label] || label_for(name)) tabs_panels = "".html_safe if options[:label] != false tabs_panels = content_tag(:ul, class: "tabs tabs--lang", id: tabs_id, data: { tabs: true }) do locales.each_with_index.inject("".html_safe) do |string, (locale, index)| string + content_tag(:li, class: tab_element_class_for("title", index)) do title = I18n.with_locale(locale) { I18n.t("name", scope: "locale") } element_class = nil element_class = "is-tab-error" if error?(name_with_locale(name, locale)) tab_content_id = sanitize_tabs_selector "#{tabs_id}-#{name}-panel-#{index}" content_tag(:a, title, href: "##{tab_content_id}", class: element_class) end end end end safe_join [field_label, tabs_panels] end tabs_content = content_tag(:div, class: "tabs-content", data: { tabs_content: tabs_id }) do locales.each_with_index.inject("".html_safe) do |string, (locale, index)| tab_content_id = "#{tabs_id}-#{name}-panel-#{index}" string + content_tag(:div, class: tab_element_class_for("panel", index), id: tab_content_id) do if options[:hashtaggable] hashtaggable_text_field(type, name, locale, options.merge(label: false)) else send(type, name_with_locale(name, locale), options.merge(label: false)) end end end end safe_join [label_tabs, tabs_content] end
[ "def", "translated", "(", "type", ",", "name", ",", "options", "=", "{", "}", ")", "return", "translated_one_locale", "(", "type", ",", "name", ",", "locales", ".", "first", ",", "options", ".", "merge", "(", "label", ":", "(", "options", "[", ":label"...
rubocop:enable Metrics/ParameterLists Public: Generates an form field for each locale. type - The form field's type, like `text_area` or `text_input` name - The name of the field options - The set of options to send to the field Renders form fields for each locale.
[ "rubocop", ":", "enable", "Metrics", "/", "ParameterLists", "Public", ":", "Generates", "an", "form", "field", "for", "each", "locale", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L38-L78
train
Returns translated field
[ 30522, 13366, 5421, 1006, 2828, 1010, 2171, 1010, 7047, 1027, 1063, 1065, 1007, 2709, 5421, 1035, 2028, 30524, 1006, 3830, 1024, 1006, 7047, 1031, 1024, 3830, 1033, 1064, 1064, 3830, 1035, 2005, 1006, 2171, 1007, 1007, 1007, 1007, 2065, 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...